Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in solving complex problems, often attributed to "Chain-of-Thought" (CoT) prompting where models are encouraged to output intermediate reasoning steps. However, a fundamental question remains: when no explicit reasoning is requested, does the model still process information in stages internally? This paper investigates the existence of an "internal chain-of-thought," proposing that LLMs perform layer-wise subtask scheduling by decomposing complex instructions into sequential subtasks handled at different network depths.
Methodology
To uncover these internal dynamics, researchers utilized four complementary interpretability techniques:
- Layer-wise Context-Masking: Progressively blocking access to in-context demonstrations at specific layers to identify where subtask abstractions are formed.
- Cross-task Patching: Extracting "task vectors" from composite tasks and applying them to zero-shot prompts to test the modularity and reusability of internal representations.
- LogitLens Decoding: Projecting intermediate hidden states into the vocabulary space to observe the evolution of the model's "thoughts" layer by layer.
- Causal Intervention: Swapping internal representations of intermediate results to confirm direct functional dependencies between subtasks.
The Sequential Nature of LLM Reasoning
The core finding of this research is the observation of "X-shape" dynamics in model accuracy during context-masking experiments. As the model processes a composite task (e.g., "find the antonym and capitalize it"), middle layers typically represent the intermediate result (the lowercase antonym), while later layers transform this into the final output (the capitalized antonym).
LogitLens decoding further supports this "subtask handoff." For instance, the probability of an intermediate answer like "slow" peaks in the middle layers before being overtaken by the final answer "Slow" in the final stages of the network. This suggests that the transformer architecture is not solving the problem in a single monolithic leap but is instead passing refined information up the stack.
Consistency Across Architectures
This layer-wise execution pattern is not an isolated quirk of a single model. Testing across Llama-3.1-8B, Mistral-7B, Qwen2.5-7B, and Llama-3.2-3B revealed consistent sequential learning dynamics. Across a variety of composite tasks—ranging from knowledge retrieval to algorithmic manipulation—the transition from subtask 1 to the final composite result followed a predictable layer-wise progression.
Key Results and Causal Evidence
- Transferability: Task vectors extracted from composite prompts successfully boosted performance on simpler subtasks with an average strength of 66%, proving that internal representations are abstract and reusable.
- Causal Proof: Causal intervention experiments confirmed that the second subtask is functionally dependent on the first. By swapping the internal representation of an intermediate result, researchers could predictably shift the model's final output.
- Formatting Latency: On the TRACE benchmark, which involves complex instruction following, the researchers found that content-related constraints are processed gradually, whereas output formatting constraints (like JSON or LaTeX) are typically resolved very late, between layers 17 and 20.
Conclusion and Future Directions
The discovery of internal subtask scheduling provides a new lens for understanding LLM behavior. While current models exhibit a clear sequential flow, the researchers noted that conceptual similarity between subtasks can make these dynamics harder to disentangle. Future work may leverage these insights for "instruction-level activation steering," allowing for more precise control over model behavior—such as enforcing safety constraints—by targeting specific layers without compromising overall performance.
Summary updated