Escaping Saddles with Stochastic Gradients
Hadi Daneshmand, Jonas Kohler, Aurelien Lucchi, Thomas Hofmann
Introduction
In this paper we analyze the use of gradient descent (GD) and its stochastic variant (SGD) to minimize objectives of the form
In the era of big data and deep neural networks, (stochastic) gradient descent is a core component of many training algorithms (Bottou, 2010). What makes SGD so attractive is its simplicity, its seemingly universal applicability and a convergence rate that is independent of the size of the training set. One specific trait of SGD is the inherent noise, originating from sampling training points, whose variance has to be controlled in order to guarantee convergence either through a conservative step size (Nesterov, 2013) or via explicit variance-reduction techniques (Johnson & Zhang, 2013).
While the convergence behavior of SGD is well-understood for convex functions (Bottou, 2010), we are here interested in the optimization of non-convex functions which pose additional challenges for optimization in particular due to the presence of saddle points and suboptimal local minima (Dauphin et al., 2014; Choromanska et al., 2015). For example, finding the global minimum of even a degree 4 polynomial can be NP-hard (Hillar & Lim, 2013). Instead of aiming for a global minimizer, a more practical goal is to search for a local optimum of the objective. In this paper we thus focus on reaching a second-order stationary point of smooth non-convex functions. Formally, we aim to find an -second-order stationary point such that the following conditions hold:
Existing work, such as (Ge et al., 2015; Jin et al., 2017a), proved convergence to a point satisfying Eq. (2) for modified variants of gradient descent and its stochastic variant by requiring additional noise to be explicitly added to the iterates along the entire path (former) or whenever the gradient is sufficiently small (latter). Formally, this yields the following update step for the perturbed GD and SGD versions:
where is typically zero-mean noise sampled uniformly from a unit sphere.
In this work, we therefore turn our attention to the following question. Do we need to perturb iterates along all dimensions in order for (S)GD to converge to a second-order stationary point? Or is it enough to simply rely on the inherent variance of SGD induced by sampling? More than a purely theoretical exercise, this question has some very important practical implications since in practice the vast majority of existing SGD methods do not add additional noise and therefore do not meet the requirement of isotropic noise. Thus we instead focus our attention on a less restrictive condition for which perturbations only have a guaranteed variance along directions of negative curvature of the objective, i.e. along the eigenvector(s) associated with the minimum eigenvalue of the Hessian. Instead of explicitly adding noise as done in Eqs. (3) and (4), we will from now on consider the simple SGD step:
and propose the following sufficient condition on the stochastic gradient to guarantee convergence to a second-order stationary point.
Let be the eigenvector corresponding to the minimum eigenvalue of the Hessian matrix . The stochastic gradient satisfies the CNC assumption, if the second moment of its projection along the direction is uniformly bounded away from zero, i.e.
Background & Related work
For smooth non-convex functions, a first-order stationary point satisfying can be reached by GD and SGD in and iterations respectively (Nesterov, 2013). Recently, it has been shown that GD can be accelerated to find such a point in ) (Carmon et al., 2017).
In order to reach second-order stationary points, existing first-order techniques rely on explicitly adding isotropic noise with a known variance (see Eq. (3)). The key motivation for this step is the insight that the area of attraction to a saddle point constitutes an unstable manifold and thus gradient descent methods are unlikely to get stuck, but if they do, adding noise allows them to escape (Lee et al., 2016). Based upon this observations, recent works prove second-order convergence of normalized GD (Levy, 2016) and perturbed GD (Jin et al., 2017a). The later needs at most iterations and is thus the first to achieve a poly-log dependency on the dimensionality. The convergence of SGD with additional noise was analyzed in (Ge et al., 2015) but to the best of our knowledge, no prior work demonstrated convergence of SGD without explicitly adding noise.
Since negative curvature signals potential descent directions, it seems logical to apply a second-order method to exploit this curvature direction in order to escape saddle points. Yet, the prototypical Newton’s method has no global convergence guarantee and is locally attracted by saddle points and even local maxima (Dauphin et al., 2014). Another issue is the computation (and perhaps storage) of the Hessian matrix, which requires operations as well as computing the inverse of the Hessian, which requires computations.
The first problem can be solved by using trust-region methods that guarantee convergence to a second-order stationary point (Conn et al., 2000). Among these methods, the Cubic Regularization technique initially proposed by (Nesterov & Polyak, 2006) has been shown to achieve the optimal worst-case iteration bound (Cartis et al., 2012). The second problem can be addressed by replacing the computation of the Hessian by Hessian-vector products that can be computed efficiently in (Pearlmutter, 1994). This is applied e.g. using matrix-free Lanczos iterations (Curtis & Robinson, 2017; Reddi et al., 2017) or online variants such as Oja’s algorithm (Allen-Zhu, 2017). Sub-sampling the Hessian can furthermore reduce the dependence on by using various sampling schemes (Kohler & Lucchi, 2017; Xu et al., 2017). Finally, (Xu & Yang, 2017) and (Allen-Zhu & Li, 2017) showed that noisy gradient updates act as a noisy Power method allowing to find a negative curvature direction using only first-order information. Despite the recent theoretical improvements obtained by such techniques, first-order methods still dominate for training large deep neural networks. Their theoretical properties are however not perfectly well understood in the general case and we here aim to deepen the current understanding.
GD Perturbed by Stochastic Gradients
In this section we derive a converge guarantee for a combination of gradient descent and stochastic gradient steps, as presented in Algorithm 1, for the case where the stochastic gradient sequence meets the CNC assumption introduced in Eq. (6). We name this algorithm CNC-PGD since it is a modified version of the PGD method (Jin et al., 2017a), but use the intrinsic noise of SGD instead of requiring noise isotropy. Our theoretical analysis relies on the following smoothness conditions on the objective function .
Note that -smoothness and -Hessian Lipschitzness are standard assumptions for convergence analysis to a second-order stationary point (Ge et al., 2015; Jin et al., 2017a; Nesterov & Polyak, 2006). The boundedness of the stochastic gradient is often used in stochastic optimization (Moulines & Bach, 2011).
The analysis presented below relies on a particular choice of parameters. Their values are set based on the desired accuracy and presented in Table 2.
1 PGD Convergence Result
Let the stochastic gradients in CNC-PGD satisfy Assumption 6 and let , satisfy Assumption 2. Then Algorithm 1 returns an -second-order stationary point with probability at least after
2 Proof sketch of Theorem 1
In order to prove Theorem 1, we consider three different scenarios depending on the magnitude of the gradient and the amount of negative curvature. Our proof scheme is mainly inspired by the analysis of perturbed gradient descent (Jin et al., 2017a), where a deterministic sufficient condition is established for escaping from saddle points (see Lemma 11). This condition is shown to hold in the case of isotropic noise. However, the non-isotropic noise coming from stochastic gradients is more difficult to analyze. Our contribution is to show that a less restrictive assumption on the perturbation noise still allows to escape saddle points. Detailed proofs of each lemma are provided in the Appendix.
When the gradient is large enough, we can invoke existing results on the analysis of gradient descent for non-convex functions (Nesterov, 2013).
Consider a gradient descent step on a -smooth function . For this yields the following function decrease:
Using the above result, we can guarantee the desired decrease whenever the norm of the gradient is large enough. Suppose that , then Lemma 1 immediately yields
Consider the setting where the norm of the gradient is small, i.e. , but the minimum eigenvalue of the Hessian matrix is significantly less than zero, i.e. . In such a case, exploiting Assumption 6 (CNC) provides a guaranteed decrease in the function value after iterations, in expectation.
Then, after iterations the function value decreases as
where the expectation is over the sequence .
Suppose that and that the absolute value of the minimum eigenvalue of the Hessian is close to zero, i.e. we already reached the desired first- and second-order optimality. In this case, we can guarantee that adding noise will only lead to a limited increase in terms of expected function value.
where the expectation is over the sequence .
We now combine the results of the three scenarios discussed so far. Towards this end we introduce the set as
Each of the visited parameters constitutes a random variable. For each of these random variables, we define the event . When occurs, the function value decreases in expectation. Since the number of steps required in the analysis of the large gradient regime and the sharp curvature regime are different, we use an amortized analysis similar to (Jin et al., 2017a) where we consider the per-step decrease Note that the amortization technique is here used to simplify the presentation but all our results hold without amortization.. Indeed, when the negative curvature is sharp, then Lemma 2 provides a guaranteed decrease in which - when normalized per step - yields
The large gradient norm regime of Lemma 1 guarantees a decrease of the same order and hence
follows from combining the two results. Let us now consider the case when (complement of ) occurs. Then the result of Lemma 3 allows us to bound the increase in terms of function value, i.e.
The results established so far have shown that in expectation the function value decreases until the iterates reach a second-order stationary point, for which Lemma 3 guarantees that the function value does not increase too much subsequently.Since there may exist degenerate saddle points which are second-order stationary but not local minima we cannot guarantee that PGD stays close to a second-order stationary point it visits. One could rule out degenerate saddles using the strict-saddle assumption introduced in (Ge et al., 2015). This result guarantees visiting a second-order stationary point in steps (see Table 2). Yet, certifying second-order optimality is slightly more intricate as one would need to know which of the parameters meets the required condition. One solution to address this problem is to provide a high probability statement as suggested in (Jin et al., 2017a) (see Lemma 10). We here follow a similar approach except that unlike the result of (Jin et al., 2017a) that relies on exact function values, our results are valid in expectation. Our solution is to establish a high probability bound by returning one of the visited parameters picked uniformly at random. This approach is often used in stochastic non-convex optimization (Ghadimi & Lan, 2013).
The idea is simple: If the number of steps is sufficiently large, then the results of Lemma (1)-(3) guarantee that the number of times we visit a second-order stationary point is high. Let be a random variable that determines the ratio of -second-order stationary points visited through the optimization path . Formally,
where is the indicator function. Let denote the probability of event and be the probability of its complement . The probability of returning a second-order stationary point is simply
Estimating the probabilities is difficult due to the interdependence of the random variables . However, we can upper bound the sum of the individual ’s. Using the law of total expectation and the results from Eq. (13) and (14), we bound the expectation of the function value decrease as:
which, after rearranging terms, leads to the following upper-bound
Therefore, the probability that occurs uniformly over is lower bounded as
SGD without Perturbation
We now turn our attention to the stochastic variant of gradient descent under the assumption that the stochastic gradients fulfill the CNC condition (Assumption 6). We name this method CNC-SGD and demonstrate that it converges to a second-order stationary point without any additional perturbation. Note that in order to provide the convergence guarantee, we periodically enlarge the step size through the optimization process, as outlined in Algorithm 2. This periodic step size increase amplifies the variance along eigenvectors corresponding to the minimum eigenvalue of the Hessian, allowing SGD to exploit the negative curvature in the subsequent steps (using a smaller step size). Increasing the step size is therefore similar to the perturbation step used in CNC-PGD (Algorithm 1). Although this may not be very common in practice, adaptive stepsizes are not unusual in the literature (see e.g. (Goyal et al., 2017)).
The analysis of CNC-SGD relies on the particular choice of parameters presented in Table 3.
Let the stochastic gradients in CNC-SGD satisfy Assumption 6 and let , satisfy Assumption 2. Then Algorithm 2 returns an -second-order stationary point with probability at least after
Learning Half-spaces with Correlated Negative Curvature
The analysis presented in the previous sections relies on the CNC assumption introduced in Eq. (6). As mentioned before, this assumption is weaker than the isotropic noise condition required in previous work. In this Section we confirm the validity of this condition for the problem of learning half-spaces which is a core problem in machine learning, commonly encountered when training Perceptrons, Support Vector Machines or Neural Networks (Zhang et al., 2015). Learning a half-space reduces to a minimization problem of the following form
where is an arbitrary loss function and the data distribution might have a finite or infinite support. There are different choices for the loss function , e.g. zero-one loss, sigmoid loss or piece-wise linear loss (Zhang et al., 2015). Here, we assume that is differentiable. Generally, the objective is non-convex and might exhibit many local minima and saddle points. Note that the stochastic gradient is unbiased and defined as
where the samples are drawn from the distribution .
However - under mild assumptions - we show that the stochastic gradients do have a significant component along directions of negative curvature. Lemma 4 makes this argument precise by establishing a lower bound on the second moment of the stochastic gradients projected onto eigenvectors corresponding to negative eigenvalues of the Hessian matrix . To establish this lower bound we require the following structural property of the loss function .
Suppose that the magnitude of the second-order derivative of is bounded by a constant factor of its first-order derivative, i.e.
holds for all in the domain of and .
The reader might notice that this condition resembles the self-concordant assumption often used in the optimization literature (Nesterov, 2013), for which the second derivative is bounded by the third derivative. One can easily check that this condition is fulfilled by commonly used activation functions in neural networks, such as the sigmoid and softplus. We now leverage this property to prove that the stochastic gradient satisfies Assumption 6 (CNC).
Consider the problem of learning half-spaces as stated in Eq. (21), where satisfies Assumption 3. Furthermore, assume that the support of is a subset of the unit sphere.This assumption is equivalent to assuming the random variable lies inside the unit sphere, which is common in learning half-space (Zhang et al., 2015). Let be a unit length eigenvector of with corresponding eigenvalue . Then
Since the result of Lemma 4 holds for any eigenvector associated with a negative eigenvalue , this naturally includes the eigenvector(s) corresponding to . As a result, Assumption 6 (CNC) holds for stochastic gradients on learning half-spaces. Combining this result with the derived convergence guarantees in Theorem 1 implies that a mix of SGD and GD steps (Algorithm 1) obtains a second-order stationary point in polynomial time. Furthermore, according to Theorem 2, vanilla SGD obtains a second-order stationary point in polynomial time without any explicit perturbation. Notably, both established convergence guarantees are dimension free.
Furthermore, Lemma 4 reveals an interesting relationship between stochastic gradients and eigenvectors at a certain iterate . Namely, the variance of stochastic gradients along these vectors scales proportional to the magnitude of the negative eigenvalues within the spectrum of the Hessian matrix. This is in clear contrast to the case of isotropic noise variance which is uniformly distributed along all eigenvectors of the Hessian matrix. The difference can be important form a generalization point of view. Consider the simplified setting where is square loss. Then the eigenvectors with large eigenvalues correspond to the principal directions of the data. In this regard, having a lower variance along the non-principal directions avoids over-fitting.
In the following section we confirm the above results and furthermore show experiments on Neural Networks that suggest the validity of these results beyond the setting of learning half-spaces.
Experiments
In this Section we first show that vanilla SGD (Algorithm 2) as well as GD with a stochastic gradient step as perturbation (Algorithm 1) indeed escape saddle points. Towards this end, we initialize SGD, GD, perturbed GD with isotropic noise (ISO-PGD) (Jin et al., 2017a) and CNC-PGD close to a saddle point on a low dimensional learning-halfspaces problem with Gaussian input data and sigmoid loss. Figure 2 shows suboptimality over epochs for an average of 10 runs. The results are in line with our analysis since all stochastic methods quickly find a negative curvature direction to escape the saddle point. See Appendix E for more details.Rather than an encompassing benchmark of the different methods, this result is to be seen as a proof of concept.
Secondly - and more importantly - we study the properties of the variance of stochastic gradients depending on the width and depth of neural networks. All of these experiments are conducted using feed-forward networks on the well-known MNIST classification task (). Specifically, we draw random parameters in each of these networks and test Assumption 6 by estimating the second moment of the stochastic gradients projected onto the eigenvectors of as follows
We do the same for isotropic noise vectors drawn from the unit ball around each .For a fair comparison all involved vectors were normalized. Figure 1 shows this estimate for eigenvectors corresponding to the minimum eigenvalues for a 1 hidden layer network with increasing number of units (top) and for a 10 hidden unit network with increasing number of layers (bottom). Similar results on the entire negative eigenspectrum can be found in Appendix E. Figure 3 shows how varies with the magnitude of the corresponding negative eigenvalues . Again we evaluate 30 random parameter settings in neural networks with increasing depth. Two conclusions can be drawn from the results: (i) Although the variance of isotropic noise along eigenvectors corresponding to decreases as , the stochastic gradients maintain a significant component along the directions of most negative curvature independent of width and depth of the neural network (see Figure 1), (ii) the stochastic gradients yield an increasing variance along eigenvectors corresponding to larger eigenvalues (see Figure 3). These findings suggest important implications. (i) justify the use and explain the success of training wide and deep neural networks with pure SGD despite the presence of saddle points. (ii) suggests that the bound established in Lemma 4 may well be extended to more general settings such as training neural networks and illustrates the implicit regularization of optimization methods that rely on stochastic gradients since directions of large curvature correspond to principal (more robust) components of the data for many machine learning models.
Conclusion
In this work we have analyzed the convergence of PGD and SGD for optimizing non-convex functions under a new assumption -named CNC - that requires the stochastic noise to exhibit a certain amount of variance along the directions of most negative curvature. This is a less restrictive assumption than the noise isotropy condition required by previous work which causes a dependency to the problem dimensionality in the convergence rate. We have shown theoretically that stochastic gradients satisfy the CNC assumption and reveal a variance proportional to the eigenvalue’s magnitude for the problem of learning half-spaces. Furthermore, we provided empirical evidence that suggests the validity of this assumption in the context of neural networks and thus contributes to a better understanding of training these models with stochastic gradients. Proving this observation theoretically and investigating its implications on the optimization and generalization properties of stochastic gradients methods is an interesting direction of future research.
Acknowledgements
We would like to thank Antonio Orvieto, Yi Xu, Tianbao Yang, Kaiqing Zhang and Alec Koppel for pointing out mistakes in the draft and their help in improving the result. We also thank Kfir Levy, Gary Becigneul, Yannic Kilcher and Kevin Roth for their helpful discussions.
References
Appendix
Recall that we assumed the function is L-smooth (or L-Lipschitz gradient) and -Lipschitz Hessian. We define these two properties below.
A differentiable function is L-smooth (or L-Lipschitz gradient) if
A twice-differentiable function is -Lipschitz Hessian if
A differentiable function (of form of (1)) has -Lipschitz stochastic gradients if
Let be obtained from one stochastic gradient step at on the -smooth objective , namely
The proof is based on a straightforward application of smoothness:
For all , the following series are bounded as
The proof is based on the following bounds on power series for :
Yet, for the sake of brevity, we omit the subsequent (straightforward) derivations needed to prove the statement. ∎
Appendix B PGD analysis
Table 4 represents the choice of parameters together with the collection of required constraints on the parameters. This table summarizes our approach for choosing the parameters of CNC-PGD presented in Algorithm 1.
B.2 Sharp negative curvature regime
Then, after iterations the function value decreases as
where the expectation is over the sequence .
The proof presented below proceeds by contradiction and is inspired by the analysis of accelerated gradient descent in non-convex settings as done in (Jin et al., 2017b). We first assume that the sufficient decrease condition is not met and show that this implies an upper bound on the distance moved over a given number of iterations. We then derive a lower bound on the iterate distance and show that - for the specific choice of parameters introduced earlier - this lower bound contradicts the upper bound for a large enough number of steps . We therefore conclude that we get sufficient decrease for .
We assume that PGD does not obtain the desired function decrease in iterations, i.e.
Under the setting of Lemma 7, assume Eq (36) holds. Then the expected distance to the initial parameter can be bounded as
Here, we use the proposed proof strategy of normalized gradient descent (Levy, 2016). First of all, we bound the effect of the noise in the first step. Recall the first update of Algorithm 1 under the above setting
Then by a straightforward application of lemma 5, we have
We proceed using the result of Lemma 1 that relates the function decrease to the norm of the visited gradients:
According to Eq. (36), the function value does not decrease too much. Plugging this bound into the above inequality yields an upper bound on the sum of the squared norm of the visited gradients, i.e.
Using the above result allows us to bound the expected distance in the parameter space as:
Replacing the above inequality into the following bound completes the proof:
Furthermore, the guaranteed closeness to the initial parameter allows us to use the gradient of the quadratic objective in the GD steps as follows,
where the vectors , and are defined in Table 5.
Our goal is to provide a lower-bound on that contradicts the result of Lemma 8. To obtain a lower bound on the distance, we use the classical result . Setting and yields
Using this result, as well as the fact that for we have
Plugging the result of the last lemma into the lower-bound established in Eq. (44) yields
To complete our lower bound, we need : (I) a lower bound on , (II) an upper bound on and (III) an upper bound on .
Norm of exponentially grows in iterations. Next lemma proves this claim.
Under the setting of Lemma 7, steps of PGD yield an exponentially growing lower bound on the expected squared norm of , i.e.
We first use Cauchy-Schwarz inequality to derive the following lower bound:
for the leftmost eigenvector of the Hessian . Plugging Equation (49) into (48) and recalling as well as the definition of as given in Table 5 yields
where the last inequality follows from Assumption 6. ∎
Using the definition of the scaling factor and the fact that the noise lies inside the unit sphere the next lemma proves a deterministic bound on this term.
Under the setting of Lemma 7 the norm of is deterministically bounded as
Starting from the definition of and recalling that has at most unit norm by Assumption 6, we have
To bound this term, we use the fact proved in Lemma 8 that stays close to for all .
then the norm of is bounded in expectation:
Using the result of Lemma 9 as well as the distance bound established in Lemma 8, we have
Now, the results on convergence of power series derived in Lemma 6 and the definition give
By combining Equation (52) and (53) we can establish the desired bound on :
We are now ready to combine the results of Lemma 11, 12, and 13, into Eq. (46) in order to obtain the desired lower bound on the distance travelled by the iterates of PGD.
Under the setting of Lemma 7 and for each and for the choice of parameters as in Table 4 we have
To prove this statement we introduce each bound in Eq. (46) step by step:
We need the lower bound to be positive to complete the proof. In this regard, we require the following condition to hold,
Using the lower bound the absolute value of the minimum eigenvalue as (in Eq. (34)), we choose parameters , , and such that the above constraints are satisfied,Note that the second requirement in (57) is always more restrictive than the last since . i.e.
These choices of parameters establish an exponential lower bound on the distance as
Since the left hand side is exponentially growing, we can derive the contradiction by choosing a large enough number of steps as:
B.3 Moderate negative curvature regime
where the expectation is over the sequence .
Using the resulf of lemma 5, we bound the decrease in the function value as
Since there is no perturbation in following steps, GD doesn’t increase the function value in following -steps (according to the result of lemma 1). ∎
Appendix C SGD analysis
Table 6 lists the parameters of CNC-SGD presented in Algorithm 2 together with the constraints that determines our choice of parameters. These constraints are driven by the theoretical analysis.
C.2 Proof of the Main Theorem
Let the stochastic gradients in CNC-SGD satisfy Assumption 6 and let and satisfy Assumption 2. Then algorithm 2 returns an -second order stationary point with probability at least after
where the noise term s are i.i.d and zero-mean and the noise term satisfies CNC assumption 6. Our analysis relies on the CNC assumption only at steps with large step-size . That is, we only exploit the negative curvature in the steps with a large step size. In this regard, we need to use the larger step size in these steps. This is different from Perturbed SGD – with isotropic noise– (Ge et al., 2015) where the variance of perturbations in all steps is exploited in the analysis.
If the norm of the gradient is large, i.e.
then the result on the one step convergence of SGD in Lemma 5 guarantees the desired decrease
The choice of and in Table 6 ensures that
The above constraint simplifies the established upperbound on the function value decrease as
where the last step is the result of the choice of parameters in Table 6.
When the minimum eigenvalue is significantly less than zero, SGD steps with a large step-size provides enough variance for following SGD steps –with a smaller step size – to exploit the negative curvature direction. This statement is formally proved in the next lemma.
Then iterations with the small step-size yields the following decrease in the function value in expectation
where the expectation is taken over the sequence .
Suppose that the minimum eigenvalue of the Hessian is quite small and visited gradients has also a small norm. In this case, we need to bound increase in the function caused by the variance of SGD. The established upperbound in Eq. 67 bounds the total increase after iterations as
The probabilistic lower bound on returning the desired second order stationary point can be derived from Eq (67) and (70) as well as Lemma 16 using exactly the same argument as the probabilistic argument on perturbed gradient descent. We define the event as
According to the result for the large gradient regime (in Eq. (67)) and the large curvature result (in Lemma 16), the function value decreases as
in itetations of SGD. In all other iterates, the increase of the function value due to the stochastic gradient steps is controlled by using our choice of steps sizes, according to the result of Eq. (70):
Let is the probability associated with , hence is the probability associated with its complement event . Note that computing the probabilities is very hard due to the dependency of to all stochastic gradient steps before iteration . Plugging these probabilities into the above conditional expectation results yields
Summing the above inequalities over the steps obtains the following upper-bound on the average of s
The above bound allows us to lower-bound the probability of retrieving an -second order stationary point (which is equivalent to the occurrence of the complement event ) uniformly over steps:
This concludes the proof of the convergence guarantee of CNC-SGD under Assumption 6. ∎
C.3 Proof of the main Lemma 16
Preliminary Through our analysis, we invoke the result of the following lemma repeatedly.
Consider stochastic processes adapted to filtration such that . If the random variable is -measurable, then
where the last step is due to the fact that is -measurable. ∎
Then iterations with the small step-size yields the following decrease in the function value in expectation
where the expectation is taken over the sequence .
Our analysis for the large curvature case in CNC-PGD (lemma 7) can be extended to SGD. Here, we borrow the compact notations from Lemma 7. Similar to the proof scheme of lemma 7, our proof is based on contradiction. We assume that the desired decrease in the function value is not obtained in iterations, namely
for all as long as Assumption 2 holds.
where the vectors , , , and are defined in Table 7. The only new term in the expansion is the noise of the stochastic gradient steps s.
Similarly to PGD, the power iterations plays an essential rule in the negative curvature exploration. For this term, we can reuse our analysis from lemma 12 and 11. The term is caused by using a stale Taylor approximation for all iterates . We need to bound the perturbation effect of this term to guarantee that power iterates exploit the negative curvature. To this end, we required a bound on . This bound is established in the next lemma using the distance bound of Lemma 19.
Under the condition of Lemma 19, the bound
where . The result of lemma 17 implies that that . Plugging the result into the above equation yields.
Using the lower-bound on the absolute value of minimum eigenvalue, i.e. , we choose parameters such that the above constraints are satisfied (eee Table 6:
We postpone the choose the step-size after finding an expression for .
Our choice of parameters fulfills the above constraints. Plugging the above result into Eq. (81) obtains the exponential growing lower-bound on the distance
Using the lower bound of Eq. (86), we can establish a contradictory result with the upperbound on the distance proposed in lemma 19
Since the left-side of the above inequality is exponentially growing, one can choose the number iterations large enough to derive the contradiction:
where is a constant independent of parameters ,, and .
To derive our contradiction, we required the upperbound of Eq. (85) to be statisfied. Replacing , achieved in Eq. (87), into this bound yields
C.4 Bound on the expectation of distance
Here, we complete the proof of lemma 7 by proving the following lemma, which is used in lemma 15.
Suppose that expectation of the decrease in function value is lower-bounded as
for as long as Assumption 2 holds.
Rearranging terms obtains a bound on the sum of the squared norm of visited gradients:
Using the Telescopic expansion of the difference , we relate the distance to the visited stochastic gradients:
To upper bound the right-side of the above inequality, we rely zero-mean assumption of s:
To further simplify the above bound, we invoke the result of lemma 17 which proves that . Replacing this result into Eq. (93) yields
Replacing the above bound into Eq. (92) yields:
Using the above result, we bound the distance as:
Finally, replacing by concludes the proof. ∎
Appendix D Analysis of Learning Half-spaces
Consider the problem of learning half-spaces as stated in Eq. (21), where satisfies Assumption 3. Furthermore, assume that the support of is a subset of the unit sphere. Let be a unit length eigenvector of with corresponding eigenvalue . Then
Using the definition of an eigenvector, and since we have:
Using the above result and as well as Jensen’s inequality, we derive the desired result:
where the last inequality follows from Eq. (97) and the fact that . ∎
Appendix E Additional experimental results
with the following methods and hyperparameters:
Gradient Descent, Stochastic Gradient Descent, PGD as in (Jin et al., 2017a) with perturbation radius and PGD-CNC with a stochastic gradient step as perturbation. All methods use the step size , the stochastic gradient steps are performed with batch size and the perturbed gradient descent methods perturb as soon as .
To complete the picture of Figure 2 we here also present the gradient norms and minimum/maximum eigenvalues along the trajectories of the different methods. It becomes apparent that all of them indeed started at a saddle and eventually move towards (and along) the flat end of the sigmoid. However, Gradient Descent is much slower in finding regions of significant negative curvature than the stochastic methods.
The neural network experiments were implemented using the Pytorch library and conducted on a GPU server. Note that we downsized the mnist dataset to an image size of and applied sigmoid acivations in the hidden layers as well as a cross-entropy loss over the 10 classes.
While we present covariances between the stochastic gradients/isotropic noise vectors with the leftmost Eigenvectors in the main paper, Figure 5 plots the covariances with the entire negative eigenspectrum.
In Figure 3 we show that the correlation of eigenvectors and stochastic gradients increases with the magnitude of the associated eigenvalues. As expected, this is not the case for noise vectors that are drawn randomly from the unit sphere. Furthermore, these correlations show a decrease with an increasing dimension as can be seen in Figure 6.