First-order Methods Almost Always Avoid Saddle Points
Jason D. Lee, Ioannis Panageas, Georgios Piliouras, Max Simchowitz, Michael I. Jordan, Benjamin Recht
Introduction
Saddle points have long been regarded as a major obstacle for non-convex optimization over continuous spaces. It is well understood that in many applications of interest, the number of saddle points significantly outnumber the number of local minima, which is especially problematic when the solutions associated with worst-case saddle points are considerably worse than those associated with worst-case local minima . Moreover, it is not hard to construct examples where a worst-case initialization of gradient descent (or other first-order methods) provably converge to saddle points [30, Section 1.2.3].
The main message of our paper is that, under very mild regularity conditions, saddle points have little effect on the asymptotic behavior of first-order methods. Building on tools from the theory of dynamical systems, we generalize recent analysis of gradient descent to establish that a wide variety of first-order methods — including gradient descent, proximal point algorithm, block coordinate descent, mirror descent — avoid so-called “strict” saddle points for almost all initializations; that is, saddle points where the Hessian of the objective function admits at least one direction of negative curvature (see Definition 1).
Our results provide a unified theoretical framework for analyzing the asymptotic behavior of a wide variety of classic optimization heuristics in non-convex optimization. Furthermore, we believe that furthering our understanding of the behavior and geometry of deterministic optimization techniques with random initialization can serve in the development of stochastic algorithms which improve upon their deterministic counterparts and achieve strong convergence-rate results; indeed, such insights have already led to significant improves in modifying gradient descent to navigate saddle-point geometry .
In recent years, the optimization and machine learning communities have dedicated much effort to understanding the geometry of non-convex landscapes by searching for unified geometric properties which could be leverage by general-purpose optimization techniques. The strict saddle property (Definition 1) is one such property which has been shown to hold in a wide and diverse range of salient objective functions: PCA, a fourth-order tensor factorization , formulations of dictionary learning , phase retrieval , low-rank matrix factorizations , and simple neural networks . It is also known that, in the worst case, the strict saddle property is unavoidable as finding descent-directions at critical points with degenerate Hessians is NP-hard in general .
Earlier work had shown that first-order descent methods can circumvent strict saddle points, provided that they are augmented with unbiased noise whose variance is sufficiently large in each direction. For example, establishes convergence of the Robbins-Monro stochastic approximation to local minimizers for strict saddle functions. More recently, give quantitative rates on the convergence of noisy gradient descent to local minimizers, for strict saddle functions.
To obtain provable guarantees without the addition of stochastic noise, and adopt trust-region methods which leverage Hessian information in order to circumvent saddle points. This approach represents a refinement of a long tradition of related, “second-order” strategies, including: a modified Newton’s method with curvilinear line search , the modified Cholesky method , trust-region methods , and the related cubic regularized Newton’s method , to name a few. Specialized to deep learning applications, have introduced a saddle-free Newton method.
However, such curvature-based optimization algorithms have a per-iteration computational complexity which scales quadratically or even cubically in the dimension , rendering them unsuitable for optimization of high-dimensional functions. In more recent work, several works have presented faster curvature-based methods including by combining fast first-order methods with fast eigenvector algorithms, to obtain lower per-iteration complexity.
Fortunately, it appears that neither the addition of isotropic noise, nor the use of second-order methods are necessary for circumventing saddle points. For example, recent work by showed that by carefully perturbing the iterates of gradient descent in the vicinity of possible saddles results in a first-order method which converges to local minimizers in a number of iterations with only poly-logarithmic dimension dependence. Moreover, many recent works have shown that, even without any random perturbations, a combination of gradient descent and a smart-initialization provably converges to the global minimum for a variety of non-convex problems: such settings include matrix factorization , phase retrieval , dictionary learning , and latent-variable models . While our results only guarantee convergence to local minimizers, they eschew the need for complex and often computationally prohibitive initialization procedures.
In addition to what has been established theoretically, there is a broadly-accepted folklore in the field that running gradient descent with a random initialization is sufficient to identity a local optima. For example, the authors of empirically observe gradient descent with random initializations on the phase retrieval problem always converges to a local minimizer, one whose quality matches that of the solution found using more costly trust-region techniques. It is the purpose of this work to place these intuitions on firm mathematical footing.
Finally, we emphasize that their are many settings in which all local optima (but not saddles!) have objective values which are nearly as small as those of the global minima; see for example . Some preliminary results have suggested that this may be a a quite general phenomenon. For example, study the loss surface of a particular Gaussian random field as a proxy for understanding the objective landscape of deep neural nets. The results leverage the Kac-Rice Theorem , and establish that critical points with more positive eigenvalues have lower expected function value, often close to that of the global minimizer. We remark that functions drawn from this Gaussian random field model share the strict saddle property defined above, and so our results apply in this setting. On the other hand, our results are considerably more general, as they do not place stringent generative assumptions on the objective function .
2 Organization
The rest of the paper is organized as follows. Section 2 introduces the notation and definitions used throughout the paper. Section 3 provides an intuitive explanation for why it is unlikely that gradient descent converges to a saddle point, by studying a non-convex quadratic and emphasizing the analogy with power iteration. Section 4 develops the main technical theorem, which uses the stable manifold theorem to show that the stable set of unstable fixed points has measure zero. Section 5 applies the main theorem to show that gradient descent, block coordinate descent, proximal point, manifold gradient descent, and mirror descent all avoid saddle points. Finally, we conclude in Section 6 by suggesting several directions of future work.
Preliminaries
Throughout the paper, we will use to denote a real-valued function in , the space of twice-continuously differentiable functions.
A point is a critical point of if .
A point is a strict saddle pointFor the purposes of this paper, strict saddle points include local maximizers. of if is a critical point and . Let denote the set of strict saddle points.
When is a manifold, the same definition applies, but with gradient and Hessian replaced by the Riemannian gradient and Riemannian Hessian . See Section 5.5 for details, and Chapter 5.5 of .
Our interest is in the attraction region of an optimization algorithm , viewed as a mapping from . The iterates of the algorithm are generated by the sequence
where is the -fold composition of . As an example, gradient descent corresponds to .
Since we are interested in the region of attraction of a critical point, we provide the definition of the stable set.
The global stable set of the strict saddles is the set of initial conditions where iteration of the mapping converges to a strict saddle. This is defined as
Intuition
To illustrate why gradient descent and related first-order methods do not converge to saddle points, consider the case of a non-convex quadratic, . Without loss of generality, assume with and . is the unique critical point of this function and the Hessian at is . Gradient descent initialized from has iterates
where denote the standard basis vectors. This iteration resembles power iteration with the matrix .
Let , and suppose . Thus we have for and for . If , then converges to the saddle point at zero since . However, if has a component outside then gradient descent diverges to . For this simple quadratic function, we see that the global stable set (attractive set) of zero is the subspace . Now, if we choose our initial point at random, the probability of that point landing in is zero as long as (i.e., is not full dimensional).
As an example of this phenomenon for a non-quadratic function, consider the following example from [30, Section 1.2.3]. Letting , the corresponding gradient mapping is
The points and are isolated local minima, and is a saddle point.
Gradient descent initialized from any point of the form converges to the saddle point . Any other initial point either diverges, or converges to a local minimum, so the stable set of is the -axis, which is a zero-measure set in . By computing the Hessian,
we find that has one positive eigenvalue with eigenvector that spans the -axis, thus agreeing with our above characterization of the stable set. If the initial point is chosen randomly, there is zero probability of initializing on the -axis and thus zero probability of converging to the saddle point .
For gradient descent, the local attractive set of a critical point is well-approximated by the span of the eigenvectors corresponding to positive eigenvalues of the Hessian. By an application of Taylor’s theorem, one can see that if the initial point is uniformly random in a small neighborhood around , then the probability of initializing in the span of these eigenvectors is zero whenever there is a negative eigenvalue. Thus, gradient descent initialized at will leave the neighborhood of . Although this argument provides valuable intuition, there are several difficulties with formalizing this argument: 1) is randomly distributed over the entire domain, not a small neighborhood around , and Taylor’s theorem does not provide any global guarantees, and 2) it does not rule out converging to a different saddle point.
Stable Manifold Theorem and Unstable Fixed Points
Let be a measure zero subset. If for all , then has measure zero.
For clarity, let . Let be a countable collection of charts of the co-domain of . By countable additivity of measure, it suffices to show that each is measure zero. Without loss of generality, we may assume that is contained in a chart , else we could repeat the same argument for each element of the chart.
We wish to show that . Let be another countable collection of charts of the domain of . Define , and note that . Thus
By assumption, is measure zero. The function is if , and thus locally Lipschitz, so preserves measure zero sets. By countable additivity and the displayed equation above, has measure zero.
2 Unstable Fixed Points
be the set of fixed points where the differential has at least a single eigenvalue with magnitude greater than one. These are the unstable fixed points.
Let be a fixed point for the local diffeomorphism . Suppose that , where is the span of the eigenvectors corresponding to eigenvalues of magnitude less than or equal to one of , and is the span of the eigenvectors corresponding to eigenvalues of magnitude greater than one of . Then there exists a embedded disk that is tangent to at called the local stable center manifold. Moreover, there exists a neighborhood of , such that , and .
For each , there is an associated open neighborhood promised by the Stable Manifold Theorem 1. forms an open cover, and since is second-countable we can extract a countable subcover, so that .
Define . Fix a point . Since , then for some non-negative integer and all , . Since we have a countable sub-cover, for some and all . This implies that for all . By Theorem 1, is a subset of the local center stable manifold which has co-dimension at least one, and is thus measure zero.
Finally, implies that . Since is unknown we union over all non-negative integers, to obtain . Since was arbitrary, we have shown that . Using Lemma 1 and that countable union of measure zero sets is measure zero, has measure zero. ∎
Under the same conditions as Theorem 2, and in addition assume , then .
Since , then . Using Theorem 2, . ∎
Application to Optimization
As an application of Theorem 2, we show that gradient descent avoids saddle points. Consider the gradient descent algorithm with step-size :
Let , and .
Every strict saddle point is an unstable fixed point of gradient descent, meaning .
First we verify that critical points of are fixed points of . Since , then and is a fixed point.
where . The eigenvalues of are , and so
Let be the gradient descent algorithm as defined in Equation (1). Under Assumption 1 and , the stable set of the strict saddle points has measure zero, meaning .
2 Proximal Point
The proximal point algorithm is given by the iteration
Under Assumption 1 and , then
Every strict stable point is an unstable fixed point of proximal point, meaning .
By combining Proposition 3 and Corollary 1, we have the following:
Let be the proximal point algorithm as defined in Equation (2). Under Assumption 1 and , the stable set of the strict saddle points has measure zero, meaning .
3 Coordinate Descent
We define to be the coordinate descent update of index in Algorithm 1. One iteration of coordinate gradient descent corresponds to the update
Let , and
where is a standard basis vector.
Every strict saddle point is an unstable fixed point of coordinate descent, meaning .
We shall prove that for some which depends on , but not on . Applying Gelfand’s theorem,
and thus has an eigenvalue of magnitude greater than .
We fix some arbitrary iteration and let . We will first show that there exists an so that
where the last inequality uses that .
Next we use the claim to show a sufficient decrease by lower bounding .
Let be in the range of . There exists a so that for some global constant that depends on .
We assume that for all , for some to be chosen later. For , it holds that and . Suppose for that and thus Using induction and triangle inequality we get
where we assume so that for all . Using the above calculation,
Thus \alpha\left\|Hy_{t}\right\|_{2}<\sqrt{d}\delta\big{(}1+2d\delta+2d\alpha L\big{)}\left\|y_{t}\right\|_{2}, and
where is the smallest non-zero singular value of . Thus by choosing small enough such that
Decompose into the orthogonal components defined by the nullspace and range space . Notice that acts as the identity on , so
Define an auxiliary sequence , and . Similarly, , , and . It follows that
Let . By inducting, and noting that ,
Using ,
where the last inequality uses that . By Gelfand’s theorem, we have established
and thus has an eigenvalue of magnitude greater than one. Thus . ∎
By combining Propositions 5, 4, and Corollary 1, we have the following:
Let be the coordinate descent algorithm as defined in Equation (4). Under Assumption 2 and , the stable set of the strict saddle points has measure zero, meaning .
In the worst-case, , but in many instances , so coordinate descent can use more aggressive step-sizes. The step-size choice is standard for coordinate-descent methods .
4 Block Coordinate Descent
The results of this section are a strict generalization of the previous section, but we present the coordinate descent case separately, since the proofs are considerably shorter.
We partition the set to blocks such that . For ease of notation, we define .
We define to be the block coordinate descent update of block in Algorithm 2. Block coordinate gradient descent is a dynamical system
where . We define the matrix , i.e., the projector onto the entries in .
Let , and be the submatrix of by extracting the rows and columns indexed by . Let
Let be a strict saddle point of . The Jacobian of the update rule of block coordinate descent computed at point has an eigenvalue of modulus greater than one.
We shall prove that . Hence by Gelfand’s theorem must have at least one eigenvalue with magnitude greater than one. The proof technique is very similar to that of the proof of Proposition 5.
We fix some arbitrary iteration and let . We will first show that there exists an ,
Thus is a decreasing (non-increasing) sequence.
We shall prove that there exists an so that for some global constant to be chosen later.
Let be in the range of . There exists an so that for some .
We assume that for all . For , it holds that and . Suppose for that and thus Using induction and triangle inequality we obtain
where we assume so that for all . Using the above,
Since , we get that and we conclude
Finally, using Inequality 12 it follows that . Let be a vector that is orthogonal to (since is symmetric). Then it holds that where denotes the smallest positive singular value of (greater than zero). Assume that and we get . However, thus by choosing we reach a contradiction. The appropriate choice of is any positive constant in (since ). ∎
To finish the proof of the lemma, suppose that Claim 2 applies. Then by Cauchy-Schwarz, there exists an index such that
However, , hence we get that
By choosing we showed that as long as is in the range of .
Assume that . It is easy to see and also , hence . Therefore from Inequality 13 proved above, if the starting vector is , which Claim 2 applies too, then .
To sum up, we showed that and since is an eigenvector of (of norm one) with corresponding negative eigenvalue , it follows that Finally using , we get . Observe that is a positive constant, (since ) and the proof follows (the parameters as claimed in the beginning will be and ). ∎
By combining Propositions 7, 6, and Corollary 1, we have the following:
Let be the block coordinate descent algorithm as defined in Equation (9). Under Assumption 3 and , the stable set of the strict saddle points has measure zero, meaning .
In the worst-case, , but in many instances , so block coordinate descent can use more aggressive step-sizes. The step-size choice is standard for block coordinate descent methods .
5 Manifold Gradient Descent
Let be a submanifold of , and be the tangent space of at . and be the orthogonal projector onto and respectively. Let be a smooth extension of to , and . The manifold gradient descent algorithm is:
Recall that the Riemannian gradient , so the above iteration is precisely manifold gradient descent with as retraction.
Since is a strict saddle, the Riemannian Hessian has a negative eigenvalue and eigenvector , and .
Since is a compact smooth manifold, is unique and smooth in a neighborhood of radius of the manifold . Letting , and its derivatives exist.
Let be the manifold gradient descent algorithm of Equation (14), and be a compact sub-manifold of . Then there is a , that only depends on the properties of and , such that for any step-size , the stable set of the strict saddle points has measure zero, meaning .
6 Mirror Descent
In this section, we consider the mirror descent algorithm. Let be a convex open subset of , and for some affine space . Given a mirror map , we define the mirror descent algorithm in Algorithm 3.
Before we continue, we provide an example of a commonly used instantiation of mirror descent known as the Multiplicative Weights algorithm.
Define the mirror map , with being the positive orthant , and affine space . The domain is which is the interior of probability simplex. The mirror descent algorithm corresponds to the update :
We define to be the closure of , and to be the relative boundary of . Due to the affine constraint, may not be full-dimensional, so we define the appropriate notions of gradient and Hessian. Let be the tangent space of . The Riemannian gradient is . Similarly the Riemannian Hessian is and is a linear mapping from . Finally, the mirror descent mapping is defined as
with and .
We say that is a mirror map if it satisfies the following properties:
is and strictly convex.
The gradient of is surjective onto , that is .
diverges on the relative boundary of , that is . Furthermore, the negative gradient points inwards, that is for , , where denotes the tangent cone of the set .
Let be the identity mapping on . We assume that
is -strongly convex, meaning .
has -Lipschitz gradient, meaning .
In the simplex example of Example 1, the strong convexity parameter satisfies .
We first express the mapping as a composition of simple mappings.
Assume that is a -strongly convex mirror map. The mirror descent algorithm can be equivalently expressed as , and is a local diffeomorphism.
Recall that . Let . By strong convexity, attains an unique minimizer in .
We first show that the minimizer . For contradiction, let us assume . By the first-order optimality conditions, , where is the normal cone of the closure of . Using [Theorem 6.9 and 6.42] and , , where denotes Minkowski sum. Thus .
By assumption, . Since the tangent cone and normal cone are polar cones,
where the inequality uses Cauchy-Schwartz , and the last equality uses that . This gives a contradiction, so we must have that .
By first-order optimality conditions, , and thus
As a shorthand, let . By existence and uniqueness of the maximizer, is a single-valued function from . Thus .
Under Assumptions 4, 5 and , then
Every strict saddle point of is an unstable fixed point of mirror descent, meaning .
By the Lipschitz assumption, and . By the strong convexity assumption of , . Thus
Using the calculation above, and is invertible. This completes our proof of the first part.
Let be a strict saddle point. First we verify that it is a fixed point of . Using that is a critical point,
Define and . By similarity transformation under ,
which is a symmetric linear operator. Define , where is an eigenvector of corresponding to a strictly negative eigenvalue , then , so . Thus is an eigenvalue of that is greater than one. Since similarity transformations preserve eigenvalues, also has an eigenvalue greater than one, and so . ∎
By combining Proposition 10 with Corollary 1, we have the following:
Let be the mirror descent algorithm defined in Equation (15). Under Assumptions 4, 5, and , then the stable set of the strict saddles in is measure zero, meaning .
This corollary does not guarantee that the stable set of saddles on is measure zero. For example in Multiplicative Weights algorithm, there are fixed points on (e.g. all the vectors with support size 1).
Conclusion
We have shown that first-order methods with random initialization and appropriate constant step-size do not converge to a saddle point. Our results apply to gradient descent, proximal point algorithm, coordinate descent, block coordinate descent, manifold gradient descent and mirror descent. The key common insight in analyzing all these optimization methods is to treat these algorithms as dynamical systems. Every strict saddle point is shown to be locally unstable for these first-order methods and applications of the center-stable manifold theorem suffice to characterize the local behavior. As long as the mapping induced by the optimization method is sufficiently well behaved, e.g. local diffeomorphism, these local arguments can be extended to the whole domain. Proving the instability of saddle points as well as the smoothness and invertibility of the corresponding maps depends upon careful instantiations of these generic arguments (e.g. choice of step-size) on a case-by-case basis. The global instability of saddle points for first-order methods is many times informally invoked without careful discussion about the necessary technical conditions needed to formalize these arguments. We hope that this work will help ground these arguments on a unified formal foundation. We end this paper with a brief discussion of some open directions:
Step-size. It is not clear if the step size restrictions are necessary to avoid saddle points (e.g. for gradient descent; see in which examples are provided where is necessary for gradient descent). Most of the constructions where the gradient method converges to saddle points require fragile initial conditions as discussed in Section 3. It remains a possibility that adaptive choice of step-size by Wolfe Line Search or backtracking, may still avoid saddle points provided the initial point is chosen at random.
Strict saddles. It is also important to understand how stringent the strict saddle assumption is. Will a perturbation of a function always satisfy the strict saddle property? provide very general sufficient conditions for a random function to be Morse, meaning the eigenvalues at critical points are non-zero, which implies the strict saddle condition. These conditions rely on checking that the density of has full support conditioned on the event that . This can be explicitly verified for functions that arise from learning problems. Similar arguments for applications that arise in game theory are developed in .
However, we note that there are very difficult unconstrained optimization problems where the strict saddle condition fails. Perhaps the simplest is optimization of quartic polynomials. Indeed, checking if zero is a local minimizer of the quartic
is equivalent to checking whether the matrix is co-positive, a co-NP complete problem. For this , the Hessian at is zero, so is a second-order KKT point, but not necessarily a local minimizer. By the change of variables , we see that checking local minimality in a problem with quadratic objective and non-negative inequality constraints is also co-NP complete.
Speed of convergence. Although gradient descent can take exponential amount of time to escape from saddle points at least for some carefully constructed non-convex functions , its stochastic counterparts perform much better . It would be interesting to characterize these hard instances to the extent possible and to understand whether they are indeed prevalent in applications of interest (e.g. deep learning). In the other direction, it would be rather useful to show that all first-order methods can be sped up by switching to carefully chosen stochastic variants.
Beyond saddle points. Even if saddle points are provably avoided, there can be multiple local minima of widely different objective value. The performance of first-order methods would depend crucially on whether they converge for most initial conditions to nearly optimal global minima. analyze such a game theoretic application and show that indeed the size of the region of attraction of the good local optima dominates that of the bad local optima implying nearly optimal average case performance. Such arguments depend crucially both on the setting as well as on the chosen optimization method and it would be interesting to explore their applicability in other settings.