Lune

ICML2025Top-tier venue

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

Marvin F. da Silva, Felix Dangel, Sageev Oore

Abstract

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 symmetrycorrected 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Penalizing Gradient Norm for Efficiently Improving Generalization in Deep Learning cites Sharpness-aware Minimization for Efficiently Improving Generalization
  • Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites Learning Transferable Visual Models From Natural Language Supervision
  • Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites Sharpness-aware Minimization for Efficiently Improving Generalization
  • Quantifying and Optimizing Simplicity via Polynomial Representations cites Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
  • Quantifying and Optimizing Simplicity via Polynomial Representations cites Learning Transferable Visual Models From Natural Language Supervision
  • Quantifying and Optimizing Simplicity via Polynomial Representations cites Sharpness-aware Minimization for Efficiently Improving Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Quantifying and Optimizing Simplicity via Polynomial RepresentationsTianren Zhang, Xiangxin Li, Minghao Xiao, Guanyu Chen et al.ICML 2026

Builds on11

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacksFrancesco Croce, Matthias HeinICML 2020 · 2,337 citations
  3. Sharpness-aware Minimization for Efficiently Improving GeneralizationPierre Foret, Ariel Kleiner, Hossein Mobahi, Behnam NeyshaburICLR 2021 · 1,861 citations
  4. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs et al.ICML 2022 · 1,464 citations
  5. Penalizing Gradient Norm for Efficiently Improving Generalization in Deep LearningYang Zhao, Hao Zhang, Xiuyuan HuICML 2022 · 165 citations

Related papers

  1. A Modern Look at the Relationship between Sharpness and GeneralizationMaksym Andriushchenko, Francesco Croce, Maximilian Müller, Matthias Hein et al.ICML 2023 · 92 citations
  2. A Reparametrization-Invariant Sharpness Measure Based on Information GeometryCheongjae Jang, Sungyoon Lee, Frank C. Park, Yung-Kyun NohNeurIPS 2022 · 19 citations
  3. Rényi Sharpness: A Novel Sharpness that Strongly Correlates with GeneralizationQiaozhe Zhang, Jun Sun, Yingzhuang LiuICLR 2026 · 1 citation
  4. Beyond Sharpness: The Role of Nonuniformity in GeneralizationYingcong Zhou, Pingfan Wu, Li Wang, Zhiguo Fu et al.AAAI 2026
  5. ASAM: Adaptive Sharpness-Aware Minimization for Scale-Invariant Learning of Deep Neural NetworksJungmin Kwon, Jeongseop Kim, Hyunseo Park, In Kwon ChoiICML 2021 · 385 citations
Dusk over the sea between two cliffs drawn in fine vertical lines