用代数结构统一位置编码,让嵌入能处理高维空间旋转。
Clifford Algebraic Rotor Embeddings : Maybe embeddings should start to CARE
- 基于旋量代数构建通用旋转嵌入,支持任意维度
- 可编码多阶多重向量,超越传统向量表示
- 适用于需要精确旋转建模的高维任务
旋转位置编码(RoPE)在序列建模中表现出色,但其高维扩展常因非交换性而丧失平移等变性。现有方法如球面RoPE依赖欧拉角,存在旋转顺序歧义。本文提出四元数旋转嵌入(QuatRo),利用四元数表示3D旋转轴,克服该问题,并证明混合与球面RoPE为其特例。进一步,通过几何代数将四元数推广至克利福德旋量(Clifford Rotors),构建克利福德代数旋转嵌入(CARE)。该框架支持任意维度的旋转嵌入,且可对多阶多重向量(multivectors)编码位置信息。实验对比了球面、四元数及克利福德嵌入,验证了其有效性。
原文摘要 · Abstract (English)
Rotary Positional Embeddings (RoPE) have demonstrated exceptional performance as a positional encoding method, consistently outperforming their baselines. While recent work has sought to extend RoPE to higher-dimensional inputs, many such extensions are non-commutative, thereby forfeiting RoPE's shift-equivariance property. Spherical RoPE is one such non-commutative variant, motivated by the idea of rotating embedding vectors on spheres rather than circles. However, spherical rotations are inherently non-commutative, making the choice of rotation sequence ambiguous. In this work, we explore a quaternion-based approach -- Quaternion Rotary Embeddings (QuatRo) -- in place of Euler angles, leveraging quaternions' ability to represent 3D rotations to parameterize the axes of rotation. We show Mixed RoPE and Spherical RoPE to be special cases of QuatRo. Further, we propose a generalization of QuatRo to Clifford Algebraic Rotary Embeddings (CARE) using geometric algebra. Viewing quaternions as the even subalgebra of Cl(3,0,0), we extend the notion of rotary embeddings from quaternions to Clifford rotors acting on multivectors. This formulation enables two key generalizations: (1) extending rotary embeddings to arbitrary dimensions, and (2) encoding positional information in multivectors of multiple grades, not just vectors. We present preliminary experiments comparing spherical, quaternion, and Clifford-based rotary embeddings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。