arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.17771cs.LGcs.AI
收藏

注意力沉底引发梯度沉底

Attention Sinks Induce Gradient Sinks: Massive Activations as Gradient Regulators in Transformers

Tsinghua University(清华大学);Peking University(北京大学)

Yihong Chen, Zhouchen Lin, Quanming Yao

AI总结:

研究从反向传播角度探讨注意力沉底与梯度沉底的关系,发现因果掩码下注意力沉底会引发梯度集中,且在预归一化架构中,大规模激活是训练时对梯度压力的适应性响应。

摘要:

在Transformer模型中,注意力沉底和大规模激活是反复出现且密切相关的现象。现有研究主要关注前向传递,不清楚其联系是直接还是由训练时机制中介。我们从反向传播角度研究此问题。实证和理论表明,在因果掩码下,注意力沉底会引发显著的梯度集中,我们称之为梯度沉底。此外,在预归一化架构中,大规模激活可被理解为训练时对这种局部梯度压力的适应性响应。为检验此假设,我们引入V-scale,一种调整价值路径反向传播梯度的修改方法。在预训练的V-scale模型中,注意力沉底被保留而大规模激活被抑制。这些结果支持梯度沉底是连接注意力沉底和大规模激活的关键训练时中介的解释。

英文摘要:

Attention sinks and massive activations are recurring and closely related phenomena in Transformer models. Existing explanations have largely focused on the forward pass, yet in pre-norm Transformers, large residual-stream norms play only an indirect forward role because sublayers operate on normalized inputs. We study this relationship from the perspective of backpropagation. Empirically and theoretically, we show that under causal masking, attention sinks can induce pronounced gradient concentration, which we term gradient sinks. Since the RMSNorm Jacobian attenuates gradients roughly in inverse proportion to input norm, massive activations can be understood as adaptive regulators of this localized gradient pressure during training. This interpretation predicts that attenuating sink-induced gradients should weaken massive activations. We test this prediction with V-scale, a modification that adjusts backpropagated gradients on the value paths. In V-scale models and a backward-only control, attention sinks are preserved, whereas massive activations are suppressed. These results identify gradient sinks as a backward-pass counterpart of attention sinks, and massive activations as an adaptive RMSNorm-mediated response that attenuates the resulting localized training pressure. Our code is available at https://github.com/LARS-research/GradientSink.

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

↑