Skip to content
Glacius
OptimizationConcept reference

Learning rates

A quadratic update scales position by 1−ηa; its sign controls crossing and its magnitude controls distance.

On this page 8 sections
  1. Overview
  2. The learning rate turns a direction into a distance
  3. A negative factor flips the sign
  4. Crossing the minimum is not the same as diverging
  5. A closer look
  6. Key takeaway
  7. Sources & further reading
  8. Concept connections

01The learning rate turns a direction into a distance#

The learning rate turns a direction into a distance. Too small a rate can make progress slow; too large a rate can jump past a minimum and grow the error. A simple quadratic lets us calculate these outcomes exactly instead of relying on a sketch.

For a positive quadratic, the learning rate determines how each update scales the current position.

f(x)=12ax2,a>0xnew=(1ηa)x\begin{gathered}f(x)=\tfrac12ax^2,\quad a>0\\x_{\mathrm{new}}=(1-\eta a)x\end{gathered}

For f(x)=x², a rate of 0.75 takes x from 4 to −2. It crosses the minimum but cuts the loss from 16 to 4.

Starting at x=4 on f=x², rate .75 gives x′=4−.75(8)=−2. The input crosses zero while cost decreases from 16 to 4. The arrow connects the two evaluated states; it is not a curve traced during the update.Starting at x=4 on f=x², rate .75 gives x′=4−.75(8)=−2. The input crosses zero while cost decreases from 16 to 4. The arrow connects the two evaluated states; it is not a curve traced during the update.
Figure 1Starting at x=4 on f=x², rate .75 gives x′=4−.75(8)=−2. The input crosses zero while cost decreases from 16 to 4. The arrow connects the two evaluated states; it is not a curve traced during the update.
Link to this figure ↗Download SVGDownload PNG

For f(x)=x2/2f(x)=x^2/2, the gradient is xx, so one step gives xnew=(1η)xx_{new}=(1-\eta)x. With x=2x=2 and η=0.5\eta=0.5, the new value is 1. With η=1.5\eta=1.5, it is 1-1: the sign flips but the distance to zero shrinks. With η=3\eta=3, it is 4-4 and the distance grows.

Check your reasoning

f(x)=4x2/2f(x)=4x^2/2, start x=3x=3, η=0.25\eta=0.25. Give (next x; loss change).

  1. A00; increases
  2. B00; decreases
  3. C66; increases
Show answer and explanation
00; decreases

Factor 0 gives x=0. Loss goes from 18 to 0.

02A negative factor flips the sign#

A negative factor flips the sign. Its absolute value determines whether distance from zero shrinks, stays fixed or grows.

For a nonzero start, repeated fixed-rate steps converge to zero when the factor’s absolute value is below 1.

Check your reasoning

f(x)=2x2/2f(x)=2x^2/2, fixed η=0.25\eta=0.25; start nonzero. Repeated steps?

  1. ASame sign; shrinks.
  2. BFlips sign; shrinks.
  3. CSame sign; grows.
Show answer and explanation
Same sign; shrinks.

Factor 0.5: same sign, closer.

03Crossing the minimum is not the same as diverging#

Crossing the minimum is not the same as diverging. A factor between −1 and 0 alternates signs while shrinking the distance.

At factor −1 the loss stays fixed; a factor below −1 makes distance and loss grow.

Check your reasoning

f(x)=4x2/2f(x)=4x^2/2, x=4x=4, η=0.375\eta=0.375. Draft: crossing zero raises loss. Give (next x; loss change).

  1. A2-2; increases
  2. B1010; increases
  3. C2-2; decreases
Show answer and explanation
2-2; decreases

x=−2; loss: 32→8.

04A closer look#

For this quadratic, improvement depends on the magnitude of the multiplier 1η1-\eta, not just whether it is positive. More complicated losses have different curvature in different regions and directions. A step-size rule must be interpreted for the stated objective.

Key takeaway

Compute the update factor and compare its absolute value with 1 before interpreting an overshoot.

  • Diagnose overshooting from a step size on a one-dimensional quadratic.

Sources & further reading

  1. [1]
    Dive into Deep Learning §12.3.1.1Dive into Deep Learning §12.3.1.1 · Article

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Learning rates.” Math behind ML. /learn/o-step-size