Gradient Descent Monotonically Decreases the Sharpness of Gradient Flow Solutions in Scalar Networks and Beyond

Itai Kreisler, Mor Shpigel Nacson, Daniel Soudry, Yair Carmon

Introduction: The Edge of Stability

In classical optimization theory, a fundamental assumption is that the learning rate (or step size) is small enough to ensure the loss decreases at every single step. However, modern deep learning frequently defies these classical rules. Researchers have observed that neural networks trained with large step sizes often enter a regime known as the Edge of Stability (EoS). In this phase, the "sharpness" of the loss landscape—defined as the maximum eigenvalue of the Hessian—hovers around $2/\eta$ (where $\eta$ is the step size), and the training loss oscillates wildly rather than decreasing monotonically.

This non-monotonic behavior raises a critical question: if the loss is constantly bouncing up and down, what is actually being optimized? Is there an underlying "potential function" that Gradient Descent (GD) is consistently minimizing? This paper uncovers a hidden monotonic quantity that explains the stability of seemingly unstable training, providing a new theoretical lens to understand how and why GD converges even when it appears to be failing.

The Hidden Monotonicity: GFS Sharpness

To find order within the chaotic EoS phase, the authors introduce the concept of Gradient Flow Solution (GFS) Sharpness.

The concept relies on a theoretical thought experiment: imagine pausing training at a specific point during the oscillatory GD process. If you were to suddenly switch from the large step size $\eta$ to an infinitesimal one—effectively transitioning to Gradient Flow—and ran the optimization until convergence, you would reach a specific minimizer. The "GFS Sharpness" is the sharpness of that potential minimizer.

The core "aha" moment of the paper is the realization that even when the current training loss is spiking, the potential solution the network is heading toward is consistently getting flatter and "better." In this way, GFS sharpness acts as a Lyapunov-like function for the EoS regime.

Theoretical Framework and Methods

To rigorously analyze this phenomenon, the authors focus on scalar linear networks (networks with arbitrary depth but only one neuron per layer) optimized using the squared loss function. This represents the simplest mathematical model that still exhibits EoS behavior.

Using tools from majorization theory and a mathematical property known as log-Schur-convexity, the authors prove that GD updates consistently move the network parameters toward regions where the GFS Sharpness is lower. A key mechanism behind this is a "balancing" effect: in scalar networks, a single step of GD makes the weights across different layers more balanced, which directly correlates with a decrease in GFS sharpness.

Furthermore, the authors develop a "quasistatic approximation"—a GFS-preserving version of GD. This demonstrates that GD closely tracks a trajectory where the GFS sharpness remains constant or decreases, even while the actual network weights oscillate.

Key Findings and Implications

The paper combines these theoretical proofs with compelling empirical evidence, yielding several major results:

  1. Monotonicity Proof (Theorem 3.2): The authors mathematically prove that for scalar networks, GFS sharpness is monotonically non-increasing under GD across a broad set of initializations.
  2. Convergence Guarantee (Theorem 3.3): The theoretical analysis shows that once the GFS sharpness drops below the stability threshold of $2/\eta$ and the loss is sufficiently small, the loss is guaranteed to converge to zero at an exponential rate.
  3. Universality in Practical Architectures: While the proofs focus on simple scalar networks, the phenomenon appears remarkably consistent across modern architectures. In experiments using VGG11 and ResNet20, the standard sharpness and loss oscillate chaotically. However, the GFS sharpness drops in a smooth, near-monotonic curve toward the $2/\eta$ line.

Ultimately, the EoS acts as a gatekeeper. When GD is initialized in a "sharp" region of the loss landscape, the EoS dynamics enable the network to find flatter regions by slowly decreasing the GFS sharpness until it hits the stability threshold.

Empirical Validation and Limitations

The empirical validation spans synthetic data (for scalar networks) and realistic datasets like CIFAR-10 and SVHN. However, calculating the GFS sharpness is computationally expensive. It requires running a full ODE solver (such as Runge-Kutta) until convergence for every single step of the GD trajectory. Consequently, the authors had to use small subsets of CIFAR-10 (100 or 1,000 images) to test realistic architectures, limiting the ability to scale these specific empirical tests to massive datasets like ImageNet.

Beyond computational complexity, the paper outlines several avenues for future work:

  • Loss Function Scope: The current theoretical analysis is tailored to squared loss. Extending this to cross-entropy is non-trivial because the Hessian of cross-entropy loss vanishes as the loss approaches zero, making "sharpness" a much trickier metric to define and track.
  • Stochasticity: The research focuses exclusively on full-batch Gradient Descent. A natural next step is to investigate whether Stochastic Gradient Descent (SGD) or adaptive optimizers like Adam exhibit similar GFS sharpness monotonicity.
  • Beyond Scalar Networks: While the empirical results on ResNets and VGGs are highly promising, extending the rigorous mathematical proofs to deep, wide, non-linear networks remains an open challenge for the optimization community.

Summary updated

BibTeX
@inproceedings{kreisler2023gradient,
  author = {Itai Kreisler and Mor Shpigel Nacson and Daniel Soudry and Yair Carmon},
  title = {{Gradient Descent Monotonically Decreases the Sharpness of Gradient Flow Solutions in Scalar Networks and Beyond}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=fsFYFyOFb4},
}
Figure