Accelerated Gradient Descent Escapes Saddle Points Faster than Gradient Descent
Chi Jin, Praneeth Netrapalli, Michael I. Jordan
Introduction
Nonconvex optimization problems are ubiquitous in modern machine learning. While it is NP-hard to find global minima of a nonconvex function in the worst case, in the setting of machine learning it has proved useful to consider a less stringent notion of success, namely that of convergence to a first-order stationary point (where ). Gradient descent (GD), a simple and fundamental optimization algorithm that has proved its value in large-scale machine learning, is known to find an -first-order stationary point (where ) in iterations (Nesterov, 1998), and this rate is sharp (Cartis et al., 2010). Such results, however, do not seem to address the practical success of gradient descent; first-order stationarity includes local minima, saddle points or even local maxima, and a mere guarantee of convergence to such points seems unsatisfying. Indeed, architectures such as deep neural networks induce optimization surfaces that can be teeming with such highly suboptimal saddle points (Dauphin et al., 2014). It is important to study to what extent gradient descent avoids such points, particular in the high-dimensional setting in which the directions of escape from saddle points may be few.
This paper focuses on convergence to a second-order stationary point (where and ). Second-order stationarity rules out many common types of saddle points (strict saddle points where ), allowing only local minima and higher-order saddle points. A significant body of recent work, some theoretical and some empirical, shows that for a large class of well-studied machine learning problems, neither higher-order saddle points nor spurious local minima exist. That is, all second-order stationary points are (approximate) global minima for these problems. Choromanska et al. (2014); Kawaguchi (2016) present such a result for learning multi-layer neural networks, Bandeira et al. (2016); Mei et al. (2017) for synchronization and MaxCut, Boumal et al. (2016) for smooth semidefinite programs, Bhojanapalli et al. (2016) for matrix sensing, Ge et al. (2016) for matrix completion, and Ge et al. (2017) for robust PCA. These results strongly motivate the quest for efficient algorithms to find second-order stationary points.
On the other hand, GD is known to be suboptimal in the convex case. In a celebrated paper, Nesterov (1983) showed that an accelerated version of gradient descent (AGD) finds an -suboptimal point (see Section 2.2) in steps, while gradient descent takes steps. The basic idea of acceleration has been used to design faster algorithms for a range of other convex optimization problems (Beck and Teboulle, 2009; Nesterov, 2012; Lee and Sidford, 2013; Shalev-Shwartz and Zhang, 2014). We will refer to this general family as “momentum-based methods.”
Such results have focused on the convex setting. It is open as to whether momentum-based methods yield faster rates in the nonconvex setting, specifically when we consider the convergence criterion of second-order stationarity. We are thus led to ask the following question: Do momentum-based methods yield faster convergence than GD in the presence of saddle points?
Perturbation (Lines 3-4): when the gradient is small, we add a small perturbation sampled uniformly from a -dimensional ball with radius . The homogeneous nature of this perturbation mitigates our lack of knowledge of the curvature tensor at or near saddle points.
Negative Curvature Exploitation (NCE, Lines 8-9; pseudocode in Algorithm 3): when the function becomes “too nonconvex” along to , we reset the momentum and decide whether to exploit negative curvature depending on the magnitude of the current momentum .
In this section, we review related work from the perspective of both nonconvex optimization and momentum/acceleration. For clarity of presentation, when discussing rates, we focus on the dependence on the accuracy and the dimension while assuming all other problem parameters are constant. Table 1 presents a comparison of the current work with previous work.
Convergence to first-order stationary points: Traditional analyses in this case assume only Lipschitz gradients (see Definition 1). Nesterov (1998) shows that GD finds an -first-order stationary point in steps. Ghadimi and Lan (2016) guarantee that AGD also converges in steps. Under the additional assumption of Lipschitz Hessians (see Definition 4), Carmon et al. (2017) develop a new algorithm that converges in steps. Their algorithm is a nested-loop algorithm, where the outer loop adds a proximal term to reduce the nonconvex problem to a convex subproblem. A key novelty in their algorithm is the idea of “negative curvature exploitation,” which inspired a similar step in our algorithm. In addition to the qualitative and quantitative differences between Carmon et al. (2017) and the current work, as summarized in Table 1, we note that while Carmon et al. (2017) analyze AGD applied to convex subproblems, we analyze AGD applied directly to nonconvex functions through a novel Hamiltonian framework.
Convergence to second-order stationary points: All results in this setting assume Lipschitz conditions for both the gradient and Hessian. Classical approaches, such as cubic regularization (Nesterov and Polyak, 2006) and trust region algorithms (Curtis et al., 2014), require access to Hessians, and are known to find -second-order stationary points in steps. However, the requirement of these algorithms to form the Hessian makes them infeasible for high-dimensional problems. A second set of algorithms utilize only Hessian-vector products instead of the explicit Hessian; in many applications such products can be computed efficiently. Rates of have been established for such algorithms (Carmon et al., 2016; Agarwal et al., 2017; Royer and Wright, 2017). Finally, in the realm of purely gradient-based algorithms, Ge et al. (2015) present the first polynomial guarantees for a perturbed version of GD, and Jin et al. (2017) sharpen it to . For the special case of quadratic functions, O’Neill and Wright (2017) analyze the behavior of AGD around critical points and show that it escapes saddle points faster than GD. We note that the current work is the first achieving a rate of for general nonconvex functions.
Acceleration: There is also a rich literature that aims to understand momentum methods; e.g., Allen-Zhu and Orecchia (2014) view AGD as a linear coupling of GD and mirror descent, Su et al. (2016) and Wibisono et al. (2016) view AGD as a second-order differential equation, and Bubeck et al. (2015) view AGD from a geometric perspective. Most of this work is tailored to the convex setting, and it is unclear and nontrivial to generalize the results to a nonconvex setting. There are also several papers that study AGD with relaxed versions of convexity—see Necoara et al. (2015); Li and Lin (2017) and references therein for overviews of these results.
2 Main Techniques
Our results rely on the following three key ideas. To the best of our knowledge, the first two are novel, while the third one was delineated in Jin et al. (2017).
Hamiltonian: A major challenge in analyzing momentum-based algorithms is that the objective function does not decrease monotonically as is the case for GD. To overcome this in the convex setting, several Lyapunov functions have been proposed (Wilson et al., 2016). However these Lyapunov functions involve the global minimum , which cannot be computed by the algorithm, and is thus of limited value in the nonconvex setting. A key technical contribution of this paper is the design of a function which is both computable and tracks the progress of AGD. The function takes the form of a Hamiltonian:
i.e., a sum of potential energy and kinetic energy terms. It is monotonically decreasing in the continuous-time setting. This is not the case in general in the discrete-time setting, a fact which requires us to incorporate the NCE step.
Improve or localize: Another key technical contribution of this paper is in formalizing a simple but powerful framework for analyzing nonconvex optimization algorithms. This framework requires us to show that for a given algorithm, either the algorithm makes significant progress or the iterates do not move much. We call this the improve-or-localize phenomenon. For instance, when progress is measured by function value, it is easy to show that for GD, with proper choice of learning rate, we have:
For AGD, a similar lemma can be shown by replacing the objective function with the Hamiltonian (see Lemma 4). Once this phenomenon is established, we can conclude that if an algorithm does not make much progress, it is localized to a small ball, and we can then approximate the objective function by either a linear or a quadratic function (depending on smoothness assumptions) in this small local region. Moreover, an upper bound on lets us conclude that iterates do not oscillate much in this local region (oscillation is a unique phenomenon of momentum algorithms as can be seen even in the convex setting). This gives us better control of approximation error.
Preliminaries
In this section, we will review some well-known results on GD and AGD in the strongly convex setting, and existing results on convergence of GD to second-order stationary points.
2 Convex Setting
To minimize a function , GD performs the following sequence of steps:
The suboptimality of GD and the improvement achieved by AGD can be clearly illustrated for the case of smooth and strongly convex functions.
The gradient Lipschitz property asserts that the gradient can not change too rapidly in a small local region.
A twice-differentiable function is -strongly convex if .
Let . A point is said to be -suboptimal if . The following theorem gives the convergence rate of GD and AGD for smooth and strongly convex functions.
3 Nonconvex Setting
For nonconvex functions finding global minima is NP-hard in the worst case. The best one can hope for in this setting is convergence to stationary points. There are various levels of stationarity.
is an -first-order stationary point of function if .
As mentioned in Section 1, for most nonconvex problems encountered in practice, a majority of first-order stationary points turn out to be saddle points. Second-order stationary points require not only zero gradient, but also positive semidefinite Hessian, ruling out most saddle points. Second-order stationary points are meaningful, however, only when the Hessian is continuous.
A twice-differentiable function is -Hessian Lipschitz if:
For a -Hessian Lipschitz function , is an -second-order stationary point if:
The following theorem gives the convergence rate of a perturbed version of GD to second-order stationary points. See Jin et al. (2017) for a detailed description of the algorithm.
Note that this rate is essentially the same as that of GD for convergence to first-order stationary points. In particular, it only has polylogarithmic dependence on the dimension.
Main Result
In this section, we present our algorithm and main result. As mentioned in Section 1, the algorithm we propose is essentially AGD with two key differences (see Algorithm 2): perturbation and negative curvature exploitation (NCE). A perturbation is added when the gradient is small (to escape saddle points), and no more frequently than once in steps. The perturbation is sampled uniformly from a -dimensional ball with radius . The specific choices of gap and uniform distribution are for technical convenience (they are sufficient for our theoretical result but not necessary).
NCE (Algorithm 3) is explicitly designed to guarantee decrease of the Hamiltonian (1). When it is triggered, i.e., when
the function has a large negative curvature between the current iterates and . In this case, if the momentum is small, then and are close, so the large negative curvature also carries over to the Hessian at due to the Lipschitz property. Assaying two points along around gives one point that is negatively aligned with and yields a decreasing function value and Hamiltonian. If the momentum is large, negative curvature can no longer be exploited, but fortunately resetting the momentum to zero kills the second term in (1), significantly decreasing the Hamiltonian.
The following theorem is the main result of this paper.
Overview of Analysis
In this section, we will present an overview of the proof of Theorem 3. Section 4.1 presents the Hamiltonian for AGD and its key property of monotonic decrease. This leads to Section 4.2 where the improve-or-localize lemma is stated, as well as the main intuition behind acceleration. Section 4.3 demonstrates how to apply these tools to prove Theorem 3. Complete details can be found in the appendix.
While GD guarantees decrease of function value in every step (even for nonconvex problems), the biggest stumbling block to analyzing AGD is that it is less clear how to keep track of “progress.” Known Lyapunov functions for AGD (Wilson et al., 2016) are restricted to the convex setting and furthermore are not computable by the algorithm (as they depend on ).
Denote the discrete Hamiltonian as , and note that in AGD, . Lemma 4 tolerates nonconvexity with curvature at most . Unfortunately, when the function becomes too nonconvex in certain regions (so that (2) holds), the analogy between the continuous and discretized versions breaks and (6) no longer holds. In fact, standard AGD can even increase the Hamiltonian in this regime (see Appendix A.1 for more details). This motivates us to modify the algorithm by adding the NCE step, which addresses this issue. We have the following result:
Lemmas 4 and 5 jointly assert that the Hamiltonian decreases monotonically in all situations, and are the main tools in the proof of Theorem 3. They not only give us a way of tracking progress, but also quantitatively measure the amount of progress.
2 Improve or Localize
One significant challenge in the analysis of gradient-based algorithms for nonconvex optimation is that many phenomena—for instance the accumulation of momentum and the escape from saddle points via perturbation—are multiple-step behaviors; they do not happen in each step. We address this issue by developing a general technique for analyzing the long-term behavior of such algorithms.
In our case, to track the long-term behavior of AGD, one key observation from Lemma 4 is that the amount of progress actually relates to movement of the iterates, which leads to the following improve-or-localize lemma:
Under the same setting as in Lemma 4, if (2) does not hold for all steps in , we have:
Corollary 6 says that the algorithm either makes progress in terms of the Hamiltonian, or the iterates do not move much. In the second case, Corollary 6 allows us to approximate the dynamics of with a quadratic approximation of .
The acceleration phenomenon is rooted in and can be seen clearly for a quadratic, where the function can be decomposed into eigen-directions. Consider an eigen-direction with eigenvalue , and linear term (i.e., in this direction ). The GD update becomes , with determining the rate of GD. The update of AGD is with matrix defined as follows:
The rate of AGD is determined by largest eigenvalue of matrix , which is denoted by . Recall the choice of parameter (3), and divide the eigen-directions into the following three categories.
Flat directions : the representative case is where AGD update becomes . For , we have for GD while for AGD, which results in AGD moving along negative gradient directions faster than GD.
3 Main Framework
It can be verified by the choice of parameters (3) and Lemma 4 that whenever (2) holds so that NCE is triggered, the Hamiltonian decreases by at least in one step. So, if NCE step is performed even once in each round of steps, we achieve enough average decrease. The troublesome case is when in some time interval of steps starting with , only AGD steps are performed without NCE. If is not an -second order stationary point, either the gradient is large or the Hessian has a large negative direction. We prove the average decrease claim by considering these two cases.
Consider the setting of Theorem 3. If for all , then by running Algorithm 2 we have .
Consider the setting of Theorem 3. If , , and perturbation has not been added in iterations , then by running Algorithm 2, we have with high probability.
For AGD, gradient and momentum interact, and both play important roles in the dynamics. Fortunately, according to Lemma 4, the Hamiltonian decreases sufficiently whenever the momentum is large; so it is sufficient to discuss the case where the momentum is small.
(informal) If is small, not too large and , then for all we have .
(informal) If is small and , then we have
See the formal versions, Lemma 16 and Lemma 17, for more details. We see that if the Hamiltonian does not decrease much (and so is localized in a small ball), the gradient in the strongly convex subspace vanishes in steps by Lemma 9. Since the hypothesis of Lemma 7 guarantees a large gradient for all of the steps, this means that is large after steps, thereby decreasing the Hamiltonian in the next steps (by Lemma 10).
3.2 Negative Curvature Scenario
See the formal version in Lemma 18. We note in above Lemma is a small number characterize the failure probability of the algorithm (as defined in Theorem 3), and has logarithmic dependence on according to (3). Lemma 11 says that around any strict saddle, for any two points that are separated along the smallest eigen-direction by at least , PAGD, starting from at least one of those points, decreases the Hamiltonian, and hence escapes the strict saddle. This implies that the width of the region starting from where AGD is stuck has width at most , and thus has small volume.
Conclusions
In this paper, we show that a variant of AGD can escape saddle points faster than GD, demonstrating that momentum techniques can indeed accelerate convergence even for nonconvex optimization. Our algorithm finds an -second order stationary point in iterations, faster than the iterations taken by GD. This is the first algorithm that is both Hessian-free and single-loop that achieves this rate. Our analysis relies on novel techniques that lead to a better understanding of momentum techniques as well as nonconvex optimization.
The results here also give rise to several questions. The first concerns lower bounds; is the rate of that we have established here optimal for gradient-based methods under the setting of gradient and Hessian-Lipschitz? We believe this upper bound is very likely sharp up to log factors, and developing a tight algorithm-independent lower bound will be necessary to settle this question. The second is whether the negative-curvature-exploitation component of our algorithm is actually necessary for the fast rate. To attempt to answer this question, we may either explore other ways to track the progress of standard AGD (other than the particular Hamiltonian that we have presented here), or consider other discretizations of the ODE (4) so that the property (5) is preserved even for the most nonconvex region. A final direction for future research is the extension of our results to the finite-sum setting and the stochastic setting.
References
Appendix A Proof of Hamiltonian Lemmas
In this section, we prove Lemma 4, Lemma 5 and Corollary 6, which are presented in Section 4.1 and Section 4.2. In section A.1 we also give an example where standard AGD with negative curvature exploitation can increase the Hamiltonian.
Recall that we define the Hamiltonian as , where, for AGD, we define . The first lemma shows that this Hamiltonian decreases in every step of AGD for mildly nonconvex functions.
Recall that the update equation of accelerated gradient descent has following form:
assuming that the precondition (2) does not hold:
The last inequality uses the fact that so that and . We substitute in the definition of and to finish the proof. ∎
We see from this proof that (8) relies on approximate convexity of , which explains why in all existing proofs, the convexity between and is so important. A perhaps surprising fact to note is that the above proof can in fact go through even with mild nonconvexity (captured in line of Algorithm 2). Thus, high nonconvexity is the problematic situation. To overcome this, we need to slightly modify AGD so that the Hamiltonian is decreasing. This is formalized in the following lemma.
When we perform an NCE step, we know that (2) holds. In the first case (), we set and set the momentum to zero, which gives:
In the second case (), expanding in a Taylor series with Lagrange remainder, we have:
where and . Due to the certificate (2) we have
On the other hand, clearly . WLOG, suppose , then, by definition of , we have:
where and . Since , also lines up with :
The Hamiltonian decrease has an important consequence: if the Hamiltonian does not decrease much, then all the iterates are localized in a small ball around the starting point. Moreover, the iterates do not oscillate much in this ball. We called this the improve-or-localize phenomenon.
Under the same setting as in Lemma 4, if (2) does not hold for all steps in , we have:
The proof follows immediately from telescoping the argument of Lemma 4. ∎
In the previous section, we proved Lemma 4 which requires , that is, . In this section, we show Lemma 4 is almost tight in the sense that when in (2), we have:
Monotonic decrease of the Hamiltonian may no longer hold, indeed, AGD can increase the Hamiltonian for those steps.
Consider a simple one-dimensional example, , where (2) always holds. Define the initial condition . By update equation in Algorithm 1, the next iterate will be , and . By the definition of Hamiltonian, we have:
since . It is not hard to verify that whenever , we will have ; that is, the Hamiltonian increases in this step.
This fact implies that when we pick a large learning rate and small momentum parameter (both are essential for acceleration), standard AGD does not decrease the Hamiltonian in a very nonconvex region. We need another mechanism such as NCE to fix the monotonically decreasing property.
Appendix B Proof of Main Result
In this section, we set up the machinery needed to prove our main result, Theorem 3. We first present the generic setup, then, as in Section 4.3, we split the proof into two cases, one where gradient is large and the other where the Hessian has negative curvature. In the end, we put everything together and prove Theorem 3.
To simplify the proof, we introduce some notation for this section, and state a convention regarding absolute constants. Recall the choice of parameters in Eq.(3):
which represent the special units for time, the Hamiltonian, the parameter space and the momentum. All the lemmas in this section hold when the constant is picked to be sufficiently large. To avoid ambiguity, throughout this section notation only hides an absolute constant which is independent of the choice of sufficiently large constant , which is defined in the precondition of Theorem 3. That is, we will always make dependence explicit in notation. Therefore, for a quantity like , we can always pick large enough so that it cancels out the absolute constant in the notation, and make smaller than any fixed required constant.
Our general strategy in the proof is to show that if none of the iterates is a SOSP, then in all steps, the Hamiltonian always decreases by at least . This gives an average decrease of . In this section, we establish some facts which will be used throughout the entire proof, including the decrease of the Hamiltonian in NCE step, the update of AGD in matrix form, and upper bounds on approximation error for a local quadratic approximation.
The first lemma shows if negative curvature exploitation is used, then in a single step, the Hamiltonian will decrease by .
Under the same setting as Theorem 3, for every iteration of Algorithm 2 where (2) holds (thus running NCE), we have:
It is also easy to check that the precondition of Lemma 5 holds, and by the particular choice of parameters in Theorem 3, we have:
where the last inequality is by picking in Theorem 3 large enough, which finishes the proof. ∎
Therefore, whenever NCE is called, the decrease of the Hamiltonian is already sufficient. We thus only need to focus on AGD steps. The next lemma derives a general expression for after an AGD update, which is very useful in multiple-step analysis. The general form is expressed with respect to a reference point , which can be any arbitrary point (in many cases we choose it to be ).
Let be an origin (which can be fixed at an arbitrary point). Let . Then an AGD (Algorithm 1) update can be written as:
where , and
Substituting for in Algorithm 1, we have a recursive equation for :
By definition of , we also have:
Clearly in Lemma 13 is a matrix, and if we expand according to the eigenvector directions of , can be reorganized as a block-diagonal matrix consisting of matrices. Let the th eigenvalue of be denoted , and denote as the th matrix with corresponding eigendirections:
We note that the choice of reference point is mainly to simplify mathmatical expressions involving .
Lemma 13 can be viewed as update from a quadratic expansion around origin , and is the approximation error which marks the difference between true function and its quadratic approximation. The next lemma shows that when sequence are all close to , then the approximation error is under control:
Using the notation of Lemma 13, if for any , we have , then for any , we also have
;
;
.
Finally, since , the third inequality is immediately implied by the second inequality. ∎
B.2 Proof for large-gradient scenario
The first lemma shows that if momentum or gradient is very large, then the Hamiltonian already has sufficient decrease on average.
Again the last step is by picking to be a large enough constant, which finishes the proof. ∎
Next, we show that if the initial momentum is small, but the initial gradient on the nonconvex subspace is large enough, then within steps, the Hamiltonian will decrease by at least .
Under the setting of Theorem 3, if , , , and for only AGD steps are used without NCE or perturbation, then:
The high-level plan is a proof by contradiction. We first assume that the energy doesn’t decrease very much; that is, for a small enough constant . By Corollary 6 and the Cauchy-Swartz inequality, this immediately implies that for all , we have . In the rest of the proof we will show that this leads to a contradiction.
Given initial and , we define . Without loss of generality, set as the origin . Using the notation and results of Lemma 13, we have the following update equation:
Consider the -th eigen-direction of , recall the definition of the block matrix as in (12), and denote
Then we have for the -th eigen-direction:
Clearly . For , by Lemma 25, we know . We can thus further write the above equation as:
By the Cauchy-Swartz inequality, this gives:
Recall that for , we have . By Proposition 14, we know: , and by Corollary 6 and Proposition 14:
Recall that we have assumed by way of contradiction that . By the precondition that NCE is not used at , due to the certificate (2), we have:
where and . Noting that we fix as the origin , by the Hessian Lipschitz property, it is easy to show that . This gives:
Again letting denote the eigenvalues of , rearranging the above sum give:
The second inequality uses the fact that . Substituting into (13) gives:
Finally, putting all pieces together, we have:
which contradicts the fact that remains inside the ball around with radius . ∎
The next lemma shows that if the initial momentum and gradient are reasonably small, and the Hamitonian does not have sufficient decrease over the next iterations, then both the gradient and momentum of the strongly convex component will vanish in iterations.
Since , by Corollary 6 and the Cauchy-Swartz inequality, we see that for all we have .
Given initial and , we define . Without loss of generality, setting as the origin , by the notation and results of Lemma 13, we have the update equation:
We will upper bound four terms separately. Clearly, for the last term , we have:
Next, we show that the first two terms become very small for . Consider coordinate and the block matrix . By Lemma 20 we have:
This immediately gives when for sufficiently large:
Finally, for , by Lemma 29, for all , we have
In sum, this gives for any fixed :
We now provide a similar argument to prove the upper bound for the momentum. That is, , we show . According to (14), we have:
Consider the -th eigendirection, so that , and recall the block matrix . Denoting
by Lemma 19 and 27, we have for with sufficiently large:
This gives, for , and for sufficiently large:
Finally, for any , by Lemma 29, we have:
Finally, we are ready to prove the main lemma of this subsection (Lemma 7), which claims that if gradients in iterations are always large, then the Hamiltonian will decrease sufficiently within a small number of steps.
Consider the setting of Theorem 3. If for all , then by running Algorithm 2 we have .
Since for all , according to Algorithm 2, the precondition to add perturbation never holds, so Algorithm will not add any perturbation in these iterations.
Next, suppose there is at least one iteration where NCE is used. Then by Lemma 12, we know that that step alone gives decrease in the Hamiltonian. According to Lemma 4 and Lemma 12 we know that without perturbation, the Hamiltonian decreases monotonically in the remaining steps. This means whenever at least one NCE step is performed, Lemma 7 immediately holds.
For the remainder of the proof, we can restrict the discussion to the case where NCE is never performed in steps . Letting
we know in case , that Lemma 15 ensures . Thus, we only need to discuss the case . Again, if , Lemma 7 immediately holds. For the remaining case, , we apply Lemma 17 starting at , and obtain
by Lemma 15 we again know we only need to discuss the case where ; otherwise, we already guarantee sufficient decrease in the Hamiltonian. Then, we clearly have , also by the precondition of Lemma 7, we know , thus . On the other hand, since if the Hamiltonian does not decrease enough, , by Lemma 6, we have , by the Hessian Lipschitz property, which gives:
Now satisfies all the preconditions of Lemma 16, and by applying Lemma 16 we finish the proof. ∎
B.3 Proof for negative-curvature scenario
We prove Lemma 8 in this section. We consider two trajectories, starting at and , with , where , where is the minimum eigenvector direction of , and where is not too small. We show that at least one of the trajectories will escape saddle points efficiently.
Assume none of the two sequences decrease the Hamiltonian fast enough; that is,
where and are the Hamiltonians at and . Then, by Corollary 6 and the Cauchy-Swartz inequality, we have for any :
Taking the difference of two AGD sequences starting from , and let , we have:
We thus obtain the update of the sequence in matrix form:
Intuitively, we want to say that the first term dominates. Technically, we will set up an induction based on the following fact:
It is easy to check the base case holds for . Then, assume that for all time steps less than or equal to , the induction assumption hold. We have:
where in the last inequality, we used Lemma 33 for monotonicity in .
To prove that the induction assumption holds for we compute:
By the precondition we have . Without loss of generality, assume that the minimum eigenvector direction of is along he first coordinate , and denote the corresponding matrix as (as in the convention of (12). Let:
We then see that (1) is along the direction, and (2) according to Lemma 32, the matrix is a diagonal matrix, where the spectral norm is achieved along the first coordinate which corresponds to the eigenvalue . Therefore, using Equation (16), we have:
where, in the second to last step, we used Lemma 31, and in the last step we used . Finally, by choosing a sufficiently large constant . Therefore, we have proved the induction, which gives us:
Noting that , by applying Lemma 33 we have
This means our assumption is wrong, and we can therefore conclude:
where the last step is due to our choice of in (3). Combining these two facts:
We are now ready to prove the main lemma in this subsection, which states with that random perturbation, PAGD will escape saddle points efficiently with high probability.
Consider the setting of Theorem 3. If , , and a perturbation has not been added in iterations , then, by running Algorithm 2, we have with probability at least .
Since a perturbation has not been added in iterations , according to PAGD (Algorithm 2), we add perturbation at , the Hamiltonian will increase by at most:
where the last step is due to our choice of in (3) with constant sufficiently large. Again by Algorithm 2, a perturbation will never be added in the remaining iterations, and by Lemma 4 and Lemma 12 we know the Hamiltonian always decreases for the remaining steps. Therefore, if at least one NCE step is performed in iteration , by Lemma 12 we will decrease in that NCE step, and at most increase by due to the perturbation. This immediately gives .
Thus, with probability at least , the perturbation will end up outside of , which give . This finishes the proof.
B.4 Proof of Theorem 3
Our main result is now easily obtained from Lemma 7 and Lemma 8.
Suppose we never encounter any -second-order stationary point. Consider the set , and two cases: (1) , in which case we know all gradients are large and by Lemma 7 we have ; (2) . In this case, define ; i.e., the earliest iteration where the gradient is small. Since by assumption, is not an -second-order stationary point, this gives , and by Lemma 8, we can conclude . Clearly . That is, in either case, we will decrease the Hamiltonian by in at most steps.
Then, for the the first case, we can repeat this argument starting at iteration , and for the second case, we can repeat the argument starting at iteration . Therefore, we will continue to obtain a decrease of the Hamiltonian by an average of per step. Since the function is lower bounded, we know the Hamiltonian can not decrease beyond , which means that in steps, we must encounter an -second-order stationary point at least once.
Finally, in steps, we will call Lemma 8 at most times, and since Lemma 8 holds with probability , by a union bound, we know that the argument above is true with probability at least:
Appendix C Auxiliary Lemma
In this section, we present some auxiliary lemmas which are used in proving Lemma 16, Lemma 17 and Lemma 18. These deal with the large-gradient scenario (nonconvex component), the large-gradient scenario (strongly convex component), and the negative curvature scenario, respectively.
The first two lemmas establish some facts about powers of the structured matrices arising in AGD.
When the eigenvalues and are distinct, the matrix can be rewritten as , and it is easy to check that the two eigenvectors have the form and . Therefore, we can write the eigen-decomposition as:
and the th power has the general form:
When there are two repeated eigenvalue , the matrix can be rewritten as . It is easy to check that has the following Jordan normal form:
The remainder of the proof follows from simple linear algebra calculations for both cases. ∎
When and are distinct, we have:
When are repeated, we have:
The remainder of the proof follows from Lemma 22 and linear algebra. ∎
The next lemma tells us when the eigenvalues of the AGD matrix are real and when they are complex.
Let , and define the matrix as follows:
Then the two eigenvalues and of are solutions of the following equation:
Moreover, when , and are real numbers, and when , and are conjugate complex numbers.
An eigenvalue of the matrix must satisfy the following equation:
Then and are real if and only if , which finishes the proof. ∎
Finally, we need a simple lemma for geometric sums.
For any and fixed , we have:
All the lemmas in this section are concerned with the behavior of the AGD matrix for eigen-directions of the Hessian with eigenvalues being negative or small and positive, as used in proving Lemma 16. The following lemma bounds the smallest eigenvalue of the AGD matrix for those directions.
Under the same setting as Lemma 21, and for , where , we have:
Let . To prove when , we only need to verify :
The last inequality follows because by assumption.
On the other hand, when , both eigenvalues are still real, and the midpoint of the two roots is:
Combining the two cases, we have shown that when we have .
In the same setting as above, the following lemma bounds the largest eigenvalue.
Under the same setting as Lemma 21, and with , and letting , we have:
By Lemma 21 and Vieta’s formula, we have:
An application of Lemma 23 finishes the proof. ∎
The following lemma establishes some properties of the powers of the AGD matrix.
Consider the same setting as Lemma 21, and let . Denote:
Then, for any , we have:
We prove the two inequalities seperately.
The last inequality holds because in at least terms are greater than one. Finally, since , we have , thus:
Second Inequality: Without loss of generality, assume . Again by Lemma 19:
The second-to-last inequality holds because it is easy to check
for any . Finally, by Lemma 24, we have
Since , , we have that when ,
Combining the two cases finishes the proof. ∎
C.2 Large-gradient scenario (strongly convex component)
All the lemmas in this section are concerned with the behavior of the AGD matrix for eigen-directions of the Hessian with eigenvalues being large and positive, as used in proving Lemma 17. The following lemma gives eigenvalues of the AGD matrix for those directions.
Under the same setting as Lemma 21, and with , we have and , where:
By Lemma 21, we know that and are two solutions of
This gives . On the other hand, discriminant is equal to
Under the same setting as above, the following lemma delineates some properties of powers of the AGD matrix.
Under the same setting as in Lemma 21, and with , denote:
By Lemma 19 and Lemma 26, using to denote the magnitude of a complex number, we have:
Reorganizing these two equations finishes the proof. ∎
The following is a technical lemma which is useful in bounding the change in the Hessian by the amount of oscillation in the iterates.
Under the same setting as Lemma 26, for any , any sequence , and any :
Let be the approximate period, and be the number of periods that exist within time . Then, we can group the summation by each period:
We prove the lemma by bounding the first term and the second term on the right-hand-side of this equation separately.
Term 2: Since , it is not hard to see:
Term 1: We first study the inner-loop factor, . Letting be the offset for each approximate period, we have that for any :
Combined with the fact that for all we have , we obtain the following:
Also, for any , we have , and by definition of , we immediately have . This yields:
The second last inequality used the fact that (although note is not ). The last inequality is true since by Lemma 26, we know . This gives:
and therefore, we can now bound the first term:
The second-to-last inequality used Eq.(17). In conclusion, since , we have:
The following lemma combines the previous two lemmas to bound the approximation error in the quadratic.
Under the same setting as Lemma 21, and with , denote:
Then, for any sequence , any , we have:
We prove the two inequalities separately.
First Inequality: Since , we further split the analysis into two cases:
Case : By Lemma 19, we can expand dthe left-hand-side as:
Noting that in this case , by Lemma 27 and Lemma 22, we have for :
Case : Again, we expand the left-hand-side as:
Noting in this case that by Lemma 26, then by Lemma 28 we have:
Second Inequality: Using Lemma 19, we know:
where we note and the coefficient of the first term is upper bounded by the following:
As in the proof of the first inequality, we split the analysis into two cases:
Case : Again, we use
Noting , again by Lemma 22 and , we have:
Case : From the above derivation, we have:
According to Lemma 26, in this case , and since , we have:
Putting all the pieces together finishes the proof. ∎
C.3 Negative-curvature scenario
In this section, we will prove the auxiliary lemmas required for proving Lemma 18.
The first lemma lower bounds the largest eigenvalue of the AGD matrix for eigen-directions whose eigenvalues are negative.
Under the same setting as Lemma 21, and with , and , we have:
Let . To prove when , we only need to verify :
The last inequality holds because in this case.
where the last inequality is due to .
The next lemma is a technical lemma on large powers.
Under the same setting as Lemma 21, and with , denote
Let and be the two eigenvalues of the matrix , where . Since , according to Lemma 21 and Lemma 23, we have , and thus expanding both sides using Lemma 19 yields:
The following lemma gives properties of the element of large powers of the AGD matrix.
Let the matrix be defined as follows and let and .
For any fixed , letting , then we have:
is a monotonically decreasing function for .
For any , we have .
For , we know that has two real eigenvalues and , Without loss of generality, we can assume . By Lemma 19, we know:
By Lemma 21 and Vieta’s formulas, we know that is monotonically decreasing in . On the other hand, we have that:
is monotonically decreasing in , implying that is monotonically decreasing in . Since both terms are positive, this implies the product is also monotonically decreasing in , which finishes the proof of the first part.
For , the two eigenvalues and are conjugate, and we have:
and this finishes the proof of the second part. ∎
The following lemma gives properties of the sum of the first row of large powers of the AGD matrix.
Under the same setting as Lemma 21, and with , denote
Since , we know that has two distinct real eigenvalues. Let and be the two eigenvalues of . For the first inequality, by Lemma 19, we only need to prove:
Taking the difference of the LHS and RHS, we have:
According to Lemma 21 and Lemma 23, , which finishes the proof of the first claim.
For the second inequality, again by Lemma 19, since both and are positive, we have:
By Lemma 23 we have , By Lemma 30 we know . Combining these facts finishes the proof. ∎