自注意力网络在QK特征谱集中时实现局部化
Self-attention Networks Localize When QK-eigenspectrum Concentrates
AI总结:
本文通过查询-键参数矩阵的特征谱刻画注意力局部化,发现小的特征谱方差同时防止秩坍缩和熵坍缩,提升模型表达性与可训练性。
摘要:
自注意力机制在现代机器学习中占据主导地位。它具有一个有趣的功能,即通过调节注意力局部化的程度,从输入序列中自适应地选择令牌,许多研究者推测这是模型性能强大的基础,但也使学习动态的底层机制变得复杂。近年来,主要有两种论点将注意力局部化与模型性能联系起来。一种是秩坍缩,即自注意力块嵌入的令牌在不同令牌之间变得非常相似,导致网络表达能力降低。另一种是熵坍缩,即注意力概率趋于非均匀并导致低熵,使学习动态更可能陷入平台期。这两种失败模式表面上可能相互矛盾,因为秩坍缩和熵坍缩分别与均匀和非均匀注意力相关。为此,我们通过查询-键参数矩阵的特征谱来刻画注意力局部化的概念,并揭示出小的特征谱方差会导致注意力局部化。有趣的是,小的特征谱方差同时防止了秩坍缩和熵坍缩,从而带来更好的模型表达性和可训练性。
英文摘要:
The self-attention mechanism prevails in modern machine learning. It has an interesting functionality of adaptively selecting tokens from an input sequence by modulating the degree of attention localization, which many researchers speculate is the basis of the powerful model performance but complicates the underlying mechanism of the learning dynamics. In recent years, mainly two arguments have connected attention localization to the model performances. One is the rank collapse, where the embedded tokens by a self-attention block become very similar across different tokens, leading to a less expressive network. The other is the entropy collapse, where the attention probability approaches non-uniform and entails low entropy, making the learning dynamics more likely to be trapped in plateaus. These two failure modes may apparently contradict each other because the rank and entropy collapses are relevant to uniform and non-uniform attention, respectively. To this end, we characterize the notion of attention localization by the eigenspectrum of query-key parameter matrices and reveal that a small eigenspectrum variance leads attention to be localized. Interestingly, the small eigenspectrum variance prevents both rank and entropy collapse, leading to better model expressivity and trainability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。