Deep learning optimization is famously messy. If you’ve ever stared at a training log, you’ve seen the loss jitter up and down, seemingly defying the "descent" in Gradient Descent. This behavior, known as the Edge of Stability (EOS), has long been a thorn in the side of optimization theory. Traditional theories assume smooth, monotonic progress, but real-world neural networks oscillate wildly along high-curvature directions.
In their paper, "Understanding Optimization in Deep Learning with Central Flows," Jeremy M. Cohen and colleagues introduce a powerful new lens to view this chaos: the Central Flow.
The Problem: Navigating the Edge of Stability
Standard optimization theory (like Gradient Flow) assumes that if you take a small enough step, the loss will go down. However, practitioners often use large learning rates where the optimizer becomes unstable. In this regime, the optimizer "bounces" back and forth across narrow valleys in the loss landscape.
While the loss might spike locally, the training still succeeds over the long term. Traditional theory cannot explain how the optimizer makes progress while oscillating, or why adaptive optimizers like RMSProp work so well in these unstable regions. We lack a mathematical "map" for the path the optimizer actually takes when it’s jittering.
Methodology: Deriving Central Flows
To bridge this gap, the researchers developed "central flows"—differential equations that model the time-averaged, smoothed trajectory of oscillatory optimizers. By filtering out the high-frequency noise of the Edge of Stability, these flows reveal the underlying optimization dynamics.
The authors derived these flows by applying a third-order Taylor expansion to the loss function—one order higher than what is typically used in optimization analysis.
- Time-Averaging: They treat the optimizer as oscillating around a smooth path. By averaging these oscillations, they derive an Ordinary Differential Equation (ODE) that describes the "macroscopic" movement of the weights.
- Implicit Sharpness Penalty: The math reveals a crucial term: the oscillations themselves act as a penalty on the "sharpness" (the largest eigenvalue of the Hessian). Essentially, the more the optimizer bounces, the more it pushes itself toward flatter regions of the landscape.
- Cone Complementarity Problem (CCP): To handle complex cases where the optimizer oscillates in multiple directions at once, the authors framed the search for the average path as a CCP—a type of convex optimization problem that determines exactly how much the optimizer should oscillate to stay at the Edge of Stability.
Key Insights
- The Hidden Progress Metric: Even when the raw training loss is moving non-monotonically (going up and down), the loss along the central flow is proven to decrease monotonically. The central flow represents the "true" progress the model is making.
- Adaptive Optimizers are "Step-Size Seekers": The paper reveals that adaptive optimizers like RMSProp implicitly adapt by finding the maximum stable step size for the local landscape.
- Acceleration via Regularization: By oscillating, the optimizer implicitly regularizes (flattens) the landscape. Because the landscape becomes flatter, the optimizer can eventually take larger effective steps, leading to faster convergence in the long run.
Empirical Results
The authors verified their theory across a wide range of modern architectures, including ResNets and Vision Transformers (ViTs) on CIFAR-10, as well as Mamba models on synthetic sorting tasks.
The central flows demonstrated a high degree of numerical accuracy in predicting long-term trajectories:
- Loss Curve Matching: The dashed lines of the central flow predictions almost perfectly overlay the smoothed loss curves of actual Gradient Descent and RMSProp runs across different architectures.
- Weight Space Accuracy: The distance between the actual optimizer and the central flow remains small over thousands of steps, whereas traditional Gradient Flow diverges almost immediately once the model hits the Edge of Stability.
- Predicting Variance: The theory accurately predicts the covariance of the oscillations, meaning it can anticipate exactly how much the model will jitter in specific directions.
Limitations and Future Work
While central flows offer a robust new framework, there are limitations. If the learning rate is too large, the dynamics become chaotic and the central flow approximation breaks down. Furthermore, the theory relies on higher-order derivatives, meaning it works best on "smooth" architectures (like those using GeLU) and struggles with non-smooth functions like ReLU. Finally, predictions are currently more accurate for Mean Squared Error (MSE) loss than for Cross-Entropy (CE) loss.
Future work aims to extend this framework to other popular optimizers like Adam (with momentum) and to leverage these insights to design entirely new, more efficient optimization algorithms.
Summary updated