Choosing the learning rate
Too small and training crawls; too large and it overshoots or blows up. See all four behaviours and learn to read the cost curve.

In this lesson you will
- Describe what happens when the learning rate α is too small, about right, too large and far too large
- Read a cost-versus-iteration plot to tell whether training is working
- Pick a sensible α by trying a few values on a rough scale
Gradient descent has one knob you have to set yourself: the learning rate . It looks innocent, just a small number multiplying the slope, but it decides whether training takes a few steps, a few million, or never finishes at all.
Four ways it can go
Using the same update :
- Too small: each step is tiny. Training does head downhill, but painfully slowly; you may run out of patience (or compute budget) long before reaching the bottom.
- About right: big confident steps at first, smaller ones as the slope flattens, and the cost settles at the minimum in a handful of iterations.
- Too large: each step jumps past the bottom to the other side of the bowl. It still zig-zags its way in, but it wastes steps bouncing back and forth.
- Far too large: each jump lands higher up the other side than where it started. The slope there is steeper, so the next jump is even bigger. The cost explodes instead of shrinking. This is called divergence.
Why can overshooting make things worse? Because the step size is times the slope. Land somewhere steeper and your next step is bigger, which lands you somewhere steeper still.
Try every behaviour
Pick a preset, or move the slider yourself, then press Run. The left chart shows the path on the cost curve; the right one shows the cost after every iteration, which is the chart practitioners actually watch.
We'll run gradient descent from the same starting point, with four different learning rates.
Reading the cost curve
When you train a real model you can’t see the landscape, but you can always plot after every iteration. That plot is your main diagnostic:
- Going down and flattening out: training is working and has converged.
- Going down, but slowly and steadily: is probably too small; try a larger one.
- Going up, or jumping up and down: something is wrong. Most often is too large, though a bug in the code can look the same. A handy check: with a very small the cost should decrease on every single iteration. If it doesn’t, suspect a bug.
A practical recipe
There’s no formula that gives the perfect for every problem, so practitioners try a few values spaced roughly three times apart, such as
run a short training for each, and pick the largest one whose cost goes down quickly and steadily, perhaps a bit smaller to be safe.
Check yourself
Self-check · 3 questions