arXiv:2512.07805cs.LGcs.AI2025-12被引 3

统一旋转与偏置位置编码,提升长序列建模能力

Group Representational Position Encoding

  • 基于群作用构建统一位置编码框架,融合旋转与加性偏置机制
  • 可精确恢复RoPE和ALiBi,支持跨子空间特征耦合,计算开销低
  • 适合需要长上下文建模的Transformer模型,如超长文本生成

我们提出GRAPE(Group Representational Position Encoding),一种基于群作用的统一位置编码框架。GRAPE统一了两类机制:(i) SO(d)中的乘法旋转(乘法型GRAPE);(ii) GL中由单秩(或低秩)幂零作用产生的加性逻辑偏置(加法型GRAPE)。在乘法型GRAPE中,位置n∈ℤ(或t∈ℝ)通过G(n)=exp(nωL)作用,其中L为秩2斜对称生成元,产生相对、组合且保范的闭式矩阵指数映射。当d/2个平面对应标准坐标对且谱为对数均匀时,可精确恢复RoPE。学习的可交换子空间与紧凑非交换混合分别以O(d)和O(rd)代价扩展几何结构,捕捉跨子空间特征耦合。在加法型GRAPE中,加性对数来自单秩(或低秩)幂零作用,精确恢复ALiBi与遗忘变压器(FoX),同时保持精确相对律与流式缓存能力。整体上,GRAPE为长上下文模型的位置几何提供了原则性设计空间,包含RoPE与ALiBi作为特例。

原文摘要 · Abstract (English)

We present GRAPE (Group Representational Position Encoding), a unified framework for positional encoding based on group actions. GRAPE unifies two families of mechanisms: (i) multiplicative rotations (Multiplicative GRAPE) in $\operatorname{SO}(d)$ and (ii) additive logit biases (Additive GRAPE) arising from unipotent actions in the general linear group $\mathrm{GL}$. In Multiplicative GRAPE, a position $n \in \mathbb{Z}$ (or $t \in \mathbb{R}$) acts as $\mathbf{G}(n) = \exp(n \, ω\, \mathbf{L})$ with a rank-2 skew-symmetric generator $\mathbf{L} \in \mathbb{R}^{d \times d}$, yielding a relative, compositional, norm-preserving map with a closed-form matrix exponential. RoPE is recovered exactly when the $d/2$ planes correspond to canonical coordinate pairs with a log-uniform spectrum. Learned commuting subspaces and compact non-commuting mixtures strictly extend this geometry to capture cross-subspace feature coupling at $O(d)$ and $O(r d)$ cost per head, respectively. In Additive GRAPE, additive logits arise from rank-1 (or low-rank) unipotent actions, recovering ALiBi and the Forgetting Transformer (FoX) as exact special cases while preserving an exact relative law and streaming cacheability. Overall, GRAPE provides a principled design space for positional geometry in long-context models, subsuming RoPE and ALiBi as special cases. Project page: https://github.com/model-architectures/GRAPE.

位置编码Transformer群作用长序列建模

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。