mlsanityData to 7 Oct 2026

Hide & Seek: Transformer Symmetries Obscure Sharpness & Riemannian Geometry Finds It

arXiv 2505.05409 ↗First posted 8 May 2025cs.LGcited by 5

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  3. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
  4. 2016Layer Normalizationcited by 5,579
  5. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  6. 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
  7. 2020Sharpness-Aware Minimization for Efficiently Improving Generalizationcited by 1,404
  8. 2022Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timecited by 1,366
  9. 2016Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networkscited by 541
  10. 2017Sharp Minima Can Generalize For Deep Netscited by 462
  11. 2020Kernel and Rich Regimes in Overparametrized Modelscited by 302
  12. 2022Penalizing Gradient Norm for Efficiently Improving Generalization in Deep Learningcited by 122
10 more
  1. 2021Implicit Bias of SGD for Diagonal Linear Networks: a Provable Benefit of Stochasticitycited by 107
  2. 2023A Modern Look at the Relationship between Sharpness and Generalizationcited by 91
  3. 2019BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performancecited by 89
  4. 2020Relative Flatness and Generalizationcited by 88
  5. 2020In Search of Robust Measures of Generalizationcited by 79
  6. 2024LoRA Done RITE: Robust Invariant Transformation Equilibration for LoRA Optimizationcited by 31
  7. 2023The Geometry of Neural Nets' Parameter Spaces Under Reparametrizationcited by 16
  8. 2019A Scale Invariant Flatness Measure for Deep Network Minimacited by 8
  9. 2024The Uncanny Valley: Exploring Adversarial Robustness from a Flatness Perspectivecited by 4
  10. 2021On Geometric Connections of Embedded and Quotient Geometries in Riemannian Fixed-rank Matrix Optimizationcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 4.

5 papers.