arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.08703cs.CLcs.AI
收藏

关于更高维度 RoPE 注意力的 token 距离建模能力研究

On the token distance modeling ability of higher RoPE attention dimension

Tsinghua University(清华大学);Pattern Recognition Center, WeChat AI, Tencent Inc(腾讯公司微信AI模式识别中心)

Xiangyu Hong, Che Jiang, Biqing Qi, Fandong Meng, Mo Yu, Bowen Zhou, Jie Zhou

AI总结:

本文通过维度级分析发现长度外推模型中存在专注于长距离依赖的“位置头”,并证明其高维注意力分配扩展与长度外推效率相关,为长文本理解提供新视角。

摘要:

基于旋转位置嵌入(RoPE)的长度外推算法在扩展语言模型的上下文长度方面已展现出良好效果。然而,位置嵌入如何捕获更长范围的上下文信息仍不清楚。基于不同维度对应 RoPE 编码中不同变化频率这一直觉,我们进行了维度级分析,以研究注意力头的隐藏维度与其对捕获长距离依赖的贡献之间的相关性。利用我们提出的相关性度量,我们从多种长度外推模型中识别出一类特定的注意力头,并将其命名为位置头(Positional Heads)。这些头表现出对长程信息交互的强烈关注,并且如我们的消融实验所证明的那样,在长输入处理中发挥关键作用。我们进一步证明了长度外推效率与这些头的高维注意力分配扩展之间的相关性。位置头的识别为未来长文本理解研究提供了新的见解。

英文摘要:

Length extrapolation algorithms based on Rotary position embedding (RoPE) have shown promising results in extending the context length of language models. However, understanding how position embedding can capture longer-range contextual information remains elusive. Based on the intuition that different dimensions correspond to different frequency of changes in RoPE encoding, we conducted a dimension-level analysis to investigate the correlation between a hidden dimension of an attention head and its contribution to capturing long-distance dependencies. Using our correlation metric, we identified a particular type of attention heads, which we named Positional Heads, from various length-extrapolated models. These heads exhibit a strong focus on long-range information interaction and play a pivotal role in long input processing, as evidence by our ablation. We further demonstrate the correlation between the efficiency of length extrapolation and the extension of the high-dimensional attention allocation of these heads. The identification of Positional Heads provides insights for future research in long-text comprehension.

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

↑