Transient learning dynamics drive escape from sharp valleys in Stochastic Gradient Descent
Ning Yang, Yikuan Zhang, Qi Ouyang, Chao Tang, Yuhai Tu
TL;DR
The paper addresses why stochastic gradient descent (SGD) tends to find flat, generalizable minima by analyzing its early transient dynamics and introducing a minimal two-valley model with anisotropic, landscape-dependent noise. It shows that the noise reshapes the loss into an effective nonequilibrium potential $\mathcal{L}_{\mathrm{eff}}^{\pm}$ and that a transient freezing point $y_{\mathrm{freeze}}$ controls final valley selection, with larger noise extending the exploratory phase and biasing toward flatter valleys (higher $P_{\mathrm{flat}}^{\mathrm{tr,SGD}}$). The results unify learning dynamics, geometry of the loss landscape, and generalization, and suggest optimization strategies that actively regulate early transient dynamics, noise anisotropy, and freeze timing. This framework provides principled guidance for designing stochastic optimizers that enhance access to flatter, more robust minima in high-dimensional networks.
Abstract
Stochastic gradient descent (SGD) is central to deep learning, yet the dynamical origin of its preference for flatter, more generalizable solutions remains unclear. Here, by analyzing SGD learning dynamics, we identify a nonequilibrium mechanism governing solution selection. Numerical experiments reveal a transient exploratory phase in which SGD trajectories repeatedly escape sharp valleys and transition toward flatter regions of the loss landscape. By using a tractable physical model, we show that the SGD noise reshapes the landscape into an effective potential that favors flat solutions. Crucially, we uncover a transient freezing mechanism: as training proceeds, growing energy barriers suppress inter-valley transitions and ultimately trap the dynamics within a single basin. Increasing the SGD noise strength delays this freezing, which enhances convergence to flatter minima. Together, these results provide a unified physical framework linking learning dynamics, loss-landscape geometry, and generalization, and suggest principles for the design of more effective optimization algorithms.
