Directions That Don't Drift: Stiefel Manifold Routing for Transformer Attention
arXiv:2609.19363
Abstract
The query and key projections $\WQ,\WK$ in attention are almost always trained by Euclidean optimizers with no geometric constraint. We constrain them to the Stiefel manifold and optimize with a Riemannian Adam carrying one scalar second moment per frame---the form of \citet{becigneul2019}, here extended to the compact, non-Hadamard $\St(d,r)$ with a tangent projector, step-norm cap, and polar retraction. Four propositions prove steepest descent in the embedded metric, gradient-scale independence, well-conditioning, and exact -equivariance. A fifth records that weight decay has \emph{identically zero} Riemannian gradient on $\St(d,r)$ ( lies in the normal space), so decay cannot act on the constrained frames. On a CIFAR-10 patch benchmark at this rule gains \,pp over AdamW across 12 paired starts (, ); earlier fixed-step Riemannian SGD gains \,pp, of which \,pp comes from frozen orthonormal initialization alone. The corrected Adam's lead grows with data: \,pp at to \,pp at . A 12-seed ablation credits all gain to the scale-free step (\,pp, ), nothing to the projector or equivariance; a targeted -sweep causally confirms the mechanism (\,pp at , ). Two five-seed grokking studies confirm the constrained arm does not grok better than the baseline (, A2 wins): the weight-decay exemption has no grokking consequence. A single-seed pilot exploiting this localization achieves the first stable grokking under slingshot conditions---Stiefel + targeted circuit regularization keeps routing-frame isometry error lower than the unconstrained ablation through every collapse.
arXiv comment26 pages, 2 figures