Source-linked AI summary

Do Language Models Use Their Depth Efficiently?

Róbert Csordás, Christopher D. Manning, Christopher Potts

arXiv:2505.13898v3cs.LGcs.AIcs.NE

TL;DR

The paper asks whether increasing Transformer depth enables new higher-order computations or merely distributes similar computation across more layers. It analyzes residual-stream contributions, layer interventions, input-complexity effects, and cross-depth representations, finding that deeper models largely refine existing computations rather than compose qualitatively new ones.

  • Problem

    The paper investigates whether deeper LLMs use their additional layers for higher-order feature composition or spread similar computations across more layers.

  • Method

    The authors analyze residual-stream contributions, causal layer interventions, computation depth across problem complexity, and mappings between shallow and deep model representations.

  • Results

    The findings indicate that later layers contribute less, have smaller effects on future computations, do not become more engaged for harder problems, and mainly refine existing representations.

  • Takeaways & Limitations

    Deeper models appear to spread similar computations across more layers rather than using added depth for new kinds of computation.

  • Takeaways & Limitations

    The paper notes that cosine-similarity analyses may miss new features written alongside erasing or strengthening operations, and that superposition may limit the method’s intuition.

Abstract

from arXiv · show

Modern LLMs are increasingly deep, and depth correlates with performance, albeit with diminishing returns. However, do these models use their depth efficiently? Do they compose more features to create higher-order computations that are impossible in shallow models, or do they merely spread the same kinds of computation out over more layers? To address these questions, we analyze the residual stream of the Llama 3.1, Qwen 3, and OLMo 2 family of models. We find: First, comparing the output of the sublayers to the residual stream reveals that layers in the second half contribute much less than those in the first half, with a clear phase transition between the two halves. Second, skipping layers in the second half has a much smaller effect on future computations and output predictions. Third, for multihop tasks, we are unable to find evidence that models are using increased depth to compose subresults in examples involving many hops. Fourth, we seek to directly address whether deeper models are using their additional layers to perform new kinds of computation. To do this, we train linear maps from the residual stream of a shallow model to a deeper one. We find that layers with the same relative depth map best to each other, suggesting that the larger model simply spreads the same computations out over its many layers. All this evidence suggests that deeper models are not using their depth to learn new kinds of computation, but only using the greater depth to perform more fine-grained adjustments to the residual. This may help explain why increasing scale leads to diminishing returns for stacked Transformer architectures.

1 Introduction

The paper asks whether deeper LLMs use extra layers for higher-order composition or merely distribute similar computations across more layers. Its analyses suggest that current models underuse their second half, mainly refining token probabilities rather than building more complex computations.

  • Research question: The central question is whether deeper models compose more features or spread similar computations across additional layers.This question motivates the paper’s analysis of residual-stream processing and layer interactions.
  • Approach: The study analyzes residual-stream contributions, layer skipping, downstream sensitivity, and related computations across Llama, Qwen, and other models.The supplied introduction describes a multi-part analysis focused mainly on math tasks and Llama models, with supplementary Qwen analyses.
  • Findings: The second half of the network contributes less and has weaker effects on future computations, suggesting that these layers mainly refine the current token’s probability distribution.The introduction reports a drop in contribution and limited impact from skipping later layers.
  • Motivation: Depth correlates with better performance in open language models, even after controlling for other scale-relevant factors.The introduction frames depth as a potential source of additional computation and compositional capability.
  • Conclusion: Overall, the findings suggest that deeper models spread similar computations across more layers instead of learning substantially more complex computations.The paper links this underuse of depth to diminishing returns from scaling stacked Transformers.

2 Background

The paper treats the residual stream as the additive state updated by attention and MLP sublayers. It uses these updates to quantify layer contributions and examines how their influence changes across depth.

  • Transformer structure: A pre-layernorm Transformer layer updates the residual stream through additive self-attention and MLP outputs.The residual stream contains token representations, while attention and MLP outputs provide the sublayer contributions.
  • Notation: The residual stream h_l has shape T × d_model, with T denoting sequence length and d_model denoting residual-stream width.The attention and MLP outputs share this representation shape.
  • Output computation: The model initializes the residual stream from token embeddings and produces output probabilities by applying softmax to final output logits.The logits are obtained from the normalized final residual through the output classifier.
  • Observed depth pattern: For Llama 3.1 70B, later layers change the residual less, with a sharp middle-of-network phase transition in contribution direction and magnitude.The figure reports both relative contribution norms and cosine similarity between contributions and the residual.
  • Contribution measure: A layer’s residual contribution is a_l + m_l = h_{l+1} − h_l, while attention and MLP contributions are measured separately as a_l and m_l.This additive decomposition provides the paper’s operational measure of how much each layer changes the residual stream.

3 Experiments

Across residual-stream, layer-skipping, reasoning-depth, and cross-model analyses, the experiments indicate that later layers contribute less to downstream computation and mainly refine current predictions. Deeper models appear to spread similar computations across more layers rather than learning qualitatively new computations.

  • 3.1 How do the Layers Interact With the Residual Stream?: The relative contribution of layers drops sharply around the network midpoint, especially for attention, with only the final few layers increasing again.The first half shows consistent contributions; the second half contributes less to the residual stream.
  • 3.1 How do the Layers Interact With the Residual Stream?: A phase transition near the midpoint changes layer behavior from predominantly erasing residual information to strengthening existing features.The first layer primarily integrates neighboring-token context, followed by refinement and erasure before the later strengthening phase.
  • 3.2 How do the Layers Influence Downstream Computations?: Skipping second-half layers has little effect on future computations or future-token predictions, although those layers remain important for the current output.The results suggest early layers integrate information and build on one another, while later layers independently refine the current probability distribution.
  • 3.2 How do the Layers Influence Downstream Computations?: Logitlens comparisons show that the second half incrementally refines the predicted probability distribution rather than performing a new kind of computation.Prediction refinement begins near the same phase transition where later-layer influence on future predictions declines.
  • 3.3 Do Deeper Problems Use Deeper Computation?: Across arithmetic, two-hop reasoning, MATH difficulty levels, and MQuAKE hop counts, the experiments find no evidence that later computation uses increasing depth to compose subresults.The second half shows minimal effect in residual-erasure analyses, and measured computation depth is independent of problem difficulty and hop count.
  • 3.4 Do Deeper Models Perform New Computations?: Linear maps from Qwen 2.5 1.5B to 14B activations achieve their best correspondence between layers at the same relative depth, indicating stretched-out computation.This supports the interpretation that deeper models perform similar computations in smaller steps rather than entirely new computations.

4 Related Work

Prior work finds Transformers broadly robust to layer interventions, with math-related tasks as a notable exception. Because math is expected to require composing subresults across layers, this paper focuses on it but finds no evidence for deeper compositions.

  • Lad et al. describe inference stages including detokenization, feature engineering, prediction ensembling, and residual sharpening.
  • Prior studies report that models are generally robust to layer skipping, swapping, and parallelization interventions.
  • Math-related tasks, including GSM8K, are a consistent exception to this intervention robustness.
  • Math is expected to require many Transformer layers because composing subresults requires depth proportional to the computation graph.
  • The paper therefore focuses on math-related tasks but finds no evidence for deeper compositions.

5 Discussion

The discussion argues that later layers often refine token probabilities rather than construct higher-level features or dynamically compose subproblems. It connects these findings to Chain of Thought and latent-space thinking, while noting unresolved architectural and training explanations.

  • Later layers often refine the final probability distribution instead of constructing higher-level features for downstream computations.The discussion notes that only the top few token probabilities may matter for downstream tasks, making extensive distribution matching appear inefficient.
  • The models show no evidence of shifting computation deeper for more complex problems, instead using fixed circuits and fixed computation budgets.
  • Chain of Thought provides compositional processing by moving intermediate computation into input/output space with recurrence between steps.
  • The interpretation of fixed-depth computation creates uncertainty for latent-thinking methods: the problem may arise from pretraining objectives or architecture.

6 Conclusion

The paper finds that later Transformer layers contribute little new computation, processing depth does not adapt to input complexity, and deeper models spread similar computations across more layers. It calls for architectures and training objectives that use deep layers more efficiently.

  • Causal interventions indicate that second-half layers do not further build on intermediate representations computed earlier.
  • Processing depth does not change with input complexity, providing no evidence that models dynamically compose increasingly complex computations.
  • Layers at matching relative positions correspond most strongly across shallow and deep models, indicating that deeper models spread similar computations across more layers.
  • The paper calls for architectures and training objectives that leverage deep layers more efficiently.

A Limitations

The paper’s conclusions are based on case studies and leave several questions unresolved. Its evidence supports depth-related findings for selected models, but broader verification and explanation remain future work.

  • The study is a case study of multiple Llama and Qwen models, so its findings may not hold for other model types.
  • The paper does not explain how models solve problems without computation that depends on problem complexity.
  • The cross-model conclusion that depth is used inefficiently should be verified on different and deeper models.
  • The analysis of computation correspondence to parse trees relies on manual study of individual trained models.
  • The authors present their findings as novel evidence about high-level LLM inner workings and as motivation for future improvement research.
  • Depth is highly significant in a regression over 132 base models, although the paper reports that models do not seem to use depth efficiently.

C Robustness Analysis

Robustness checks extend the main experiments across more examples and a second math dataset. They also examine variability among individual examples when quantifying layer importance.

  • Robustness analyses repeat the residual-stream, layer-skipping, and Logitlens experiments with more samples and the Math dataset.
  • Four examples show variability in layer-skipping effects, motivating use of the maximum effect to quantify overall layer importance.

D Results on Other Models

Results on additional models largely reproduce the main residual-stream findings, while neighboring-layer similarity reflects Transformer anisotropy and masks richer contribution structure.

  • Performance improves with the number of layers on HELM Lite, similarly to the Open LLM Leaderboard.
  • Llama 3.1 8B, Qwen 3, and OLMo 2 show results similar to the main residual-stream contribution findings.
  • Neighboring layers have very high cosine similarity, often close to 1, consistent with known Transformer anisotropy.
  • Math and GSM8K robustness plots report contribution norms and cosine similarities for layers and sublayers, with findings consistent with Fig. 2.
  • Despite neighboring-layer similarity, comparing residual streams with layer and sublayer contributions reveals richer structure.

D.2 How do the Layers Influence Downstream Computations?

Downstream-computation analyses find broadly similar depth-use patterns across models, with notable differences in Qwen 3 and OLMo 2. Additional experiments examine layer interactions, predictions, and fine-tuning.

  • Instruction tuning does not influence the observed behavior, while the effect is less pronounced but still present in Qwen 3 models.
  • Qwen 3 32B begins integrating information from past timesteps around layer 40, including a layer that composes information from many previous steps.
  • Qwen models use more layers but appear to use a fixed number independently of computation depth, while OLMo 2 shows weaker depth dependence.
  • The depth-score findings on MATH and MQuAKE for Llama 3.1 8B and Qwen 3 match the main Sec. 3.3 results.
  • The Qwen 2.5 model pair was selected because its smaller size fit both models on one A6000 GPU and provided a larger layer-count difference.
  • Fine-tuning appears to increase computation depth, but instance-level analysis finds mostly marginal effects limited to the last 1–2 tokens before prediction.

E Details on the DeepMind Math Training

The experiments fine-tune or pretrain models on the arithmetic subset of the DeepMind Math dataset using a question–answer formatting template. Multiple examples are concatenated to fill the context window without splitting examples.

  • The training data consists of files in the DeepMind Math train set whose names begin with “arithmetic_”.
  • Each example is formatted as “Q: question A: answer” before being passed to the network.
  • Examples are concatenated with whitespace to fill the context window, while incomplete examples are preserved and the remaining space is padded.

F Extended Related Work

Related work connects residual-stream behavior, layer skipping, feature-building mechanisms, and causal interventions to questions about efficient depth use. The cited figures and studies motivate examining whether later layers build new computations or mainly refine existing representations.

  • Residual-stream efficiency: Prior studies report marginal improvements in the second half of Transformer layers, robustness to layer skipping or swapping, and partial layer removal with task-dependent effects.
  • Additional analyses: The cited appendix figures examine layer contributions, residual norms, cosine similarities, output-prediction effects, and cross-model behavior across Llama, Qwen, and OLMo 2.
  • Multi-layer mechanisms: Interpretability research has identified multi-layer mechanisms such as induction heads, successor heads, copy suppression, and circuits for addition.
  • Composition: The paper states that it finds no evidence of higher-level conditional composition in which mechanisms combine variably to compute more complex functions.
  • Causal analysis: Causal intervention methods are presented as a way to test hypothesized mechanisms directly and reduce reliance on accidental surface correlations.

G Hardware Resources

The appendix combines remote and local hardware for experiments across models and analyses. It reports additional layer-contribution, prediction, intervention, and residual-erasure results for Llama, Qwen, and OLMo 2 models.

  • Hardware resources: Training each model for the Sec. 3.5 experiments uses two Nvidia A100 80GB GPUs for two days.
  • Hardware resources: Full-finetuning Llama 3.1 3B on the DeepMind Math Dataset uses four Nvidia H200 GPUs for 10 hours.
  • Hardware resources: Training the linear maps between Qwen model layers uses A6000 GPUs and takes 80 GPU-days in total.
  • Appendix analyses: Appendix analyses compare layer contributions, future-token effects, local inter-layer effects, Logitlens predictions, and residual erasure across Llama, Qwen, and OLMo 2 models.The included figures cover GSM8K, basic arithmetic, and two-hop reasoning analyses.
  • Appendix analyses: Intervention and attribution figures examine future predictions, local layer effects, integrated gradients, probability-difference norms, and residual erasure across model sizes.
Loading 2505.13898v3…