Toward Deeper Understanding of Nonconvex Stochastic Optimization with Momentum using Diffusion Approximations

Tianyi Liu, Zhehui Chen, Enlu Zhou, Tuo ZhaoarXiv 2018

Abstract

Momentum Stochastic Gradient Descent (MSGD) algorithm has been widely applied to many nonconvex optimization problems in machine learning, e.g., training deep neural networks, variational Bayesian inference, and etc. Despite its empirical success, there is still a lack of theoretical understanding of convergence properties of MSGD. To fill this gap, we propose to analyze the algorithmic behavior of MSGD by diffusion approximations for nonconvex optimization problems with strict saddle points and isolated local optima. Our study shows that the momentum helps escape from saddle points, but hurts the convergence within the neighborhood of optima (if without the step size annealing or momentum annealing). Our theoretical discovery partially corroborates the empirical success of MSGD in training deep neural networks.

Introduction

In the landscape of modern machine learning, Momentum Stochastic Gradient Descent (MSGD) has established itself as the "gold standard" for training deep neural networks. While Vanilla Stochastic Gradient Descent (VSGD) is theoretically well-mapped, the specific advantages of momentum in complex, nonconvex environments have remained largely intuitive rather than formal. Practitioners know that momentum helps "speed up" training, but the mathematical mechanics of how it navigates saddle points and settles into local optima have been elusive.

This paper bridges the gap between empirical success and theoretical understanding. By employing diffusion approximations, the authors provide a rigorous framework to explain why momentum is a double-edged sword: it is an essential accelerator for escaping plateaus, yet a potential hindrance to precision at the final destination.

Methodology: The Diffusion Approximation

The core challenge in analyzing MSGD lies in its discrete, high-variance nature. To overcome this, the researchers model the algorithm’s trajectory as a continuous-time process through Diffusion Approximation. This approach splits the analysis into three distinct mathematical lenses:

  1. Global Dynamics (ODE Approximation): In regions where the gradient is dominant (the "slopes" of the loss landscape), the algorithm's behavior is modeled as an Ordinary Differential Equation (ODE). This reveals that momentum acts as a constant velocity multiplier, accelerating progress by a factor of $1/(1-\mu)$, where $\mu$ is the momentum parameter.
  2. Local Dynamics (SDE Approximation): Near stationary points—such as saddle points or local optima—the gradient approaches zero, and the "noise" of the stochastic updates takes over. Here, the authors use Stochastic Differential Equations (SDE) to analyze how the variance of the gradient interacts with the momentum buffer.
  3. The Fixed-State-Chain: To address the non-Markovian nature of momentum (where the next step depends on the previous velocity), the authors introduce a "Fixed-State-Chain" technique. This allows them to extract a Markovian structure, making the complex dynamics of MSGD mathematically tractable.

Key Insights: The Role of Momentum

The study identifies two primary phases where momentum fundamentally alters the optimization path compared to VSGD.

1. Escaping Saddle Points

Saddle points are notorious in nonconvex optimization; they are flat regions where the gradient is zero, but downward paths exist. The authors demonstrate that momentum amplifies the variance of the stochastic noise. At a saddle point, this increased variance acts as a beneficial "kick," pushing the algorithm toward downward directions much more aggressively than VSGD. This explains why MSGD is significantly more robust against getting "stuck" in high-loss plateaus.

2. The Convergence Penalty near Optima

While noise amplification is a boon at saddle points, it becomes a liability near a local optimum. As the algorithm attempts to settle into the bottom of a narrow valley, the momentum-induced variance creates excessive "jitter." Without adjustment, MSGD may oscillate around the optimum rather than converging to it.

This finding provides a formal theoretical justification for annealing. To reach the same level of precision as VSGD, MSGD requires either a reduction in the step size ($\eta$) or a decrease in the momentum parameter ($\mu$) as training progresses. This aligns perfectly with the common practice of learning rate scheduling used by deep learning practitioners.

Empirical Validation

The theoretical framework was tested against both controlled environments and large-scale benchmarks:

  • Streaming PCA: Used as a laboratory to observe the transition between escaping saddle points and converging to optima.
  • Deep Learning Benchmarks: The authors trained a ResNet-9 architecture on CIFAR-10 and CIFAR-100.

The results were conclusive. On CIFAR-10, MSGD achieved a top accuracy of 95.87%, significantly outperforming VSGD’s 95.32%. The statistical significance was robust, with p-values of 0.0108 for CIFAR-10 and $1.023 \times 10^{-5}$ for CIFAR-100, confirming that the benefits of momentum are not merely a result of hyperparameter tuning but are inherent to the algorithm's dynamics.

Conclusion and Future Directions

This research provides a vital theoretical pillar for the use of momentum in nonconvex optimization. It characterizes MSGD as a high-performance engine: it provides the necessary velocity to traverse complex landscapes and the power to escape traps, provided it is "braked" correctly through annealing near the goal.

However, the authors note that the diffusion approximation is an asymptotic theory (assuming the step size $\eta$ approaches zero). Future work is needed to develop non-asymptotic theories that provide guarantees for the finite, often large step sizes used in practical applications. Additionally, exploring landscapes with non-isolated optima—common in over-parameterized neural networks—remains an open and exciting frontier.

Summary updated

BibTeX
@misc{liu2018toward,
  author = {Tianyi Liu and Zhehui Chen and Enlu Zhou and Tuo Zhao},
  title = {{Toward Deeper Understanding of Nonconvex Stochastic Optimization with Momentum using Diffusion Approximations}},
  year = {2018},
  eprint = {1802.05155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.05155},
}
Figure