Paper: 2606.20547 Authors: Przemyslaw Musialski Categories: cs.LG, cs.CV, cs.GR, cs.RO, math.DG
The Gap
Mainstream attention (transformers, set transformers, graph attention) operates on vector tokens: each token is a feature vector in R^d, and the score between a pair is a learned kernel (e.g., dot product of learned projections).
When the data are intrinsically group-valued (e.g., rotations, rigid motions, affine transforms), the community has tried two workarounds:
- Irrep-based methods (e.g., steerable CNNs, equivariant transformers): decompose the group action into irreducible representations. This works only for compact groups (SO(3), etc.) and blows up combinatorially.
- Surjective-exp methods: lift to a larger space where the exponential map is surjective, then apply standard attention on the lifted vectors. This fails for affine groups with non-zero scale/shear because the exponential map is not surjective onto them.
Both approaches require heavy machinery (Clebsch-Gordan products, spherical harmonics, learned score kernels) and cannot handle the full affine group Aff(2) with scale and shear.
The gap is clear: no attention mechanism exists that accepts bare group transformations as tokens and produces an intrinsic, closed-form score — yet group-valued data are everywhere (robotics, graphics, medical imaging).
Problem: attention with group-valued data
|
v
Existing solutions: vector tokens + learned kernel
/ \
v v
Compact case: irrep Non-compact case: surjective exp
(SO(3), etc.) (scale/shear impossible)
\ /
v v
Both fail for Aff(2) + heavy machinery
|
v
Our insight: token = group element, score = -||log( relative )||^2
|
v
Evidence: SE(2), SO(3), Aff(2) outperforms learned MLP kernel
|
v
Conclusion: first attention for any matrix Lie group, no representations
The Increment
One sentence: Before this paper, attention tokens were feature vectors requiring learned kernels or irreducible representations; after this paper, tokens are bare matrix Lie group elements and the attention score is a closed-form algebraic distance, enabling attention on any matrix Lie group — including non-compact affine groups — with zero learned score parameters.
Core Mechanism
The method treats each token as an element g_i of a matrix Lie group G (e.g., a rotation, a rigid motion, an affine transform).
There is no separate feature vector; the group element is the token.
Given a set of such tokens, the attention score for pair (i, j) is computed in three intrinsic steps:
- Relative pose: compute h_ij = g_i^{-1} g_j, which captures the transformation from token i to token j. This is a canonical invariant under the diagonal group action (i.e., if all tokens are transformed by the same group element on the left, the relative poses remain unchanged).
- Logarithm: take the matrix logarithm log(h_ij) to obtain an element w_ij of the Lie algebra g. This maps the group difference to a linear vector space.
- Score: the attention weight is s_ij = - || w_ij ||_λ^2 / τ, where ||·||_λ is a block-weighted Frobenius norm — each block of the algebra (e.g., rotation block, translation block) gets its own weight. τ is a temperature.
No learned kernel, no irreducible decompositions. The score is purely geometric.
The output of attention (e.g., a weighted combination) would use the same group structure — but the paper focuses on the score itself and shows it matches or beats a learned MLP kernel on the same invariant.
Input: group elements g_1, g_2, ..., g_n (each a matrix)
|
v
For each pair (i,j): compute h_ij = g_i^{-1} g_j
|
v
w_ij = log( h_ij ) (Lie algebra element)
|
v
s_ij = - || w_ij ||_lambda^2 / tau (spatial proximity in algebra)
|
v
a_ij = softmax_j( s_ij ) via exp(s_ij)/sum
|
v
Output: weighted group mean? (not detailed, but standard Fréchet mean)
Structural Metaphor: Neighborhood in a Map of Transformations
Imagine you have a set of cities on a globe (group elements).
The distance between two cities is not a straight line through the Earth but a geodesic along the surface.
Each city token is a location (group element). The relative pose g_i^{-1} g_j is like the bearing and distance from city i to city j — a transformation that moves you from one to the other.
The logarithm maps this surface movement to a local Euclidean map (the tangent space) centered at the identity. It’s like flattening the globe around the starting city onto a flat sheet of paper.
The score is the negative squared distance on that flat paper, weighted by how important each direction is (rotations vs translations vs scale).
Before this paper, you had to learn a separate traffic model (learned kernel) for every pair of cities, or you had to assume the globe is a perfect sphere (compact group) and use spherical harmonics. Now you simply compute the geodesic distance in closed form.
If the cities are under a global coordinate transformation (rotate the whole globe), the distances between any two cities remain the same — that’s diagonal equivariance. This holds tautologically because relative poses are unchanged.
Key Concepts
-
Matrix Lie Group: A set of matrices that is closed under multiplication and inversion, and forms a smooth manifold. Each element represents a transformation (e.g., rotation, translation, scaling, shearing). Tokens are these matrices, not feature vectors attached to transformations.
Example: SE(2) = 3x3 matrices [R t; 0 1] where R is 2x2 rotation, t is translation. Token g = a specific rigid motion. -
Lie Algebra: The tangent space at the identity matrix. The matrix logarithm maps a group element (near identity) to an algebra element — a matrix whose exponential is the original element. This algebra is a vector space with a norm (Frobenius).
Example: For SO(3), the logarithm of a rotation gives a skew-symmetric matrix representing an axis-angle vector. The norm is the angle. -
Closed-form score: The attention weight does not come from a learned query-key dot product. Instead it is the negative squared distance in the algebra, weighted per block. This is the canonical “proximity kernel” for matrix Lie groups.
Why it matters: Zero learned parameters for the score (only a scalar temperature), intrinsic, and works for any matrix Lie group (including non-compact affine groups) where the logarithm is defined on the chosen chart.
Framework Shift
The mainstream approach treats attention as a learned similarity on vectors.
This paper reifies the token as a group element and defines similarity as closed-form geometric distance.
Before (mainstream approach): After (this paper):
Token = vector v_i Token = group g_i
| |
v v
score = v_i^T W_q^T W_k v_j h = g_i^{-1} g_j (relative pose)
| |
v v
learned W_q and W_k w = log(h) (algebra element)
| |
v v
output = weighted sum of vectors score = -||w||^2 / tau (intrinsic)
From learned similarity on feature vectors to intrinsic geometric distance on group elements, the core shift is: *the token itself carries the geometry, and the score is a canonical function of that geometry, not a learned one.
Expert Assessment
Problem choice: Real gap. Existing geometric attention methods (irrep, surjective-exp) are either limited to compact groups or require heavy representation machinery. The affine group with scale/shear is a genuine blind spot, and this paper offers the first clean solution. However, the claim “first attention with bare group tokens” might be true in the narrow sense but should be checked against related work like “group attention” in graph networks.
Method maturity: Elegant insight — almost obvious in retrospect. The closed-form score is a natural “distance kernel” on the group manifold. The block-weighted norm is a sensible way to handle heterogeneous components (rotation vs translation). No brute force, no heavy learning.
Experimental integrity: The experiments (sequence completion on SE(2), SO(3), Aff(2)) are small-scale but focused. They compare the closed-form score against a learned MLP kernel on the same relative-pose invariant, showing competitive or better performance with 50-80x fewer parameters. The vector-token baseline (using raw coordinates) breaks invariance by 5-12 orders of magnitude — a clear demonstration of the problem. However, the paper does not compare against state-of-the-art equivariant attention methods (e.g., LieTransformer, E(n) Equivariant Transformers) on the tasks, so the practical advantage over those remains uncertain.
Writing quality: The paper is dense but well-structured. The “cocycle condition” and Lie algebra jargon might confuse practitioners. The section on block-weighted norms could be clearer — the choice of block weights is not justified beyond “scale the dimensions to similar magnitude”. If the authors had provided a concrete example of constructing the norm for Aff(2), the paper would be more accessible.
Verdict: Weak accept — a clean, theoretically sound contribution that addresses a genuine gap, but the empirical validation is narrow and the practical impact on large-scale tasks remains to be shown.
Takeaways
- Replace learned score kernels with closed-form group distance for any data where tokens are transformations (poses, orientations, affine warps). This eliminates the need for learned query-key projections and ensures equivariance by construction.
- The concept of “token as group element” can transfer to sequence modeling for robotic trajectories, camera motions, or articulations — wherever the input is a stream of transformations.
- The block-weighted Frobenius norm is a simple, principled way to combine multiple Lie algebra components (rotation, translation, scale) into a single distance. Practitioners can use this as a plug-in similarity measure for any matrix Lie group with a logarithm chart.
论文: 2606.20547 作者: Przemyslaw Musialski 分类: cs.LG, cs.CV, cs.GR, cs.RO, math.DG
缺口
主流的注意力机制(Transformer、Set Transformer、图注意力网络)将每个令牌(token)视为特征向量,两两之间的分数由学习到的核函数决定(如经过投影的向量点积)。
当数据本身天然是群值的(如旋转、刚体运动、仿射变换),现有研究走两条路:
- 不可约表示方法(如 steerable CNN、等变 Transformer):将群作用分解为不可约表示。 这只对紧致群(如 SO(3))有效,而且计算复杂度随维数爆炸增长。
- 满射指数映射方法:将群元素提升到指数映射为满射的更大空间,然后在该空间用标准注意力。 这种方法无法处理包含尺度/切变的仿射群,因为其指数映射不是满射的。
两条路都需要大量数学工具(Clebsch-Gordan 积、球谐函数、学习到的核函数),而且都无法覆盖含尺度与切变的完整仿射群 Aff(2)。
缺口明确:没有任何注意力机制能直接将裸群变换作为令牌,并给出内在的闭式分数,而群值数据在机器人学、计算机图形学、医学影像等领域无处不在。
问题:群值数据的注意力机制
|
v
现有方案:向量令牌 + 学习核
/ \
v v
紧致情况:不可约表示 非紧致情况:满射指数映射
(SO(3)等) (无法处理尺度/切变)
\ /
v v
都无法覆盖Aff(2) + 繁重工具
|
v
我们洞见:令牌 = 群元素,分数 = -||log(相对位姿)||^2
|
v
实证:SE(2)、SO(3)、Aff(2) 优于学习MLP核
|
v
结论:首个适用于任意矩阵李群的注意力机制,无需表示理论
增量
一句话: 在此论文之前,注意力令牌是特征向量,需要学习核或不可约表示;在此论文之后,令牌是裸矩阵李群元素,注意力分数是相对位姿的闭式代数距离,可服务于包括非紧致仿射群在内的任意矩阵李群,且分数参数为零。
核心机制
本文将每个令牌视为矩阵李群 G 中的一个元素 g_i(例如旋转、刚体运动、仿射变换)。 没有单独的特征向量;群元素本身就是令牌。
给定一组这样的令牌,任意一对 (i, j) 的注意力分数通过三个内在步骤计算:
- 相对位姿:计算 h_ij = g_i^{-1} g_j,它捕捉了从令牌 i 到令牌 j 的变换。 这是对角线群作用下的规范不变量(即所有令牌被同一个元素左乘时,相对位姿不变)。
- 对数映射:取矩阵对数 log(h_ij),得到李代数 g 中的元素 w_ij。 这就把群差异映射到了一个线性向量空间。
- 分数:注意力权重为 s_ij = - || w_ij ||_λ^2 / τ,其中 ||·||_λ 是分块加权的 Frobenius 范数——代数的每个块(如旋转块、平移块)有自己的权重。 τ 是温度参数。
无需学习核函数,无需不可约分解。分数纯粹是几何的。
注意力的输出(如加权组合)同样可以利用群的结构——但本文聚焦于分数本身,并展示它在同一不变量上匹配或优于学习到的 MLP 核。
输入:群元素 g_1, g_2, ..., g_n (每个是一个矩阵)
|
v
对于每对 (i,j):计算 h_ij = g_i^{-1} g_j
|
v
w_ij = log( h_ij ) (李代数元素)
|
v
s_ij = - || w_ij ||_lambda^2 / tau (代数空间中的临近性)
|
v
a_ij = softmax_j( s_ij ) 取 exp(s_ij)/sum
|
v
输出:加权群均值? (文中未详述,但可基于 Fréchet 平均)
核喻:变换地图中的邻里关系
想象你在一个球面上有若干城市(群元素)。 两个城市之间的最短路线不是穿过地球内部的直线,而是沿着球面的测地线。 每个城市令牌就是一个位置(群元素)。相对位姿 g_i^{-1} g_j 好比从城市 i 到城市 j 的方位和距离——一个将你从一处移到另一处的变换。
对数映射将这个沿表面的移动变成以单位元为中心的局部欧氏地图(切空间)。 这就像把出发城市周围的球面展平到一张纸上。 分数就是这张平纸上负的平方距离,并按照每个方向的重要性(旋转 vs 平移 vs 尺度)加权。
在本论文之前,你需要在每对城市之间学习一个独立的交通模型(学习核),或者假设地球是完美球体(紧致群)并使用球谐函数。 现在你只需直接计算测地距离。 如果所有城市都经历同一个全局坐标变换(比如整个球面旋转),任意两个城市之间的距离保持不变——这就是对角线等变性。因为相对位姿不变,所以等变是套套逻辑。
关键概念
-
矩阵李群:满足矩阵乘法封闭、求逆封闭,且构成光滑流形的一组矩阵。 每个元素代表一个变换(如旋转、平移、尺度、切变)。令牌就是这些矩阵本身,而不是附在变换上的特征向量。 例子: SE(2) = 3x3 矩阵 [R t; 0 1],其中 R 是 2x2 旋转矩阵,t 是平移向量。令牌 g = 一个具体的刚体运动。
-
李代数:单位元处的切空间。矩阵对数将(靠近单位元的)群元素映射到代数元素——一个矩阵,其指数等于原群元素。 该代数是向量空间,具有 Frobenius 范数。 例子:对于 SO(3),旋转的对数给出一个反对称矩阵,对应于轴角向量。其范数就是旋转角度。
-
闭式分数:注意力权重不是来自学习到的查询-键点积。 它是代数中加权负平方距离。这是矩阵李群的规范”临近核”。 为什么重要:分数参数为零(只有一个标量温度),内在,且适用于任何有对数映射的矩阵李群(包括非紧致仿射群)。
框架转变
主流方法将注意力视为向量之上的学习相似度。 本文将令牌实体化为群元素,并将相似度定义为闭式几何距离。
之前(主流方法): 之后(本文方法):
令牌 = 向量 v_i 令牌 = 群元素 g_i
| |
v v
分数 = v_i^T W_q^T W_k v_j h = g_i^{-1} g_j (相对位姿)
| |
v v
学习 W_q 和 W_k w = log(h) (代数元素)
| |
v v
输出 = 向量的加权和 分数 = -||w||^2 / tau (内在)
从特征向量上的学习相似度到群元素上的内在几何距离,核心转变是:令牌本身携带几何,分数是该几何的规范函数,而非学习所得。
专家评审
选题眼光: 真缺口。现有的几何注意力方法(不可约表示、满射指数映射)要么局限于紧致群,要么需要繁重的表示工具。含尺度/切变的仿射群是真正的盲区,本文提供了首个干净的解决方案。但”首个裸群令牌注意力”的声称在广义上可能是真的,需对比图神经网络中的”群注意力”相关工作。
方法成熟度: 优雅的洞见——事后来看近乎显然。闭式分数是流形上自然的”距离核”。分块加权范数合理处理了不同分量(旋转 vs 平移)。不蛮干。
实验诚意: 实验规模较小(SE(2)、SO(3)、Aff(2) 上的序列补全),但针对性强。与基于相同相对位姿不变量但学习 MLP 核的基线相比,闭式分数以 50-80 倍的参数节省达到相当或更好的性能。向量令牌基线破坏了不变量,验证了问题所在。但本文未与先进的等变注意力方法(如 LieTransformer、E(n) 等变 Transformer)对比,所以实际优势尚不确定。
写作功力: 论文密度大但结构清晰。“上同调条件”和李代数行话可能让实践者困惑。分块范数的选择缺乏动机解释——只是说”将各维度缩放到相近量级”。如果作者能给出构建 Aff(2) 范数的具体例子,论文会更易读。
判决: 弱接收——贡献干净、理论扎实,填补了真正的空白,但实证验证狭窄,对大规模任务的实践影响有待观察。
要点总结
- 用闭式群距离替代学习核分数:适用于任何令牌为变换的数据(位姿、朝向、仿射扭曲)。这消除了学习查询-键投影的需求,且保证等变性。
- “令牌即群元素”的概念:可迁移至机器人轨迹、相机运动、关节姿态等序列建模场景。
- 分块加权 Frobenius 范数:一种简单、有原则的方法,将多个李代数分量(旋转、平移、尺度)合并为一个距离。实践者可将其作为任意有对数映射的矩阵李群的即插即用相似度度量。