Data-Free Pruning of Self-Attention Layers in LLMs
Dhananjay Saikumar, Blesson Varghese
TL;DR
This work identifies Attention Suppression in deep self-attention layers of decoder-only Transformers, where later layers mute their own updates, transferring representational change to the residual path and MLP. Building on this, it introduces Gate-Norm, a data-free, one-shot pruning proxy that ranks attention layers purely from weight matrices via the gate norm $m_ ext{l} = \|W_{q, ext{l}} W_{k, ext{l}}^ op\|_F$, enabling fast, on-device pruning without calibration data or forward passes. Empirically, Gate-Norm matches data-driven pruning in perplexity and zero-shot accuracy across multiple 13B/7B checkpoints, while delivering up to 1.3–1.5x throughput gains and up to 30% speedups at modest pruning budgets; at larger budgets, gains persist with small accuracy degradations. The method runs in milliseconds on GPUs and under 30 seconds on CPUs, making data-free compression feasible for ultra-large models and privacy-constrained deployments, and is compatible with lightweight post-pruning LoRA fine-tuning. These findings suggest a path toward architectural simplifications and dynamic depth strategies that exploit inherent redundancy in late self-attention layers.
Abstract
Many self-attention sublayers in large language models (LLMs) can be removed with little to no loss. We attribute this to the Attention Suppression Hypothesis: during pre-training, some deep attention layers learn to mute their own contribution, leaving the residual stream and the MLP to carry the representation. We propose Gate-Norm, a one-shot, weight-only criterion that ranks attention sublayers by query--key coupling and removes the least coupled ones, requiring no calibration data, no forward passes, no fine-tuning, and no specialized kernels. On 40-layer, 13B-parameter LLaMA models, Gate-Norm prunes the model in under a second. Pruning $8$--$16$ attention sublayers yields up to $1.30\times$ higher inference throughput while keeping average zero-shot accuracy within $2\%$ of the unpruned baseline across BoolQ, RTE, HellaSwag, WinoGrande, ARC-Easy/Challenge, and OpenBookQA. Across these settings, Gate-Norm matches data-driven pruning methods in accuracy while being $\sim 1000\times$ faster to score layers, enabling practical, data-free compression of LLMs.
