Attribution-guided Pruning for Compression, Circuit Discovery, and Targeted Correction in LLMs

Sayed Mohammad Vakilzadeh Hatefi, Maximilian Dreyer, Reduan Achtibat, Patrick Kahardipraja, Thomas Wiegand, Wojciech Samek, Sebastian LapuschkinarXiv 2025 · DOI

Large Language Models (LLMs) are transformative but present significant challenges: their massive scale makes deployment difficult, and they often inherit undesirable behaviors—such as toxicity or repetitive output—from their training data. Traditional solutions like uniform pruning or extensive fine-tuning often lead to performance degradation or catastrophic forgetting. This paper introduces a unified framework leveraging Layer-wise Relevance Propagation (LRP) to "surgically" prune LLMs, enabling efficient compression, mechanistic interpretability, and targeted behavior correction.

Methodology: LRP as a Precision Scalpel

The core of this framework is LRP, an attribution method that redistributes a model's final prediction back through its layers to assign a "relevance score" to every neuron and weight. Unlike standard gradients, which measure local sensitivity to input changes, LRP identifies the specific components truly responsible for a model's output.

As illustrated in the overview below, this attribution engine supports three primary applications:

  1. Model Compression: Pruning weights with the lowest relevance on general-purpose datasets (e.g., Wikipedia).
  2. Circuit Discovery: Identifying the minimal subgraphs (circuits) essential for specific tasks, such as Indirect Object Identification (IOI).
  3. Targeted Correction: Utilizing differential attribution to calculate the relevance of components for both a general task and an undesired task (e.g., toxic responses). By pruning components with high toxicity relevance but low general relevance, the model can be "detoxified" without expensive retraining.
Overview of the three core applications: compression, circuit discovery, and behavior suppression.

Key Insights and Empirical Results

The authors evaluated their framework on the Llama and OPT model families across several benchmarks, including WikiText2 for general performance and RealToxicityPrompts for behavior suppression.

The "0.3% Solution" for Detoxification

A striking finding is the precision of differential attribution. The authors demonstrate that pruning as few as 100 neurons—approximately 0.3% of the total—in specific MLP layers can significantly reduce toxicity scores while maintaining the model's general language capabilities. This surgical approach avoids the performance trade-offs typical of broader fine-tuning methods.

Superior Circuit Discovery

In mechanistic interpretability tasks like IOI, LRP identifies much sparser and more effective circuits than traditional activation or gradient-based methods. As shown in the performance curves below, LRP-guided pruning (green lines) allows the model to maintain near-original accuracy even when 80-90% of other components are removed. This suggests that LRP is uniquely capable of isolating the "minimal sufficient" set of parameters for a specific behavior.

Performance comparison of different pruning methods on the IOI task. LRP (green) consistently maintains higher accuracy at higher sparsity levels across edges, neurons, and attention heads.

Global vs. Local Sorting

For circuit discovery, the authors found that sorting components globally across the entire model architecture is far superior to layer-by-layer sorting. This global perspective allows the algorithm to identify true architectural bottlenecks for specific tasks, regardless of their location in the model.

Limitations and Future Outlook

While highly effective, LRP-guided pruning is computationally demanding. It requires a backward pass to store activations and relevance scores, necessitating significantly more VRAM (e.g., ~60GB for TinyLlama) compared to forward-pass-only methods like Wanda (~5GB). Additionally, the success of targeted correction depends heavily on the quality of the reference samples used to define the "undesired" behavior.

Future work may focus on optimizing the memory efficiency of LRP and exploring how structured vs. unstructured pruning can be better tailored to specific architectural components like attention heads versus MLP layers.

Summary updated

BibTeX
@misc{hatefi2025attribution,
  author = {Sayed Mohammad Vakilzadeh Hatefi and Maximilian Dreyer and Reduan Achtibat and Patrick Kahardipraja and Thomas Wiegand and Wojciech Samek and Sebastian Lapuschkin},
  title = {{Attribution-guided Pruning for Compression, Circuit Discovery, and Targeted Correction in LLMs}},
  year = {2025},
  eprint = {2506.13727},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.13727},
}
Figure