SGD — Convergence Under Every Standard Assumption
Convex, strongly convex and non-convex SGD; constant versus decaying steps; Robbins–Monro; and the difference between expected and high-probability guarantees.
Setup
where the oracle satisfies, conditional on the past :
Assumptions
(A1) is what makes the method a stochastic approximation of gradient descent rather than a different algorithm. It holds exactly for uniform sampling from a finite training set, and it fails for importance sampling without reweighting, for asynchronous updates with stale gradients, and for gradient clipping — which is worth knowing, since clipping is standard practice in LLM training and the standard theorems do not cover it.
Convex case
Let be convex with minimiser , , and assume (A1) and (A3). Run SGD for steps with constant and output . Then
Strongly convex case: the noise floor
Let be -strongly convex and -smooth, and assume (A1)–(A2). Run SGD with constant . Then
Key idea
Two terms, two behaviours. The first decays geometrically — this is the deterministic linear rate, unchanged. The second, , does not decay at all. Constant-step SGD does not converge to ; it converges to a ball of radius around it, and the radius shrinks only if you shrink . The trade is explicit: a larger step reaches the ball faster and the ball is bigger. This is the whole story behind learning-rate schedules, and it is visible directly in the SGD experiment as the flattening of the error curve.
Under the same assumptions, run SGD with for . Then for all ,
for absolute constants depending only on the ratio .
In the stochastic approximation setting, if the step sizes satisfy
then (under regularity conditions on and the noise) almost surely.
Quoted from Robbins and Monro; modern proofs go through supermartingale convergence. The two conditions have clean interpretations visible in the proofs above: ensures the geometric-decay factor goes to zero, so the initial condition is forgotten; ensures the accumulated noise is finite, so the noise floor vanishes. satisfies both; satisfies the first only; any constant satisfies the second only — and correspondingly has the floor computed above.
Non-convex case
Let be -smooth and bounded below by , and assume (A1)–(A2). Run SGD for steps with constant . Then
What this does not say
Compare with the deterministic non-convex rate for : noise costs a full square root. And the conclusion is still only about average squared gradient norm — it does not say the last iterate has small gradient, does not say any iterate is near a local minimum, and says nothing at all about . Every caveat from the deterministic non-convex theorem still applies, plus the new one that the guarantee is in expectation.
Mini-batching and the expectation/probability distinction
If with the conditionally i.i.d. unbiased with variance , then is unbiased with conditional variance . Consequently the noise floor of constant-step SGD becomes and the non-convex rate becomes .
A bound implies only
by Markov's inequality, and this is the best possible without further assumptions.
Key idea
For a confidence statement one needs , i.e. a hundred-fold improvement in the expected error — a -fold increase in under the rate. This is why high-probability bounds for SGD are a separate research programme rather than a corollary: getting with a dependence requires martingale concentration (Azuma or Freedman's inequality) applied to the noise sequence, and additional assumptions such as sub-Gaussian gradient noise. Reporting an in-expectation bound as though it were a high-confidence guarantee is a common and consequential error.
Heuristic — a reasoning shortcut that predicts the right answer in the regimes discussed here. It is not a proof and can fail outside them.
As with held fixed, the SGD recursion resembles the Itô SDE
where is the gradient-noise covariance. Li, Tai and E make this precise as a weak approximation of order one in .
What this does not say
The approximation is genuinely useful for intuition — it explains why the stationary distribution depends on the ratio rather than on either separately, and it motivates linear learning-rate scaling rules. But its hypotheses are not satisfied in the regimes people invoke it for:
- it requires small, and deep learning uses the largest stable ;
- it assumes the noise is approximately Gaussian, whereas mini-batch gradient noise is often heavy-tailed;
- it assumes varies slowly, whereas gradient noise covariance changes sharply across the loss landscape.
Statements of the form "SGD prefers flat minima because the SDE's stationary measure concentrates there" are heuristic arguments resting on these hypotheses, not theorems about SGD. They belong in the same category as the other plausible-but-unproven claims catalogued on the deep learning theory page.
Problems
Derive the constant-step SGD noise floorProof · Graduate · 1 hour SGD on convex Lipschitz objectivesProof · Intermediate · 30 min The non-convex SGD rateProof · Advanced · 1 hour Mini-batching and the compute budgetNumerical · Intermediate · 30 min Reading the Robbins–Monro conditions off the proofProof · Intermediate · 30 min Implement SGD and locate the noise floorCoding · Advanced · 3 hours Expected error does not give a high-probability guaranteeProof · Advanced · 30 minReferences
- PaperHerbert Robbins and Sutton Monro (1951). A stochastic approximation method
- SurveyLéon Bottou, Frank E. Curtis and Jorge Nocedal (2018). Optimization Methods for Large-Scale Machine LearningThe clearest single account of the results on this page, with the constant-step noise floor made explicit.
- PaperSaeed Ghadimi and Guanghui Lan (2013). Stochastic first- and zeroth-order methods for nonconvex stochastic programmingThe source of the non-convex SGD rate.
- PaperAlexander Rakhlin, Ohad Shamir and Karthik Sridharan (2012). Making Gradient Descent Optimal for Strongly Convex Stochastic Optimization
- PaperQianxiao Li, Cheng Tai and Weinan E (2017). Stochastic modified equations and adaptive stochastic gradient algorithmsMakes the SDE approximation precise, including the order of the approximation.
These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.
Results stated on this page
- DefinitionThe stochastic gradient oracleThe three standard assumptions on the gradient estimator — unbiasedness, bounded variance, and independence across steps.
- TheoremSGD on convex Lipschitz functionsproof includedWith a tuned constant step the averaged iterate attains expected suboptimality of order 1/sqrt T.
- TheoremSGD on strongly convex smooth functions with constant stepproof includedThe error contracts geometrically to a noise floor proportional to the step size times the variance.
- TheoremSGD with decaying step sizeproof includedWith step of order 1/(mu t) the expected error is of order sigma squared over mu squared t, with no floor.
- TheoremRobbins–Monro conditionsSquare-summable but non-summable step sizes give almost sure convergence in the stochastic approximation setting.
- TheoremSGD on smooth non-convex functionsproof includedThe expected squared gradient norm averaged over iterates is O(1/sqrt T) with a tuned constant step.
- PropositionMini-batching reduces variance linearly, not the rateproof includedA batch of size B divides the gradient variance by B, which buys a constant factor and not a better exponent.
- PropositionExpected error does not bound failure probabilityproof includedA bound on the expected gap gives only a Markov-type tail bound, which is far weaker than an exponential one.
- HeuristicThe SDE / diffusion approximation of SGDIn a small-step limit SGD resembles a stochastic differential equation, a useful picture whose hypotheses rarely hold in practice.
Experiments
Problems (7)
All problems- SGD on convex Lipschitz objectivesProofIntermediate⏱ 30 min
- Expected error does not give a high-probability guaranteeProofAdvanced⏱ 30 min
- Implement SGD and locate the noise floorCodingAdvanced⏱ 3 hours
- Mini-batching and the compute budgetNumericalIntermediate⏱ 30 min
- Derive the constant-step SGD noise floorProofGraduate⏱ 1 hour
- The non-convex SGD rateProofAdvanced⏱ 1 hour
- Reading the Robbins–Monro conditions off the proofProofIntermediate⏱ 30 min
Papers that use this mathematics
Adam: A Method for Stochastic Optimization
Diederik P. Kingma, Jimmy Ba · 2015
Mastering the game of Go without human knowledge
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton and others · 2017
Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
Sergey Ioffe, Christian Szegedy · 2015
Human-level control through deep reinforcement learning
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski and others · 2015
Auto-Encoding Variational Bayes
Diederik P. Kingma, Max Welling · 2014
ImageNet Classification with Deep Convolutional Neural Networks
Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton · 2012