Pro
Pro lesson

Gradient descent

How a model finds the bottom of a valley it cannot see, one small step at a time.

This one’s part of How Models Learn Pro — every lesson, every interactive, and new ones as they land. About 10 minutes.

Already Pro? Sign in and you’ll go straight in.

Inside “Gradient descent”

What you’ll learn

  1. Lost in the fog
  2. Step downhill, then look again
  3. The learning rate
  4. Two dials, one landscape
  5. Bumpy landscapes

Key terms

Loss landscape
The loss for every possible setting of a model’s parameters, pictured as hills and valleys.
Gradient
The steepness of the loss along every parameter at once, gathered into one arrow; it points uphill.
Gradient descent
Repeatedly nudging the parameters a little way against the gradient, so the loss goes down.
Learning rate
A hyperparameter that sets how big each gradient descent step is.
Diverging
When steps overshoot by more each time and the loss grows instead of shrinking.
Local minimum
A point lower than everything around it, but not necessarily the lowest point overall.
Global minimum
The lowest loss anywhere in the landscape.
Loss curve
The loss plotted against one parameter, such as the slope of a line, with everything else held fixed or chosen at its best.

Sources