Every bowl you've dragged a point across so far had exactly one bottom, findable from anywhere. Real loss landscapes are rarely a single bowl — they can fold into separate dips, and worse, they can have flat spots that look like a minimum from one direction and a maximum from another.
This surface has two dips separated by a ridge. Drag along the ridge itself, right through the middle — the gradient can shrink to nearly nothing there too, even though it obviously isn't the bottom of anything.
A function is convex if the Hessian's eigenvalues are non-negative everywhere — informally, if it curves upward (or stays flat) in every direction, at every point. When that fails, a critical point (where ) needs a second test to classify:
- — the Hessian of at the critical point being classified.
- — the two pure second partials (curvature along each axis).
- — the mixed second partial (how curvature along one axis changes as the other moves).
- det > 0 and fxx > 0: a minimum
Both axes curve upward and agree with each other — a genuine local bottom.
- det > 0 and fxx < 0: a maximum
Both axes curve downward together — a genuine local top.
- det < 0: a saddle point
The axes disagree — curving up along one direction and down along another. The gradient still vanishes here, but it's neither a min nor a max: this is exactly what happened on the ridge above.
- Convex functions never produce a saddle
If is convex everywhere, and hold at every point, so this test can only ever report "minimum" — which is precisely why convexity was such a strong guarantee in the first place.
On the convex bowl, every critical point the test finds is a minimum — there's no other option. Switch to the non-convex landscape and settle near the ridge at the center: same test, same formula, and this time it reports "saddle."
Let , which has three critical points: the ridge at the origin, and two wells at .
- Confirm the origin is critical
Differentiate via the chain rule — the outer square, times the inner derivative:
- Classify it with the Hessian test
Differentiate the two first partials again:
- From :
- From that same expression: (no appears in it)
- From :
At : , so — a saddle, exactly as the drag confirmed.
- Classify a well the same way
At : , so and — a minimum, with , the global minimum value.
Drag the point to the landscape's saddle point — where the gradient vanishes but the Hessian determinant is negative, so it's neither a minimum nor a maximum.
A vanishing gradient is necessary for a minimum, but never sufficient — the second-derivative test is what tells a genuine bottom apart from a saddle or a ridge. Neural network loss landscapes are almost never convex, and in high dimensions saddle points, not local minima, turn out to be the more common obstacle — which is exactly why practical optimizers need more than "follow the gradient downhill" to escape them.