Why Does Sharpness-Aware Minimization Generalize Better Than SGD?

Zixiang Chen, Junkai Zhang, Y. Kou, Xiangning Chen, Cho-Jui Hsieh +1 more
2/12/2026

No official code found. Best implementation: MediaBrain-SJTU/FedLESAM (25 stars, last commit 2024-07-29).

Abstract

The challenge of overfitting, in which the model memorizes the training data and fails to generalize to test data, has become increasingly significant in the training of large neural networks. To tackle this challenge, Sharpness-Aware Minimization (SAM) has emerged as a promising training method, which can improve the generalization of neural networks even in the presence of label noise. However, a deep understanding of how SAM works, especially in the setting of nonlinear neural networks and classification tasks, remains largely missing. This paper fills this gap by demonstrating why SAM generalizes better than Stochastic Gradient Descent (SGD) for a certain data model and two-layer convolutional ReLU networks. The loss landscape of our studied problem is nonsmooth, thus current explanations for the success of SAM based on the Hessian information are insufficient. Our result explains the benefits of SAM, particularly its ability to prevent noise learning in the early stages, thereby facilitating more effective learning of features. Experiments on both synthetic and real data corroborate our theory.

View on arXivView PDF

Code Implementations(1)

[ICML 2024 spotlight] This repository contains the implementation details for the paper "Locally Estimated Global Perturbations are Better than Local Perturbations for Federated Sharpness-aware Minimization"

253PythonMay 28, 20242 years ago

Similar Papers

Cite this paper

@article{chen2026does,
  title  = {Why Does Sharpness-Aware Minimization Generalize Better Than SGD?},
  author = {Zixiang Chen and Junkai Zhang and Y. Kou and Xiangning Chen and Cho-Jui Hsieh and Quanquan Gu},
  year   = {2026},
  eprint = {2310.07269},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2310.07269},
  journal = {NEURIPS 2023 2023}
}

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/2310.07269.svg)](https://codeofpaper.com/paper/2310.07269)

Discussion