arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2406.09897cs.CL
收藏

3D-RPE:通过三维旋转位置编码增强长上下文建模

3D-RPE: Enhancing Long-Context Modeling Through 3D Rotary Position Encoding

College of Intelligence and Computing, Tianjin University(天津大学智能与计算学部);Beijing Wenge Technology Co. Ltd.(北京文阁科技有限公司)

Xindian Ma, Wenyuan Liu, Peng Zhang, Nan Xu

AI总结:

本文受 Bloch Sphere 启发提出三维旋转位置编码 3D-RPE,通过可控长期衰减和更高位置分辨率增强长上下文建模,并在长上下文 NLU 与长序列 LM 任务上验证其优于 RoPE。

摘要:

受 Bloch Sphere(布洛赫球)表示的启发,我们提出了一种位于三维球面上的新型旋转位置编码,命名为 3D Rotary Position Encoding(3D-RPE,三维旋转位置编码)。3D-RPE 是广泛使用的 2D Rotary Position Encoding(RoPE,二维旋转位置编码)的先进版本,在长上下文建模方面具有两大优势:可控的长期衰减和更高的位置分辨率。对于可控长期衰减,3D-RPE 允许在 chunk size(块大小)内调节长期衰减,从而确保对相距较远相对位置的 token 之间的相对位置信息进行建模。对于增强的位置分辨率,3D-RPE 能够缓解 RoPE 上由位置插值导致的位置分辨率下降。我们在长上下文 Natural Language Understanding(NLU,自然语言理解)和长序列 Language Modeling(LM,语言建模)任务上进行了实验。实验结果表明,3D-RPE 相比 RoPE 取得了性能提升,尤其是在长上下文 NLU 任务中。

英文摘要:

Inspired by the Bloch Sphere representation, we propose a novel rotary position encoding on a three-dimensional sphere, named 3D Rotary Position Encoding (3D-RPE). 3D-RPE is an advanced version of the widely used 2D Rotary Position Encoding (RoPE), with two major advantages for modeling long contexts: controllable long-term decay and improved position resolution. For controllable long-term decay, 3D-RPE allows for the regulation of long-term decay within the chunk size, ensuring the modeling of relative positional information between tokens at a distant relative position. For enhanced position resolution, 3D-RPE can mitigate the degradation of position resolution caused by position interpolation on RoPE. We have conducted experiments on long-context Natural Language Understanding (NLU) and long-sequence Language Modeling (LM) tasks. From the experimental results, 3D-RPE achieved performance improvements over RoPE, especially in long-context NLU tasks.

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

↑