Part VIII — Neural Network Fundamentals, Backpropagation & Optimizers · Chapter 7

Loss landscapes in high dimensions

Hook

"Gradient descent might get stuck in a local minimum" is one of the most repeated warnings about training neural networks. In a landscape with millions of dimensions, how often does that actually happen?

Intuition
f(0.0, 0.0) = 0.00 — try moving along y only

The gradient is exactly zero right where you started — by every test gradient descent has, this looks like a place to stop. Drag along xx and the value climbs. Drag along yy instead, and it falls. Zero gradient was never a guarantee of a minimum.

Formalize
  1. A true minimum curves up in every direction

    A flat point (f=0\nabla f = 0) is a true local minimum only if the function curves upward in every direction through it.

  2. One downward direction makes it a saddle

    If even one direction curves downward instead, it's a saddle point — and gradient descent can simply walk out along that direction.

  3. The Hessian's eigenvalues decide which

    Whether a given direction curves up or down is governed by the sign of an eigenvalue of the Hessian (the matrix of second derivatives); a minimum needs all of them positive.

Play
f(0.0, 0.0) = 0.00

Switch between Bowl and Saddle. Same starting point, same exactly-zero gradient — one traps you, one doesn't. In two dimensions, a random flat point has to get lucky in only 2 independent directions to be a true minimum.

Worked example
  1. Model each dimension as a coin flip

    Treat each of nn dimensions at a flat point as an independent coin flip: does the function curve up or down along that direction? A true minimum needs every coin to land "up."

  2. Compute the probability as n grows

    With fair coins, that probability is (1/2)n(1/2)^n:

    • n=1n=1: (1/2)1=0.5(1/2)^1=0.5
    • n=2n=2: (1/2)2=0.25(1/2)^2=0.25
    • n=7n=7: (1/2)7=1/1280.0078(1/2)^7=1/128\approx0.0078 — already under 1%1\%
    • n=20n=20: (1/2)20=1/1,048,5760.00000095(1/2)^{20}=1/1{,}048{,}576\approx0.00000095 — under one in a million
  3. Apply it to real networks

    Real networks have millions of dimensions. Almost every flat point gradient descent finds is a saddle, not a trap — and saddles have at least one escape direction, which is exactly what noisy, non-exact gradients (Chapter 5 of Part II) are good at stumbling onto.

Checkpoint

Starting exactly at the zero-gradient point, drag to reach a value of -2 or lower.

f(0.0, 0.0) = 0.00
Drag the point to try it
Summary
P(true minimum)(1/2)nP(\text{true minimum}) \approx (1/2)^n

"Stuck in a local minimum" describes a 2D intuition that barely survives contact with high dimensions. The real obstacle in deep networks is usually a saddle point's flat region nearby, not the point itself — training slows down passing through, then finds a downhill direction and keeps going. The next few chapters look at other things that go wrong at depth, and why.