Skip to content
StackDecode
AI & ML Atlas
Neural NetworksoptimiserInteractive simulation

AdaGrad

Gives rarely updated parameters bigger steps by dividing by their accumulated gradient history.

The idea

AdaGrad keeps a running sum of squared gradients for each parameter and divides the learning rate by its square root. Parameters that get large or frequent gradients see their step shrink, while rare features keep a large step. This suits sparse data, but the sum never decreases so the learning rate eventually vanishes.

θ ← θ − η g / (√Σg² + ε)

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

  • current weights
  • minimum
  • last update

Start somewhere on the bowl. Rings are lines of equal loss; the minimum is at the centre.

step:
0
loss:
3.4617
1/61

Loss landscape seen from above: a long narrow valley. Final loss 0.003.

Step by step

  1. 1Compute the gradient g.
  2. 2Accumulate G ← G + g².
  3. 3Update θ ← θ − η·g / (√G + ε).
  4. 4Repeat.

Where it is used

Sparse problems such as word embeddings and click prediction.

Watch out for

The monotonically shrinking step size can stop learning too early.

Related