arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.08908cs.LGcs.AIcs.CLcs.CR
收藏

解释大语言模型中的重复令牌现象

Interpreting the Repeated Token Phenomenon in Large Language Models

Google DeepMind(谷歌DeepMind);University of Oxford(牛津大学);UC Berkeley(加州大学伯克利分校)

Itay Yona, Ilia Shumailov, Jamie Hayes, Federico Barbero, Yossi Gandelsman

AI总结:

本文通过识别大语言模型中注意力汇对应的神经回路,解释了重复单词时模型输出偏离的失效机制,并提出针对性补丁在不损害整体性能的前提下修复该脆弱性。

摘要:

大语言模型(LLMs)尽管能力出众,但在被提示准确重复一个单词时却常常失败,反而输出无关文本。这一尚未得到解释的失效模式代表了一种脆弱性,甚至允许终端用户使模型偏离其预期行为。我们旨在解释这一现象的成因,并将其与“注意力汇(attention sinks)”这一概念联系起来。注意力汇是一种对流畅性至关重要的涌现式LLM行为,其中初始令牌获得不成比例的高注意力分数。我们的研究识别了负责注意力汇的神经回路,并展示了长重复序列如何破坏该回路。我们将这一发现扩展到其他表现出类似回路破坏的非重复序列。为了解决这一问题,我们提出了一种有针对性的补丁,能够有效解决该问题而不会对模型的整体性能产生负面影响。本研究为一种LLM脆弱性提供了机制性解释,展示了可解释性如何诊断和解决问题,并为更安全、更可靠的模型提供了见解。

英文摘要:

Large Language Models (LLMs), despite their impressive capabilities, often fail to accurately repeat a single word when prompted to, and instead output unrelated text. This unexplained failure mode represents a vulnerability, allowing even end-users to diverge models away from their intended behavior. We aim to explain the causes for this phenomenon and link it to the concept of ``attention sinks'', an emergent LLM behavior crucial for fluency, in which the initial token receives disproportionately high attention scores. Our investigation identifies the neural circuit responsible for attention sinks and shows how long repetitions disrupt this circuit. We extend this finding to other non-repeating sequences that exhibit similar circuit disruptions. To address this, we propose a targeted patch that effectively resolves the issue without negatively impacting the model's overall performance. This study provides a mechanistic explanation for an LLM vulnerability, demonstrating how interpretability can diagnose and address issues, and offering insights that pave the way for more secure and reliable models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑