A Unified Theory of SGD: Variance Reduction, Sampling, Quantization and Coordinate Descent

Eduard A. Gorbunov, Filip Hanzely, Peter Richtárik

Abstract

In this paper, we introduce a unified analysis of a large family of variants of proximal stochastic gradient descent (SGD) which so far have required different intuitions and convergence analyses. By establishing a single parametric framework, we provide convergence guarantees for a massive family of SGD variants, including variance reduction, quantization, and coordinate descent. Our "master theorem" not only recovers best-known rates for existing algorithms but also facilitates the derivation of new, provably effective SGD methods.

Introduction

Stochastic Gradient Descent (SGD) is the cornerstone of modern machine learning optimization. Over the last decade, the SGD family has expanded into a diverse ecosystem of variants: variance-reduced methods like SVRG and SAGA, quantized versions for distributed training such as DIANA, and randomized coordinate descent (RCD). Historically, each variant required a bespoke mathematical proof to guarantee convergence. This siloed approach has hindered the comparison of methods, slowed innovation in hybrid algorithms, and obscured the fundamental properties shared by successful SGD variants.

The Unified Framework

The core contribution of this work is a single parametric framework defined by a pair of recursive inequalities (Assumption 4.1). This framework acts as the "DNA" of a stochastic gradient method. Instead of analyzing specific algorithm mechanics, we assume the stochastic gradient ($g^k$) and a "noise" sequence ($\sigma_k^2$) follow these rules:

  1. Gradient Variance Bound: The expected distance of the stochastic gradient from the true gradient at the optimum is bounded by the distance to the optimum (scaled by a constant $A$) and the current "learnable" noise ($\sigma_k^2$).
  2. Noise Evolution: The noise $\sigma_k^2$ decreases over time (controlled by $\rho$) but can be "re-injected" based on the distance of the current iterate from the optimum (scaled by $C$).

By tuning six parameters ($A, B, C, \rho, D_1, D_2$), we can describe almost any SGD variant. For instance, in variance-reduced methods, the static noise constants $D_1$ and $D_2$ are zero, allowing exact convergence. In vanilla SGD, these constants are positive, explaining convergence to a neighborhood of the solution.

Experimental Validation

To validate the framework and the new methods it enables, we conducted experiments on standard benchmarks from the LIBSVM library, including the w1a, gisette, and mushrooms datasets. We focused on logistic regression with Tikhonov regularization.

One key finding is the efficiency of SGD-MB (sampling with replacement). The theory predicts that sampling with replacement maintains nearly identical convergence per iteration compared to independent sampling, while being computationally cheaper to implement ($O(\tau \log n)$ vs $O(n)$).

Convergence of SGD variants on the gisette_scale dataset, comparing sampling with (r: True) and without (r: False) replacement across different step sizes (gamma).

As shown in the experimental results, the convergence behavior for sampling with and without replacement is virtually indistinguishable across different datasets and step sizes, confirming the theoretical predictions that the sampling strategy does not degrade the convergence rate per iteration.

Convergence of SGD variants on the w1a dataset, illustrating the robustness of the unified theory across different data distributions.

Key Insights

  • Lyapunov Function Unification: Convergence is proven using a "Lyapunov function" that measures total system energy (error + noise). We show this energy decreases linearly for all methods within the framework under strong-quasi convexity.
  • RCD as SGD: A significant insight is that Randomized Coordinate Descent (RCD) is not a separate class of algorithm but a specific parameterization of the unified SGD theory.
  • The Zero-Noise Condition: The framework identifies that the transition from "neighborhood convergence" to "exact convergence" depends entirely on whether static noise terms ($D_1, D_2$) can be driven to zero.

Conclusion and Future Work

This unified theory provides a powerful tool for understanding and designing stochastic optimization methods. While it covers a vast array of algorithms, future work remains in extending the framework to biased estimators (like SAG), accelerated methods (momentum), and non-convex landscapes typical of deep learning.

Summary updated

BibTeX
@inproceedings{gorbunov2020unified,
  author = {Eduard A. Gorbunov and Filip Hanzely and Peter Richtárik},
  title = {{A Unified Theory of SGD: Variance Reduction, Sampling, Quantization and Coordinate Descent}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
  url = {https://openreview.net/forum?id=WyDkNl9JIL0},
}
Figure