The Unreasonable Ineffectiveness of the Deeper Layers

Andrey Gromov, Kushal Tirumala, Hassan Shapourian, Paolo Glorioso, Dan Roberts · DOI

TL;DR

This paper investigates how knowledge is stored in Large Language Models (LLMs) by systematically removing layers and observing the impact on performance. Surprisingly, they found that a significant fraction of the deepest layers (up to half) can be removed with minimal degradation on question-answering tasks, suggesting that current pretraining methods might not fully leverage these deeper layers or that shallower layers are more critical for knowledge storage.

What Problem Does This Paper Address?

A fundamental question in LLM research is understanding how and where knowledge is encoded within the vast number of parameters. While LLMs have demonstrated remarkable capabilities, the specific role of different layers, particularly the deeper ones, remains unclear. This paper tackles this by asking: if we remove layers from an LLM, and its performance on certain tasks doesn't drop significantly, does that mean those layers aren't storing crucial knowledge? This is important for model compression, efficiency, and for gaining deeper scientific insights into LLM architectures.

Methods

The authors propose a layer pruning strategy. First, they identify "optimal" blocks of layers to remove by measuring the angular distance between the representations at different layers. The intuition is that layers with similar representations might be redundant. They then remove these identified blocks of layers. To mitigate the performance drop caused by pruning, they employ a "healing" step using parameter-efficient finetuning (PEFT) methods, specifically Quantization and Low-Rank Adapters (QLoRA). This allows them to perform experiments on a single 40GB A100 GPU. They also explore a simpler pruning strategy of just removing the deepest layers.

Datasets

The paper uses the Colossal Clean Crawled Corpus (C4) for pretraining dataset statistics and for healing (finetuning). For evaluation, they use:

  • Massive Multitask Language Understanding (MMLU): A benchmark for world knowledge and problem-solving.
  • BoolQ: A yes/no reading comprehension benchmark.
  • Chain-of-Thought MMLU (CoT-MMLU): For evaluating reasoning capabilities.
  • GSM8K: A grade-school math benchmark.
  • HellaSwag: A common-sense reasoning benchmark.

Key Insights and Ideas

  • Deeper Layers are Surprisingly Expendable for QA: The most striking finding is that LLMs can tolerate the removal of a substantial fraction (up to 50%) of their deepest layers without a significant drop in performance on question-answering benchmarks. This challenges the intuition that deeper layers are always responsible for more complex knowledge.
  • Healing is Crucial for Smoothness, Not Knowledge Acquisition: The "healing" step (finetuning) is effective at restoring performance and smoothing out the sharp transitions seen in accuracy plots after pruning. However, it doesn't seem to introduce new knowledge; rather, it helps the model adapt to the pruned architecture.
  • Perplexity vs. Task Performance Decoupling: While QA performance remains robust to layer pruning, the model's perplexity (a measure of how well it predicts the next token) degrades smoothly and proportionally to the number of layers removed. This suggests a decoupling between general language modeling ability and specific task performance.
  • Shallow Layers Might Hold Key Knowledge: The robustness to deep layer removal implies that either current pretraining methods don't fully utilize deeper layers, or shallower layers play a more critical role in storing core knowledge.
  • Reasoning Tasks are More Sensitive: Unlike QA tasks, reasoning tasks like GSM8K and HellaSwag show immediate performance degradation with any level of pruning, suggesting deeper layers are more important for these capabilities.

Key Results

  • For models like Llama-2-70B, up to 40-50% of layers could be removed with minimal impact on MMLU and BoolQ accuracy, before a sharp drop to random guessing.
  • Healing with QLoRA significantly improved performance, especially for tasks like BoolQ, and smoothed the loss curves.
  • The similarity-informed pruning strategy generally outperformed random or shallow-layer pruning strategies.
  • Reasoning tasks (GSM8K, HellaSwag) showed immediate performance degradation with even small amounts of pruning, unlike QA tasks.

Limitations and Future Work

  • Model Dependence: While the findings are consistent across several LLM families, the exact pruning fraction before performance collapse varies by model size and architecture.
  • Reasoning vs. Knowledge: The paper hypothesizes that deeper layers are crucial for reasoning but not necessarily for knowledge storage, and provides initial evidence. Further work is needed to systematically test this.
  • Pruning Strategy Optimization: The authors explored a similarity-based strategy and a simpler "remove-deepest" strategy, but acknowledge that better pruning strategies might exist, especially for reasoning tasks.
  • Healing Mechanism: The exact mechanism by which healing restores performance and why it smooths loss but not QA accuracy needs further investigation.
  • Pretraining Details: The impact of pretraining details (e.g., scaling laws, distillation) on pruning robustness is an open question.
  • Future Work: The authors suggest exploring more advanced pruning strategies, investigating the role of deeper layers in reasoning and chain-of-thought generation, and understanding how to enable LLMs to better utilize their deepest layers. They also propose studying pruning across different pretraining checkpoints to understand the emergence of these phenomena.

Summary updated

BibTeX
@inproceedings{gromov2025unreasonable,
  author = {Andrey Gromov and Kushal Tirumala and Hassan Shapourian and Paolo Glorioso and Dan Roberts},
  title = {{The Unreasonable Ineffectiveness of the Deeper Layers}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=ngmEcEer8a},
}
Figure