arXiv:2409.14381cs.CLcs.LG2024-09被引 44

发现大模型中存在关键层,移除它会导致性能崩溃。

Investigating Layer Importance in Large Language Models

  • 用采样方法高效计算各层的贡献度,基于沙普利值框架。
  • 早期关键层一旦移除,模型性能骤降至随机水平。
  • 非关键层删除影响极小,适合优化与安全部署研究。

大语言模型(LLMs)因其强大的文本理解与处理能力受到广泛关注,但其内部机制仍不透明,阻碍了在高安全性场景中的应用,并限制了模型改进。本文通过研究大模型中各层的重要性,提出一种高效的采样方法,利用沙普利值(Shapley values)这一特征归因与数据估值的通用框架,准确评估层的重要性。同时,通过层剔除实验,分析特定层被移除后的性能退化情况。研究发现存在‘基石层’——某些早期层对模型表现具有主导性贡献。移除一个基石层会导致模型性能急剧下降,常降至随机猜测水平;而移除非基石层仅引起微小性能波动。本研究首次揭示了大模型中基石层的存在,强调其对未来模型理解与设计的关键作用。

原文摘要 · Abstract (English)

Large language models (LLMs) have gained increasing attention due to their prominent ability to understand and process texts. Nevertheless, LLMs largely remain opaque. The lack of understanding of LLMs has obstructed the deployment in safety-critical scenarios and hindered the development of better models. In this study, we advance the understanding of LLM by investigating the significance of individual layers in LLMs. We propose an efficient sampling method to faithfully evaluate the importance of layers using Shapley values, a widely used explanation framework in feature attribution and data valuation. In addition, we conduct layer ablation experiments to assess the performance degradation resulting from the exclusion of specific layers. Our findings reveal the existence of cornerstone layers, wherein certain early layers can exhibit a dominant contribution over others. Removing one cornerstone layer leads to a drastic collapse of the model performance, often reducing it to random guessing. Conversely, removing non-cornerstone layers results in only marginal performance changes. This study identifies cornerstone layers in LLMs and underscores their critical role for future research.

大模型层重要性沙普利值可解释性

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