First climb, then descend.
Compute the gradient, perturb parameters in the locally worst direction, evaluate the gradient there, and use that second gradient for the update.
Compare SGD with sharpness-aware minimization. Perturb weights toward the local worst case, then update against that elevated loss to favor solutions whose surroundings stay stable.
Two parameter vectors can have similar training loss while reacting very differently to small perturbations. SAM approximates a min–max objective: choose weights that minimize the maximum loss inside a radius around them.
Compute the gradient, perturb parameters in the locally worst direction, evaluate the gradient there, and use that second gradient for the update.
A tiny radius resembles ordinary training; an excessive radius can optimize the wrong scale.
The basic method needs two forward-backward evaluations per update.
Raw curvature should not be treated as an architecture-independent causal explanation.
Always measure held-out performance, calibration, corruption robustness, and compute.
These papers introduce SAM, adaptive variants, efficient approximations, and critiques of simplistic flatness narratives. Curves here are explanatory.
Introduces the neighborhood min–max objective.
ADAPTIVEAddresses scale sensitivity in sharpness measures.
EFFICIENTStudies geometry-aware perturbations and efficiency.
CAUTIONShows naive flatness measures depend on parameterization.