acceptodds
Under review as a conference paper at ICLR 2027

Before the First Token: A Shared Causal Subspace for Response-Length Planning in LLMs

Abstract

Large language models (LLMs) often produce responses of markedly different lengths across prompts and instructions, yet it remains unclear whether response length is explicitly planned before decoding and, if so, how such plans are represented internally. We investigate pre-generation response-length planning in LLMs. We first show that future response length is encoded before the first generated token: controlled length perturbations induce persistent changes in response length even when the explicit length signal is unavailable during subsequent decoding, supporting the existence of a pre-generation planning state rather than a purely autoregressive length effect. We then introduce a cross-replicated trajectory analysis that isolates within-prompt representation changes associated with actual response length and identifies components that generalize across instruction paraphrases and families. This analysis reveals a highly reproducible, low-dimensional shared subspace with a dominant length-related axis and additional nonlinear trajectory structure. We further establish its causal role by decomposing hidden-state interventions into components parallel and orthogonal to the learned subspace. The parallel component preserves most of the bidirectional length-transfer effect of the full intervention, whereas the orthogonal component has substantially weaker effects. Moreover, train-derived subspace displacements systematically shorten or lengthen responses for held-out prompts without explicit length instructions and transfer across prompts. Together, these results suggest that response length is not merely an emergent consequence of autoregressive decoding, but is partly governed by a shared, low-dimensional internal control geometry established before generation begins.

Primary area:
interpretability and explainable AI
Keywords:
Interpretability, Explainable AI, LLMs

Reviews

Among:
Shape:
1234this paper, Bottom 2%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.33 over 3 reviews, above 2% of the others.
Reviewer_qXD2OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper asks whether Llama-3.1-8B-Instruct forms an internal representation of response length before generating its first token. The authors conducted experiments including (1) hiding the length instruction from the model during generation after it has been read, (2) copying internal states from a prompt with a length instruction into one without it to find where length information is stored, (3) swapping the first few generated tokens between the two prompts, (4) extracting a low-dimensional “length direction” from internal states, and (5) adding this direction to new prompts that contain no length instruction. They find that length information is stored mainly at the chat-template tokens between the user message and the response, in the middle layers, and that changing these states before generation makes responses shorter or longer.

Critical strengths
  • Each alternative explanation is tested directly. The paper lists three alternatives at the start (the model re-reads the instruction while generating, the instruction only changes the first tokens, or the internal states are correlated with length but do not cause it) and runs a separate experiment for each.
  • The controls are well chosen. The extracted direction is compared with random directions of the same size, a direction outside the extracted space, and changing the full internal state. The effect also holds when the first 16 response tokens are fixed.
  • The extraction method reduces the influence of topic and wording. The length direction is estimated only from changes within the same prompt, and only the part shared by two differently worded instruction sets is kept.
Critical weaknesses

W1. The scope of models, prompts, and settings is narrow.

  • One model: All experiments use Llama-3.1-8B-Instruct. There are no other model families, no other sizes within the Llama family, and no base model. Since the question of whether language models plan before generating is general, a single 8B model is a significant limitation.
  • One prompt source with no breakdown by task type: All prompts come from UltraChat, and results are not broken down by the kind of request (e.g., explanation, list, creative writing, coding). Natural response length varies strongly with task type, so it is unclear whether the effect holds uniformly or is driven by particular kinds of prompts.
  • One decoding setting: All generations use greedy decoding. Whether the effect survives sampling, which is how models are typically used, is untested.
  • One language and one chat template: The localization result depends on the specific template tokens of Llama-3.1, so it is unclear how it transfers to other templates.

The authors acknowledge these limitations, but they substantially restrict what the paper establishes.

W2. The results show that length information is stored before generation, but not that the model plans the length in advance.

The masking experiment hides only the tokens of the length instruction. The template positions (C1–C5) have already read the instruction during prefill, and the model attends to these positions again at every step of generation. The model may therefore simply store the requested length at C1–C5 and look it up while generating. This is different from deciding the length before generation begins, which is what the title and abstract suggest. The intervention experiment has the same issue: changing C5 changes what the model looks up during generation. To distinguish the two, the authors could restore the original C5 states after the first few generated tokens. If the change in length persists, the length was set early; if it disappears, the model relies on C5 throughout generation. Otherwise, the claim of a "plan" should be softened.

W3. Prior work on length steering is not discussed, and the new method is not compared with simpler ones.

Previous work has already shown that adding vectors to a model’s internal states can change response length or verbosity (Stolfo et al., 2024, "Improving Instruction-Following in Language Models through Activation Steering"; Azizi et al., "Activation Steering for Chain-of-Thought Compression"), but neither is cited. The main new contribution is therefore showing where and when length information forms, not that length can be steered, and the paper should state this clearly. In addition, the proposed extraction method is not clearly better than a simpler one. The authors should test whether a simpler direction, such as the difference between prompts asking for brief and detailed answers, has a similar effect when applied in the same way.

Questions for authors

Does a similar pre-generation length representation exist for reasoning? For example, with chain-of-thought prompting or models that produce a reasoning trace before the final answer, does the state at the template positions also predict and control the length of the reasoning, and does it separate the length of the reasoning from the length of the final answer?

Reviewer_FxjKOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper studies whether Llama-3.1-8B-Instruct plans its response length before generation. Using decode-time masking, activation patching, and response-prefix experiments, the authors try to show that length information is mainly stored at the post-user template positions in the middle layers. They then extract a cross-replicated length trajectory and use it for activation steering to control response length.

Critical strengths

The paper is easy to follow. The authors tried to understand response length planning through extensive experiments. I appreciate the authors’ efforts.

Critical weaknesses

My main concerns are unconvincing experiments and rather limited contributions:

  1. The masking experiment (Section 4.1) cannot eliminate the hypothesis that the model rereads the length instruction during decoding. The length instruction is fully visible during prefill. Only the attention from the decoded tokens to length instruction is set to zero during decoding. During prefill, the other input tokens have already attended to the length instruction, and their encodings remain visible during decoding. The model can therefore still access the length information through these positions during decoding.

  2. The hypothesis tested in the prefix experiment (Section 4.4) is of limited significance. When the instruction is present in the input (C_T + Z_0), it is expected that most of the length effect is retained. The result mainly confirms that response length is determined by the instruction, which is expected, and the experiment adds little beyond this.

  3. The extraction of a length direction (Section 5–6) has limited novelty. Responses of different lengths have different representations, and the paper extracts a direction from these representations to steer the model. This follows standard activation steering, an established line of work. The contribution is therefore largely an application of existing methods to response length.

Questions for authors

See Weaknesses.

Please consider citing https://proceedings.mlr.press/v267/dong25p.html, which studies exactly the response planning phenomenon, with length planning one of the core motivating examples.

Reviewer_vwaKOpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper investigates length control in LLM generation from a mechanistic perspective by analyzing the model's internal behavior. Through experiments using a single LLM across a few hundred prompts, the authors aim to indicate that target length information is encoded within the model's hidden representations before decoding.

Critical strengths

Investigating how LLMs internally represent and regulate output length through controlled experiments is interesting for model interpretability and controllable generation.

Critical weaknesses
  • Incomplete Manuscript: In its current state, the paper reads as an early work-in-progress rather than a complete, publication-ready manuscript.
  • Limited Experimental Scope: The empirical evaluation is restricted to a single LLM and a small dataset of only a few hundred prompts. This scale is insufficient to draw generalizable conclusions or robustly support the paper's claims across different model families, sizes, or prompts.
  • Limited Novelty and Technical Insight: It is already well established in the interpretability literature that an LLM's hidden states encode input instructions and task constraints. Beyond confirming that length constraints are detectable in the hidden states, the paper offers limited novel insights into how this representation causally governs generation termination or how it can be leveraged to improve length control in practice.
Questions for authors

See weaknesses.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.