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

Sharpness-Aware Minimization with Adaptive Regularization for Training Deep Neural Networks

Jinping Zou, Xiaoge Deng, Tao Sun

TL;DR

This paper introduces SAMAR, a novel optimization algorithm that improves deep learning generalization by making the regularization in Sharpness-Aware Minimization (SAM) adaptive. By dynamically adjusting the penalty for "sharp" loss regions based on real-time gradient information, SAMAR outperforms standard SAM and SGD on image classification benchmarks while maintaining a proven convergence rate.

What Problem Does This Paper Address?

In deep learning, finding a "flat" minimum in the loss landscape—where small perturbations to model weights don't cause a massive spike in error—is a hallmark of good generalization. Sharpness-Aware Minimization (SAM) was designed to find these flat regions.

However, standard SAM relies on a fixed hyperparameter to balance the trade-off between minimizing the training loss and reducing sharpness. This is a "one-size-fits-all" approach that doesn't account for the fact that the loss landscape changes as training progresses. The authors identify a gap: there is a lack of SAM-based methods that can adaptively adjust this regularization parameter on the fly.

Methods

The authors propose SAMAR (SAM with Adaptive Regularization). The core innovation is a dynamic update rule for the regularization parameter ($\lambda$).

  1. Sharpness Ratio ($r_k$): The algorithm calculates the ratio of the gradient norms between the current and previous iterations. This serves as a computationally "cheap" proxy for how much the local sharpness is changing.
  2. Adaptive Update:
    • If the ratio is high (indicating the model has moved into a sharper region), the algorithm increases $\lambda$ to prioritize finding flatter ground.
  3. If the ratio is low (indicating a flatter region), it decreases $\lambda$, allowing the model to focus more on minimizing the primary training loss.
  4. Theoretical Guarantee: The authors provide a mathematical proof showing that SAMAR achieves a sublinear convergence rate of $O(1/\sqrt{K})$, which is theoretically consistent with standard Stochastic Gradient Descent (SGD). Notably, their proof avoids the restrictive "bounded gradient" assumption often required in similar analyses.

Datasets

The researchers evaluated SAMAR using two standard computer vision benchmarks:

  • CIFAR-10: A dataset of 60,000 small images across 10 classes.
  • CIFAR-100: A more complex version with 100 classes, providing a tougher test for generalization.

They tested these datasets across two popular architectures: ResNet-34 and WideResNet-34-10.

Key Insights and Ideas

  • Gradient Norm as a Sensor: Using the ratio of gradient norms is a clever way to sense the "texture" of the loss landscape without the massive computational overhead of calculating the Hessian (second-order derivatives).
  • Counteracting Sharpness: The "aha" moment is that regularization shouldn't be a constant constraint. By increasing regularization specifically when the landscape gets "peaky," the optimizer acts like a driver tapping the brakes only when the road gets bumpy, rather than riding the brakes the whole way.
  • Complexity Matters: The benefits of SAMAR are most pronounced on more complex datasets (CIFAR-100) and larger models. On simpler tasks, the performance gap between optimizers is smaller because models overfit more easily regardless of the optimization strategy.

Key Results

  • Superior Accuracy: On CIFAR-100 using WideResNet-34-10, SAMAR achieved a Top-1 accuracy of 83.77%, outperforming SAM (83.01%), SGD (82.36%), and the recent VaSSO optimizer (83.02%).
  • Better Generalization: SAMAR consistently showed a lower Generalization Error (the gap between training and testing performance). For instance, on CIFAR-100, its generalization error was roughly 15.58%, compared to 17.38% for SGD.
  • Stability: The adaptive mechanism helped maintain higher accuracy in the final stages of training (the "Last 10" average) compared to baselines.

Limitations and Future Work

While SAMAR shows strong results, the authors note a few areas for improvement:

  • Small-Scale Performance: On the simpler CIFAR-10 dataset, SAMAR occasionally lagged slightly behind VaSSO on certain metrics, suggesting that the benefits of adaptivity are scale-dependent.
  • Perturbation Mechanisms: The current work focuses on adapting the weight of the regularization. The authors suggest that future research should explore adapting the adversarial perturbations themselves to further refine how the algorithm "probes" the local landscape for sharpness.

Summary updated

BibTeX
@inproceedings{zou2025sharpness,
  author = {Jinping Zou and Xiaoge Deng and Tao Sun},
  title = {{Sharpness-Aware Minimization with Adaptive Regularization for Training Deep Neural Networks}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=ub478n1jOk},
}

Loading related content...

Figure