arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.11276cs.CLcs.LG
收藏

旋转位置嵌入可能导致注意力头在长距离检索中的维度低效

The Rotary Position Embedding May Cause Dimension Inefficiency in Attention Heads for Long-Distance Retrieval

University of Southern California(南加州大学)

Ting-Rui Chiang, Dani Yogatama

AI总结:

该研究通过受控实验和对三个 LLM 的分析,揭示 RoPE 在长上下文中因旋转角度范围过大而造成部分维度低效,且这些维度不助益长上下文问答。

摘要:

旋转位置嵌入(RoPE)被广泛应用于许多大型语言模型(LLM)的注意力头中。它根据 query 和 key 向量在输入序列中的位置,以不同角度旋转这些向量中的维度。对于长上下文建模,位置范围可能变化很大,因此 RoPE 会以极大的角度范围旋转某些维度。我们假设,广泛的旋转角度可能会阻碍 LLM 利用这些维度。为验证该假设,我们提出了一项受控实验,表明应用 RoPE 会导致某些维度的效用较低。我们对三个 LLM 的分析还表明,这些维度无助于 LLM 完成长上下文问答。

英文摘要:

The Rotary Position Embedding (RoPE) is widely used in the attention heads of many large language models (LLM). It rotates dimensions in the query and the key vectors by different angles according to their positions in the input sequence. For long context modeling, the range of positions may vary a lot, and thus RoPE rotates some dimensions by a great range of angles. We hypothesize that the wide range of rotation angles may prevent LLMs from utilizing those dimensions. To validate this hypothesis, we present a controlled experiment showing that applying RoPE causes low utility of certain dimensions. Our analyses on three LLMs also indicate that these dimensions do not help LLMs do long-context question answering.

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

↑