Adaptive Methods and Variance Reduction
AdaGrad, RMSProp, Adam and AdamW derived from their design goals, plus SVRG and SAGA and what each one actually guarantees.
Two distinct ideas are often conflated. Adaptive methods rescale the step per coordinate using observed gradient magnitudes; they change the geometry but not the noise. Variance reduction constructs a lower-variance gradient estimator; it changes the noise but not the geometry. They address different terms in the SGD bound, and they have very different theoretical status.
AdaGrad
With accumulated coordinatewise,
Let be convex with subgradients , and suppose for all . Then AdaGrad with satisfies
Key idea
The bound involves , not . For sparse gradients — most coordinates zero most of the time, as in bag-of-words features or embedding layers — the former is far smaller. That is what AdaGrad was designed for and what it provably delivers. The dense case gives no improvement over tuned SGD, and AdaGrad's monotonically growing makes the effective step decay like whether or not that is appropriate — which is the motivation for the exponential averaging in RMSProp and Adam.
RMSProp and Adam
With , typically,
RMSProp is Adam with and no bias correction.
Why the bias correction is what it is
Unroll the exponential moving average from m_0 = 0.
Take expectations assuming the gradient distribution is stationary with mean g.
. The same computation gives .
The estimator is biased towards zero by exactly the factor (1 − β₁ᵗ), so dividing by it removes the bias.
geometrically, so the correction is negligible after a few thousand steps.
The correction matters only early: at t = 1 with β₂ = 0.999 the uncorrected v₁ is a thousand times too small, so the uncorrected step would be about thirty times too large.
There is a sequence of convex functions with bounded gradients on a bounded convex domain, and a choice of satisfying the conditions stated in the original Adam paper, for which Adam's average regret does not tend to zero.
Quoted from Reddi, Kale and Kumar. The counterexample is a one-dimensional problem where a large informative gradient arrives every third step and small misleading gradients arrive in between; the exponential average forgets the large gradient before it can be acted on, so the effective step in the informative direction is persistently too small. The proposed fix, AMSGrad, replaces with a running maximum, restoring the monotonicity that AdaGrad had and Adam gave up.
What this does not say
The theorem does not say Adam does not work. It says the convergence proof in the original paper is wrong, and that no such proof can exist under those hypotheses. Adam works extremely well on the problems it is used for; AMSGrad, which has a proof, is not noticeably better in practice. The honest statement is that Adam's empirical success is not currently explained by a convergence theorem, and convergence guarantees for it exist only under additional assumptions (bounded gradients plus , or a decaying schedule).
AdamW: why decoupling matters
Consider adding to the gradient (L2 regularisation) versus subtracting from the update (weight decay). Under SGD the two coincide. Under a diagonal preconditioner they do not: the first gives
the second gives
The effective shrinkage in the first is , which varies by coordinate.
Key idea
Under Adam, , so L2 regularisation applies weaker shrinkage to coordinates with large gradient variance — the opposite of what a regulariser is supposed to do, since those are exactly the parameters most at risk of overfitting noise. Decoupling the decay (AdamW) makes the shrinkage uniform and, empirically, substantially improves generalisation. This is a case where a purely mathematical observation about operator ordering had a large practical effect, and it is worth keeping as a reminder that " penalty" and "weight decay" are only synonyms for unpreconditioned methods.
Variance reduction
The noise floor comes from . For a finite sum the variance can be reduced to zero at the optimum, using a control variate.
- Outer loop. At epoch , set the snapshot and compute the full gradient once, at cost .
- Inner loop. For : sample uniformly and take
- Restart. Set to (an average of) the inner iterates and repeat.
The inner-loop direction is unbiased, and its variance is bounded by
so it tends to zero as both the iterate and the snapshot approach .
For -strongly convex with each being -smooth, SVRG with suitable and satisfies for some , at a total gradient cost of .
Quoted from Johnson and Zhang. Compare the alternatives for the same problem: full gradient descent costs and SGD costs . SVRG's beats both — an additive rather than multiplicative dependence on and . SAGA achieves the same with a gradient table instead of periodic full passes.
Empirical observation — a regularity seen in experiments. No theorem on this page establishes it in general.
Despite the clean theory, SVRG and SAGA have not produced wall-clock improvements on large neural networks, and are not used.
What this does not say
Defazio and Bottou investigated this directly and identified several reasons, none of which is a flaw in the theorems:
- Data augmentation makes the objective not a finite sum — each "example" is a distribution, so there is no fixed to snapshot.
- Batch normalisation and dropout make depend on the rest of the batch and on fresh randomness, again breaking the finite-sum structure.
- The snapshot goes stale fast. The theory assumes stays small; in deep learning the iterate moves far within an epoch, so the control variate has little correlation with the gradient it is correcting and the variance reduction largely evaporates.
- Memory. SAGA's gradient table is , which is impossible at scale.
This is a good example of a gap between theory and practice where the theory is correct and the hypotheses are what fail. Identifying which hypothesis fails is more useful than concluding that theory does not apply.
Problems
The AdaGrad summation inequalityProof · Advanced · 30 min Derive Adam's bias correctionProof · Beginner · 15 min Why AdamW differs from Adam with L2Proof · Intermediate · 30 min The SVRG control variateProof · Advanced · 1 hourReferences
- PaperJohn Duchi, Elad Hazan and Yoram Singer (2011). Adaptive subgradient methods for online learning and stochastic optimizationAdaGrad.
- PaperDiederik P. Kingma and Jimmy Ba (2015). Adam: A Method for Stochastic Optimization
- PaperSashank J. Reddi, Satyen Kale and Sanjiv Kumar (2018). On the Convergence of Adam and BeyondThe non-convergence counterexample and AMSGrad.
- PaperIlya Loshchilov and Frank Hutter (2019). Decoupled Weight Decay RegularizationAdamW.
- PaperRie Johnson and Tong Zhang (2013). Accelerating stochastic gradient descent using predictive variance reductionSVRG.
- PaperAaron Defazio and Léon Bottou (2019). On the Ineffectiveness of Variance Reduced Optimization for Deep Learning
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
- TheoremAdaGrad regret boundproof includedAdaGrad attains a regret bound that adapts to the observed gradient scale per coordinate.
- DefinitionAdamExponential moving averages of the gradient and its square, with bias correction.
- TheoremAdam can fail to convergeThere is a convex online problem on which Adam with standard parameters has non-vanishing average regret.
- PropositionL2 regularisation and weight decay differ under adaptive preconditioningproof includedAdding lambda times the weight to the gradient is not the same as shrinking the weight, once the update is rescaled per coordinate.
- TheoremSVRG attains a linear rate on finite sumsVariance reduction removes the noise floor entirely for strongly convex finite-sum problems.
- Empirical observationVariance reduction does not help deep learning in practiceThe methods that provably remove the noise floor for finite sums have not produced wall-clock gains on large neural networks.