Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late in Training

Zhanpeng Zhou, Mingze Wang, Yuchen Mao, Bingrui Li, Junchi Yan
2/12/2026

No official code found. Best implementation: zzp1012/SAM-in-Late-Phase (20 stars, MIT, last commit 2025-02-20).

Abstract

Sharpness-Aware Minimization (SAM) has substantially improved the generalization of neural networks under various settings. Despite the success, its effectiveness remains poorly understood. In this work, we discover an intriguing phenomenon in the training dynamics of SAM, shedding light on understanding its implicit bias towards flatter minima over Stochastic Gradient Descent (SGD). Specifically, we find that SAM efficiently selects flatter minima late in training. Remarkably, even a few epochs of SAM applied at the end of training yield nearly the same generalization and solution sharpness as full SAM training. Subsequently, we delve deeper into the underlying mechanism behind this phenomenon. Theoretically, we identify two phases in the learning dynamics after applying SAM late in training: i) SAM first escapes the minimum found by SGD exponentially fast; and ii) then rapidly converges to a flatter minimum within the same valley. Furthermore, we empirically investigate the role of SAM during the early training phase. We conjecture that the optimization method chosen in the late phase is more crucial in shaping the final solution's properties. Based on this viewpoint, we extend our findings from SAM to Adversarial Training.

View on arXivView PDF

Code Implementations(1)

MIT

[ICLR 2025 Spotlight] Code release for "Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late In Training"

200PythonFeb 20, 20251 years agoMIT

Similar Papers

Cite this paper

@article{zhou2026sharpnessaware,
  title  = {Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late in Training},
  author = {Zhanpeng Zhou and Mingze Wang and Yuchen Mao and Bingrui Li and Junchi Yan},
  year   = {2026},
  eprint = {2410.10373},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.10373},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.10373.svg)](https://codeofpaper.com/paper/2410.10373)

Discussion