You know the slope at a point. How do you actually use it to walk downhill to the minimum — and what goes wrong if your steps are too big?
Each click takes one step: move a little in the direction that decreases , based on the slope right where you're standing. Watch the trail of dots — that's the path down.
That's gradient descent. Starting from some , repeat:
- — the current position, before this step.
- — the new position, after taking the step.
- — the learning rate: how big a step to take (read "eta").
- — the gradient evaluated at the current position, pointing uphill.
- Eta is the learning rate
(eta) is the learning rate — how big a step you take.
- Direction versus distance
The gradient tells you which way is uphill; decides how far you step away from it.
Drag up and take a few steps. Too small and it crawls; push it high enough and it overshoots the minimum, bouncing back and forth — or worse, flies further away with every step.
From with :
- Take the first step
- Take the second step
- Read what happened
Each step shrinks the distance to the minimum at by the same factor — that's what a stable learning rate looks like.
Tune η and take steps until ∇f(x) is within 0.05 of zero — 15 steps or fewer. Too small and you’ll run out of steps; too large and you’ll overshoot.
Gradient descent repeatedly steps against the gradient. The learning rate trades off speed against stability: too small converges slowly, too large overshoots or diverges entirely.