Convergence of a Stochastic Gradient Method with Momentum for Non-Smooth Non-Convex Optimization

Vien V. Mai, Mikael Johansson

Introduction

In the world of deep learning, stochastic gradient descent (SGD) with momentum is the "gold standard" for training models. While practitioners have used these methods for years with great success, theoretical understanding has lagged behind. Specifically, most convergence proofs for momentum methods assume the objective function is either convex (bowl-shaped) or smooth (has a continuous gradient).

However, many modern machine learning problems are neither. They are often non-smooth (due to ReLU activations or $L_1$ penalties) and non-convex. This paper tackles the "weakly convex" function class—a broad category that includes many non-smooth, non-convex problems like robust phase retrieval and non-linear least squares.

This research provides the first theoretical convergence guarantees for the Stochastic Heavy Ball (SHB) momentum method when applied to these difficult landscapes. By constructing a novel Lyapunov function, the authors prove that SHB achieves an $O(1/\epsilon^2)$ sample complexity—matching the best-known rates for standard SGD—while demonstrating that momentum significantly improves the algorithm's robustness to hyperparameter tuning.

Methods and Theoretical Innovations

The authors analyze the Stochastic Heavy Ball (SHB) method, also known as Polyak’s momentum. In this setup, the search direction is a moving average of current and past stochastic subgradients. The key technical challenge in proving convergence for momentum is that the "state" of the algorithm depends on the previous step, making the mathematical analysis complex. The authors overcome this through three main innovations:

  1. Constructing a Novel Lyapunov Function: They designed a specialized energy function ($V_k$) that tracks the progress of the algorithm. This function is "well-behaved" enough to show that the algorithm's error decreases at a predictable rate.
  2. Using the Moreau Envelope: Since the functions are non-smooth, one cannot simply rely on the gradient (which might not exist everywhere). Instead, they use the gradient of the Moreau envelope—a smoothed version of the objective function—as a proxy for measuring "near-stationarity."
  3. Single Time-Scale Analysis: Unlike previous theoretical works that required the stepsize and momentum parameters to decay at different rates (a two-time-scale approach), this paper shows that a simpler, single-time-scale approach is sufficient.

Experimental Setup

As a primarily theoretical paper, the authors used synthetic experiments to validate their proofs rather than large-scale image datasets. They focused on the Robust Phase Retrieval problem, aiming to recover a hidden signal from noisy, squared measurements.

  • Setup: A system of $m=300$ non-linear equations with $n=100$ variables.
  • Conditions: They tested varying "condition numbers" (which dictate the difficulty of the matrix math) and "outlier ratios" (the amount of noise or corruption in the data).

Key Insights and Results

  • Momentum is "Free" Theory-Wise: The paper proves a sample complexity of $O(1/\epsilon^2)$. This is the exact same rate as standard SGD, meaning that adding momentum doesn't hurt the theoretical worst-case performance. The algorithm is guaranteed to find an $\epsilon$-stationary point within this timeframe.
  • Parameter-Free Tuning: The analysis shows that the momentum parameter ($\beta$) can be scaled similarly to the stepsize ($\alpha$). This justifies the common practice of using a fixed, high momentum (like 0.9) without needing complex decay schedules.
  • The "Low-Pass Filter" Effect: Momentum acts like a low-pass filter, averaging out the noise in stochastic subgradients. This provides a stabilizing effect that vanilla SGD lacks.

Empirical Speed and Stability: Even though the worst-case complexity is the same as SGD, experiments show that SHB often reaches high-accuracy solutions faster and more reliably in practice.

Function gap vs iterations for SGD and SHB under various conditions

Superior Robustness: In numerical tests, SHB was far less sensitive to the initial stepsize ($\alpha_0$) than vanilla SGD. While SGD would often fail or oscillate wildly if the stepsize was slightly too large, SHB remained stable and converged across a much wider range of values.

Epochs to accuracy vs initial stepsize demonstrating SHB's robustness

Limitations and Future Work

  • Bounded Gradients: For the constrained smooth case, the authors still rely on the assumption that gradients are bounded. While they managed to remove this for unconstrained problems, a general proof for constrained problems without this assumption remains an open question.
  • Stationarity Measure: The use of the Moreau envelope gradient is mathematically sound but can be less intuitive for practitioners than simple gradient norms.
  • Hyperparameter Interaction: While the paper shows SHB is robust, it doesn't fully explore the optimal coupling between the stepsize and momentum for specific non-smooth architectures like Transformers or deep CNNs.

Summary updated

BibTeX
@inproceedings{mai2020convergence,
  author = {Vien V. Mai and Mikael Johansson},
  title = {{Convergence of a Stochastic Gradient Method with Momentum for Non-Smooth Non-Convex Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=-wjs5mZjRF3},
}
Figure