Nonconvex Optimization & Saddle Points
Stationary points, escaping saddles and benign landscapes.
Finding the global minimum of a general nonconvex function is hopeless, and even certifying that a point is a local minimum can be NP-hard. Yet gradient methods train nonconvex models every day. This lesson makes precise what they can promise: gradient descent almost never converges to a strict saddle, a little noise makes escaping saddles efficient, and some important nonconvex problems have no spurious local minima at all.
What you’ll learn
- Define first- and second-order stationarity, strict saddles and approximate second-order stationary points, and explain why local optimality is hard to certify in general.
- Prove, via the stable manifold theorem, that gradient descent from a random start converges to a strict saddle with probability zero, and explain why that alone does not make it fast.
- Estimate the time to escape a strict saddle from a random perturbation, and state the guarantee of perturbed gradient descent.
- Prove that has no spurious local minima, and survey which landscapes are benign and which are not.
What a local method can promise
| Stationary point | Hessian | Example at |
|---|---|---|
| strict local minimum | ||
| strict saddle | some eigenvalue | , or the saddle |
| degenerate: minimum | , singular | |
| degenerate: saddle | , singular | , or the monkey saddle (Hessian ) |
Certifying local optimality is hard. Murty & Kabadi (1987) built indefinite quadratic programs with simple constraints and integer data for which checking that a given feasible point is not a local minimum is NP-complete; as a corollary, deciding that a matrix is not copositive is NP-complete. The difficulty survives without constraints: substituting turns into the quartic , and is a local minimum of exactly when is copositive. Degenerate points are where the hardness lives.
So the realistic goal of a local method is a second-order stationary point. That is worth having only when such points are good, which is the theme of the last step.
At a stationary point of a smooth the gradient is zero and the Hessian is . What can you conclude?
- It is a strict local minimum
- It is a strict saddle
- Nothing yet: it could be a local minimum or a saddle, depending on higher-order terms
- It must be a local maximum
Show the answer
C. Nothing yet: it could be a local minimum or a saddle, depending on higher-order terms
The second-order necessary condition holds (), but the sufficient one fails (the Hessian is singular). has a minimum there, and have saddles, and all three have this Hessian.
Gradient descent avoids strict saddles
The gradient map is a diffeomorphism. Its Jacobian has all eigenvalues at least , and is injective:
At a strict saddle, the Jacobian has an eigenvalue : the fixed point of is unstable along at least one direction.
The center–stable manifold theorem: the points near whose forward orbits stay near lie on a local manifold of dimension at most , a set of Lebesgue measure zero.
An orbit that converges to eventually stays near it, so it enters after finitely many steps. Preimages under a diffeomorphism of a null set are null, and a countable union of null sets is null.
Escaping saddles efficiently
Near a strict saddle, is close to its quadratic model. Let be the eigenvector of the most negative eigenvalue . The component of along grows geometrically:
Escaping to distance from an initial offset therefore takes a number of steps that is only logarithmic in :
A uniformly random perturbation of radius in has a component along of typical size ; the probability that it is smaller than is of order . So with probability about the escape time is
The dimension and the failure probability enter only through a logarithm. Bad starting points form a thin slab around the stable manifold, and a random kick lands in it only with small probability.
A strict saddle has most negative eigenvalue , the step is , and a perturbation leaves you from the stable manifold. About how many steps until the escaping component reaches ?
Show the answer
13800 steps
. Weak negative curvature, not bad luck, is what makes saddles slow: each factor of 10 closer to the manifold costs only more steps, but halving doubles everything.
Stochastic gradients bring their own perturbations: Ge et al. (2015) proved that noisy SGD escapes strict saddles and reaches a local minimum in polynomially many iterations for strict-saddle functions, with orthogonal tensor decomposition as the application. Second-order methods can use negative curvature directly: Newton's method with cubic regularization (Nesterov & Polyak, 2006) finds approximate second-order stationary points in iterations, each needing Hessian information.
Benign landscapes
If every local minimum of is global and every other stationary point is a strict saddle, then "find a second-order stationary point", which perturbed gradient descent does efficiently, means "find a global minimum". The prototype is principal component analysis written as a nonconvex factorization problem. Let be symmetric positive semidefinite with eigenvalues and orthonormal eigenvectors , and minimize over
Differentiate. Stationary points satisfy , so or is an eigenvector with equal to its eigenvalue: for .
At with , look along (orthogonal to ): negative curvature, a strict saddle. At the Hessian is , negative along : also strict.
At the Hessian has eigenvalue along and along each other : strict local minima.
Their value is the smallest of all stationary values, , minimized at : the best rank-one approximation of (Eckart–Young). Since as , the global minimum is a stationary point, so these are the global minima.
For with , the point is stationary. What is the smallest eigenvalue of the Hessian there?
Show the answer
-2
. The eigenvalue points toward the global minimizers , so this is a strict saddle that gradient descent escapes.
| Problem | Landscape | Source |
|---|---|---|
| Linear autoencoder (PCA) with squared error | all local minima global; other critical points saddles | Baldi & Hornik (1989) |
| PSD matrix completion, regularized, incoherent target, enough random entries | w.h.p. every local minimum is global | Ge, Lee & Ma (2016) |
| Deep linear networks, squared loss | every local minimum global; every other critical point a saddle, but with more than one hidden layer some saddles have no negative curvature | Kawaguchi (2016) |
| Two-layer ReLU networks fitted to a target network of the same form (6 to 20 hidden units) | in high input dimension, nearly all targets of the relevant sizes give spurious local minima | Safran & Shamir (2018) |
Frontier
The global picture that emerges: in nonconvex optimization, gradient descent is guaranteed a stationary point at the rate, generically a second-order one, efficiently one with a little noise, and a global minimum only when the landscape is benign. Whether training succeeds is then a property of the problem, often helped by overparameterization, as much as of the algorithm. The Initialization lesson's heuristic, that a flat point in high dimension usually has some downhill direction, is why the saddle-escape results of this lesson matter so much in practice.
Key takeaways
- Local methods aim for second-order stationary points: and , or approximately and . Degenerate points are where certifying local optimality becomes NP-hard.
- For , -smooth and , gradient descent from a random start converges to a strict saddle with probability zero, because the gradient map is a diffeomorphism and stable manifolds are null sets. This says nothing about speed.
- The escaping component grows like , so random perturbations escape in steps. Perturbed gradient descent finds -second-order points in iterations.
- Benign landscapes, where second-order stationary means globally optimal, include PCA as , linear autoencoders and regularized matrix completion; deep linear networks have non-strict saddles, and ReLU networks can have spurious minima.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Gradient descent with step starts from a Gaussian random point on a , -smooth function whose saddle points are all strict and countably many. What is guaranteed?
- It reaches a global minimum
- With probability 1 it does not converge to a saddle point; if it converges, the limit is almost surely a local minimizer
- It escapes every saddle within a number of steps polynomial in the dimension
- It converges to a local minimizer for every starting point
Show the answer
B. With probability 1 it does not converge to a saddle point; if it converges, the limit is almost surely a local minimizer
That is the Lee–Simchowitz–Jordan–Recht theorem. The bad starts form a measure-zero set (preimages of stable manifolds), but nothing is said about speed, nor that the iterates converge at all.
Why does the time to escape a strict saddle grow only logarithmically as the starting offset from the stable manifold shrinks?
- Because the gradient is large near a saddle
- Because the offset along the negative-curvature direction grows geometrically, by per step
- Because the Hessian is singular at a strict saddle
- Because a small learning rate makes each step more accurate
Show the answer
B. Because the offset along the negative-curvature direction grows geometrically, by per step
The escaping component multiplies by every step, so going from to takes steps: each halving of costs the same constant number of extra steps.
Which of these landscapes is benign: every local minimum global and every other stationary point a strict saddle?
- for symmetric PSD with
- The squared loss of a deep linear network with three hidden layers
- The squared loss of a small two-layer ReLU network fitted to a target network of the same form
- A general indefinite quadratic over the nonnegative orthant
Show the answer
A. for symmetric PSD with
Its stationary points are and ; all but have the negative-curvature direction , and those two are global minima.
Further reading
- J. D. Lee, M. Simchowitz, M. I. Jordan & B. Recht, "Gradient descent only converges to minimizers," Proceedings of the 29th Conference on Learning Theory, PMLR 49, 1246–1257 (2016).
- R. Ge, F. Huang, C. Jin & Y. Yuan, "Escaping from saddle points — online stochastic gradient for tensor decomposition," Proceedings of the 28th Conference on Learning Theory, PMLR 40, 797–842 (2015).
- C. Jin, R. Ge, P. Netrapalli, S. M. Kakade & M. I. Jordan, "How to escape saddle points efficiently," Proceedings of the 34th ICML, PMLR 70, 1724–1732 (2017).
- R. Ge, J. D. Lee & T. Ma, "Matrix completion has no spurious local minimum," Advances in Neural Information Processing Systems 29 (2016).
- P. Jain & P. Kar, "Non-convex optimization for machine learning," Foundations and Trends in Machine Learning 10(3–4), 142–336 (2017).