Log inStart free
LESSON 2.34 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Local minima and saddle points

Roll gradient descent down a bumpy loss and see where it stops.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 2.34 · SADDLE BAYCURVE 0.62 ABOVE THE CHORD · NOT CONVEX
01
Stage 1 of 6 · Convex test
On a convex surface, every chord lies above the curve. Here f rises 0.62 above it.
Explain it simply

The grey lines are contours of the loss, like height lines on a map. Take the teal line from P to Q. On the right, the red curve is the loss along it, and the dashed line joins its ends. In the shaded band, the ground curves down, so the curve climbs over the line. This surface is not convex.

Contours of two valleys. Along the line from P to Q, the loss rises up to 0.62 above the straight chord, near x = 0.15.

weights w: starts and paths A, B, Cgradient steps, loss, stallsminima reachedthe chord test from P to Qcontours of the loss
loss f(x, y) · contoursf curves down along xPQf along P → Q, and the chord−1−0.500.511.5−1−0.50x along P → Q (y = 0)losschordf0.62 abovePQloss f(x, y) · contoursf curves down along xPQf along P → Q, and the chord−1−0.500.511.5−1−0.50x along P → Q (y = 0)losschordf0.62 abovePQ
Toy: one loss f(x, y) · η = 0.1 · 60 steps · numbers to 2 decimals
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
f((1−t) P+t Q)≤(1−t) f(P)+t f(Q)\sy{f}{grad}{f}\big((1-t)\,\sy{P}{data}{P} + t\,\sy{Q}{data}{Q}\big) \le (1-t)\,f(P) + t\,f(Q)
f(0.15,0)=−0.017>−0.633f(0.15, 0) = -0.017 > -0.633

On a convex surface, the curve never rises above the chord.

Common mix-ups

MYTHGradient descent always finds the lowest point.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01On the convex bowl, where do A, B and C end?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.