Understanding the unstable convergence of gradient descent

Kwangjun Ahn, Jingzhao Zhang, Suvrit Sra

Standard optimization theory dictates that for a function to be minimized stably, the learning rate or step size ($\eta$) must be less than $2/L$, where $L$ is the "sharpness" (the maximum eigenvalue of the Hessian). If $\eta > 2/L$, Gradient Descent (GD) should theoretically diverge.

However, in modern deep learning, models are frequently trained with large step sizes that violate this condition. Despite this theoretical instability, the training loss often continues to decrease, albeit non-monotonically. This paper investigates why GD often converges in deep learning even when step sizes are "theoretically" too large, identifying that neural network landscapes lack flat minima, forcing GD into an "unstable" regime where it oscillates along valleys of the loss function rather than diverging.

Methodology and New Metrics

To explain the fundamental causes and characteristics of this "unstable convergence," the authors combine theoretical analysis with empirical experiments on datasets like CIFAR-10 and synthetic data.

  • Dynamical Systems Theory: Using the Stable Manifold Theorem, the authors prove that GD cannot converge to any stationary point where the sharpness exceeds $2/\eta$.
  • Toy Models: Simplified settings, such as "flattened" quadratic costs and single-neuron networks, are used to isolate how non-quadratic growth (common in neural networks due to activation functions) prevents total divergence.
  • New Metrics: The study introduces two key quantities to quantify behavior:
  • Relative Progress Ratio (RP): Measures how much the loss changes relative to the squared gradient norm.
  • Directional Smoothness (L): Quantifies how much the gradient changes along the specific update direction.

Key Insights: The Mechanics of Unstable Convergence

The paper provides a principled view of how neural networks optimize in practice, highlighting several core phenomena.

The "No-Go" Theorem Theorem 1 states that for almost all initializations, GD will never settle at a sharp stationary point. Instead, it must keep moving or oscillating.

Why the Loss Doesn't Explode In simple quadratic functions, exceeding the step size limit leads to infinite divergence. In neural networks, activation functions like tanh or ReLU "flatten" the landscape far from the minima. This creates "forward-invariant" sets—regions where the dynamics are trapped, allowing the model to oscillate and slowly drift toward better regions instead of flying off to infinity. Experiments show that linear networks (which are purely quadratic) diverge when the step size is too large, whereas networks with non-linear activations exhibit unstable convergence without exploding.

Oscillatory Dynamics In the unstable regime, successive iterates tend to have nearly opposite gradients. This "zig-zagging" behavior is a hallmark of unstable convergence, as the optimizer bounces back and forth across a valley while slowly descending.

Zig-zagging oscillatory dynamics characteristic of unstable convergence.

The Edge of Stability (EoS) The paper provides a theoretical foundation for the Edge of Stability phenomenon, where sharpness often hovers right around the $2/\eta$ threshold. The authors prove a formal identity relating the Relative Progress Ratio to Directional Smoothness: $RP(\theta) \approx -1 + \frac{\eta}{2} L(\theta; \eta \nabla f(\theta))$. This explains why the loss doesn't stay negative (decreasing) at every step but averages out to a decrease over time.

Loss decreases non-monotonically while sharpness hovers around the stable threshold.

The paper also demonstrates that Stochastic Gradient Descent (SGD) exhibits similar unstable behavior, where the expected loss change can even be positive in some iterations, yet the overall trend remains downward.

Limitations and Future Work

While this framework robustly explains constant step-size GD and SGD, several open questions remain:

  • Adaptive Optimizers: It remains unclear how these insights translate to adaptive methods like Adam or RMSProp.
  • Optimization Speed: The paper notes that larger step sizes in the unstable regime can sometimes lead to faster optimization, but the theoretical reason for this "acceleration" is not fully explored.
  • New Optimizer Design: The finding that adjacent iterates have nearly opposite gradients suggests that current variance-reduction techniques (which assume similar gradients) might be suboptimal in the unstable regime. This opens the door for designing new optimizers specifically tailored for these oscillatory dynamics.

Summary updated

BibTeX
@inproceedings{ahn2022understanding,
  author = {Kwangjun Ahn and Jingzhao Zhang and Suvrit Sra},
  title = {{Understanding the unstable convergence of gradient descent}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=KAOhLG9Fi9},
}
Figure