Skip to content

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

Fig. / How it works
STEP TOO BIG: IT BOUNCES
Domain 01
Foundations
Role · kind
TrainingConcept
Level
Beginner

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

See it on the full map

Try it

Roll downhill: gradient descent, momentum and Adam
Loading interactive widget…
TakeawaySame landscape, same starting point, different update rules. The learning rate decides whether you crawl, glide or fly off the map.

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 θ\theta and loss LL, one step is

θt+1=θt−η ∇L(θt).\theta_{t+1} = \theta_t - \eta \, \nabla L(\theta_t).

On a simple quadratic bowl L=a2θ2L = \tfrac{a}{2}\theta^2, the update is θt+1=(1−ηa)θt\theta_{t+1} = (1 - \eta a)\theta_t. It converges only when ∣1−ηa∣<1|1 - \eta a| < 1, that is η<2/a\eta < 2/a: 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

  1. Q01

    Training loss jumps around and then becomes NaN. What is the most likely fix?

    Show answer

    B: Decrease the learning rate

  2. 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

Go deeper

Learn first