Foundations to Frontier
Tests
E. Deep Learning › E3 Optimizers (one page each)

Adadelta

Adadelta fixes AdaGrad's ever-shrinking learning rate by replacing the sum of squared gradients with a moving average, and it goes one step further: it scales each step by the root-mean-square of recent updates, so that the update has the same units as the parameter and no global learning rate is needed. This page covers the update, its two running averages, the units argument, the role of ε and ρ, and how it relates to RMSProp. In the exercises you show that Adadelta's first step is about √ε/√(1 − ρ) whatever the gradient, then compare it with fixed-rate RMSProp on problems whose solutions differ in scale by a factor of 10⁴: Adadelta adapted to every scale once ε was large enough, ε turned out to be the hidden learning rate, and scaling the solution by s was exactly equivalent to scaling ε by s².

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Remember recent history, not all of it

AdaGrad divides by the total of all past squared gradients, so its steps only ever shrink. Adadelta keeps a fading memory instead: a moving average of recent squared gradients. It also keeps a moving average of recent steps, and uses that as the numerator. The ratio “typical recent step ÷ typical recent gradient” gives steps measured in the same units as the parameters, so in principle no learning rate needs to be chosen.

Optimizer lab: Adadelta versus plain gradient descent
Adadelta: final loss 33.947 · gradient descent: final loss 2.2e-9 (step 22)
Orange: the chosen optimizer; grey dashed: plain gradient descent with the same learning rate. Darker shading means higher loss. On the ill-conditioned bowl, raise κ and watch gradient descent zig-zag across the narrow direction; on the saddle it stalls near the flat start; on the plateau its gradients are tiny. Adaptive methods rescale each direction; momentum methods build speed along consistent directions. The target is 1% of the starting loss (for the saddle, a loss below −0.2; its minima are at −0.25).
Why engineers care

Engineering models mix parameters with very different units and scales, such as a gain in volts per metre, a time constant in seconds, a mass in kilograms. An optimiser whose steps carry the parameters’ units, and adapt to their scale, is attractive when tuning a learning rate per problem is impractical. Understanding where Adadelta’s hidden scale comes from (ε) prevents surprises.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Adadelta replaces AdaGrad's sum of squared gradients with…
  2. 2. Adadelta's numerator is…
  3. 3. Adadelta's goal is to need…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Gradient average: E[g²] ← ρE[g²] + (1 − ρ)g², typically with ρ = 0.95, an averaging window of about 1/(1 − ρ) = 20 steps.
  • Step: Δx = −(√(E[Δx²] + ε)/√(E[g²] + ε))·g.
  • Update average: E[Δx²] ← ρE[Δx²] + (1 − ρ)Δx².
  • Example with ρ = 0.5, ε = 0.25, both averages zero, g = 1: E[g²] = 0.5, Δx = −√0.25/√0.75 ≈ −0.577, then E[Δx²] = 0.5 × 0.333 ≈ 0.167.
  • First step: with both averages at zero, |Δx| = √ε·|g|/√((1 − ρ)g² + ε) ≈ √ε/√(1 − ρ) for any sizeable gradient: 4.47 × 10⁻³ for ε = 10⁻⁶ and ρ = 0.95, whether g is 2 or 2000.
  • Units: g has units of loss/x, √E[g²] the same, √E[Δx²] units of x. So Δx has units of x, which plain SGD and AdaGrad do not.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Averaging window for ρ = 0.9?
  2. 2. Adadelta's first step for a large gradient is about…
  3. 3. Adadelta's update has the units of…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Adadelta in code

Exercise 1.

  • The first step is 4.47 × 10⁻³ for g = 2 and for g = 2000, which equals √ε/√(1 − ρ).
  • Under a constant unit gradient, Adadelta travels only about 7 units in 1000 steps with ε = 10⁻⁶, against about 590 with ε = 10⁻². The distance scales roughly with √ε.
  • So ε, nominally a tiny constant for numerical safety, sets the step size like a learning rate.

Practice.

  • PyTorch’s Adadelta multiplies the step by lr (default 1.0), which reintroduces a learning rate.
  • Increase ε (to around 10⁻⁴–10⁻²) if parameters must move far from their initial values. If the steps are too large, lower it.
  • Adadelta is rarely used for modern deep networks; RMSProp and Adam replaced it. Its unit-consistency idea reappears in Adafactor’s relative step size (E3-13).
torch.optim.Adadelta(params, lr=1.0, rho=0.95, eps=1e-6)
🐍 Exercise 1: Adadelta's step and its hidden scale
Implement Adadelta's update, compute its first step size, and measure how far it can travel under a constant gradient for different ε.
📝 Quick check (Level 2)
0/3 answered
  1. 1. In PyTorch, Adadelta's lr argument…
  2. 2. If Adadelta moves too slowly toward a distant solution, increase…
  3. 3. Adadelta's unit-consistency idea reappears in…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Motivation from Newton’s method. Zeiler (2012) argued that a second-order step Δx = −H⁻¹g has the right units, since H ≈ g/Δx, so 1/H ≈ Δx/g. Adadelta approximates this ratio with the RMS of recent updates divided by the RMS of recent gradients: a diagonal, secant-like curvature estimate built from history.

The role of ε.

  • At the start both averages are zero and the numerator is √ε, so ε sets the initial step scale.
  • The numerator can only grow as fast as updates accumulate: with a constant gradient, E[Δx²] grows by about (1 − ρ)ε per step, giving roughly √t growth in step size.
  • Problems whose solutions lie far from the start therefore need a larger ε, or many steps.
  • If every parameter and the solution are multiplied by s, Adadelta’s trajectory scales by s when ε is multiplied by s² (exactly, apart from the negligible ε inside the gradient average’s square root). This is a symmetry, not a removal of the scale.

Relation to RMSProp. RMSProp (E3-6) uses the same gradient average but a fixed learning rate in the numerator. Adadelta’s numerator adapts to the parameter scale; RMSProp’s does not.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Adadelta approximates which step?
  2. 2. Scaling the solution by s is equivalent for Adadelta to scaling ε by…
  3. 3. RMSProp differs from Adadelta in using…

Level 4: Expert

★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.

Does Adadelta really need no learning rate?

History.

  • M. Zeiler (2012) introduced Adadelta, in the same year as RMSProp’s lecture-slide debut.
  • It was used for early speech and translation models (for example, D. Bahdanau et al.’s 2015 attention model).
  • It was largely superseded by Adam (2014–2015).

Exercise 2. Linear regression (10 weights) whose true weights have magnitude about 0.01, 1 or 100: the same problem in different units. We run 1500 full-batch steps from w = 0 with RMSProp at a fixed rate of 0.01 (tuned for scale 1), and with Adadelta (ρ = 0.95) at ε from 10⁻⁸ to 10⁻², and report the relative distance to the true weights (0.0039 is the noise floor).

method scale 0.01 scale 1 scale 100
RMSProp, lr 0.01 0.550 0.005 0.860
Adadelta, ε = 10⁻⁸ 0.004 0.344 0.989
Adadelta, ε = 10⁻⁶ 0.004 0.004 0.898
Adadelta, ε = 10⁻⁴ 0.004 0.004 0.344
Adadelta, ε = 10⁻² 0.004 0.004 0.004
  • Fixed-rate RMSProp worked only at the scale it was tuned for. At scale 0.01 its steps were too large and it hovered around the solution. At scale 100 they were far too small to get there.
  • Adadelta adapted, if ε was large enough. With ε = 10⁻² it solved all three scales. With smaller ε it failed at the larger scales: ε is the hidden learning rate.
  • A near-exact symmetry. ε = 10⁻⁸ at scale 1 and ε = 10⁻⁴ at scale 100 gave the same error, 0.3441, agreeing to nine decimal places: scaling the solution by s = 100 behaved like scaling ε by s² = 10⁴. (The ε inside the gradient average’s square root breaks the symmetry slightly, but it is negligible once gradients are non-trivial.)
  • Lesson: Adadelta does not remove the scale; it moves it into ε. Its advantage is that a moderately large ε covers a wider range of scales than one fixed learning rate does.
🐍 Exercise 2 (research): does Adadelta really need no learning rate?
Fit linear regressions whose solutions have scale 0.01, 1 and 100 with fixed-rate RMSProp and with Adadelta at ε from 10⁻⁸ to 10⁻², and compare the relative errors after 1500 steps.

Adadelta in AI, robotics and aerospace

  • Parameter estimation with mixed units: fitting physical models (gains, time constants, masses) benefits from unit-consistent steps; Adadelta’s idea, or explicit parameter scaling, avoids per-parameter tuning.
  • Legacy models: older speech and translation systems trained with Adadelta may need its settings reproduced when fine-tuned.
  • Design lesson: “learning-rate-free” methods hide a scale somewhere, so find it and set it deliberately.

References

  1. M. D. Zeiler (2012). “ADADELTA: an adaptive learning rate method.” arXiv:1212.5701.
  2. J. Duchi, E. Hazan, Y. Singer (2011). “Adaptive subgradient methods for online learning and stochastic optimization.” Journal of Machine Learning Research 12.
  3. D. Bahdanau, K. Cho, Y. Bengio (2015). “Neural machine translation by jointly learning to align and translate.” Proc. ICLR.