SELF-STABILIZATION: THE IMPLICIT BIAS OF GRADI-ENT DESCENT AT THE EDGE OF STABILITY

Abstract

Traditional analyses of gradient descent show that when the largest eigenvalue of the Hessian, also known as the sharpness S(θ), is bounded by 2/η, training is "stable" and the training loss decreases monotonically. Recent works, however, have observed that this assumption does not hold when training modern neural networks with full batch or large batch gradient descent. Most recently, Cohen et al. (2021) detailed two important phenomena. The first, dubbed progressive sharpening, is that the sharpness steadily increases throughout training until it reaches the instability cutoff 2/η. The second, dubbed edge of stability, is that the sharpness hovers at 2/η for the remainder of training while the loss continues decreasing, albeit non-monotonically. We demonstrate that, far from being chaotic, the dynamics of gradient descent at the edge of stability can be captured by a cubic Taylor expansion: as the iterates diverge in direction of the top eigenvector of the Hessian due to instability, the cubic term in the local Taylor expansion of the loss function causes the curvature to decrease until stability is restored. This property, which we call self-stabilization, is a general property of gradient descent and explains its behavior at the edge of stability. A key consequence of self-stabilization is that gradient descent at the edge of stability implicitly follows projected gradient descent (PGD) under the constraint S(θ) ≤ 2/η. Our analysis provides precise predictions for the loss, sharpness, and deviation from the PGD trajectory throughout training, which we verify both empirically in a number of standard settings and theoretically under mild conditions. Our analysis uncovers the mechanism for gradient descent's implicit bias towards stability.

1. INTRODUCTION

1.1 GRADIENT DESCENT AT THE EDGE OF STABILITY Almost all neural networks are trained using a variant of gradient descent, most commonly stochastic gradient descent (SGD) or ADAM (Kingma & Ba, 2015) . When deciding on an initial learning rate, many practitioners rely on intuition drawn from classical optimization. In particular, the following classical lemma, known as the "descent lemma," provides a common heuristic for choosing a learning rate in terms of the sharpness of the loss function: Definition 1. Given a loss function L(θ), the sharpness at θ is defined to be S(θ) := λ max (∇ 2 L(θ)). When this eigenvalue is unique, the associated eigenvector is denoted by u(θ). Lemma 1 (Descent Lemma). Assume that S(θ) ≤ ℓ for all θ. If θ t+1 = θ t -η∇L(θ t ), L(θ t+1 ) ≤ L(θ t ) - η(2 -ηℓ) 2 ∥∇L(θ t )∥ 2 . Here, the loss decrease is proportional to the squared gradient, and is controlled by the quadratic η(2ηℓ) in η. This function is maximized at η = 1/ℓ, a popular learning rate criterion. For any η < 2/ℓ, the descent lemma guarantees that the loss will decrease. As a result, learning rates below 2/ℓ are considered "stable" while those above 2/ℓ are considered "unstable." For quadratic * Equal contribution 1

