TL;DR
Large Language Models (LLMs) don't use their layers uniformly; instead, they follow a "Guess-then-Refine" framework. Early layers act as statistical guessers, proposing high-frequency tokens (like "the" or "and"), while deeper layers act as contextual integrators that refine these guesses into precise, task-appropriate answers.
What Problem Does This Paper Address?
Despite the ubiquity of LLMs, we still treat their internal computations as a "black box." A major open question in mechanistic interpretability is how these models actually utilize their depth. Do they compute the final answer incrementally across all layers, or do they settle on a prediction early and simply "pass it along"?
Understanding this isn't just academic—it has massive implications for efficiency. If we knew which tokens were "easy" and finished early, we could implement "early exiting" to save massive amounts of compute during inference.
Methods
The authors trace the intermediate representations of several open-weight models (GPT2-XL, Pythia-6.9B, Llama2-7B, and Llama3-8B) using a tool called TunedLens.
Unlike the more common "LogitLens"—which simply applies the final output layer to intermediate states—TunedLens learns a linear transformation for each layer. This allows for a more faithful decoding of what the model "thinks" at any given depth, accounting for the fact that intermediate features often operate in different mathematical subspaces than the final output.
The researchers also employed Activation Patching to causally verify their findings, swapping internal activations between different tasks to see when the model commits to a specific reasoning path.
Datasets
The study utilized a diverse set of benchmarks to test different types of "depth usage":
- English Wikipedia: Used for baseline next-token prediction and frequency analysis.
- MQuAKE: A dataset for multi-hop and multi-token fact recall (e.g., "The Statue of Liberty is located in...").
- MMLU, SST, NLI, and MRPC: Standard benchmarks used to evaluate "fixed-option" downstream tasks like multiple-choice questions and sentiment analysis.
Key Insights and Ideas
- Frequency-Conditioned Onset: In the very first layers, models are essentially "flying blind." Without enough context or access to factual knowledge (which usually resides in middle-to-late MLP layers), the model defaults to corpus statistics. It guesses the most common tokens in the language.
- Refinement is the Rule, Not the Exception: Even when an early layer correctly guesses a high-frequency token, that prediction is "flipped" or refined more than 70% of the time. This suggests that token prediction is an iterative process of increasing precision, rather than a "one-and-done" event.
- The "First Token" Bottleneck: In multi-token fact recall, the first token of an answer requires significantly more depth than the subsequent ones. Once the model "decides" on the first token (the direction of the answer), the following tokens emerge at much shallower layers.
- Two-Phase Reasoning: For tasks like multiple-choice questions, the model operates in two distinct stages:
- Option-Collection: Early layers identify the valid choices (e.g., A, B, C, D) and move them to the top of the probability list.
- Option-Reasoning: Later layers deliberate between those valid choices to pick the final answer.
Key Results
- Statistical Guessing: For Pythia-6.9B, the top 10 most frequent tokens in English make up over 75% of early-layer predictions, despite only accounting for 34% of final predictions.
- Massive Revision: Over 80% of top-ranked predictions in the first layer are eventually replaced by the final layer.
- POS Dynamics: Function words (determiners, adpositions) and punctuation are "finished" by the model much earlier (around layer 5) than content words like nouns and verbs, which often require 20+ layers to stabilize.
- Fact Recall Depth: In a 3-token fact recall task for Pythia, the first token emerges around layer 27, while the second and third tokens stabilize much earlier, at layers 20 and 12 respectively.
Limitations and Future Work
The authors acknowledge that their study focuses primarily on next-token prediction and constrained-choice tasks. While they provide a clear map of how depth is used for "retrieval" and "format identification," the dynamics of complex reasoning (like Chain-of-Thought) remain less clear.
Future work could extend this "Guess-then-Refine" analysis to more recent "reasoning-heavy" models to see if the two-phase process holds up when the model has to "think" before it speaks. Additionally, these insights provide a roadmap for more sophisticated early-exiting strategies that could make LLM inference significantly faster and cheaper.
Summary updated