Groepsrepresentatie Positiecodering
Group Representational Position Encoding
December 8, 2025
Auteurs: Yifan Zhang, Zixiang Chen, Yifeng Liu, Zhen Qin, Huizhuo Yuan, Kangping Xu, Yang Yuan, Quanquan Gu, Andrew Chi-Chih Yao
cs.AI
Samenvatting
Wij presenteren GRAPE (Group RepresentAtional Position Encoding), een uniform raamwerk voor positionele codering gebaseerd op groepswerkingen. GRAPE verenigt twee families van mechanismen: (i) multiplicatieve rotaties (Multiplicatieve GRAPE) in SO(d) en (ii) additieve logit-bias (Additieve GRAPE) die voortkomen uit unipotente werkingen in de algemene lineaire groep GL. In Multiplicatieve GRAPE werkt een positie n in Z (of t in R) als G(n)=exp(n,ω,L) met een scheefsymmetrische generator L van rang 2 in R^{d×d}, wat resulteert in een relatieve, compositionele, norm-behoudende afbeelding met een gesloten-vorm matrixexponentiële. RoPE wordt exact gereproduceerd wanneer de d/2 vlakken de canonieke coördinaatparen zijn met een log-uniform spectrum. Aangeleerde commutatieve deelruimten en compacte niet-commutatieve mengsels breiden deze geometrie strikt uit om kruis-deelruimte-koppeling van kenmerken vast te leggen tegen een kostprijs van respectievelijk O(d) en O(r d) per hoofd. In Additieve GRAPE ontstaan additieve logits als unipotente werkingen van rang 1 (of lage rang), waarbij ALiBi en de Forgetting Transformer (FoX) als exacte speciale gevallen worden gereproduceerd, terwijl een exacte relatieve wet en stream-cachebaarheid behouden blijven. Samen biedt GRAPE een principeruimte voor het ontwerpen van positionele geometrie in modellen met lange context, waarbij RoPE en ALiBi als speciale gevallen worden omvat. Projectpagina: https://github.com/model-architectures/GRAPE.
English
We present GRAPE (Group RepresentAtional Position Encoding), a unified framework for positional encoding based on group actions. GRAPE brings together two families of mechanisms: (i) multiplicative rotations (Multiplicative GRAPE) in SO(d) and (ii) additive logit biases (Additive GRAPE) arising from unipotent actions in the general linear group GL. In Multiplicative GRAPE, a position n in Z (or t in R) acts as G(n)=exp(n,ω,L) with a rank-2 skew generator L in 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 are the canonical coordinate pairs with 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 as 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. Altogether, GRAPE supplies 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.