Run Adadelta, the optimizer with no learning rate
Why it matters Adadelta is a standard option in Keras and PyTorch and a good way to understand where Adam's second moment comes from.
Adadelta fixes Adagrad's ever-shrinking steps and even removes the learning rate, by matching units between the step and the gradient.
Write adadelta(w0, a, steps, rho=0.9, eps=1e-6) on f(w) = 0.5 * sum(a * w^2) (gradient a * w). Keep Eg = 0 and Edx = 0 per parameter. Each step: g = a * w; Eg = rho * Eg + (1 - rho) * g^2; dx = -sqrt(Edx + eps) / sqrt(Eg + eps) * g; Edx = rho * Edx + (1 - rho) * dx^2; w = w + dx. Return w as a float array.
def adadelta(w0, a, steps, rho=0.9, eps=1e-6)Example
adadelta([1.0], [1.0], 1) is about [0.996838]: the first steps are tiny because Edx starts at 0, then they grow.
Understand the idea
Adagrad divides by the square root of ALL past squared gradients, so its steps shrink forever. Adadelta uses a decaying average instead, and then replaces the learning rate with a running average of its own past step sizes. It is like adjusting your walking pace by how far your recent strides took you, not by a fixed rule.
Tiny example: w = 1, a = 1, rho = 0.9, eps = 1e-6. g = 1, Eg = 0.1. Edx = 0, so dx = -sqrt(1e-6) / sqrt(0.1 + 1e-6) = about -0.0032. Edx then becomes 0.1 * 0.0032^2 and future steps grow as more history builds up.
Rules: Eg = rho Eg + (1 - rho) g^2, dx = -sqrt(Edx + eps) / sqrt(Eg + eps) * g, Edx = rho Edx + (1 - rho) dx^2.
It is used where tuning a learning rate is painful, such as quick baselines.