Lune

ICML2022Top-tier venue

Towards Understanding Sharpness-Aware Minimization

Maksym Andriushchenko, Nicolas Flammarion

Abstract

Sharpness-Aware Minimization (SAM) is a recent training method that relies on worst-case weight perturbations which significantly improves generalization in various settings. We argue that the existing justifications for the success of SAM which are based on a PAC-Bayes generalization bound and the idea of convergence to flat minima are incomplete. Moreover, there are no explanations for the success of using mm-sharpness in SAM which has been shown as essential for generalization. To better understand this aspect of SAM, we theoretically analyze its implicit bias for diagonal linear networks. We prove that SAM always chooses a solution that enjoys better generalization properties than standard gradient descent for a certain class of problems, and this effect is amplified by using mm-sharpness. We further study the properties of the implicit bias on non-linear networks empirically, where we show that fine-tuning a standard model with SAM can lead to significant generalization improvements. Finally, we provide convergence results of SAM for non-convex objectives when used with stochastic gradients. We illustrate these results empirically for deep networks and discuss their relation to the generalization behavior of SAM. The code of our experiments is available at https://github.com/tml-epfl/understanding-sam.

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.

96 top-tier papers have 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

  • Adversarial Weight Perturbation Helps Robust Generalization cites Overfitting in adversarially robust deep learning
  • A Modern Look at the Relationship between Sharpness and Generalization cites Adversarial Weight Perturbation Helps Robust Generalization
  • A Modern Look at the Relationship between Sharpness and Generalization cites Fantastic Generalization Measures and Where to Find Them
  • A Modern Look at the Relationship between Sharpness and Generalization cites Sharpness-aware Minimization for Efficiently Improving Generalization
  • FlatMatch: Bridging Labeled Data and Unlabeled Data with Cross-Sharpness for Semi-Supervised Learning cites Adversarial Weight Perturbation Helps Robust Generalization
  • FlatMatch: Bridging Labeled Data and Unlabeled Data with Cross-Sharpness for Semi-Supervised Learning cites Sharpness-aware Minimization for Efficiently Improving Generalization
  • Improving the Model Consistency of Decentralized Federated Learning cites Sharpness-aware Minimization for Efficiently Improving Generalization
  • Overfitting in adversarially robust deep learning cites Deep Double Descent: Where Bigger Models and More Data Hurt
  • Sharpness-aware Minimization for Efficiently Improving Generalization cites Fantastic Generalization Measures and Where to Find Them
  • When Do Flat Minima Optimizers Work? cites Fantastic Generalization Measures and Where to Find Them
  • When Do Flat Minima Optimizers Work? cites Sharpness-aware Minimization for Efficiently Improving Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers96

  1. When Do Flat Minima Optimizers Work?Jean Kaddour, Linqing Liu, Ricardo Silva, Matt J. KusnerNeurIPS 2022 · 102 citations
  2. A Modern Look at the Relationship between Sharpness and GeneralizationMaksym Andriushchenko, Francesco Croce, Maximilian Müller, Matthias Hein et al.ICML 2023 · 92 citations
  3. Improving the Model Consistency of Decentralized Federated LearningYifan Shi, Li Shen, Kang Wei, Yan Sun et al.ICML 2023 · 89 citations
  4. Deep Networks Always Grok and Here is WhyAhmed Imtiaz Humayun, Randall Balestriero, Richard G. BaraniukICML 2024 · 53 citations
  5. FlatMatch: Bridging Labeled Data and Unlabeled Data with Cross-Sharpness for Semi-Supervised LearningZhuo Huang, Li Shen, Jun Yu, Bo Han et al.NeurIPS 2023 · 50 citations

Builds on12

  1. Sharpness-aware Minimization for Efficiently Improving GeneralizationPierre Foret, Ariel Kleiner, Hossein Mobahi, Behnam NeyshaburICLR 2021 · 1,861 citations
  2. Deep Double Descent: Where Bigger Models and More Data HurtPreetum Nakkiran, Gal Kaplun, Yamini Bansal, Tristan Yang et al.ICLR 2020 · 1,108 citations
  3. Overfitting in adversarially robust deep learningLeslie Rice, Eric Wong, J. Zico KolterICML 2020 · 935 citations
  4. Adversarial Weight Perturbation Helps Robust GeneralizationDongxian Wu, Shu-Tao Xia, Yisen WangNeurIPS 2020 · 917 citations
  5. Fantastic Generalization Measures and Where to Find ThemYiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan et al.ICLR 2020 · 705 citations

Related papers

  1. Stability Analysis of Sharpness-Aware MinimizationHoki Kim, Jinseong Park, Yujin Choi, Jaewook LeeICML 2026 · 18 citations
  2. Sharpness-Aware Minimization Revisited: Weighted Sharpness as a Regularization TermYun Yue, Jiadi Jiang, Zhiling Ye, Ning Gao et al.KDD 2023 · 7 citations
  3. Sharpness-Aware Minimization: General Analysis and Improved RatesDimitris Oikonomou, Nicolas LoizouICLR 2025
  4. How Sharpness-Aware Minimization Minimizes Sharpness?Kaiyue Wen, Tengyu Ma, Zhiyuan LiICLR 2023 · 3 citations
  5. Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late In TrainingZhanpeng Zhou, Mingze Wang, Yuchen Mao, Bingrui Li et al.ICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines