CORTEXA
← Browse
arxivcs.CLcs.AI2026-07-01

Recovering Input Text from Hidden States: Study of Gradient-Based Inversion of Decoder-Only Language Models

Mikołaj Słowikowski, Maciej Witold Majewski

This work studies the hidden-state inversion problem: recovering the original input token sequence of a decoder-only language model from its last-layer hidden states. Rather than treating inversion as a one-shot reconstruction, we study it as a continuous embedding-space optimisation in which a soft proxy is driven towards the leaked target without any hard-token projection during the search, and a token is committed only once, at the end of the inner loop. This design choice has two consequences which are the main focus of this paper. First, keeping the optimisation entirely in continuous space exposes a rich set of internal signals: rank trajectories of the ground-truth token, per-position loss curves, and a discrete loss measured at commit time. Second, the discrete loss allows assessing the correctness of recovery via cumulative discrete loss. We further analyse which tokens break the reconstructions and find a sharp categorical asymmetry: space-prefixed, high-frequency function words in dense regions of the embedding matrix dominate the failures, while content-bearing tokens are recovered almost perfectly. On 10-token C4 prompts the exact-match rate rises from 66.9% to 97.5% (mean similarity 0.994) as the candidate window is widened, confirming that most errors are recoverable near-misses rather than genuine ambiguities. A comparison with the released SIPIT reference situates these findings: per-step hard projection is faster, but the continuous formulation is what makes the optimisation observable and its failures detectable. The results show that last-layer hidden states of GPT-2 are as sensitive as the original text.

View free PDFSource page

Related papers

arxivcs.CLcs.AIcs.CVcs.LG2026-07-07

Gradient-Based Speech-to-Text Alignment for Any ASR Model: From CTC to Speech LLMs

Albert Zeyer, Ralf Schlüter, Hermann Ney

Speech-to-text alignment means finding the temporal boundaries of each word in the audio. Some models provide such an alignment directly and others do not. Connectionist temporal classification (CTC) and transducer models have an alignment by construction, whereas attention-based…

View free PDFSource page
arxivcs.CLcs.AIcs.PL2026-07-09

TypeProbe: Recovering Type Representations from Hidden States of Pre-trained Code Models

Giuliano Gorgone, Fausto Carcassi

State-of-the-art code models achieve impressive performance, yet the extent to which they internally encode type information remains poorly understood. We probe the residual streams of pretrained code models for internal type representations using a parallel dataset of Java and P…

View free PDFSource page
arxivcs.AIcs.CL2026-07-11

SPARK: Susceptibility-Guided Profiling and Steering of Latent Reasoning States in Large Language Models

Dongxu Zhang, Yiding Sun, Zihao Guo, Xiangyang Yang, Kai Tang, Lin Chen, et al.

Reasoning failures in large language models (LLMs) are usually evaluated from final answers, but a wrong answer does not reveal why the model failed. The same incorrect output may reflect missing capability, an unstable reasoning trajectory, or a failure to activate a reasoning s…

View free PDFSource page
arxivcs.CLcs.AI2026-06-26

From Signals to Transfer: A Factorised Study of Probe-Based Uncertainty Estimation in Large Language Models

Ponhvoan Srey, Xiaobao Wu, Cong-Duy Nguyen, Quang Minh Nguyen, Duc Anh Vu, Anh Tuan Luu

Probe-based uncertainty estimation (UE) has emerged as a prominent approach to detect hallucinations in Large Language Models (LLMs) by learning uncertainty from internal model signals. Yet, recent methods vary simultaneously across feature design, training data construction, and…

View free PDFSource page
arxivcs.CLcs.AI2026-07-12

Unlocking Parallelism in Autoregressive Language Models via Speculative Decoding with Progressive Tree Drafting

Zipeng Gao, Zhi Zheng, Qingrong Xia, Junda Lin, Ziwei Zhao, Tong Xu, et al.

Speculative decoding has significantly accelerated Large Language Model (LLM) inference by alleviating memory-bound bottlenecks. However, traditional speculative decoding typically relies on auxiliary draft modules, incurring significant training and communication overhead. Altho…

View free PDFSource page