Restoring Pruned Large Language Models via Lost Component Compensation

Zijian Feng, Hanzhang Zhou, Zixiao Zhu, Tianjiao Li, Jia Jim Deryl Chua, Lee Onn Mak, Gee Wah Ng, Kezhi Mao

TL;DR

Pruning Large Language Models (LLMs) saves massive computational costs but often severely degrades their performance, and standard fine-tuning methods like LoRA struggle to recover this lost information efficiently. The authors introduce RestoreLCC, a plug-and-play method that contrastively probes critical attention heads and directly compensates for the specific mathematical components lost during pruning. This targeted approach significantly restores model accuracy across various pruning schemes with virtually zero inference overhead.

What Problem Does This Paper Address?

Weight pruning—whether structured, semi-structured, or unstructured—is a go-to technique to shrink LLMs so they can run on consumer hardware. However, cutting out up to 50% of a model's weights inevitably causes severe information loss.

To heal these pruned models, practitioners typically turn to Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA. The catch? LoRA was originally designed to adapt dense models to new downstream tasks, not to repair the structural damage caused by pruning. Because standard PEFT methods search the parameter space blindly without considering what specific information was lost, their performance recovery remains suboptimal.

Methods

The authors propose RestoreLCC (Restoring Pruned LLMs via Lost Component Compensation), a framework that operates in two main phases:

  1. Contrastive Probing: To figure out where the pruning damage hurts the most, the authors construct contrastive sample pairs (e.g., correct vs. incorrect responses). They use activation editing to probe which attention heads are most critical for distinguishing between these pairs, ranking head importance via a lightweight linear classifier.
  2. Lost Component Compensation (LCC): For the top-ranked attention heads, they calculate the exact activation difference between the original dense model and the pruned model. Using Singular Value Decomposition (SVD), they decompose this difference into orthogonal directional components. Instead of blindly trusting the top principal components, RestoreLCC freezes these directions and learns a scalar magnitude ($\beta_i$) for all components, alongside a trainable bias vector.

During inference, the final learned compensation vector is simply absorbed as a constant bias vector into the multi-head attention block. This means it introduces no additional computational steps during generation.

Figure 4: Overview of the RestoreLCC framework. It integrates two key modules, (1) contrastive probing and (2) lost component compensation (LCC), to restore the performance of pruned LLMs.

Datasets

  • Calibration & Probing: The C4 dataset and the Alpaca instruction dataset were used for general recovery and probing.
  • Evaluation Benchmarks: The models were tested on WikiText (for perplexity) and a diverse suite of zero-shot commonsense reasoning tasks, including BoolQ, HellaSwag, WinoGrande, ARC-easy, ARC-challenge, RTE, and OpenBookQA.

Key Insights and Ideas

  • Pruning Damage is Visible in Activations: The information loss from pruning weight matrices directly manifests as distortions in attention head activations. Directly injecting the lost components brings the activations right back to dense-model levels, whereas LoRA provides only marginal improvements.
  • Don't Ignore the Minor Components: Surprisingly, the most critical task-relevant information doesn't always reside in the top principal components (the ones with the largest SVD eigenvalues). Minor components, when properly scaled, can yield significantly better restoration performance than the leading components.
Figure 3: Logit gain of attention heads recovered with different components.
  • Target Attention, Not FFNs: Mechanistic interpretability shows that attention heads specialize in distinct task functions, while Feed-Forward Networks (FFNs) store broad factual knowledge. Compensating multi-head attention (MHA) modules proves far more effective and parameter-finer than trying to fix FFNs.

Key Results

  • Superior Performance Across Pruning Schemes: RestoreLCC consistently outperforms state-of-the-art baselines (LoRA, DoRA, LoFiT, EoRA, FLAP) across unstructured, semi-structured, and structured pruning. For instance, on a 50% unstructured pruned LLaMA-7B, RestoreLCC achieved a mean accuracy of 58.83%, outperforming the best baseline by +2.01%.
  • Highly Effective Task-Specific Recovery: When evaluated on task-specific recovery (e.g., BoolQ) at a harsh 60% sparsity ratio, RestoreLCC successfully recovered performance using as few as 100–200 training samples, achieving a +3.56% accuracy boost over LoFiT.
  • True Efficiency: The total parameter overhead is less than 0.05% of the model size. Because the compensation is absorbed into the existing attention bias, the inference delay is a perfect 1.0x (zero slowdown relative to the base pruned model).
Figure 1: These figures compare the performance of the original dense model, the pruned model, and two recovery methods applied to the pruned model: LoRA and Lost Component Compensation (LCC, ours), which directly adds back components lost due to pruning. The used dataset is BoolQ, and please see § 3 for experimental details. The left figure shows the logit difference (correct minus incorrect) of attention heads with/without recovery, and the right figure shows the accuracies of final model outputs for each method. l[·] and a[·] indicate the layer index and the head index, respectively. For instance, l12.a16 means the 16-th head at the 12-th layer.

Limitations and Future Work

The primary limitation is that RestoreLCC assigns learnable magnitudes to all components of the selected attention heads. While less important components can be down-weighted during training, this unconstrained optimization can occasionally lead to overfitting on unimportant components.

In future work, the authors plan to design a pre-selection mechanism to isolate relevant components before learning their magnitudes, which would further reduce the number of trainable parameters and mitigate overfitting risks. They also plan to explore using activation noise to enhance the contrastive probing phase.

Summary updated

BibTeX
@inproceedings{feng2025restoring,
  author = {Zijian Feng and Hanzhang Zhou and Zixiao Zhu and Tianjiao Li and Jia Jim Deryl Chua and Lee Onn Mak and Gee Wah Ng and Kezhi Mao},
  title = {{Restoring Pruned Large Language Models via Lost Component Compensation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=cECo8tetzF},
}
Figure