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

Sharpness-Aware Minimization: General Analysis and Improved Rates

Dimitris Oikonomou, Nicolas Loizou

Sharpness-Aware Minimization (SAM) has emerged as a cornerstone technique for improving generalization in deep learning by steering optimization toward flatter regions of the loss landscape. Despite its empirical success, the theoretical understanding of SAM has been hindered by fragmented analyses and restrictive assumptions. This paper, presented at ICLR 2025, introduces a "Unified SAM" framework that bridges the gap between different algorithmic variants and provides a more realistic theoretical foundation for its performance.

The Challenge: Theoretical Fragmentation and Restrictive Assumptions

In modern deep learning, the goal is not merely to minimize training loss but to find solutions that generalize well to unseen data. Research suggests that "flat" minima—regions where the loss function changes slowly—correlate with better generalization. SAM was designed to find these regions by minimizing both the loss and the local "sharpness."

However, the research community has been divided between two primary implementations:

  1. Standard SAM: Uses a normalized gradient for its inner perturbation.
  2. Unnormalized SAM (USAM): Does not use normalization.

Prior to this work, these two versions were analyzed using disparate techniques, making direct comparison difficult. Furthermore, most existing proofs relied on "bounded variance" or "bounded gradient" assumptions. These assumptions are frequently violated in high-dimensional neural network optimization, where noise levels often scale with the distance from the optimum.

The Unified SAM Framework

The authors propose a unified update rule characterized by a parameter $\lambda \in [0, 1]$. This parameter acts as a continuous dial between the two methodologies:

  • $\lambda = 1$: Recovers standard SAM.
  • $\lambda = 0$: Recovers USAM.
  • $0 < \lambda < 1$: Represents a convex combination of the two.

By framing SAM in this way, the authors can analyze the entire spectrum of sharpness-aware algorithms within a single theoretical structure.

Realistic Convergence Conditions

To move beyond the limitations of previous research, the paper introduces the Expected Residual (ER) Condition. Unlike the bounded variance assumption, the ER condition allows the stochastic noise to scale with the gradient magnitude, providing a much more accurate model for how modern optimizers behave in practice.

Additionally, the authors extend their analysis to functions satisfying the Polyak-Łojasiewicz (PL) condition. The PL condition is a common generalization of strong convexity that applies to many non-convex machine learning problems, allowing the authors to establish a sublinear $O(1/t)$ convergence rate to the exact solution—the first such result for SAM that does not rely on bounded variance.

Key Insights: Hybridization and Importance Sampling

The "Neighborhood" Problem and Dynamic Schedules

One of the paper's most significant theoretical findings is that in a deterministic setting, standard SAM ($\lambda=1$) often fails to converge to the exact minimum. Instead, it tends to oscillate within a "neighborhood" of the optimum. In contrast, USAM ($\lambda=0$) can achieve exact convergence.

To resolve this, the authors propose a hybrid strategy. By using a dynamic schedule for $\lambda$—specifically $\lambda_t = 1 - 1/t$—the optimizer begins as USAM and gradually transitions toward SAM. This approach captures the aggressive early progress of unnormalized updates while benefiting from the late-stage refinement and generalization properties of normalized SAM.

Arbitrary Sampling and Efficiency

The unified framework is built to accommodate any unbiased gradient estimator. This allowed the authors to provide the first theoretical analysis of Importance Sampling for SAM. By sampling data points based on their individual smoothness constants ($L_i$) rather than uniform sampling, the algorithm achieves faster convergence rates, effectively offering a "free lunch" in terms of optimization efficiency.

Empirical Results

The theoretical predictions were validated across several benchmarks, including CIFAR-10 and CIFAR-100, using architectures such as ResNet-18 and WideResNet-28-10.

  • Superior Accuracy: On CIFAR-100 with a WideResNet-28-10, the dynamic hybrid strategy achieved 81.71% accuracy, notably higher than pure SAM (80.69%) and pure USAM (80.84%).
  • Stability: The unified framework demonstrated improved training stability by allowing the "degree of normalization" to be tuned to the specific dataset and model architecture.

Conclusion and Future Directions

This work provides a rigorous and unified theoretical foundation for Sharpness-Aware Minimization, moving the field away from restrictive assumptions and toward a more nuanced understanding of how normalization affects convergence. While the first-order Taylor expansion used for the inner maximization remains a standard approximation, future work may explore higher-order Hessian-based approximations or automated methods for learning the optimal $\lambda$ schedule during training. For now, the Unified SAM framework offers a powerful tool for practitioners looking to maximize the generalization potential of their models.

Summary updated

BibTeX
@inproceedings{oikonomou2025sharpness,
  author = {Dimitris Oikonomou and Nicolas Loizou},
  title = {{Sharpness-Aware Minimization: General Analysis and Improved Rates}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=8rvqpiTTFv},
}
Figure