剪掉注意力层能省资源,但可能让模型解释更不准、信心更不靠谱。
Don't Go Breaking My LLM: The Impact of Pruning Attention Layers on Explanation Faithfulness and Confidence Calibration

- 剪掉33%注意力层,模型准确率基本不变,但解释力下降。
- 模型自信程度与实际表现脱节,准确性稳但解释和校准变差。
- 适合关注模型可信度的开发者,别只看速度和准确率。
剪枝大语言模型(LLMs)通过移除网络部分结构降低内存和推理成本,得到更小但精度相近的模型。由于注意力层是资源消耗最大的部分,剪枝它们是一种有前景的压缩策略。已有研究显示,最多可剪掉33%的注意力层而几乎不影响准确率。然而,注意力剪枝对模型可解释性——尤其是解释忠实性和置信度校准——的影响尚未被研究。为此,我们系统评估了五种不同LLMs在八个数据集上剪枝注意力层后对解释忠实性和置信度校准的影响。结果表明,尽管剪枝后模型准确率普遍保持较高水平,但其解释忠实性和置信度校准能力往往显著下降。值得注意的是,即使准确率稳定,解释力和校准性能仍可能出现剧烈波动,揭示出模型置信度、可解释性与准确率之间存在错位。这说明剪枝可能影响模型的可信赖性,仅用准确率和效率指标不足以全面评估剪枝效果。我们建议在评估剪枝模型时纳入可解释性和校准性指标。
原文摘要 · Abstract (English)
Pruning Large Language Models (LLMs) reduces memory and inference costs by removing parts of the network, producing smaller models that retain most of their accuracy. As attention layers are the most resource-intensive parts of LLMs, pruning them is a promising compression strategy. Prior work shows that up to 33% of attention layers can be pruned with minimal accuracy loss. Nevertheless, the impact of attention pruning on model interpretability, specifically faithfulness and confidence calibration, remains unstudied. To address this gap, we study how pruning attention layers affects explanation faithfulness and confidence calibration across five LLMs and eight datasets. While the pruned models often maintain high accuracy, we find that their faithfulness and calibration often degrade. Notably, faithfulness and calibration can fluctuate significantly, even when accuracy remains stable, highlighting a misalignment between model confidence, interpretability, and accuracy. Our findings suggest that layer pruning can affect LLMs' interpretability and reliability in ways not captured by accuracy and efficiency measures alone. We recommend including explainability and calibration metrics when evaluating pruned models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。