Nonconvex optimization and saddles
Separate small gradients, local minima, strict saddles, and global solutions when convex certificates are unavailable.
On this page
The question for today
What you’ll understand
- Classify stationary points using Hessian signs and identify inconclusive cases.
- Derive a first-order stationarity bound for smooth lower-bounded objectives.
- Explain why escaping saddles does not guarantee a global optimum.
Neural networks, matrix factorizations, and many physical fitting problems are nonconvex. We can still make rigorous claims, but the claims become more specific. A small gradient means approximate first-order stationarity, not necessarily a good solution. Curvature can distinguish some saddles from local minima, while flat directions require additional analysis. The aim is to replace the vague statement that an algorithm converged with a precise account of what was measured and what remains unknown.
Stationarity has several possible meanings
At a differentiable unconstrained local minimum, the gradient vanishes. If the function is twice differentiable, its Hessian there is positive semidefinite. Neither condition alone is sufficient: has both zero first derivative and zero second derivative at zero, yet it is not a local minimum. A positive-definite Hessian at a stationary point is a sufficient local condition, while a negative eigenvalue supplies a direction of negative curvature.
A strict saddle is commonly understood here as a stationary point with at least one negative Hessian eigenvalue. Terminology varies across research papers, so check definitions before applying a result. A local minimum can still be worse than another minimum elsewhere. Even an algorithm guaranteed to avoid all strict saddles may finish at a suboptimal local minimum unless special landscape structure connects the remaining stationary points to global solutions.
Smooth descent still proves something
Suppose the objective is globally L-smooth and bounded below by a finite value. Exact gradient descent with step decreases its value by at least the squared gradient norm divided by . Summing this inequality over iterations bounds the total squared gradient. Therefore the smallest gradient norm among the first T iterates becomes small at a rate proportional to the inverse square root of T. Convexity is not needed for that first-order guarantee.
The conclusion concerns the best stationarity residual among those iterates, not convergence of the entire sequence to one point and not proximity to a global minimizer. The starting objective gap and smoothness constant affect the bound, and a function without a finite global L needs a local or adaptive argument. This is a useful example of a theorem that remains meaningful after losing convexity without silently keeping the stronger convex optimality interpretation.
Escape mechanisms need their own assumptions
At an exact saddle, deterministic gradient descent started exactly there remains fixed because its gradient is zero. Small perturbations can reveal an unstable negative-curvature direction. Research guarantees for perturbed gradient methods specify smoothness of gradients and often Hessians, perturbation sizes, tolerances, probabilities, and objective-gap assumptions. The resulting approximate second-order stationarity is more informative than a small gradient, but degenerate stationary points and poor local minima still need careful interpretation.
The interactive model has a single convex quadratic minimum and no saddle at all. Increase η above two to observe divergence, then explain why this is step-size instability rather than evidence of a nonconvex landscape. The two-dimensional worked calculation supplies the actual saddle example. Real experiments should inspect multiple starts, held-out objectives where appropriate, gradient residuals, and curvature evidence; agreement among runs is useful empirical information, not a universal proof of global optimality.
Work it through
One direction contracts while another escapes
For , classify the origin and take one gradient step with η=0.1 from . Contrast with starting exactly at the origin.
The gradient is and the Hessian is . At the origin the gradient is zero, but the negative eigenvalue −2 makes it a strict saddle: small y displacements reduce f.
At , the gradient is , so the update is . The objective changes from zero to .
The x component is multiplied by 0.8 while y is multiplied by 1.2, exposing the unstable negative-curvature direction. Starting exactly at gives zero update forever. This example is unbounded below, so it illustrates saddle geometry rather than the lower-bounded convergence theorem.
A tiny perturbation reveals descent away from a zero-gradient saddle. Negative-curvature escape and convergence to a finite optimum are separate questions.
The living notebook
Explore the model
Interactive lab · optimization
Do not mistake instability for a saddle
Set x₀ nonzero and compare η=1.5 with η=2.2 on the fixed convex f(x)=x²/2. Predict which path diverges. The lab has no nonconvex objective, negative-curvature direction, perturbation mechanism, or saddle-point detection.
- Position x0
- 2
- Objective x²/2
- 2
- Iteration behavior
- Stable step
Gradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forDivergence on this convex model comes from the update multiplier, so an unstable trajectory alone does not diagnose nonconvex geometry.
Pause & reason
Check your understanding
Your turn
Try it yourself
Classify zero for and . Explain why their gradients and Hessians at zero do not distinguish the answers.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compare function values on either side of zero. Both second derivatives vanish at zero, making the ordinary second-derivative test inconclusive.
Compare with the solution
For f, every nonzero x has , so zero is a strict global minimum. For h, every nonzero x has , so zero is a strict global maximum. Both first and second derivatives vanish there. Higher-order information or direct value comparison is needed; a positive-semidefinite zero Hessian is not a sufficient minimum certificate.
Keep the idea
Take it with you
- First-order stationarity is weaker than local minimality and much weaker than global optimality.
- Smooth lower-bounded descent can guarantee a small gradient without convexity.
- Saddle-escape results need explicit regularity and randomness assumptions and do not generally certify global minima.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.