Perfect Parallelization in Mini-Batch SGD with Classical Momentum Acceleration

Sachin Garg, Michal Derezinski

TL;DR

Everyone uses momentum with mini-batch Stochastic Gradient Descent (SGD) to train massive models on GPUs, yet theory has struggled to explain why this simple combination scales so effortlessly. This paper proves that in the "interpolation regime" (where a model can fit the training data perfectly), classical momentum unlocks perfect parallelization: doubling your mini-batch size cuts the required training steps in half. Even better, it hands practitioners a dead-simple, math-backed rule of thumb for tuning momentum based solely on batch size.

What Problem Does This Paper Address?

If you want to train a modern machine learning model fast, you throw GPUs at it by increasing the mini-batch size $m$—averaging $m$ stochastic gradients per step. Strangely, for vanilla SGD without momentum, larger mini-batches reduce gradient variance, yet they barely budge the total number of iterations needed to converge. You burn more parallel compute without taking fewer steps.

Empirically, adding classical momentum—like Polyak’s Heavy Ball (HBM) or Nesterov’s Accelerated Gradient (NAG), which carry a fraction $\beta$ of the previous update forward—fixes this, allowing optimizers like Adam and SGD+momentum to thrive on massive batches. However, a frustrating theory-practice gap remained. While theoreticians invented intricate, specialized acceleration schemes, practitioners stuck with classical momentum. Prior attempts to prove why classical momentum accelerates mini-batch SGD required unrealistic noise assumptions or astronomically large mini-batches that scaled poorly with problem conditioning.

Methods

The authors study optimization over quadratic functions in the interpolation regime—an abstraction for overparameterized deep learning where all individual data points can be simultaneously satisfied at the optimum.

Instead of analyzing one specific algorithm, they build a unified framework called stochastic momentum processes. This captures standard mini-batch SGD alongside classic linear system solvers like Randomized Kaczmarz and Block Coordinate Descent, encompassing both Heavy Ball and Nesterov momentum.

To analyze how errors shrink over time, one must bound products of non-symmetric random matrices—a notoriously tricky linear algebra trap where standard matrix concentration inequalities blow up to infinity. Prior works tried to diagonalize these matrices, inadvertently introducing massive penalty factors when matrices were nearly non-diagonalizable. The authors sidestep diagonalization and black-box concentration entirely, splitting the error into two parts:

  1. Bias (expected trajectory): Controlled by permuting the transition matrix into $2 \times 2$ blocks and applying the Schur decomposition, which cleanly bounds the matrix powers without condition-number blowups.
  2. Variance (stochastic noise): Controlled by deriving a custom matrix recursion that tracks how mini-batch variance interacts with both real and complex eigenvalues of those $2 \times 2$ blocks.

Datasets

To test their theoretical predictions on kernel ridge regression tasks, the authors evaluate randomized block coordinate descent on benchmark datasets sourced from Scikit-learn and OpenML. Three are explicitly named in the main text (with a fourth detailed in the appendix):

  • Covtype
  • California Housing
  • Abalone

No new datasets or benchmarks are introduced.

Key Insights and Ideas

  • Momentum unlocks linear scaling: Vanilla mini-batch SGD has an average contraction rate that doesn't change with batch size $m$. Momentum exploits the $1/m$ variance reduction of mini-batching, converting parallel compute directly into fewer iterations.
  • Total work stays constant: Up to a natural saturation point ($m \approx \sqrt{\kappa}$, where $\kappa$ is the stochastic condition number), increasing batch size by $m\times$ reduces iteration count by $m\times$. Total stochastic gradients computed remain virtually unchanged, meaning parallel GPU workers translate directly into wall-clock speedup.
  • A problem-independent tuning rule: You don't need to know the elusive condition number $\kappa$ to tune momentum in the parallel scaling regime. Setting the momentum parameter to $\beta = 1 - 1/m$ (or $1 - \Theta(1/m)$) is near-optimal until batch sizes hit saturation.
  • Simpler beats specialized at scale: While complex, theoretically "optimal" acceleration schemes (like Lyapunov-based CDpp) beat classical momentum at batch size $m=1$, classical momentum scales far better with large mini-batches and overtakes them.

Key Results

  • Theoretical Convergence: For a problem with stochastic condition number $\kappa$ and mini-batch size $m$, properly tuned SGD with HBM or NAG reaches $\epsilon$-accuracy in $O((\kappa/m + \sqrt{\kappa})\log(\kappa/\epsilon))$ iterations—improving smoothly from vanilla SGD's $O(\kappa \log(1/\epsilon))$ at $m=1$ down to the accelerated $O(\sqrt{\kappa}\log(\kappa/\epsilon))$ limit.
  • Empirical Verification: Across Covtype and California Housing (testing mini-batches up to $m=500$ and $m=1000$ to reach $10^{-7}$ error), vanilla Coordinate Descent (CD) showed flat iteration counts regardless of $m$. Adding NAG momentum (CD+NAG) dropped iteration counts from $\sim 10^5$ down to $\sim 10^3$, keeping the total number of sampled rows flat across orders of magnitude in $m$.
  • HBM vs. NAG: Testing interpolation parameters $\omega \in [0, 1]$ on Abalone (to $10^{-10}$ error) showed all classical momentum variants achieve the same scaling behavior, though NAG ($\omega = 1$) consistently edged out HBM ($\omega = 0$) in empirical speed.

Limitations and Future Work

  • Quadratic and Interpolation Assumptions: The theory strictly analyzes convex quadratic objectives in the interpolation regime (zero gradient noise at the optimum). Extending this clean parallelization theory to non-quadratic deep learning landscapes or noisy, non-interpolating regimes remains open.
  • Logarithmic Overhead & Saturation: Perfect parallelization holds up to a logarithmic factor (stemming from a $t^3$ polynomial prefactor in the bound). Furthermore, once $m$ exceeds $\Theta(\sqrt{\kappa})$, speedup saturates and $\beta = 1 - 1/m$ becomes too aggressive—requiring $\beta$ to be capped at $1 - \Theta(1/\sqrt{\kappa})$ or tuned via runtime search.

Summary updated

Abstract

Accelerating stochastic gradient methods with classical momentum schemes, such as Polyak's heavy ball, has proven highly successful in training large-scale machine learning models, particularly when combined with the hardware acceleration of large mini-batch computations. Yet, the effect of classical momentum on stochastic mini-batch optimization has been poorly understood theoretically, with prior works requiring strong noise assumptions and extremely large mini-batches. In this work, we develop a general theory of stochastic momentum acceleration for optimizing over quadratics in the interpolation regime, a popular abstraction for studying deep learning dynamics which also includes classical methods such as randomized Kaczmarz and coordinate descent. Our framework encompasses both heavy ball and Nesterov-style momentum, allows for arbitrary mini-batch sizes, and makes minimal assumptions on the stochastic noise. In particular, we show that acceleration from classical momentum is directly proportional to the gradient mini-batch size (up to a natural saturation point), thereby enabling perfect parallelization of mini-batch computations. Our theory also provides a simple choice for the momentum parameter, which is shown to be effective empirically.
BibTeX
@inproceedings{garg2026perfect,
  author = {Sachin Garg and Michal Derezinski},
  title = {{Perfect Parallelization in Mini-Batch SGD with Classical Momentum Acceleration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=3iXnCafw0q},
}
Figure