The Structural Origin of Attention Sink: Variance Discrepancy, Super Neurons, and Dimension Disparity
作者: Siquan Li, Kaiqi Jiang, Jiacheng Sun, Tianyang Hu
分类: cs.LG, cs.AI, stat.ML
发布日期: 2026-05-07
备注: Accepted to ICML 2026
💡 一句话要点
揭示LLM注意力黑洞的结构性根源,提出head-wise RMSNorm加速收敛。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 注意力黑洞 大型语言模型 自注意力机制 方差差异 维度差异 超神经元 head-wise RMSNorm
📋 核心要点
- 大型语言模型中注意力黑洞现象普遍存在,但其结构性成因尚不明确,阻碍了模型性能的进一步提升。
- 通过分析自注意力机制中的值聚合过程和前馈网络中的超神经元激活,揭示了方差差异和维度差异是注意力黑洞产生的根本原因。
- 提出了head-wise RMSNorm,通过稳定值聚合输出,恢复统计奇偶性,显著加速了模型预训练的收敛速度。
📝 摘要(中文)
大型语言模型(LLM)中普遍存在注意力黑洞现象,即初始token不成比例地垄断注意力分数,但其结构性根源仍然难以捉摸。本文为此现象提供了一种机制解释。首先,我们将根源追溯到自注意力中固有的值聚合过程,该过程导致了系统的方差差异。我们进一步证明,这种差异被前馈网络(FFN)层中超神经元的激活所极大地放大。具体来说,通道稀疏的下投影触发了首个token表示的维度差异,从而需要形成注意力黑洞作为结构锚点。然后,我们通过两个受控干预验证了这条因果链:(i) 通过注意力掩码修改隔离聚合效应,以及(ii) 放大目标token表示的方差。这两种干预都可以在任意位置复制注意力黑洞。我们的机制理解为系统地控制黑洞形成提供了基础。最后,作为概念验证,我们提出了一种架构修改方法,即head-wise RMSNorm,它可以在预训练期间稳定值聚合输出。我们的实验表明,恢复跨位置的统计奇偶性可以显著加速收敛。
🔬 方法详解
问题定义:论文旨在解决大型语言模型(LLM)中注意力黑洞(Attention Sink)现象的结构性根源问题。现有方法缺乏对该现象内在机制的理解,难以有效控制和缓解注意力黑洞,导致模型性能受限。
核心思路:论文的核心思路是揭示注意力黑洞的结构性成因,即自注意力机制中的值聚合过程导致方差差异,并通过前馈网络(FFN)中的超神经元放大,最终形成维度差异,迫使模型将初始token作为“锚点”来吸收注意力。基于此理解,通过控制方差差异来缓解注意力黑洞。
技术框架:论文的研究框架主要包括以下几个部分:1) 分析自注意力机制中的值聚合过程,揭示方差差异的产生;2) 研究FFN层中超神经元对该差异的放大作用;3) 通过实验验证方差差异和维度差异与注意力黑洞之间的因果关系;4) 提出head-wise RMSNorm,稳定值聚合输出,缓解方差差异。
关键创新:论文最重要的技术创新点在于揭示了注意力黑洞的结构性根源,并提出了head-wise RMSNorm来缓解该问题。与现有方法相比,该方法不是简单地调整注意力权重,而是从根本上控制了方差差异,从而更有效地缓解了注意力黑洞。
关键设计:head-wise RMSNorm的关键设计在于对每个注意力头的输出分别进行RMSNorm归一化,从而稳定值聚合的输出,减少不同位置token表示之间的方差差异。具体实现是在标准的RMSNorm基础上,对每个注意力头的输出应用独立的缩放因子和偏移量。
🖼️ 关键图片
📊 实验亮点
实验结果表明,通过注意力掩码修改和放大目标token表示的方差,可以成功复制任意位置的注意力黑洞。此外,提出的head-wise RMSNorm能够显著加速模型预训练的收敛速度,验证了缓解方差差异的有效性。具体性能提升数据未知。
🎯 应用场景
该研究成果可应用于各种基于Transformer的大型语言模型,通过缓解注意力黑洞现象,提升模型对长文本的处理能力,改善生成质量,并加速模型训练收敛。潜在应用领域包括机器翻译、文本摘要、对话系统等。
📄 摘要(原文)
Despite the prevalence of the attention sink phenomenon in Large Language Models (LLMs), where initial tokens disproportionately monopolize attention scores, its structural origins remain elusive. This work provides a \textit{mechanistic explanation} for this phenomenon. First, we trace its root to the value aggregation process inherent in self-attention, which induces a systematic variance discrepancy. We further demonstrate that this discrepancy is drastically amplified by the activation of super neurons within Feed-Forward Network (FFN) layers. Specifically, the channel-sparse down-projections trigger a dimension disparity of the first-token representation, necessitating the formation of attention sinks as a structural anchor. Then, we validate this causal chain through two controlled interventions: (i) isolating the aggregation effect via attention mask modifications and (ii) amplifying the variance of targeted token representations. Both interventions can replicate attention sinks at arbitrary positions. Our mechanistic understanding offers a foundation for the systematic control of sink formation. Finally, as a proof of concept, we propose \textit{head-wise RMSNorm}, an architectural modification that stabilizes value aggregation outputs during pre-training. Our experiments demonstrate that restoring statistical parity across positions significantly accelerates convergence.