NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sharpness-Aware Minimization: An Implicit Regularization Perspective

Kayhan Behdin, Rahul Mazumder

Abstract

Sharpness-Aware Minimization (SAM) is a recent optimization framework aiming to improve the deep neural network generalization, through obtaining flatter (i.e. less sharp) solutions. As SAM has been numerically successful, recent papers have studied the theoretical aspects of the framework and have shown SAM solutions are indeed flat. However, there has been limited theoretical exploration regarding statistical properties of SAM. In this work, we directly study the statistical performance of SAM, and present a new theoretical explanation of why SAM generalizes well. To this end, we study two statistical problems, neural networks with a hidden layer and kernel regression, and prove under certain conditions, SAM has smaller prediction error over Gradient Descent (GD). Our results concern both convex and non-convex settings, and show that SAM is particularly well-suited for non-convex problems. Additionally, we prove that in our setup, SAM solutions are less sharp as well, showing our results are in agreement with the previous work. Our theoretical findings are validated using numerical experiments on numerous scenarios, including deep neural networks.

Introduction

Training deep neural networks involves navigating a complex loss landscape characterized by numerous local minima. While standard optimizers like Gradient Descent (GD) can effectively minimize training error, the geometric properties of the resulting solutions significantly impact generalization. "Sharp" minima—regions where the loss function changes rapidly with small parameter perturbations—often lead to poor performance on unseen data. Conversely, "flat" minima are associated with superior generalization.

Sharpness-Aware Minimization (SAM) was introduced to explicitly seek these flatter regions. While empirical evidence has long supported SAM's effectiveness, theoretical understanding has primarily focused on its ability to find flat solutions rather than explaining why these solutions yield better statistical performance. This work bridges that gap by providing a rigorous statistical analysis of SAM’s prediction error compared to GD.

Theoretical Framework

The study analyzes SAM through two primary lenses:

  1. One-Layer ReLU Neural Networks: A fundamental model for understanding non-linear dynamics.
  2. Kernel Regression with Indefinite Kernels: This setup allows for the simulation of non-convex landscapes typical of deep learning.

The researchers employ a Bias-Variance Decomposition to track the algorithmic trajectory. By analyzing discrete steps—rather than the idealized "infinitesimally small" steps often used in theory—they calculate how error components evolve. A key finding is that SAM consistently achieves lower bias than GD, particularly in the early stages of training or under low-noise conditions.

Results and Discussion

The theoretical predictions were validated across several benchmarks, including CIFAR-10, CIFAR-100, and noisy variants of these datasets.

Comparison of SAM and GD performance across empirical datasets (CIFAR100, CIFAR10-noisy) and theoretical models (noiseless and noisy settings).

Key Findings

  • Statistical Superiority: The paper mathematically proves that SAM’s total prediction error is strictly lower than GD’s under specific conditions, such as finite training time.
  • Non-Convex Stability: While SAM may exhibit higher variance in purely convex settings, it serves as a critical stabilizer in non-convex landscapes. In these scenarios, GD's error can theoretically diverge, whereas SAM keeps it bounded.
  • Implicit Regularization: SAM’s dynamics act as a form of implicit regularization, preventing the model from overfitting to sharp, noisy features in the training data.
  • Empirical Performance: On CIFAR-100 with a ResNet50 architecture, SAM reached 81.51% accuracy, outperforming GD's 79.50%. In noisy environments (CIFAR10-Random), the gap widened significantly (90.81% for SAM vs. 87.20% for GD).

Conclusion and Future Work

This work provides the first rigorous statistical proof that SAM reduces prediction error by leveraging its sharpness-seeking behavior as a regularizer. While the analysis focuses on simplified models like one-layer networks to maintain mathematical tractability, the results align closely with empirical observations in deep networks.

Future research directions include extending these guarantees to multi-layered architectures and conducting a more granular analysis of "Stochastic" SAM. Understanding how mini-batch noise interacts with SAM’s pursuit of flatness remains a vital open question for the deep learning community.

Summary updated

BibTeX
@misc{behdin2023sharpness,
  author = {Kayhan Behdin and Rahul Mazumder},
  title = {{Sharpness-Aware Minimization: An Implicit Regularization Perspective}},
  year = {2023},
  eprint = {2302.11836},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.11836},
}
Figure