arXiv:2605.14075cs.LGcs.CL2026-05被引 2

用实际删层后的性能下降代替余弦相似度,更准确评估大模型各层重要性

Rethinking Layer Relevance in Large Language Models Beyond Cosine Similarity

论文配图:Rethinking Layer Relevance in Large Language Models Beyond Cosine Similarity
图 1 · 摘自论文原文
  • 以删层后准确率下降作为层重要性指标,取代易误导的余弦相似度
  • 实验证明余弦相似度与真实性能损失相关性弱,常误判关键层
  • 适合做模型剪枝、轻量化和可解释性研究的研究者参考

大语言模型(LLM)已彻底改变自然语言处理。理解其内部机制对开发更具可解释性和优化架构至关重要。机制可解释性催生了多种评估层重要性的方法,其中余弦相似度被广泛使用。本文表明,余弦相似度是衡量层性能退化的一个糟糕代理。理论分析显示,某一层即使余弦相似度极低,仍可能对模型性能至关重要。在多个LLM上的实证结果证实,余弦相似度与真实性能下降之间的相关性通常较弱或中等,导致对Transformer内部机制的误解。我们提出一种更稳健的层重要性评估指标:实际删去某层后模型准确率的下降值。尽管计算成本较高,但该方法能更准确反映层的重要性,有助于制定更明智的剪枝策略和构建轻量级模型。研究结果对可解释性LLM的发展具有重要意义,强调应超越余弦相似度来评估层重要性。

原文摘要 · Abstract (English)

Large language models (LLMs) have revolutionized natural language processing. Understanding their internal mechanisms is crucial for developing more interpretable and optimized architectures. Mechanistic interpretability has led to the development of various methods for assessing layer relevance, with cosine similarity being a widely used tool in the field. On this work, we demonstrate that cosine similarity is a poor proxy for the actual performance degradation caused by layer removal. Our theoretical analysis shows that a layer can exhibit an arbitrarily low cosine similarity score while still being crucial to the model's performance. On the other hand, empirical evidence from a range of LLMs confirms that the correlation between cosine similarity and actual performance degradation is often weak or moderate, leading to misleading interpretations of a transformer's internal mechanisms. We propose a more robust metric for assessing layer relevance: the actual drop in model accuracy resulting from the removal of a layer. Even though it is a computationally costly metric, this approach offers a more accurate picture of layer importance, allowing for more informed pruning strategies and lightweight models. Our findings have significant implications for the development of interpretable LLMs and highlight the need to move beyond cosine similarity in assessing layer relevance.

可解释性模型剪枝层重要性大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。