发现大模型中激活值突增的关键层,提出简单方法提升性能。
A Single Layer to Explain Them All:Understanding Massive Activations in Large Language Models

- 定位到所有大模型共有的'激活突增层'(ME Layer)
- 该层导致隐藏表示多样性下降,影响注意力机制
- 改进后在指令遵循和数学推理上均提升,无需微调
我们研究了大语言模型中大规模激活的起源,识别出一个名为'大规模涌现层(ME Layer)'的特定层,该层在各类模型中均一致出现,是大规模激活首次生成并经残差连接向深层传播的位置。研究表明,在ME Layer中,RMSNorm与前馈网络(FFN)参数共同促成大规模激活的产生。一旦形成,大规模激活的标记表征在各层间保持高度不变,降低了传递给注意力模块的隐藏表示多样性。为此,我们提出一种简单有效的缓解方法,能持续提升模型在多个任务上的表现,包括指令遵循与数学推理,且适用于无训练和微调场景。此外,该方法通过选择性削弱注意力黑洞的影响,揭示了其在隐藏状态层面的成因,为系统性缓解策略提供了新视角。
原文摘要 · Abstract (English)
We investigate the origins of massive activations in large language models (LLMs) and identify a specific layer named the \textbf{Massive Emergence Layer (ME Layer)}, that is consistently observed across model families, where massive activations first emerge and subsequently propagate to deeper layers through residual connections. We show that, within the ME Layer both the RMSNorm and the FFN parameters jointly contribute to the emergence of massive activations. Once formed, the massive activation token representation remains largely invariant across layers, reducing the diversity of hidden representations passed to the attention module. Motivated by this limitation, we propose a simple and effective method to reduce the rigidity of the massive activation token. Our approach consistently improves LLM performance across multiple tasks, including instruction following and math reasoning, in both training free and fine tuning settings. Moreover, we show that our method mitigates attention sinks by selectively weakening their influence, elucidating their origin at the hidden state level and shedding new light on principled mitigation strategies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。