Sharpness-Aware Minimization and the Edge of Stability

Philip M. Long, Peter L. Bartlett
9/21/2023
24 citations
cs.LGcs.NEstat.ML

Official code: google-deepmind/sam_edge (22 stars, Python, Apache-2.0, last commit 2026-04-13).

Abstract

Recent experiments have shown that, often, when training a neural network with gradient descent (GD) with a step size $η$, the operator norm of the Hessian of the loss grows until it approximately reaches $2/η$, after which it fluctuates around this value. The quantity $2/η$ has been called the "edge of stability" based on consideration of a local quadratic approximation of the loss.

Show full abstract

We perform a similar calculation to arrive at an "edge of stability" for Sharpness-Aware Minimization (SAM), a variant of GD which has been shown to improve its generalization. Unlike the case for GD, the resulting SAM-edge depends on the norm of the gradient. Using three deep learning training tasks, we see empirically that SAM operates on the edge of stability identified by this analysis.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
221Python, ShellSep 29, 20237 months agoApache-2.0

Similar Papers

Cite this paper

@article{long2023sharpnessaware,
  title  = {Sharpness-Aware Minimization and the Edge of Stability},
  author = {Philip M. Long and Peter L. Bartlett},
  year   = {2023},
  eprint = {2309.12488},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.12488v6}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.12488.svg)](https://codeofpaper.com/paper/2309.12488)

Discussion