Seeking Flat Minima via Sharpness-Aware Minimization

This direction is split into other directions: perturbation radius sensitivity. Its last version stays readable and citable here.

Version 1 of 1156 papers169 conceptsfrozen 2026-10-04

In deep learning, the "loss landscape" is rarely a smooth bowl. Instead, it is a rugged terrain of peaks and valleys. While standard optimizers like SGD or Adam are excellent at finding a valley where training loss is low, they are indifferent to the shape of that valley. This indifference is a problem: narrow, "sharp" valleys often lead to poor generalization on new data, while broad, "flat" basins tend to be more robust.

Sharpness-Aware Minimization (SAM) is a family of optimization techniques designed to explicitly seek out these flatter regions. By shifting the objective from "find a point with low loss" to "find a neighborhood with low loss," SAM has become a cornerstone for improving the generalization of models ranging from Vision Transformers to Large Language Models.

Standard optimization asks: Where is the loss lowest right now? SAM asks: If I moved slightly in the worst possible direction, would the loss still be low?

To answer this, SAM performs a two-step dance in every training iteration:

  1. The Adversarial Ascent: It calculates a perturbation—a small shift in the model weights—that increases the loss as much as possible within a small radius $\rho$.
  2. The Sharpness-Aware Descent: It calculates the gradient at this "worst-case" nearby point and uses that gradient to update the original weights.

By minimizing the loss of the worst-case neighbor, the optimizer is naturally pushed away from sharp peaks (where a small shift causes a massive loss spike) and toward flat basins (where the loss remains stable even under perturbation). Richong Zhang and colleagues in Regularizing Neural Networks via Adversarial Model Perturbation were among the first to formalize this as a regularization scheme that smooths the optimization surface.

The Problem of the "Goldilocks" Radius

The most critical hyperparameter in SAM is the perturbation radius, $\rho$. It defines the size of the neighborhood the optimizer "feels" around itself. However, setting this radius is a delicate balancing act.

As Chanwoong Park and Ernest K. Ryu demonstrate in Sharpness-Aware Minimization Can Hallucinate Minimizers, if $\rho$ is too large, SAM can "hallucinate" minimizers. The optimizer might stall at points that aren't actually stationary points of the original loss function because the perturbation is so large it interacts with distant, irrelevant features of the landscape.

Conversely, if the radius is too small, the optimizer fails to escape sharp minima. This sensitivity is a recurring theme across the literature:

Overcoming the Computational Tax

The primary drawback of standard SAM is its cost: it requires two forward and backward passes per update (one for the perturbation, one for the actual gradient), effectively doubling the training time. Recent research has focused on making "flatness" cheaper to find.

One approach is Momentum-SAM (MSAM). Marlon Becker proposes using the existing momentum vector from the optimizer to approximate the "sharp" direction, eliminating the need for the second gradient computation (Momentum-SAM: Sharpness Aware Minimization without Computational Overhead).

Another bottleneck is memory. Storing a full-parameter perturbation for billion-parameter models is expensive. The νSAM algorithm addresses this by using nuclear norm constraints to generate low-rank perturbations, slashing the memory footprint of the perturbation by over 99% while maintaining the generalization benefits.

Stability and Gradient Mismatch

A subtle failure mode in sharpness-aware training occurs when we try to get a better estimate of sharpness. Intuitively, taking multiple steps of adversarial ascent should find a "truer" worst-case neighbor. However, Hoki Kim and Jaewook Lee discovered a "gradient mismatch" problem: multi-step ascent often leads to update directions that struggle to minimize the original loss (Exploring the Effect of Multi-step Ascent in Sharpness-Aware Minimization).

To fix this, researchers have introduced stabilization techniques:

Broadening the Scope: Privacy and Robustness

The benefits of seeking flat minima extend beyond simple accuracy. In Differential Privacy (DP), adding noise to gradients usually destroys utility. However, Jinseong Park et al. show that by finding flat minima, models become naturally more robust to the noise required for privacy (Differentially Private Sharpness-Aware Training).

Similarly, in Reinforcement Learning, Benjamin Freed demonstrated that training "world models" with SAM reduces compounding errors during imagined rollouts, as the model's predictions become less sensitive to small errors in the state representation (Improving Model-Based Reinforcement Learning by Converging to Flatter Minima).

By shifting the focus from individual points to the local geometry of the loss landscape, Sharpness-Aware Minimization provides a principled way to build models that don't just memorize their training data, but truly understand the underlying structure of the problem.

Papers in this version

Showing 60 of 156 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_seeking_flat_minima_via_sharpness_aware__cd4b08f5,
  title = {Seeking Flat Minima via Sharpness-Aware Minimization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/seeking-flat-minima-via-sharpness-aware-minimization/rdr_cd4b08f5796f45f29a17fc7dd89314c1},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-01},
}

This exact version (version 1, frozen text):

@misc{lacuna_seeking_flat_minima_via_sharpness_aware__cd4b08f5_v1,
  title = {Seeking Flat Minima via Sharpness-Aware Minimization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/seeking-flat-minima-via-sharpness-aware-minimization/rdr_cd4b08f5796f45f29a17fc7dd89314c1/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-01},
}