Learning Rate
How big a step gradient descent takes on each update. Too small and training crawls; too large and it overshoots and diverges.
Also step size · learning rate schedule · warmup · cosine decay
Walking down a dark hill by feeling the slope. Tiny steps are safe but take forever. Giant leaps make you jump over the valley and land on the other side, higher than before.
Where it fits
+All relationships as a list
Is a kind of / part of
Siblings
Try it
How it works
Gradient descent tells you which direction is downhill. The learning rate decides how far to move in that direction each step.
- Too small: every step is tiny. Training is slow and can stall on flat regions.
- About right: the loss falls steadily.
- Too large: steps overshoot the bottom of the valley. The loss bounces around or explodes.
Try it in the widget: raise the learning rate and watch the ball start to zig-zag and then fly off the surface.
Schedules
Most modern recipes do not keep the learning rate fixed:
- Warmup: start very small for the first few hundred or thousand steps, because early gradients are noisy and large.
- Decay: gradually lower it (cosine or linear) so the final steps settle precisely into a minimum.
Adam and other adaptive optimizers rescale the step for each parameter, which makes training less sensitive to the exact value, but you still choose the global learning rate. It is the first of the hyperparameters worth tuning.
The math
For parameters and loss , one step is
On a simple quadratic bowl , the update is . It converges only when , that is : steeper curvature demands a smaller learning rate.
Everyday use cases
- Case 01
Training any neural network
The first thing practitioners tune when a model will not learn: a stuck loss suggests too small, a loss exploding to NaN suggests too large.
- Case 02
Fine-tuning a pretrained model
A much smaller learning rate than in pretraining keeps the model from forgetting what it already knows.
Strengths, weaknesses and when to use it
Strengths
- One number with a huge effect, so tuning it is often the cheapest win.
Weaknesses
- The best value depends on model, batch size and optimizer, so it rarely transfers between setups.
When to use itAlways. Start from a known-good default for your optimizer, then sweep a few values on a log scale (for example 1e-4, 3e-4, 1e-3).
Compare with
Check yourself
- Q01
Training loss jumps around and then becomes NaN. What is the most likely fix?
Show answer
B: Decrease the learning rate
- Q02
Why do many training recipes decay the learning rate over time?
Show answer
A: To take big steps early and fine steps near the minimum