Title: ESCAPING SADDLE POINTS FASTER WITH STOCHASTIC MOMENTUM

Abstract: Stochastic gradient descent (SGD) with stochastic momentum is popular in nonconvex stochastic optimization and particularly for the training of deep neural networks. In standard SGD, parameters are updated by improving along the path of the gradient at the current iterate on a batch of examples, where the addition of a "momentum" term biases the update in the direction of the previous change in parameters. In non-stochastic convex optimization one can show that a momentum adjustment provably reduces convergence time in many settings, yet such results have been elusive in the stochastic and non-convex settings. At the same time, a widely-observed empirical phenomenon is that in training deep networks stochastic momentum appears to significantly improve convergence time, variants of it have flourished in the development of other popular update methods, e.g. ADAM (Kingma & Ba (2015)), AMSGrad (Reddi et al. ( 2018b)), etc. Yet theoretical justification for the use of stochastic momentum has remained a significant open question. In this paper we propose an answer: stochastic momentum improves deep network training because it modifies SGD to escape saddle points faster and, consequently, to more quickly find a second order stationary point. Our theoretical results also shed light on the related question of how to choose the ideal momentum parameter-our analysis suggests that β ∈ [0, 1) should be large (close to 1), which comports with empirical findings. We also provide experimental findings that further validate these conclusions.

1. INTRODUCTION:

SGD with stochastic momentum has been a de facto algorithm in nonconvex optimization and deep learning. It has been widely adopted for training machine learning models in various applications. Modern techniques in computer vision (e.g. Krizhevsky et al. (2012) ; He et al. (2016) ; Cubuk et al. (2018) ; Gastaldi (2017) ), speech recognition (e.g. Amodei et al. (2016) ), natural language processing (e.g. Vaswani et al. (2017) ), and reinforcement learning (e.g. Silver et al. (2017) ) use SGD with stochastic momentum to train models. The advantage of SGD with stochastic momentum has been widely observed (Hoffer et al. (2017) ; Loshchilov & Hutter (2019) ; Wilson et al. (2017) ). Sutskever et al. (2013) demonstrate that training deep neural nets by SGD with stochastic momentum helps achieving in faster convergence compared with the standard SGD (i.e. without momentum). The success of momentum makes it a necessary tool for designing new optimization algorithms in optimization and deep learning. For example, all the popular variants of adaptive stochastic gradient methods like Adam (Kingma & Ba (2015) ) or AMSGrad (Reddi et al. (2018b) ) include the use of momentum.

Despite the wide use of stochastic momentum (Algorithm 1) in practice, 1 justification for the clear empirical improvements has remained elusive, as has any mathematical guidelines for actually setting the momentum parameter-it has been observed that large values (e.g. β = 0.9) work well in practice. It should be noted that Algorithm 1 is the default momentum-method in popular software 1: Required: Step size parameter η and momentum parameter β. 2: Init: w0 ∈ R d and m-1 = 0 ∈ R d . 3: for t = 0 to T do 4:

Given current iterate wt, obtain stochastic gradient gt := ∇f (wt; ξt).

5::

Update stochastic momentum mt := βmt-1 + gt.

6::

Update iterate wt+1 := wt -ηmt. 7: end for packages such as PyTorch and Tensorflow. In this paper we provide a theoretical analysis for SGD with momentum. We identify some mild conditions that guarantees SGD with stochastic momentum will provably escape saddle points faster than the standard SGD, which provides clear evidence for the benefit of using stochastic momentum. For stochastic heavy ball momentum, a weighted average of stochastic gradients at the visited points is maintained. The new update is computed as the current update minus a step in the direction of the momentum. Our analysis shows that these updates can amplify a component in an escape direction of the saddle points.

In this paper, we focus on finding a second-order stationary point for smooth non-convex optimization by SGD with stochastic heavy ball momentum. Specifically, we consider the stochastic nonconvex optimization problem, min w∈R d f (w) := E ξ∼D [f (w; ξ)], where we overload the notation so that f (w; ξ) represents a stochastic function induced by the randomness ξ while f (w) is the expectation of the stochastic functions. An ( , )-second-order stationary point w satisfies ∇f (w) ≤ and ∇2 f (w) -I.

(1)

Obtaining a second order guarantee has emerged as a desired goal in the nonconvex optimization community. Since finding a global minimum or even a local minimum in general nonconvex optimization can be NP hard (Anandkumar & Ge (2016) ; Nie (2015) ; Murty & Kabadi (1987) ; Nesterov (2000) ), most of the papers in nonconvex optimization target at reaching an approximate second-order stationary point with additional assumptions like Lipschitzness in the gradients and the Hessian (e.g. Allen-Zhu & Li (2018) ; Carmon & Duchi (2018) ; Curtis et al. (2017) ; Daneshmand et al. (2018) ; Du et al. (2017) ; Fang et al. (2018; 2019) ; Ge et al. (2015) ; Jin et al. (2017; 2019) ; Kohler & Lucchi (2017) ; Lei et al. (2017) ; Lee et al. (2019) ; Levy (2016); Mokhtari et al. (2018) ; Nesterov & Polyak (2006) ; Reddi et al. (2018a) ; Staib et al. (2019) ; Tripuraneni et al. (2018) ; Xu et al. (2018) ). 2 We follow these related works for the goal and aim at showing the benefit of the use of the momentum in reaching an ( , )-second-order stationary point.

We introduce a required condition, akin to a model assumption made in (Daneshmand et al. (2018) ), that ensures the dynamic procedure in Algorithm 2 produces updates with suitable correlation with the negative curvature directions of the function f . Definition 1. Assume, at some time t, that the Hessian H t = ∇ 2 f (w t ) has some eigenvalue smaller thanand ∇f (w t ) ≤ . Let v t be the eigenvector corresponding to the smallest eigenvalue of ∇ 2 f (w t ). The stochastic momentum m t satisfies Correlated Negative Curvature (CNC) at t with parameter γ > 0 if

EQUATION

As we will show, the recursive dynamics of SGD with heavy ball momentum helps in amplifying the escape signal γ, which allows it to escape saddle points faster.

Contribution: We show that, under CNC assumption and some minor constraints that upper-bound parameter β, if SGD with momentum has properties called Almost Positively Aligned with Gradient (APAG), Almost Positively Correlated with Gradient (APCG), and Gradient Alignment or Curvature Exploitation (GrACE), defined in the later section, then it takes T = O((1 -β) log(1/(1 -β) ) -10 ) iterations to return an ( , ) second order stationary point. Alternatively, one can obtain an ( , √ ) second order stationary point in T = O((1 -β) log(1/(1 -β) ) -5 ) iterations. Our theoretical result demonstrates that a larger momentum parameter β can help in escaping saddle points faster. As saddle points are pervasive in the loss landscape of optimization and deep learning (Dauphin et al. (2014) ; Choromanska et al. (2015) ), the result sheds light on explaining why SGD with momentum enables training faster in optimization and deep learning.

Notation: In this paper we use E t [•] to represent conditional expectation E[•|w 1 , w 2 , . . . , w t ], which is about fixing the randomness upto but not including t and notice that w t was determined at t -1.

2. BACKGROUND:

2.1 A THOUGHT EXPERIMENT. Let us provide some high-level intuition about the benefit of stochastic momentum with respect to escaping saddle points. In an iterative update scheme, at some time t 0 the parameters w t0 can enter a saddle point region, that is a place where Hessian ∇ 2 f (w t0 ) has a non-trivial negative eigenvalue, say λ min (∇ 2 f (w t0 )) ≤ -, and the gradient ∇f (w t0 ) is small in norm, say ∇f (w t0 ) ≤ . The challenge here is that gradient updates may drift only very slowly away from the saddle point, and may not escape this region; see (Du et al. (2017) ; Lee et al. (2019) ) for additional details. On the other hand, if the iterates were to move in one particular direction, namely along v t0 the direction of the smallest eigenvector of ∇ 2 f (w t0 ), then a fast escape is guaranteed under certain constraints on the step size η; see e.g. (Carmon et al. (2018) ). While the negative eigenvector could be computed directly, this 2nd-order method is prohibitively expensive and hence we typically aim to rely on gradient methods. With this in mind, Daneshmand et al. (2018) , who study non-momentum SGD, make an assumption akin to our CNC property described above that each stochastic gradient g t0 is strongly non-orthogonal to v t0 the direction of large negative curvature. This suffices to drive the updates out of the saddle point region.

In the present paper we study stochastic momentum, and our CNC property requires that the update direction m t0 is strongly non-orthogonal to v t0 ; more precisely, E t0 [ m t0 , v t0 2 ] ≥ γ > 0. We are able to take advantage of the analysis of (Daneshmand et al. (2018) ) to establish that updates begin to escape a saddle point region for similar reasons. Further, this effect is amplified in successive iterations through the momentum update when β is close to 1. Assume that at some w t0 we have m t0 which possesses significant correlation with the negative curvature direction v t0 , then on successive rounds m t0+1 is quite close to βm t0 , m t0+2 is quite close to β 2 m t0 , and so forth; see Figure 1 for an example. This provides an intuitive perspective on how momentum might help accelerate the escape process. Yet one might ask does this procedure provably contribute to the escape process and, if so, what is the aggregate performance improvement of the momentum? We answer the first question in the affirmative, and we answer the second question essentially by showing that momentum can help speed up saddle-point escape by a multiplicative factor of 1 -β. On the negative side, we also show that β is constrained and may not be chosen arbitrarily close to 1.

2.2. MOMENTUM HELPS ESCAPE SADDLE POINTS: AN EMPIRICAL VIEW:

Let us now establish, empirically, the clear benefit of stochastic momentum on the problem of saddle-point escape. We construct two stochastic optimization tasks, and each exhibits at least one significant saddle point. The two objectives are as follows.

EQUATION

EQUATION

)

Problem (3) of these was considered by (Staib et al. (2019) ; Reddi et al. (2018a) ) and represents a very straightforward non-convex optimization challenge, with an embedded saddle given by the matrix H := diag([1, -0.1]), and stochastic gaussian perturbations given by b i ∼ N (0, diag([0.1, 0.001])); the small variance in the second component provides lower noise in the escape direction. Here we have set n = 10. Observe that the origin is in the neighborhood of saddle points and has objective value zero. SGD and SGD with momentum are initialized at the origin in the experiment so that they have to escape saddle points before the convergence. The second objective (4) appears in the phase retrieval problem, that has real applications in physical sciences (Candés et al. (2013) ; Shechtman et al. (2015) ). In phase retrieval3 , one wants to find an unknown w * ∈ R d with access to but a few samples y i = (a i w * ) 2 ; the design vector a i is known a priori. Here we have sampled w * ∼ N (0, I d /d) and a i ∼ N (0, I d ) with d = 10 and n = 200.

The empirical findings, displayed in Figure 2 , are quite stark: for both objectives, convergence is significantly accelerated by larger choices of β. In the first objective (Figure 4a ), we see each optimization trajectory entering a saddle point region, apparent from the "flat" progress, yet we observe that large-momentum trajectories escape the saddle much more quickly than those with smaller momentum. A similar affect appears in Figure 4b . To the best of our knowledge, this is the first reported empirical finding that establishes the dramatic speed up of stochastic momentum for finding an optimal solution in phase retrieval.

2.3. RELATED WORKS.:

Heavy ball method: The heavy ball method was originally proposed by Polyak (1964) . It has been observed that this algorithm, even in the deterministic setting, provides no convergence speedup over standard gradient descent, except in some highly structure cases such as convex quadratic objectives where an "accelerated" rate is possible (Lessard et al. (2016) 2019)). Our work belongs to this category. In this category, perhaps the pioneer works are (Ge et al. (2015) ) and (Jin et al. (2017) ). Jin et al. (2017) show that explicitly adding isotropic noise in each iteration guarantees that GD escapes saddle points and finds a second order stationary point with high probability. Following (Jin et al. (2017) ), Daneshmand et al. (2018) assume that stochastic gradient inherently has a component to escape. Specifically, they make assumption of the Correlated Negative Curvature (CNC) for stochastic gradient g t so that

E t [ g t , v t 2 ] ≥ γ > 0.

The assumption allows the algorithm to avoid the procedure of perturbing the updates by adding isotropic noise. Our work is motivated by (Daneshmand et al. (2018) ) but assumes CNC for the stochastic momentum m t instead. In Appendix A, we compare the results of our work with the related works.

3. MAIN RESULTS:

We assume that the gradient ∇f is L-Lipschitz; that is, f is L-smooth. Further, we assume that the Hessian ∇ 2 f is ρ-Lipschitz. These two properties ensure that ∇f (w) -∇f (w ) ≤ L w -w and that ∇ 2 f (w) -∇ 2 f (w ) ≤ ρ w -w , ∀w, w . The L-Lipschitz gradient assumption implies that |f (w )-f (w)-∇f (w), w -w | ≤ L 2 w-w 2 , ∀w, w , while the ρ-Lipschitz Hessian assumption implies that |f (w )-f (w)-∇f (w), w -w -(w -w) ∇ 2 f (w)(w -w)| ≤ ρ 6 w-w 3 , ∀w, w . Furthermore, we assume that the stochastic gradient has bounded noise ∇f (w) -∇f (w; ξ) 2 ≤ σ 2 and that the norm of stochastic momentum is bounded so that m t ≤ c m . We denote Π i M i as the matrix product of matrices {M i } and we use

σ max (M ) = M 2 := sup x =0 x,M x x,x

to denote the spectral norm of the matrix M .

3.1. REQUIRED PROPERTIES WITH EMPIRICAL VALIDATION:

Our analysis of stochastic momentum relies on three properties of the stochastic momentum dynamic. These properties are somewhat unusual, but we argue they should hold in natural settings, and later we aim to demonstrate that they hold empirically in a couple of standard problems of interest. Definition 2. We say that SGD with stochastic momentum satisfies Almost Positively Aligned with Gradient (APAG)4 if we have

EQUATION

)

We say that SGD with stochastic momentum satisfies Almost Positively Correlated with Gradient (APCG) with parameter τ if ∃c > 0 such that,

EQUATION

)

where the PSD matrix M t is defined as

M t = (Π τ -1 s=1 G s,t )(Π τ -1 s=k G s,t ) with G s,t := I-η s j=1 β s-j ∇ 2 f (w t ) = I-η(1-β s ) 1-β ∇ 2 f (w t ) for any integer 1 ≤ k ≤ τ -1,

and η is any step size chosen that guarantees each G s,t is PSD. Definition 3. We say that the SGD with momentum exhibits Gradient Alignment or Curvature Exploitation (GrACE) if ∃c h ≥ 0 such that

EQUATION

APAG requires that the momentum term m t must, in expectation, not be significantly misaligned with the gradient ∇f (w t ). This is a very natural condition when one sees that the momentum term is acting as a biased estimate of the gradient of the deterministic f . APAG demands that the bias can not be too large relative to the size of ∇f (w t ). Indeed this property is only needed in our analysis when the gradient is large (i.e. ∇f (w t ) ≥ ) as it guarantees that the algorithm makes progress; our analysis does not require APAG holds when gradient is small.

APCG is a related property, but requires that the current momentum term m t is almost positively correlated with the the gradient ∇f (w t ), but measured in the Mahalanobis norm induced by M t . It For (e), we observe that the value is almost always nonnegative. Sub-figures (c) and (f): We plot the value of ∇f (wt), Mtmt /ησmax(Mt) ∇f (wt) 2 . For (c), we let Mt = (Π 3×10 5 s=1 Gs,t)(Π 3×10 5 s=1 Gs,t) and we only report the values when the update is in the region of saddle points. For (f), we let Mt = (Π 500 s=1 Gs,t)(Π 500 s=1 Gs,t) and we observe that the value is almost always nonnegative. The figures implies that SGD with momentum has APAG and APCG properties in the experiments. Furthermore, an interesting observation is that, for the phase retrieval problem, the expected values might actually be nonnegative. may appear to be an unusual object, but one can view the PSD matrix M t as measuring something about the local curvature of the function with respect to the trajectory of the SGD with momentum dynamic. We will show that this property holds empirically on two natural problems for a reasonable constant c . APCG is only needed in our analysis when the update is in a saddle region with significant negative curvature, ∇f (w) ≤ and λ min (∇ 2 f (w)) ≤ -. Our analysis does not require APCG holds when the gradient is large or the update is at an ( , )-second order stationary point.

For GrACE, the first term on l.h.s of ( 7) measures the alignment between stochastic momentum m t and the gradient ∇f (w t ), while the second term on l.h.s measures the curvature exploitation. The first term is small (or even negative) when the stochastic momentum m t is aligned with the gradient ∇f (w t ), while the second term is small (or even negative) when the stochastic momentum m t can exploit a negative curvature (i.e. the subspace of eigenvectors that corresponds to the negative eigenvalues of the Hessian ∇ 2 f (w t ) if exists). Overall, a small sum of the two terms (and, consequently, a small c h ) allows one to bound the function value of the next iterate (see Lemma 8).

On Figure 3 , we report some quantities related to APAG and APCG as well as the gradient norm when solving the previously discussed problems (3) and (4) using SGD with momentum. We also report a quantity regarding GrACE on Figure 4 in the appendix.

3.2. CONVERGENCE RESULTS:

The high level idea of our analysis follows as a similar template to (Jin et al. (2017); Daneshmand et al. (2018) ; Staib et al. (2019) ). Our proof is structured into three cases: either (a) ∇f (w) ≥ , or (b) ∇f (w) ≤ and λ min (∇ 2 f (w)) ≤ -, or otherwise (c) ∇f (w) ≤ and λ min (∇ 2 f (w)) ≥ -, 1: Required: Step size parameters r and η, momentum parameter β, and period parameter T thred . 2: Init: w0 ∈ R d and m-1 = 0 ∈ R d . 3: for t = 0 to T do 4:

Get stochastic gradient gt at wt, and set stochastic momentum mt := βmt-1 + gt.

Set learning rate: η := η unless (t mod T thred ) = 0 in which case η := r 6: wt+1 = wt -ηmt. 7: end for meaning we have arrived in a second-order stationary region. The precise algorithm we analyze is Algorithm 2, which identical to Algorithm 1 except that we boost the step size to a larger value r on occasion. We will show that the algorithm makes progress in cases (a) and (b). In case (c), when the goal has already been met, further execution of the algorithm only weakly hurts progress. Ultimately, we prove that a second order stationary point is arrived at with high probability. While our proof borrows tools from (Daneshmand et al. (2018) ; Staib et al. (2019) ), much of the momentum analysis is entirely novel to our knowledge. Theorem 1. Assume that the stochastic momentum satisfies CNC. Set5 r = O( 2), η = O( 5), and

T thred = c(1-β) η log( Lcmσ 2 ρc c h (1-β)δγ ) = O((1 -β) log( Lcmσ 2 ρc c h (1-β)δγ ) -6

) for some constant c > 0. If SGD with momentum (Algorithm 2) has APAG property when gradient is large ( ∇f (w) ≥ ), APCG T thred property when it enters a region of saddle points that exhibits a negative curvature ( ∇f (w) ≤ and λ min (∇ 2 f (w)) ≤ -), and GrACE property throughout the iterations, then it reaches an ( , ) second order stationary point in

T = 2T thred (f (w 0 ) -min w f (w))/(δF thred ) = O((1 -β) log( Lcmσ 2 ρc c h (1-β)δγ ) -10 ) iterations with high probability 1 -δ, where F thred = O( 4 ).

The theorem implies the advantage of using stochastic momentum for SGD. Higher β leads to reaching a second order stationary point faster. As we will show in the following, this is due to that higher β enables escaping the saddle points faster. In Subsection 3.2.1, we provide some key details of the proof of Theorem 1. The interested reader can read a high-level sketch of the proof, as well as the detailed version, in Appendix G.

Remark 1: (constraints on β) We also need some minor constraints on β so that β cannot be too close to 1. They are 1)  and 6) T thred ≥ 1 + 2β 1-β . Please see Appendix E.1 for the details and discussions. Remark 2: (escaping saddle points) Note that Algorithm 2 reduces to CNC-SGD of Daneshmand et al. ( 2018) when β = 0 (i.e. without momentum). Therefore, let us compare the results. We show that the escape time of Algorithm 2 is T thred := Õ (1-β) η (see Appendix E.3.3, ).

L(1 -β) 3 > 1, 2) σ 2 (1 -β) 3 > 1, 3) c (1 -β) 2 > 1, 4) η ≤ 1-β L , 5) η ≤ 1-β ,

On the other hand, for CNC-SGD, based on Table 3 in their paper, is T thred = Õ 1 η . One can clearly see that T thred of our result has a dependency 1 -β, which makes it smaller than that of Daneshmand et al. (2018) for any same η and consequently demonstrates escaping saddle point faster with momentum.

Remark 3: (finding a second order stationary point) Denote a number such that ∀t, g t ≤ . In Appendix G.3, we show that in the high momentum regime where (1 -β) << ρ 2 10 c 9 m c 2 h c , Algorithm 2 is strictly better than CNC-SGD of Daneshmand et al. (2018) , which means that a higher momentum can help find a second order stationary point faster. Empirically, we find out that c ≈ 0 (Figure 3 ) and c h ≈ 0 (Figure 4 ) in the phase retrieval problem, so the condition is easily satisfied for a wide range of β.

3.2.1. ESCAPING SADDLE POINTS:

In this subsection, we analyze the process of escaping saddle points by SGD with momentum. Denote t 0 any time such that (t 0 mod T thred ) = 0. Suppose that it enters the region exhibiting a small gradient but a large negative eigenvalue of the Hessian (i.e. ∇f (w t0 ) ≤ and λ min (∇ 2 f (w t0 )) ≤ -). We want to show that it takes at most T thred iterations to escape the region and whenever it escapes, the function value decreases at least by F thred = O( 4 ) on expectation, where the precise expression of F thred will be determined later in Appendix E. The technique that we use is proving by contradiction. Assume that the function value on expectation does not decrease at least F thred in T thred iterations. Then, we get an upper bound of the expected distance E t0 [ w t0+T thredw t0 2 ] ≤ C upper . Yet, by leveraging the negative curvature, we also show a lower bound of the form E t0 [ w t0+T thred -w t0 2 ] ≥ C lower . The analysis will show that the lower bound is larger than the upper bound (namely, C lower > C upper ), which leads to the contradiction and concludes that the function value must decrease at least F thred in T thred iterations on expectation. Since

T thred = O((1 -β) log( 1 (1-β) ) 6

), the dependency on β suggests that larger β can leads to smaller T thred , which implies that larger momentum helps in escaping saddle points faster.

Lemma 1 below provides an upper bound of the expected distance. The proof is in Appendix C. Lemma 1. Denote t 0 any time such that (t

0 mod T thred ) = 0. Suppose that E t0 [f (w t0 ) - f (w t0+t )] ≤ F thred for any 0 ≤ t ≤ T thred . Then, E t0 [ w t0+t -w t0 2 ] ≤ C upper,t := 8ηt F thred +2r 2 c h + ρ 3 r 3 c 3 m (1-β) 2 + 8η 2 tσ 2 (1-β) 2 + 4η 2 β 1-β 2 c 2 m + 2r 2 c 2 m .

We see that C upper,t in Lemma 1 is monotone increasing with t, so we can define C upper := C upper,T thred . Now let us switch to obtaining the lower bound of

E t0 [ w t0+T thred -w t0 2 ].

The key to get the lower bound comes from the recursive dynamics of SGD with momentum. Lemma 2. Denote t 0 any time such that (t 0 mod T thred ) = 0. Let us define a quadratic approximation at w t0 , Q(w

) := f (w t0 ) + w -w t0 , ∇f (w t0 ) + 1 2 (w -w t0 ) H(w -w t0 )

, where

H := ∇ 2 f (w t0 ). Also, define G s := (I -η s k=1 β s-k H).

Then we can write w t0+t -w t0 exactly using the following decomposition.

qv,t-1 Π t-1 j=1 G j -rm t0 +η qm,t-1 (-1) t-1 s=1 Π t-1 j=s+1 G j β s m t0 + η qq,t-1 (-1) t-1 s=1 Π t-1 j=s+1 G j s k=1 β s-k ∇f (w t0+k ) -∇Q(w t0+s ) + η qw,t-1 (-1) t-1 s=1 Π t-1 j=s+1 G j s k=1 β s-k ∇f (w t0 ) +η q ξ,t-1 (-1) t-1 s=1 Π t-1 j=s+1 G j s k=1 β s-k ξ t0+k .

The proof of Lemma 2 is in Appendix D. Furthermore, we will use the quantities q v,t-1 , q m,t-1 , q q,t-1 , q w,t-1 , q ξ,t-1 as defined above throughout the analysis.

Lemma 3. Following the notations of Lemma 2, we have that

E t0 [ w t0+t -w t0 2 ] ≥ E t0 [ q v,t-1 2 ]+2ηE t0 [ q v,t-1 , q m,t-1 +q q,t-1 +q w,t-1 +q ξ,t-1 ] =: C lower .

We are going to show that the dominant term in the lower bound of

E t0 [ w t0+t -w t0 2 ] is E t0 [ q v,t-1

2 ], which is the critical component for ensuring that the lower bound is larger than the upper bound of the expected distance.

Lemma 4. Denote θ j := j k=1 β j-k = j k=1 β k-1 and λ := -λ min (H). Following the conditions and notations in Lemma 1 and Lemma 2, we have that

EQUATION

)

Proof. We know that λ min (H) ≤ -< 0. Let v be the eigenvector of the Hessian H with unit norm that corresponds to λ min (H) so that Hv = λ min (H)v. We have

EQUATION

where (a) is because v is with unit norm, (b) is by Cauchy-Schwarz inequality, (c), (d) are by the definitions, and (e) is by the CNC assumption so that

E t0 [ m t0 , v 2 ] ≥ γ.

Observe that the lower bound in ( 8) is monotone increasing with t and the momentum parameter β. Moreover, it actually grows exponentially in t. To get the contradiction, we have to show that the lower bound is larger than the upper bound. By Lemma 1 and Lemma 3, it suffices to prove the following lemma. We provide its proof in Appendix E. Lemma 5. Let F thred = O( 4 ) and η2 T thred ≤ r 2 . By following the conditions and notations in Theorem 1, Lemma 1 and Lemma 2, we conclude that if SGD with momentum (Algorithm 2) has the APCG property, then we have that

C lower := E t0 [ q v,T thred -1 A LITERATURE SURVEY

Heavy ball method: The heavy ball method was originally proposed by Polyak (1964) . It has been observed that this algorithm, even in the deterministic setting, provides no convergence speedup over standard gradient descent, except in some highly structure cases such as convex quadratic objectives where an "accelerated" rate is possible (Lessard et al. (2016) ; Goh (2017) ). In recent years, some works make some efforts in analyzing heavy ball method for other classes of optimization problems besides the quadratic functions. For example, Ghadimi et al. (2015) Yet, the rate is not better than that of the standard SGD. We are also aware of the works (Ghadimi & Lan (2016; 2013) ), which propose some variants of stochastic accelerated algorithms with first order stationary point guarantees. Yet, the framework in (Ghadimi & Lan (2016; 2013) ) does not capture the stochastic heavy ball momentum used in practice. There is also a negative result about the heavy ball momentum. Kidambi et al. (2018) show that for a specific strongly convex and Figure 4 : Plot regarding the GrACE property. We plot the values of

η ∇f (w t ),g t -m t + 1 2 η 2 m t H t m t η 2

versus iterations. An interesting observation is that the value is well upper-bounded by zero for the phase retrieval problem. The results imply that the constant c h is indeed small. strongly smooth problem, SGD with heavy ball momentum fails to achieving the best convergence rate while some algorithms can.

Reaching a second order stationary point: As we mentioned earlier, there are many works aim at reaching a second order stationary point. We classify them into two categories: specialized algorithms and simple GD/SGD variants. Specialized algorithms are those designed to exploit the negative curvature explicitly and escape saddle points faster than the ones without the explicit exploitation (e.g. Carmon et al. (2018) 2019)). Our work belongs to this category. In this category, perhaps the pioneer works are (Ge et al. (2015) ) and (Jin et al. (2017) ). Jin et al. (2017) show that explicitly adding isotropic noise in each iteration guarantees that GD escapes saddle points and finds a second order stationary point with high probability. Following (Jin et al. (2017) ), Daneshmand et al. (2018) assume that stochastic gradient inherently has a component to escape. Specifically, they make assumption of the Correlated Negative Curvature (CNC) for stochastic gradient g t so that

E t [ g t , v t 2 ] ≥ γ > 0.

The assumption allows the algorithm to avoid the procedure of perturbing the updates by adding isotropic noise. Our work is motivated by (Daneshmand et al. (2018) ) but assumes CNC for the stochastic momentum m t instead. Very recently, Jin et al. (2019) consider perturbing the update of SGD and provide a second order guarantee. Staib et al. (2019) consider a variant of RMSProp (Tieleman & Hinton (2012) ), in which the gradient g t is multiplied by a preconditioning matrix G t and the update is

w t+1 = w t -G -1/2 t g t .

The work shows that the algorithm can help in escaping saddle points faster compared to the standard SGD under certain conditions. Fang et al. (2019) propose average-SGD, in which a suffix averaging scheme is conducted for the updates. They also assume an inherent property of stochastic gradients that allows SGD to escape saddle points.

We summarize the iteration complexity results of the related works for simple SGD variants on Table 1 . 6 The readers can see that the iteration complexity of (Fang et al. (2019) ) and (Jin et al. (2019) ) are better than (Daneshmand et al. (2018) ; Staib et al. (2019) ) and our result. So, we want to explain the results and clarify the differences. First, we focus on explaining why the popular algorithm, SGD with heavy ball momentum, works well in practice, which is without the suffix averaging scheme used in (Fang et al. (2019) ) and is without the explicit perturbation used in (Jin et al. (2019) ). Specifically, we focus on studying the effect of stochastic heavy ball momentum and showing the advantage of using it. Furthermore, our analysis framework is built on the work of (Daneshmand et al. (2018) ). We believe that, based on the insight in our work, one can also show the advantage of stochastic momentum by modifying the assumptions and algorithms in (Fang et al. (2019) ) or (Jin et al. (2019) ) and consequently get a better dependency on . Table 1 : Iteration complexity to find an ( , ) second-order stationary point .

B LEMMA 6, 7, AND 8

In the following, Lemma 7 says that under the APAG property, when the gradient norm is large, on expectation SGD with momentum decreases the function value by a constant and consequently makes progress. On the other hand, Lemma 8 upper-bounds the increase of function value of the next iterate (if happens) by leveraging the GrACE property. Lemma 6. If SGD with momentum has the APAG property, then, considering the update step

w t+1 = w t -ηm t , we have that E t [f (w t+1 )] ≤ f (w t ) -η 2 ∇f (w t ) 2 + Lη 2 c 2 m 2 .

Proof. By the L-smoothness assumption,

EQUATION

)

Taking the expectation on both sides. We have

EQUATION

)

where we use the APAG property in the last inequality.

Lemma 7. Assume that the step size η satisfies η ≤ 2 8Lc 2 m . If SGD with momentum has the APAG property, then, considering the update step w t+1 = w t -ηm t , we have that

E t [f (w t+1 )] ≤ f (w t ) -η 4 2 when ∇f (w t ) ≥ . Proof. E t [f (w t+1 )-f (w t )] Lemma 6 ≤ -η 2 ∇f (w t ) 2 + Lη 2 c 2 m 2 ∇f (wt) ≥ ≤ -η 2 2 + Lη 2 c 2 m 2 ≤ -η 4 2

, where the last inequality is due to the constraint of η.

Lemma 8. If SGD with momentum has the GrACE property, then, considering the update step

w t+1 = w t -ηm t , we have that E t [f (w t+1 )] ≤ f (w t ) + η 2 c h + ρη 3 6 c 3 m .

Proof. Consider the update rule w t+1 = w t -ηm t , where m t represents the stochastic momentum and η is the step size. By ρ-Lipschitzness of Hessian, we have f

(w t+1 ) ≤ f (w t ) -η ∇f (w t ), g t + η ∇f (w t ), g t -m t + η 2 2 m t ∇ 2 f (w t )m t + ρη 3 6 m t 3 .

Taking the conditional expectation, one has

EQUATION

C PROOF OF LEMMA 1

Lemma 1 Denote t 0 any time such that (t 0 mod T thred ) = 0. Suppose that E t0 [f (w t0 )f (w t0+t )] ≤ F thred for any 0 ≤ t ≤ T thred . Then,

E t0 [ w t0+t -w t0 2 ] ≤ C upper,t := 8ηt F thred + 2r 2 c h + ρ 3 r 3 c 3 m (1 -β) 2 + 8η 2 tσ 2 (1 -β) 2 + 4η 2 β 1 -β 2 c 2 m + 2r 2 c 2 m . (13)

Proof. Recall that the update is w t0+1 = w t0 -rm t0 , and w t0+t = w t0+t-1 -ηm t0+t-1 , for t > 1.

We have that

EQUATION

where the first inequality is by the triangle inequality and the second one is due to the assumption that m t ≤ c m for any t. Now let us denote

• α s := t-1-s j=0 β j • A t-1 := t-1 s=1 α s

and let us rewrite g t = ∇f (w t ) + ξ t , where ξ t is the zero-mean noise. We have that

EQUATION

To proceed, we need to upper bound E t0 [4η 2

t-1 s=1 α s ∇f (w t0+s ) 2 ]. We have that

E t0 [4η 2 t-1 s=1 α s ∇f (w t0+s ) 2 ] (a) ≤ E t0 [4η 2 A 2 t-1 t-1 s=1 α s A t-1 ∇f (w t0+s ) 2 ] (b) ≤ E t0 [4η 2 A t-1 1 -β t-1 s=1 ∇f (w t0+s ) 2 ] (c) ≤ E t0 [4η 2 t (1 -β) 2 t-1 s=1 ∇f (w t0+s ) 2 ]. (16)

where (a) is by Jensen's inequality, (b) is by max s α s ≤ 1 1-β , and (c) is by A t-1 ≤ t 1-β . Now let us switch to bound the other term.

EQUATION

)

where (a) is because E t0 [ξ t0+i ξ t0+j ] = 0 for i = j, (b) is by that ξ t 2 ≤ σ 2 and max t α t ≤ 1 1-β . Combining ( 14), ( 15), ( 16), ( 17),

EQUATION

Now we need to bound E t0 [ t-1 s=1 ∇f (w t0+s ) 2 ]. By using ρ-Lipschitzness of Hessian, we have that

EQUATION

By adding η ∇f (w t0+s-1 ), g t0+s-1 on both sides, we have

EQUATION

)

Taking conditional expectation on both sides leads to

EQUATION

where E t0+s-1 [η ∇f (w t0+s-1 ), g t0+s-1 -m t0+s-1 + 1 2 η 2 m t0+s-1 ∇ 2 f (w t0+s-1 )m t0+s-1 ] ≤ η 2 c h by the GrACE property. We have that for t 0 ≤ t 0 + s -1

EQUATION

)

Summing the above inequality from s = 2, 3, . . . , t leads to

EQUATION

where (a) is by the assumption (made for proving by contradiction) that E t0 [f (w t0 ) -f (w t0+s )] ≤ F thred for any 0 ≤ s ≤ T thred . By ( 21) with s = 1 and η = r, we have

EQUATION

)

By ( 23) and ( 24), we know that

EQUATION

where (a) is by the constraint that η 2 t ≤ r 2 for 0 ≤ t ≤ T thred and (b) is by the constraint that r ≥ η.

By combining ( 25) and ( 18)

EQUATION

D PROOF OF LEMMA 2 AND LEMMA 3

Lemma 2 Denote t 0 any time such that (t 0 mod T thred ) = 0. Let us define a quadratic approximation at w t0 , Q(w) := f (w t0 ) + w -w t0 , ∇f (w t0 ) + 1 2 (w -w t0 ) H(w -w t0 ), where H := ∇ 2 f (w t0 ). Also, define G s := (I -η s k=1 β s-k H) and

• qv,t-1 := Π t-1 j=1 Gj -rmt 0 .

• qm,t-1 := -t-1 s=1 Π t-1 j=s+1 Gj β s mt 0 .

• qq,t-1

:= -t-1 s=1 Π t-1 j=s+1 Gj s k=1 β s-k ∇f (w t 0 +k ) -∇Q(wt 0 +s) . • qw,t-1 := -t-1 s=1 Π t-1 j=s+1 Gj s k=1 β s-k ∇f (wt 0 ). • q ξ,t-1 := -t-1 s=1 Π t-1 j=s+1 Gj s k=1 β s-k ξ t 0 +k .

Then, w t0+t -w t0 = q v,t-1 + ηq m,t-1 + ηq q,t-1 + ηq w,t-1 + ηq ξ,t-1 .

Notations::

Denote t 0 any time such that (t 0 mod T thred ) = 0. Let us define a quadratic approximation at w t0 ,

EQUATION

where H := ∇ 2 f (w t0 ). Also, we denote

EQUATION

)

Proof. First, we rewrite m t0+j for any j ≥ 1 as follows.

EQUATION

)

We have that

EQUATION

where (a) is by using ( 29) with j = t -1, (b) is by subtracting and adding back the same term, and

(c) is by ∇Q(w t0+t-1 ) = ∇f (w t0 ) + H(w t0+t-1 -w t0 ).

To continue, by using the nations in (28), we can rewrite (30) as

EQUATION

)

Recursively expanding (31) leads to

EQUATION

where (a) we use the notation that Π t-1 j=s G j := G s × G s+1 × . . . . . . G t-1 and the notation that Π t-1 j=t G j = 1 and (b) is by the update rule. By using the definitions of {q ,t-1 } in the lemma statement, we complete the proof.

Lemma 3 Following the notations of Lemma 2, we have that

E t0 [ w t0+t -w t0 2 ] ≥ E t0 [ q v,t-1 2 ] + 2ηE t0 [ q v,t-1 , q m,t-1 + q q,t-1 + q w,t-1 + q ξ,t-1 ] := C lower (33)

Proof. Following the proof of Lemma 2, we have

EQUATION

E PROOF OF LEMMA 5

Lemma 5 Let F thred = O( 4 ) and η 2 T thred ≤ r 2 . By following the conditions and notations in Theorem 1, Lemma 1 and Lemma 2, we conclude that if SGD with momentum (Algorithm 2) has the APCG property, then we have that C lower := E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q m,T thred -1 + q q,T thred -1 + q w,T thred -1 + q ξ,T thred -1 ] > C upper . 65), ( 66) 25),( 39),( 87),( 89) 45), (78) 7 "

cr ≤ c 0 c 3 m ρLσ 2 c h , c0 = 1 1152 c 0 c 3 m ρLσ 2 c (1-β) 2 c h ≤ cr c 0 c 3 m ρLσ 4 (1-β) 3 c h ≤ cr r " r ≤ δF thred 8c h from (89) " η δ 2 γ 2 5 cη (64) cη ≤ c 1 c 5 m ρL 2 σ 2 c c h , c1 = c 0 24 η " η ≤ r/ √ T thred from (

" η " η ≤ min{ (1-β) L , (1-β) } from (

F thred δγ 2 4 cF (65) cF ≤ c 2 c 4 m ρ 2 Lσ 4 c h , c2 = c 0 576 cF ≥ 8c 2 0 c 6 m ρ 2 L 2 σ 4 c h F thred " F thred ≤ 2 r

4 from ( 88) "

T thred T thred ≥ c(1-β) η log( Lcmσ 2 ρc c h (1-β)δγ

) from ( 82) W.l.o.g, we assume that c m , L, σ 2 , c , c h , and ρ are not less than one and that ≤ 1.

E.1 SOME CONSTRAINTS ON β.

We require that parameter β is not too close to 1 so that the following holds,

• 1) L(1 -β) 3 > 1.

• 2) σ 2 (1 -β) 3 > 1.

•

3) c (1 -β) 2 > 1. • 4) η ≤ 1-β L . • 5) η ≤ 1-β . • 6) T thred ≥ c(1-β) η log( Lcmσ 2 ρc c h (1-β)δγ ) ≥ 1 + 2β 1-β .

The constraints upper-bound the value of β. That is, β cannot be too close to 1. We note that the β dependence on L, σ, and c are only artificial. We use these constraints in our proofs but they are mostly artefacts of the analysis. For example, if a function is L-smooth, and L < 1, then it is also 1-smooth, so we can assume without loss of generality that L > 1. Similarly, the dependence on σ is not highly relevant, since we can always increase the variance of the stochastic gradient, for example by adding an O(1) gaussian perturbation.

E.2 SOME LEMMAS:

To prove Lemma 5, we need a series of lemmas with the choices of parameters on Table 3 .

Upper bounding E t0 [ q q,t-1 ]:

Lemma 9. Following the conditions in Lemma 1 and Lemma 2, we have

EQUATION

Proof.

E t0 [ q q,t-1 ] = E t0 [ - t-1 s=1 Π t-1 j=s+1 G j s k=1 β s-k ∇f (w t0+k ) -∇Q(w t0+s ) ] (a) ≤ E t0 [ t-1 s=1 Π t-1 j=s+1 G j s k=1 β s-k ∇f (w t0+k ) -∇Q(w t0+s ) ] (b) ≤ E t0 [ t-1 s=1 Π t-1 j=s+1 G j 2 s k=1 β s-k ∇f (w t0+k ) -∇Q(w t0+s ) ] (c) ≤ E t0 [ t-1 s=1 Π t-1 j=s+1 G j 2 s k=1 β s-k ∇f (w t0+k ) -∇Q(w t0+s ) ] (d) ≤ E t0 [ t-1 s=1 Π t-1 j=s+1 G j 2 s k=1 β s-k ∇f (w t0+k ) -∇f (w t0+s ) + ∇f (w t0+s ) -∇Q(w t0+s ) ]

(37) where (a), (c), (d) is by triangle inequality, (b) is by the fact that Ax 2 ≤ A 2 x 2 for any matrix A and vector x. Now that we have an upper bound of ∇f (w t0+k ) -∇f (w t0+s ) ,

EQUATION

where (a) is by the assumption of L-Lipschitz gradient and (b) is by applying the triangle inequality (s -k) times and that w t -w t-1 ≤ η m t-1 ≤ ηc m , for any t. We can also derive an upper bound of E t0 [ ∇f (w t0+s ) -∇Q(w t0+s ) ],

EQUATION

(c.f. Lemma 1.2.4 in (Nesterov (2013) )) and using the definition that

Q(w) := f (w t0 ) + w -w t0 , ∇f (w t0 ) + 1 2 (w -w t0 ) H(w -w t0 ), (b) is by Lemma 1 and η 2 t ≤ r 2 for 0 ≤ t ≤ T thred E t0 [ w t0+t -w t0 2 ] ≤ 8ηt F thred + 2r 2 c h + ρ 3 r 3 c 3 m (1 -β) 2 + 8η 2 tσ 2 (1 -β) 2 + 4η 2 β 1 -β 2 c 2 m + 2r 2 c 2 m ≤ 8ηt F thred + 2r 2 c h + ρ 3 r 3 c 3 m (1 -β) 2 + 8 r 2 σ 2 (1 -β) 2 + 4η 2 β 1 -β 2 c 2 m + 2r 2 c 2 m .

(41) Combing ( 37), ( 38), (39), we have that

EQUATION

EQUATION

where on the last line we use the notation that

EQUATION

To continue, let us analyze Π t-1 j=s+1 G j 2 first.

EQUATION

Above, we use the notation that θ j := j k=1 β j-k . For (a), it is due to that λ := -λ min (H), λ max (H) ≤ L, and the choice of η so that 1 ≥ ηL 1-β , or equivalently,

EQUATION

For (b), it is due to that θ j ≥ 1 for any j and λ ≥ . Therefore, we can upper-bound the first term on r.h.s of (42) as

EQUATION

where (a) is by that fact that

EQUATION

where (a) is by the fact that

s k=1 β s-k ≤ 1/(1 -β), (b) is by (44), (c) is by using that ∞ s=1 ( 1 1+η ) s ≤ 1 η , (d) is by ∞ k=1 z k k ≤ z (1-z) 2 for any |z| ≤ 1 and substituting z = 1 1+η , which leads to ∞ k=1 z k k ≤ z (1-z) 2 = 1/(1+η ) (1-1/(1+η )) 2 = 1+η (η ) 2 ≤ 2 (η )

2 in which the last inequality is by chosen the step size η so that η ≤ 1.

By combining (42), (46), and (47), we have that

EQUATION

which completes the proof.

Upper bounding q v,t-1 : Lemma 10. Following the conditions in Lemma 1 and Lemma 2, we have

EQUATION

Proof.

EQUATION

where the last inequality is because η is chosen so that 1 ≥ ηL 1-β and the fact that λ max (H) ≤ L.

Lower bounding E t0 [2η q v,t-1 , q q,t-1 ]:

Lemma 11. Following the conditions in Lemma 1 and Lemma 2, we have

EQUATION

Proof. By the results of Lemma 9 and Lemma 10

E t0 [2η q v,t-1 , q q,t-1 ] ≥ -E t0 [2η q v,t-1 q q,t-1 ] Lemma 10 ≥ -E t0 [2η Π t-1 j=1 (1 + ηθ j λ) rc m q q,t-1 ] Lemma 9 ≥ -2η Π t-1 j=1 (1 + ηθ j λ) 2 rc m × βLc m (1 -β) 2 + ρ η 2 8 F thred + 2r 2 c h + ρ 3 r 3 c 3 m (1 -β) 3 + ρ 8 r 2 σ 2 (1-β) 2 + 4η 2 β 1-β 2 c 2 m + 2r 2 c 2 m 2η (1 -β) ].

(52)

Lower bounding E t0 [2η q v,t-1 , q ξ,t-1 ]:

Lemma 12. Following the conditions in Lemma 1 and Lemma 2, we have

EQUATION

Proof.

EQUATION

where (a) holds for some coefficients α k , (b) is by the tower rule, (c) is because q v,t-1 is measureable with t 0 , and (d) is by the zero mean assumption of ξ's.

Lower bounding E t0 [2η q v,t-1 , q m,t-1 ]:

Lemma 13. Following the conditions in Lemma 1 and Lemma 2, we have

EQUATION

)

Proof.

EQUATION

where (a) is by defining the matrix B := Π t-1 j=1 G j t-1 s=1 Π t-1 j=s+1 G j β s . For (b), notice that the matrix B is symmetric positive semidefinite. To see that the matrix B is symmetric positive semidefinite, observe that each G j := (I -η j k=1 β j-k H) can be written in the form of G j = U D j U for some orthonormal matrix U and a diagonal matrix D j . Therefore, the matrix product

Π t-1 j=1 G j Π t-1 j=s+1 G j = U (Π t-1 j=1 D j )(Π t-1 j=s+1 D j )

U is symmetric positive semidefinite as long as each G j is. So, (b) is by the property of a matrix being symmetric positive semidefinite.

Lower bounding 2ηE t0 [ q v,t-1 , q w,t-1 ]: Lemma 14. Following the conditions in Lemma 1 and Lemma 2, if SGD with momentum has the APCG property, then

EQUATION

EQUATION

where (a) is by the APCG property. We also have that

EQUATION

where (a) and (b) is by (44) . Substituting the result back to (58), we get

2ηE t0 [ q v,t-1 , q w,t-1 ] ≥ - 2η 2 rc 1 -β t-1 s=1 D s 2 ∇f (w t0 ) 2 ≥ - 2η 2 rc 1 -β t-1 s=1 Π t-1 j=1 (1 + ηθ j λ) 2 (1 + η ) s ∇f (w t0 ) 2 ≥ - 2η 2 rc (1 -β)η Π t-1 j=1 (1 + ηθ j λ) 2 ∇f (w t0 ) 2

(60) Using the fact that ∇f (w t0 ) ≤ completes the proof.

E.3 PROOF OF LEMMA 5:

Recall that the strategy is proving by contradiction. Assume that the function value does not decrease at least F thred in T thred iterations on expectation. Then, we can get an upper bound of the expected distance E t0 [ w t0+T thred -w t0 2 ] ≤ C upper but, by leveraging the negative curvature, we can also show a lower bound of the form E t0 [ w t0+T thred -w t0 2 ] ≥ C lower . The strategy is showing that the lower bound is larger than the upper bound, which leads to the contradiction and concludes that the function value must decrease at least F thred in T thred iterations on expectation. To get the contradiction, according to Lemma 1 and Lemma 3, we need to show that E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q m,T thred -1 + q q,T thred -1 + q w,T thred -1 + q ξ,T thred -1 ] > C upper .

(61) Yet, by Lemma 13 and Lemma 12, we have that ηE t0 [ q v,T thred -1 , q m,T thred -1 ] ≥ 0 and ηE t0 [ q v,T thred -1 , q ξ,T thred -1 ] = 0. So, it suffices to prove that

EQUATION

and it suffices to show that

• 1 4 E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q q,T thred -1 ] ≥ 0. • 1 4 E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q w,T thred -1 ] ≥ 0. • 1 4 E t0 [ q v,T thred -1 2 ] ≥ C upper . E.3.1 PROVING THAT 1 4 E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q q,T thred -1 ] ≥ 0:

By Lemma 4 and Lemma 11, we have that

EQUATION

To show that the above is nonnegative, it suffices to show that

EQUATION

and

EQUATION

and

EQUATION

Now w.l.o.g, we assume that c m , L, σ 2 , c , and ρ are not less than one and that ≤ 1. By using the values of parameters on Table 3 , we have the following results; a sufficient condition of ( 64) is that

EQUATION

)

A sufficient condition of ( 65) is that

EQUATION

and

EQUATION

and

EQUATION

A sufficient condition of ( 66) is that

EQUATION

and a sufficient condition for the above (71), by the assumption that both σ 2 ≥ 1 and c m ≥ 1, is

EQUATION

)

Now let us verify if (67), ( 68), ( 69), ( 70), (72) are satisfied. For (67), using the constraint of c η on Table 3 , we have that

1 cη ≥ c 5 m ρL 2 σ 2 c c h c1

. Using this inequality, it suffices to let c r ≥ c0 2 c 3 m ρLσ 2 c c h (1-β) 2 for getting (67), which holds by using the constraint that c (1 -β) 2 > 1 and ≤ 1.

For (68), using the constraint of c F on Table 3 , we have that 1

c F ≥ c 4 m ρ 2 Lσ 4 c h c2

. Using this inequality, it suffices to let c r ≥ c0 c 3 m ρLσ 4 (1-β) 3 , which holds by using the constraint that σ

2 (1 -β) 3 > 1. For (69), it needs (1-β) 3 1152cmρc h ≥ c0 c 3 m ρLσ 2 c h ≥ c r , which hold by using the constraint that σ 2 (1 -β) 3 > 1. For (70), it suffices to let (1-β) 2 14c 2 m ρ ≥ c0 c 3 m ρLσ 2 c h ≥ c r which holds by using the constraint that σ 2 (1 -β) 3 > 1. For (72), it suffices to let (1-β) 3 576c 3 m ρσ 2 ≥ c0 c 3 m ρLσ 2 c h ≥ c r ,

which holds by using the constraint that L(1 -β) 3 > 1 and ≤ 1. Therefore, by choosing the parameter values as Table 3 , we can guarantee that 1

4 E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q q,T thred -1 ] ≥ 0. E.3.2 PROVING THAT 1 4 E t0 [ q v,T thred -1 2 ] + 2ηE t0 [ q v,T thred -1 , q w,T thred -1 ] ≥ 0:

By Lemma 4 and Lemma 14, we have that

EQUATION

)

To show that the above is nonnegative, it suffices to show that

EQUATION

A sufficient condition is cr cη ≥ 8 4 c 1-β . Using the constraint of c η on Table 3 , we have that

1 cη ≥ c 5 m ρL 2 σ 2 c c h c1

. So, it suffices to let c r ≥ c0 4 3c 5 m ρL 2 σ 2 c h (1-β) , which holds by using the constraint that L(1 -β) 3 > 1 (so that L(1 -β) > 1) and ≤ 1.

E.3.3 PROVING THAT:

1 4 E t0 [ q v,T thred -1 2 ] ≥ C upper :

From Lemma 4 and Lemma 1, we need to show that

EQUATION

We know that 1 4 Π T thred -1

EQUATION

Note that the left hand side is exponentially growing in T thred . We can choose the number of iterations T thred large enough to get the desired result. Specifically, we claim that T thred ≥ c(1-β) η log( Lcmσ 2 ρc c h (1-β)δγ ) for some constant c > 0. To see this, let us first apply log on both sides of (76),

EQUATION

where we denote a :=

4η F thred +2r 2 c h + ρ 3 r 3 c 3 m (1-β) 2 and b := 4 r 2 σ 2 (1-β) 2 + 2η 2 β 1-β 2 c 2 m + r 2 c 2 m .

To proceed, we are going to use the inequality log(1 + x) ≥ x 2 , for x ∈ [0, ∼ 2.51]. We have that

EQUATION

as guaranteed by the constraint of η. So,

EQUATION

where (a) is by using the inequality log(1 + x) ≥ x 2 with x = ηθ j ≤ 1 and (b) is by making

T thred -1 2(1-β) ≥ β (1-β) 2

, which is equivalent to the condition that

EQUATION

Now let us substitute the result of (79) back to (77). We have that

EQUATION

which is what we need to show. By choosing T thred large enough,

EQUATION

for some constant c > 0, we can guarantee that the above inequality (81) holds.

F PROOF OF LEMMA 15 Set T = 2T thred f (w 0 ) -min w f (w) /(δ∆). We return w uniformly randomly from w 0 , w T thred , w 2T thred , . . . , w kT thred , . . . , w KT thred , where K := T /T thred . Then, with probability at least 1 -δ, we will have chosen a w k where Υ k did not occur.

Proof. Let P k be the probability that Υ k occurs.

E[f (w (k+1)T thred ) -f (w kT thred )] = E[f (w (k+1)T thred ) -f (w kT thred )|Υ k ]P k + E[f (w (k+1)T thred ) -f (w kT thred )|Υ c k ](1 -P k ) ≤ -∆P k + δ∆/2(1 -P k ) = δ∆/2 -(1 + δ/2)∆P k ≤ δ∆/2 -∆P k .

(84) Summing over all K, we have

1 K + 1 K k=0 E[f (w (k+1)T thred ) -f (w kT thred )] ≤ ∆ 1 K + 1 K k=0 (δ/2 -P k ) ⇒ 1 K + 1 K k=0 P k ≤ δ/2 + f (w 0 ) -min w f (w) (K + 1)∆ ≤ δ ⇒ 1 K + 1 K k=0 (1 -P k ) ≥ 1 -δ. (85)

Consider that Υ k is the that ∇f (w kT thred ) ≥ . Denote t 0 := kT thred in the following. We have that E t0 [f (w t0+T thred ) -f (w t0 )] = 

When ∇f (w kT thred ) ≤ and λ min (∇ 2 f (w kT thred )) ≤ -:

The scenario that Υ k is the case that ∇f (w kT thred ) ≤ and λ min (∇ 2 f (w kT thred )) ≤has been analyzed in Appendix E, which guarantees that E[f (w t0+T thred ) -f (w t0 )] ≤ -F thred under the setting.

When ∇f (w kT thred ) ≤ and λ min (∇ 2 f (w kT thred )) ≥ -: where (a) is by using Lemma 8 with step size r, (b) is by using Lemma 8 with step step size η, (c) is by setting η 2 T thred ≤ r 2 and η ≤ r, (d) is by the choice of r so that 8r 2 c h ≤ δF thred . Now we are ready to use Lemma 15, since both the conditions are satisfied. According to the lemma and the choices of parameters value on Table 3 , we can set T = 2T thred f (w 0 )min w f /(δF thred ) = O((1 -β) log( Lcmσ 2 ρc c h (1-β)δγ ) -10 ), which will return a w that is an ( , ) second order stationary point. Thus, we have completed the proof. G.3 COMPARISON TO DANESHMAND ET AL. (2018) Theorem 2 in Daneshmand et al. (2018) states that, for CNC-SGD to find an ( , ρ 1/2 ) stationary point, the total number of iterations is T = O( 10 L 3 δ 4 γ 4 log 2 ( L δγ ) -10 ), where is the bound of the stochastic gradient norm g t ≤ which can be viewed as the counterpart of c m in our paper. By translating their result for finding an ( , ) stationary point, it is T = O( 10 L 3 ρ 5 δ 4 γ 4 log 2 ( ρ L δγ ) -10 ). On the other hand, using the parameters value on Table 3 , we have that T = 2T thred f (w 0 )-min w f (w) /(δF thred ) =

O(:

(1-β)c 9 m L 3 ρ 3 (σ 2 ) 3 c 2 h c δ 4 γ 4 log( Lcmσ 2 c c h

(1-β)δγ ) -10 ) for Algorithm 2. Before making a comparison, we note that their result does not have a dependency on the variance of stochastic gradient (i.e. σ 2 ), which is because they assume that the variance is also bounded by the constant (can be seen from ( 86) in the supplementary of their paper where the variance terms ζ i are bounded by ). Following their treatment, if we assume that σ 2 ≤ c m , then on (71) we can instead replace (σ 2 + 3c 2 m ) with 4c 2 m and on (72) it becomes 1 ≥ 2018), which means that a higher momentum can help to find a second order stationary point faster.

:

Heavy ball momentum is the default choice of momentum method in PyTorch and Tensorflow, instead of Nesterov's momentum. See the manual pages https://pytorch.org/docs/stable/_modules/ torch/optim/sgd.html and https://www.tensorflow.org/api_docs/python/tf/ keras/optimizers/SGD.

We apologize that the list is far from exhaustive.

It is known that phase retrieval is nonconvex and has the so-called strict saddle property: (1) every local minimizer {w * , -w * } is global up to phase, (2) each saddle exhibits negative curvature (see e.g.(Sun et al. (2015; 2016);Chen et al. (2018)))

Note that our analysis still go through if one replaces 1 2 on r.h.s. of (5) with any larger number c < 1; the resulted iteration complexity would be only a constant multiple worse.

See Table3in Appendix E for the precise expressions of the parameters. Here, we hide the parameters' dependencies on γ, L, cm, c , σ 2 , ρ, c h , and δ. W.l.o.g, we also assume that cm, L, σ 2 , c , c h , and ρ are not less than one and ≤ 1.

] + 2ηE t0 [ q v,T thred -1 , q m,T thred -1 + q q,T thred -1 + q w,T thred -1 + q ξ,T thred -1 ] > C upper .4 CONCLUSIONIn this paper, we identify three properties that guarantee SGD with momentum in reaching a secondorder stationary point faster by a higher momentum, which justifies the practice of using a large value of momentum parameter β. We show that a greater momentum leads to escaping strict saddle points faster due to that SGD with momentum recursively enlarges the projection to an escape direction. However, how to make sure that SGD with momentum has the three properties is not very clear. It would be interesting to identify conditions that guarantee SGD with momentum to have the properties. Perhaps a good starting point is understanding why the properties hold in phase retrieval. We believe that our results shed light on understanding the recent success of SGD with momentum in non-convex optimization and deep learning.

We follow the work(Daneshmand et al. (2018)) for reaching an ( , )-stationary point, while some works are for an ( , √ )-stationary point. We translate them into the complexity of getting an ( , )-stationary point.

One can use any upper bound of f (w0) -minw f (w) as f (w0) -minw f (w) in the expression of T .

Figures and Tables:

Figure 1: The trajectory of the standard SGD (left) and SGD with momentum (right).

Figure 2: Performance of SGD with different values of β = {0, 0.3, 0.5, 0.7, 0.9}; β = 0 corresponds to the standard SGD. Fig. 4a: We plot convergence in function value f (•) given in (3). Initialization is always set as w0 = 0. All the algorithms use the same step size η = 5 × 10 -5 . Fig. 4b: We plot convergence in relative distance to the true model w * , defined as min( wt -w * , wt + w * )/ w * , which more appropriately captures progress as the global sign of the objective (4) is unrecoverable. All the algorithms are initialized at the same point w0 ∼ N (0, I d /(10000d)) and use the same step size η = 5 × 10 -4 .

(a) Gradient norm ∇f (wt) . (b) About APAG. (c) About APCG. (d) Gradient norm ∇f (wt) . (e) About APAG. (f) About APCG.

Figure 3: Plots of the related properties. Sub-figures on the top row are regarding solving (3) and sub-figures on the bottom row are regarding solving (4) (phase retrieval). Note that the function value/relative distance to w * are plotted on Figure 2. Above, sub-figures (a) and (d): We plot the gradient norms versus iterations. Sub-figures (b) and (e): We plot the values of ∇f (wt), mt -gt / ∇f (wt) 2 versus iterations. For (b), we only report them when the gradient is large ( ∇f (wt) ≥ 0.02). It shows that the value is large than -0.5 except the transition. For (e), we observe that the value is almost always nonnegative. Sub-figures (c) and (f): We plot the value of ∇f (wt), Mtmt /ησmax(Mt) ∇f (wt) 2 . For (c), we let Mt = (Π 3×10 5s=1 Gs,t)(Π 3×10 5 s=1 Gs,t) and we only report the values when the update is in the region of saddle points. For (f), we let Mt = (Π 500 s=1 Gs,t)(Π 500 s=1 Gs,t) and we observe that the value is almost always nonnegative. The figures implies that SGD with momentum has APAG and APCG properties in the experiments. Furthermore, an interesting observation is that, for the phase retrieval problem, the expected values might actually be nonnegative.

(a) About GrACE for problem (3). (b) About GrACE for problem (4) (phase retrieval).

;Agarwal et al. (2017);Allen-Zhu & Li (2018);Xu et al. (2018)). Simple GD/SGD variants are those with minimal tweaks of standard GD/SGD or their variants (e.g.Ge et al. (2015); Levy (2016);Fang et al. (2019);Jin et al. (2017; 2018; 2019);Daneshmand et al. (2018);Staib et al. (

Algorithm ComplexityPerturbed SGD(Ge et al. (2015)) O( -16 ) Average-SGD(Fang et al. (2019)) O( -7 ) Perturbed SGD(Jin et  al. (2019)) O( -8 ) CNC-SGD (Daneshmand et al. (2018)) O( -10 ) Adaptive SGD (Staib et al. (2019)) O( -10 ) SGD+momentum (this work) O((1 -β) log( 1 (1-β) ) -10 )

Daneshmand et al. (2018)) Let us define the eventΥ k := { ∇f (w kT thred ) ≥ or λ min (∇ 2 f (w kT thred )) ≤ -}. The complement is Υ c k := { ∇f (w kT thred )≤ and λ min (∇ 2 f (w kT thred )) ≥ -}, which suggests that w kT thred is an ( , )-second order stationary points. Suppose thatE[f (w (k+1)T thred ) -f (w kT thred )|Υ k ] ≤ -∆ E[f (w (k+1)T thred ) -f (w kT thred )|Υ c k ]

t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]] = E t0 [f (w t0+1 ) -f (w t0 )] + T thred -1 t=1 E t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]]

t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]] t0 ) 2 + Lr 2 c 2 m + r 2 ch is by using Lemma 6 with step size r, (b) is by using Lemma 8, (c) is due to the constraint that η 2 T thred ≤ r 2 , (d) is by the choice of r, (e) is by ∇f (w t ) ≥ , (f ) is by the choice of r so that r ≤ 2 4(Lc 2 m +c h ) , and (g) is by r 4 2 ≥ F thred .

Now let us switch to show thatE[f (w (k+1)T thred ) -f (w kT thred )|Υ c k ] ≤ δ F thred 2 Recall that Υ ck means that ∇f (w kT thred ) ≤ and λ min (∇ 2 f (w kT thred )) ≥ -. Denote t 0 := kT thred in the following. We have thatE t0 [f (w t0+T thred ) -f (w t0 )] = T thred -1 t=0 E t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]] = E t0 [f (w t0+1 ) -f (w t0 )] + T thred -1 t=1 E t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]]

t0 [E[f (w t0+t+1 ) -f (w t0+t )|w 0:t0+t ]] 2r 2 c h + ρ 3 r 3 c 3 m ≤ 4r 2 c h

β) 3 . This will remove all the parameters' dependency on σ 2 . Now by comparing Õ((1-β)c 9 m c 2 h c • ρ 3 L 3 δ 4 γ 4-10 ) of ours andT = Õ(ρ 2 10 • ρ 3 L 3 δ 4 γ 4-10 ) of Daneshmand et al. (2018), we see that in the high momentum regime where (1 -β) << ρ 2 10 c 9 m c 2 h c , Algorithm 2 is strictly better than that of Daneshmand et al. (

prove an O(1/T ) ergodic convergence rate when the problem is smooth convex, whileSun et al. (2019) provide a non-ergodic convergence rate for certain classes of convex problems.Ochs et al. (2014) combine the technique of forward-backward splitting with heavy ball method for a specific class of nonconvex optimization problem. For stochastic heavy ball method,Loizou & Richtárik (2017) analyze a class of linear regression problems and shows a linear convergence rate of stochastic momentum, in which the linear regression problems actually belongs to the case of strongly convex quadratic functions. Other works includes(Gadat et al. (2016)), which shows almost sure convergence to the critical points by stochastic heavy ball for general non-convex coercive functions. Yet, the result does not show any advantage of stochastic heavy ball over other optimization algorithms like SGD.Can et al. (2019) show an accelerated linear convergence to a stationary distribution under Wasserstein distance for strongly convex quadratic functions by SGD with stochastic heavy ball momentum.Yang et al. (2018) provide a unified analysis of stochastic heavy ball momentum and Nesterov's momentum for smooth non-convex objective functions. They show that the expected gradient norm converges at rate

Table content: <table/>

Constraints and choices of the parameters.

Table content: <table><tr><td>Parameter</td><td>Value</td><td>Constraint origin</td><td>constant</td></tr><tr><td>r</td><td>δγ 2 cr</td><td>(64), (</td><td/></tr></table>

Peer review (iclr2020):
Summary: The paper presents an analysis and numerical evaluation of SGD with momentum for non-convex optimization problems. In particular, the main contribution of the paper, as the authors claim in the abstract, is showing that stochastic momentum improves deep network training because it modifies SGD to escape saddle points faster. Comments: SGD with heavy ball momentum (or stochastic heavy ball method) is one of the most popular methods for training neural networks. As the authors mentioned the method is widely employed in practice, especially in the area of deep learning. However, despite the popularity of the method both in convex and non-convex optimization, its convergence properties are not very well understood. I consider any meaningful direction for understanding the convergence of this method a nice fit to ICLR, however i find the presentation of this paper somehow confusing, especially Section 3 which is supposed to be the main contribution of the paper. 1) I understand the motivation of the authors and what they tried to communicate but i find that there is no satisfactory explanation of what Theorem 1 is actually saying. For example In case that the method is the popular stochastic gradient descent method. Does the theorem covers the known results of SGD appeared in previous works? 2) In addition, the theorem states* If SGD with momentum (Algorithm 2) has ....APAG...APCG_T...GrACE ...*. How we can guarantee that the above 3 conditions is satisfied from the Algorithm 2? There is also no satisfactory explanation of why the authors analyze Algorithm 2 and not Algorithm 1. 3) The presentation of Section 3.2.1 is also not clear. I am suggesting to the authors to explain in more details the theoretical results of their paper and highlight why the 5 lemmas of this section are important to be in the main part of the paper. I think a notation subsection will be useful for the reader. 4) I am suggesting the authors to include in the introduction the more known variant of SGD with momentum: 5) The authors name their methods *SGD with stochastic momentum*. The method is either *SGD with momentum* or *Stochastic heavy ball method*. SGD with stochastic momentum is something different (see for example [Loizou, Richtarik 2017] from paper*s reference section) Minor Comment: page 3, bellow eq(4): the first (3) ----> Problem (3) Missing references: The authors did an excellent work on reviewing the literature review on SGD with momentum. Bellow find three recent related works that could be mentioned: Aybat, Necdet Serhat, Alireza Fallah, Mert Gurbuzbalaban, and Asuman Ozdaglar. *A universally optimal multistage accelerated stochastic gradient method.* arXiv preprint arXiv:1901.08022 (2019). Loizou, Nicolas, and Peter Richtárik. *Linearly convergent stochastic heavy ball method for minimizing generalization error.* arXiv preprint arXiv:1710.10737 (2017). Loizou, Nicolas, and Peter Richtárik. *Accelerated gossip via stochastic heavy ball method.* In 2018 56th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pp. 927-934. IEEE, 2018. ========= after rebuttal ============= I would like to thank the authors for the reply. After reading their response and the comments of the other reviewers I decide to update my score to *weak accept*.