Hide & Seek: Transformer Symmetries Obscure Sharpness & Riemannian Geometry Finds It
Not on the map. Why?
Abstract (arXiv)
The concept of sharpness has been successfully applied to traditional architectures like MLPs and CNNs to predict their generalization. For transformers, however, recent work reported weak correlation between flatness and generalization. We argue that existing sharpness measures fail for transformers, because they have much richer symmetries in their attention mechanism that induce directions in parameter space along which the network or its loss remain identical. We posit that sharpness must account fully for these symmetries, and thus we redefine it on a quotient manifold that results from quotienting out the transformer symmetries, thereby removing their ambiguities. Leveraging tools from Riemannian geometry, we propose a fully general notion of sharpness, in terms of a geodesic ball on the symmetry-corrected quotient manifold. In practice, we need to resort to approximating the geodesics. Doing so up to first order yields existing adaptive sharpness measures, and we demonstrate that including higher-order terms is crucial to recover correlation with generalization. We present results on diagonal networks with synthetic data, and show that our geodesic sharpness reveals strong correlation for real-world transformers on both text and image classification tasks.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 22 of its 36 references that are in the map. First posted on arXiv 8 May 2025.
Builds on
22 of 36 references.
References · 22
- 2017Attention Is All You Needcited by 59,932
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
- 2016Layer Normalizationcited by 5,579
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2020Sharpness-Aware Minimization for Efficiently Improving Generalizationcited by 1,404
- 2022Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timecited by 1,366
- 2016Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networkscited by 541
- 2017Sharp Minima Can Generalize For Deep Netscited by 462
- 2020Kernel and Rich Regimes in Overparametrized Modelscited by 302
- 2022Penalizing Gradient Norm for Efficiently Improving Generalization in Deep Learningcited by 122
10 more
- 2021Implicit Bias of SGD for Diagonal Linear Networks: a Provable Benefit of Stochasticitycited by 107
- 2023A Modern Look at the Relationship between Sharpness and Generalizationcited by 91
- 2019BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performancecited by 89
- 2020Relative Flatness and Generalizationcited by 88
- 2020In Search of Robust Measures of Generalizationcited by 79
- 2024LoRA Done RITE: Robust Invariant Transformation Equilibration for LoRA Optimizationcited by 31
- 2023The Geometry of Neural Nets' Parameter Spaces Under Reparametrizationcited by 16
- 2019A Scale Invariant Flatness Measure for Deep Network Minimacited by 8
- 2024The Uncanny Valley: Exploring Adversarial Robustness from a Flatness Perspectivecited by 4
- 2021On Geometric Connections of Embedded and Quotient Geometries in Riemannian Fixed-rank Matrix Optimizationcited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2025Symmetry in Neural Network Parameter Spacescited by 31
- 2026Generalizing the Geometry of Model Merging Through Frechet Averagescited by 1
- 2026Quantifying and Optimizing Simplicity via Polynomial Representationscited by 0
- 2026A Link between Shock-wave Theory and Symmetry-reduced Stochastic Gradient Descent for Artificial Neural Networkscited by 0
- 2026Effects of width-dependent model hyperparameters and ℓ2-regularization on the loss landscape of two-layer ReLU networkscited by 0
- 2026Effects of width-dependent model hyperparameters and ℓ2-regularization on the loss landscape of two-layer ReLU networks18 Jul 2026
- 2026A Link between Shock-wave Theory and Symmetry-reduced Stochastic Gradient Descent for Artificial Neural Networks16 Jun 2026
- 2026Quantifying and Optimizing Simplicity via Polynomial Representations28 May 2026
- 2026Generalizing the Geometry of Model Merging Through Frechet Averages29 Apr 2026
- 2025Symmetry in Neural Network Parameter Spaces16 Jun 2025