Skip to content
Deep Learning

What is the learning rate?

The step size of gradient descent: each update moves the weights by the learning rate times the gradient. Too high and the loss oscillates or diverges; too low and training crawls.

datasciencetrivia.com

Card 1 of 263. Answer: The step size of gradient descent: each update moves the weights by the learning rate times the gradient. Too high and the loss oscillates or diverges; too low and training crawls.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

The learning rate is the hyperparameter that sets how big a step gradient descent takes on each update: w ← w − η∇L(w), where η (sometimes written α) is the learning rate. It is often the most important hyperparameter to tune, because the wrong value can keep a model from training at all, however good the rest of the setup is.

When the rate is too high, each step overshoots the minimum. Near a minimum the right step is small, and a step that is too big jumps to the other side of the valley, sometimes higher up than where it started. The loss oscillates or spikes, and if the rate is large enough it grows from step to step until it diverges, often ending in NaN values. On L(w) = w², whose gradient is 2w, each step multiplies w by (1 − 2η): with η between 0.5 and 1, w flips sign every step but still shrinks, and with η above 1 it grows on every step.

When the rate is too low, training crawls. On the same L(w) = w², starting at w = 1, η = 0.1 shrinks w by a factor of 0.8 per step and gets it below 0.01 after 21 steps; η = 0.001 shrinks it by 0.998 and needs about 2,300 steps, more than 100 times as many. On a fixed epoch budget the run stops before converging, which looks like underfitting: a smooth but nearly flat loss curve. In deep networks the usual symptom is a loss that crawls across plateaus.

Two claims about low rates need qualifying. A lower rate does settle closer to the minimum when gradients are noisy, as with mini-batches: on L(w) = ½w² with gradient noise of standard deviation σ, the weight jitters with spread √(η/(2 − η))·σ, about 0.23σ at η = 0.1 and 0.07σ at η = 0.01. But it also closes the gap by 1% per step instead of 10%, which is why schedules start high and decay. And a low rate does not create local minima; it only lacks the step size and noise to hop out of the nearest one, where larger steps can skip shallow dips.

Typical starting values are 0.1 to 0.01 for SGD and around 0.001 for Adam, with 3e-4 a popular default. In practice the rate is rarely constant: warmup keeps the first steps small, step decay or cosine annealing shrink it later, and adaptive optimizers like Adam and RMSProp scale it per parameter. To find a good value, run a learning-rate range test, which raises the rate every batch and plots the loss, and pick a rate somewhat below the point where the loss starts to climb. If a run diverges, lower the rate by a factor of 3 to 10.

All questions