TL;DR
Even though Large Language Models (LLMs) generate text one word at a time without an explicit "fuel gauge," their internal states linearly encode how many tokens are left in their response—even before the first output word is generated. When a model second-guesses itself (emitting a word like "Wait"), this internal estimate jumps upward, and researchers can actively dial response lengths up or down simply by nudging the model along this newly discovered internal direction.
What Problem Does This Paper Address?
When you talk to an LLM, does it already have a rough commitment to how much it's going to say before it begins, or is it purely improvising token-by-token? Beyond satisfying our curiosity, this "commitment question" matters for AI safety—for instance, helping us detect "decorative reasoning," where a model pretends to rethink an answer in its chain-of-thought without actually changing its trajectory.
Previous research in batch scheduling showed that you can statistically guess output length using complex, nonlinear neural networks. However, a complex probe might be computing the length for the model from weak clues. To prove the LLM itself maintains an explicit, accessible representation of remaining length, you have to show it can be read out with the simplest possible tool: a single linear layer.
Methods
The authors freeze several instruction-tuned LLMs (primarily 7B–8B parameter models like Llama-3.1-8B, Olmo-3-7B, and Mistral-7B, plus Qwen3-4B and 32B for targeted tests) and attach linear probes—essentially linear regressions—directly to the models' hidden states (concatenated across all layers in the residual stream).
They compare three setups, evaluated by Mean Absolute Error (MAE) in tokens on naturally terminated sequences:
- Constant-median baseline: Always guesses the dataset's median remaining length—the mathematically strictest constant guess under MAE.
- Completion Length Probe (Prompt-only): Reads the very last token of the prompt to predict total length $T$, then blindly counts down by 1 as each token is generated.
- Remaining Count Probe: Reads the hidden state at every generated token to dynamically estimate how much text is left.
Finally, they test activation steering: taking the learned probe weights at a single layer and adding or subtracting that vector directly into the model's residual stream during generation to see if it controls verbosity.
Datasets
To test both in-distribution accuracy and cross-dataset generalization, the authors evaluate across seven datasets:
- Two synthetic datasets: Count and Countdown, where prompts explicitly instruct the model to count up or down to a number $n \in [0, 300]$, making target length deterministic.
- Five natural-language benchmarks: Spanning short factual retrieval to long reasoning traces—TriviaQA, GSM8K, MATH, MMLU-Pro, and OpenThoughts-1k.
Key Insights and Ideas
- Before speaking, the model already has a ballpark length: Total output length is linearly decodable from the prompt's final hidden state across every model and dataset tested.
- The estimate updates on the fly: Because the per-token probe isn't forced to count down monotonically, it adapts. In most model-dataset pairs, reading mid-generation states beats blindly counting down from the initial prompt estimate.
- Self-correction triggers a sudden "time extension": When a model catches a mistake and emits a retraction token ("Wait"), its internal estimate of remaining tokens spikes upward—offering a clean, quantitative signature of genuine mid-flight course correction.
- Generalization is a one-way street: Probes trained on messy, natural-language reasoning transfer surprisingly well to other datasets (even synthetic counting tasks), whereas probes trained on synthetic counting fail completely on natural language.
- The representation can steer behavior: Pushing the hidden state along the probe's vector smoothly lengthens or shortens completions without wrecking text quality (measured via negative log-likelihood).
Key Results
- Prompt-end & per-token accuracy: On natural-language tasks, the Completion Length Probe achieves 0.57 to 0.88 of the constant-median baseline's error. During generation, the Remaining Count Probe beats the baseline in all 20 model-dataset cells, and beats the prompt-only countdown by >1 token in 13 of them.
- Asymmetric transfer: Pooled across models, natural-language probes beat the target dataset's baseline floor in 29 of 44 off-diagonal transfer tests (and 10 of 18 natural-to-synthetic tests). Synthetic-trained probes succeed in 0 of 22 synthetic-to-natural tests.
- The "Wait" jump: On Qwen3-4B solving GSM8K, emitting "Wait" causes the predicted remaining length to jump by an average of +72.8 tokens, compared to -0.7 tokens at matched control positions ($p < 10^{-4}$, Cohen's $d = 3.10$).
- Monotonic steering: Steering Llama-3.1-8B at layer 24 on GSM8K shifts average response lengths monotonically from 155 tokens (negative steering) to 283 tokens (positive steering), compared to 227 tokens unsteered, while keeping cutoff rates $\le 2.1\%$.
Limitations and Future Work
- Decodable $\neq$ causal in the wild: Steering proves the model can be controlled via this direction, not that the unperturbed model naturally consults it to decide when to stop. Proving natural usage requires activation patching or ablation, along with random-direction steering controls.
- Token identity confounds: The retraction analysis only examined the word "Wait" in one cell (Qwen3-4B / GSM8K) without controlling for token identity—meaning the probe might just assign a high static weight to the token "Wait" itself rather than reading deeper planning states.
- Task accuracy & filtering: Steering experiments tracked fluency (log-likelihood), not whether the math answers remained correct. Additionally, training only on naturally terminated sequences filtered out up to 37.5% of long generations on datasets like OpenThoughts-1k. Exploring base models and frontier-scale architectures remains open for future work.
Summary updated