When Pruning Meets Interpretability: Preserving Sparse Autoencoder Robustness in LLMs
Organizations: Department of Computer Science The Ohio State University Columbus, OH 43210, USA
Abstract
Sparse autoencoders (SAEs) are widely used to interpret the internal representations of large language models (LLMs), yet their reliability under post-hoc model compression remains poorly understood. We present a systematic study of how pruning affects SAE behavior and theoretically show that, for a fixed SAE, its impact is governed by perturbation energy, a covariance-weighted norm. This perspective exposes a key limitation of magnitude pruning: by ignoring activation geometry, it distorts the learned representation space and degrades SAE functionality. Activation-aware methods such as Wanda and SparseGPT, in contrast, implicitly control perturbation energy and are therefore substantially more robust at preserving SAE behavior. We further reveal a consistent structural vulnerability across all pruning methods: middle layers are significantly more sensitive to pruning than early or late layers. Guided by this insight, we propose a layer-wise sparsity allocation strategy, achieving lower perplexity under the same average pruning sparsity. Experiments across four model architectures validate our theoretical findings. Code is publicly available at https://github.com/osu-srml/sae-robustness-under-pruning/tree/main.
Figures & tables
| Layers | Method | Spar. (%) | Core | Absorption | SCR | TPP | |||||
| KL Score | CE Score | Expl. Var. | Cos Sim | MSE | Abs. Frac. | Full Abs. | Top-10 | Top-10 | |||
| Early (0-8) | Baseline | 0 | 0.9944 | 0.9941 | 0.8976 | 0.9497 | 0.4268 | 0.0674 | 0.0354 | 0.1714 | 0.0270 |
| Magnitude | 50 | 0.9847 | 0.9818 | 0.8416 | 0.9175 | 0.6536 | 0.0764 | 0.0486 | 0.1130 | 0.0187 | |
| Wanda | 50 | 0.9935 | 0.9873 | 0.8793 | 0.9401 | 0.4648 | 0.0691 | 0.0353 | 0.1487 | 0.0188 | |
| SparseGPT | 50 | 0.9918 | 0.9906 | 0.8728 | 0.9353 | 0.4886 | 0.0717 | 0.0402 | 0.1329 | 0.0196 | |
| Middle (9-17) | Baseline | 0 | 0.9887 | 0.9876 | 0.8763 | 0.9301 | 2.0582 | 0.0668 | 0.0586 | 0.3047 | 0.0424 |
| Model | Method | Spar. (%) | Core | Absorption | SCR | TPP | |||||
| KL Score | CE Score | Expl. Var. | Cos Sim | MSE | Abs. Frac. | Full Abs. | Top-10 | Top-10 | |||
| gemma-2 2b | Baseline | 0 | 0.9873 | 0.9864 | 0.8812 | 0.9370 | 5.2568 | 0.0836 | 0.0746 | 0.2843 | 0.0450 |
| Magnitude | 50 | 0.9681 | 0.9624 | 0.7928 | 0.8893 | 10.4390 | 0.0795 | 0.0783 | 0.1824 | 0.0131 | |
| Wanda | 50 | 0.9873 | 0.9835 | 0.8625 | 0.9277 | 5.4659 | 0.0789 | 0.0680 | 0.2497 | 0.0330 | |
| SparseGPT | 50 | 0.9855 | 0.9874 | 0.8468 | 0.9193 | 6.4717 | 0.0826 | 0.0766 | 0.2297 | 0.0325 | |
| gemma-2 9b | Baseline | 0 | 0.9914 | 0.9900 | 0.8882 | 0.9380 | 7.7362 | 0.0997 | 0.0654 | 0.3237 | 0.0603 |
| Wanda | SparseGPT | ||||
| Model | Avg. Sparsity | Uniform | Layer-wise | Uniform | Layer-wise |
| gemma-2-2b | 50% | 212 | 148 | 141 | 98 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Layers | Method | Spar. (%) | Core | Absorption | SCR | TPP | |||||
| KL Score | CE Score | Expl. Var. | Cos Sim | MSE | Abs. Frac. | Full Abs. | Top-10 | Top-10 | |||
| Layer 0 | Baseline | 0 | 0.9966 | 0.9967 | 0.9453 | 0.9766 | 0.1396 | 0.0131 | 0.0324 | 0.1488 | 0.0272 |
| Magnitude | 50 | 0.9915 | 0.9962 | 0.8984 | 0.9531 | 0.2754 | 0.0141 | 0.0432 | 0.1385 | 0.0327 | |
| Wanda | 50 | 0.9964 | 0.9932 | 0.9375 | 0.9727 | 0.1582 | 0.0127 | 0.0339 | 0.1605 | 0.0242 | |
| SparseGPT | 50 | 0.9953 | 0.9948 | 0.9375 | 0.9727 | 0.1611 | 0.0133 | 0.0346 | 0.1514 | 0.0206 | |
| Layer 1 | Baseline | 0 | 0.9958 | 0.9951 | 0.9219 | 0.9648 | 0.2402 | 0.0989 | 0.0913 | 0.1788 | 0.0336 |
| Layers | Method | Spar. (%) | Core | Absorption | SCR | TPP | |||||
| KL Score | CE Score | Expl. Var. | Cos Sim | MSE | Abs. Frac. | Full Abs. | Top-10 | Top-10 | |||
| Layer 9 | Baseline | 0 | 0.9917 | 0.9901 | 0.8711 | 0.9297 | 0.9844 | 0.0555 | 0.0498 | 0.2386 | 0.0247 |
| Magnitude | 50 | 0.9664 | 0.9544 | 0.7773 | 0.8789 | 1.3438 | 0.0555 | 0.0498 | 0.0858 | 0.0118 | |
| Wanda | 50 | 0.9915 | 0.9846 | 0.8438 | 0.9141 | 1.0234 | 0.0429 | 0.0310 | 0.1830 | 0.0170 | |
| SparseGPT | 50 | 0.9888 | 0.9880 | 0.8281 | 0.9062 | 1.0938 | 0.0527 | 0.0414 | 0.1565 | 0.0138 | |
| Layer 10 | Baseline | 0 | 0.9909 | 0.9901 | 0.8672 | 0.9258 | 1.1953 | 0.0708 | 0.0541 | 0.2430 | 0.0220 |
| Layers | Method | Spar. (%) | Core | Absorption | SCR | TPP | |||||
| KL Score | CE Score | Expl. Var. | Cos Sim | MSE | Abs. Frac. | Full Abs. | Top-10 | Top-10 | |||
| Layer 18 | Baseline | 0 | 0.9855 | 0.9852 | 0.8867 | 0.9375 | 4.4062 | 0.0951 | 0.1101 | 0.3244 | 0.0655 |
| Magnitude | 50 | 0.9426 | 0.9278 | 0.7617 | 0.8672 | 6.9375 | 0.0795 | 0.1189 | 0.1193 | 0.0063 | |
| Wanda | 50 | 0.9854 | 0.9846 | 0.8672 | 0.9297 | 4.8750 | 0.0813 | 0.0921 | 0.2761 | 0.0511 | |
| SparseGPT | 50 | 0.9831 | 0.9880 | 0.8477 | 0.9180 | 5.5000 | 0.0815 | 0.1070 | 0.2658 | 0.0573 | |
| Layer 19 | Baseline | 0 | 0.9844 | 0.9835 | 0.8828 | 0.9375 | 5.5312 | 0.0823 | 0.0935 | 0.3398 | 0.0660 |
| Layer Group | Magnitude | Wanda | SparseGPT |
| Early (0–8) | 57.36 | 31.87 | 26.66 |
| Middle (9–17) | 47.13 | 21.16 | 20.70 |
| Late (18–25) | 53.69 | 26.45 | 24.95 |
LLM Pruning
Large language model pruning removes less useful weights or components to reduce memory and inference costs while preserving model capabilities.
See all 177 papers