CORTEXA
← Browse
arxivcs.CLcs.LG2026-07-06

How Much is Left? LLMs Linearly Encode Their Remaining Output Length

Mohamed Amine Merzouk, Dmitri Carpov, Mirko Bronzi, Damiano Fornasiere, Adam Oberman

Large language models generate one token at a time, yet their responses show remarkably consistent length structure: step-by-step solutions converge in predictable token counts, retrievals stop after a few sentences, retractions extend responses by measurable amounts. We ask whether the model carries an internal estimate of how much response remains. Training minimal-capacity linear probes on frozen hidden states of three open-weight 7-8B models across seven completion-style datasets, we find three converging pieces of evidence. First, total response length is linearly decodable from the prompt's last hidden state alone, before any output is emitted. Second, probe directions trained on natural-language datasets transfer broadly, including to controlled synthetic completions never seen in training, outperforming a statistical baseline; the converse direction generally fails, and this asymmetry is itself informative. Third, on curated high-loss completions, the probe's per-position estimate shifts upward at the moment the model retracts and restarts a partial solution, a directional behavior no position-only predictor can reproduce (qualitative, not aggregate). We frame this as approximate estimation of remaining generation length, distinct from exact-counting impossibility results for transformers, and interpret it as evidence that LLMs maintain a plan-like internal representation of output length (decodable, not necessarily used causally).

View free PDFSource page

Related papers

arxivcs.AIcs.CLcs.LGstat.APstat.ML2026-07-02

Online Safety Monitoring for LLMs

Mona Schirmer, Metod Jazbec, Alexander Timans, Christian Naesseth, Maja Waldron, Eric Nalisnick

Despite alignment training, LLMs remain prone to generating unsafe outputs at deployment time. Monitoring outputs online and raising an alarm when safety can no longer be assumed is therefore critical. We study a simple real-time monitor that turns a verifier signal from an exter…

View free PDFSource page
arxivcs.CLcs.IRcs.LG2026-07-11

Transforming LLMs into Efficient Cross-Encoders via Knowledge Distillation for RAG Reranking

Shreeya Dasa Lakshminath, Shubhan S

Cross-encoders achieve high reranking accuracy in Retrieval-Augmented Generation (RAG) pipelines but impose quadratic inference costs that limit real-time deployment. We address this by fine-tuning LLaMA 3 (8B) as a drop-in reranker using a two-stage pipeline: supervised fine-tun…

View free PDFSource page
arxivcs.CLcs.AIcs.CEcs.LG2026-06-26

Enhancing Numerical Prediction in LLMs via Smooth MMD Alignment

Zhuo Zuo, Li Yue, Wenhao Zheng, Chenpeng Wang, Xianggen Liu

Despite their strong general capabilities, large language models (LLMs) often remain unreliable when outputs must be numerically precise. A key reason is the training objective: standard cross-entropy treats numeric tokens as unstructured categories and ignores the metric structu…

View free PDFSource page
arxivcs.CLcs.LG2026-07-06

Knowledge Knows, Verbalization Tells: Disentangling Latent Directions for Mathematical Solvability in LLMs

Nikolaos Xiros, Maria-Eleni Zoumpoulidi, Georgios Paraskevopoulos

Although LLMs have made significant progress in mathematical reasoning, determining whether a mathematical problem is solvable remains a fundamental yet challenging capability. While recent studies have probed internal representations of model solvability beliefs, verbalization h…

View free PDFSource page
arxivcs.CLcs.AIcs.LG2026-07-05

Beyond Multilingual Averages: MTEB-PT, a Benchmark for Portuguese Sentence Encoders

Lucas Hideki Takeuchi Okamura, Alexandre Alcoforado, Anna Helena Reali Costa

Portuguese remains underrepresented in text embedding evaluation, despite being one of the most widely spoken languages in the world. As a result, embedding models are often selected based on English or multilingual metrics, while their effectiveness in Portuguese remains unclear…

View free PDFSource page
arxivcs.CRcs.CLcs.LG2026-07-11

One Token Is Enough: Fingerprinting and Verifying Large Language Models from Single-Token Output Distributions

Tomas Bruckner

Large language models (LLMs) are increasingly consumed through opaque serving chains - API aggregators, resellers, and inference providers - in which the client has no technical means to confirm that the model answering is the model advertised, and recent audits show that a subst…

View free PDFSource page