A Journey to the Edge of Stability
Abstract
It has recently been found that deep learning often occurs at the "edge of stability (EoS)," where the maximum Hessian eigenvalue of the model is stabilized at a value reciprocal to the learning rate. However, what happens before we reach that regime? We fix a deep learning problem and vary first order optimization methods with dense learning rate sweeps. We then track the characterizing quantities of a learning trajectory: the loss, the sharpness, and the alignment between consecutive gradients. To our surprise, if we scale the learning rate by the dc gain of the optimizer, these traces from the sweeps from different optimizers almost perfectly overlap across a large range of learning rates. The dc-normalized optimizers have another role that only becomes apparent in high learning rates: they select when the sharpness value detaches from this universal curve and enters the edge of stability. Upon this discovery, we specify three distinct regimes with respect to the dc-adjusted learning rate: the low-LR regime where the trajectory is nearly insensitive to the optimizer, the high-LR regime, where the optimizer governs the sharpness according to the EoS reciprocal rule, and the in-between mid-LR regime where so-called progressive sharpening originates independently of the optimizer. This distinguishes the role of the optimizer, the learning rate, and the model in shaping the learning progress.
Create a lesson
Metadata
- Comments
- 33 pages, 20 figures
Related papers
Valid Inference with AI-Generated Covariates in Clustered Business Panels: Informative Validation, Temporal Contamination and Stabilization
Shared title terminologycs.LGYousef Nejatbakhsh, Malihe Aliasgari, Sina Shokoohyar et al.
Sequence-Level Score Centering Stabilizes Off-Policy LLM Reinforcement Learning
Shared title terminologycs.LGRuixiang Zhang
SMORE: Stability-Promoting Mesh-Agnostic Model Reduction for Time-Dependent PDEs
Shared title terminologycs.LGYangyuan Li, Weichao Li, Shaowu Pan
Apparent Compression, Real Stability: The Intrinsic Dimension of Learning a Quantum Wavefunction
Shared title terminologycs.LGLu Wei, Yufeng Wang, Chenfeng Cao et al.
Stabilizing the Dynamic Low-Rank Training
Shared title terminologycs.LGZhonghan Xu, Ling Wang, Junhao Chen et al.