A CCELERATING SGD WITH MOMENTUM FOR OVERPARAMETERIZED LEARNING
A BSTRACT
Nesterov SGD is widely used for training modern neural networks and other machine learning models.
Yet, its advantages over SGD have not been theoretically clariﬁed.
Indeed, as we show in this paper, both theoretically and empirically,
Nesterov SGD with any parameter selection does not in general provide acceleration over ordinary SGD.
Furthermore, Nesterov SGD may diverge for step sizes that ensure convergence of ordinary SGD.
This is in contrast to the classical results in the deterministic setting, where the same step size ensures accelerated convergence of the Nesterov’s method over optimal gradient descent.
To address the non-acceleration issue, we introduce a compensation term to Nesterov SGD.
The resulting algorithm, which we call MaSS , converges for same step sizes as SGD.
We prove that MaSS obtains an accelerated convergence rates over
SGD for any mini-batch size in the linear setting.
For full batch, the convergence rate of MaSS matches the well-known accelerated rate of the Nesterov’s method.
We also analyze the practically important question of the dependence of the convergence rate and optimal hyper-parameters on the mini-batch size, demonstrating three distinct regimes: linear scaling, diminishing returns and saturation.
Experimental evaluation of MaSS for several standard architectures of deep networks, including ResNet and convolutional networks, shows improved performance over SGD, SGD+Nesterov and Adam.
I NTRODUCTION
Many modern neural networks and other machine learning models are over-parametrized (5).
These models are typically trained to have near zero training loss, known as interpolation and often have strong generalization performance, as indicated by a range of empirical evidence including (23; 3).
Due to a key property of interpolation – automatic variance reduction (discussed in Section 2.1), stochastic gradient descent (SGD) with constant step size is shown to converge to the optimum of a convex loss function for a wide range of step sizes (12).
Moreover, the optimal choice of step size η ∗ for SGD in that setting can be derived analytically.
The goal of this paper is to take a step toward understanding momentum-based SGD in the interpolating setting.
Among them, stochastic version of Nesterov’s acceleration method (SGD+Nesterov) is arguably the most widely used to train modern machine learning models in practice.
The popularity of SGD+Nesterov is tied to the well-known acceleration of the deterministic Nesterov’s method over gradient descent (15).
Yet, has not not theoretically clear whether Nesterov SGD accelerates over SGD.
As we show in this work, both theoretically and empirically, Nesterov SGD with any parameter selection does not in general provide acceleration over ordinary SGD.
Furthermore, Nesterov SGD may diverge, even in the linear setting, for step sizes that guarantee convergence of ordinary SGD.
Intuitively, the lack of acceleration stems from the fact that, to ensure convergence, the step size of
SGD+Nesterov has to be much smaller than the optimal step size for SGD.
This is in contrast to the deterministic Nesterov method, which accelerates using the same step size as optimal gradient descent.
As we prove rigorously in this paper, the slow-down of convergence caused by the small step size negates the beneﬁt brought by the momentum term.
We note that a similar lack of acceleration for the stochastic Heavy Ball method was analyzed in (9).
To address the non-acceleration of SGD+Nesterov, we introduce an additional compensation term to allow convergence for the same range of step sizes as SGD.
The resulting algorithm, MaSS (Momentum-added Stochastic Solver) 1 updates the weights w and u using the following rules (with the compensation term underlined):
[Equation]
Here, ˜ ∇ represents the stochastic gradient.
The step size η 1 , the momentum parameter γ ∈ (0 , 1) and the compensation parameter η 2 are independent of t .
We proceed to analyze theoretical convergence properties of MaSS in the interpolated regime.
Speciﬁcally, we show that in the linear setting MaSS converges exponentially for the same range of step sizes as plain SGD, and the optimal choice of step size for MaSS is exactly η ∗ which is optimal for SGD.
Our key theoretical result shows that MaSS has accelerated convergence rate over SGD.
Furthermore, in the full batch (deterministic) scenario, our analysis selects η 2 = 0 , thus reducing MaSS to the classical Nesterov’s method (15).
In this case our convergence rate also matches the well-known convergence rate for the Nesterov’s method (15; 4).
This acceleration is illustrated in Figure 1.
Note that SGD+Nesterov
(as well as Stochastic Heavy Ball) does not converge faster than SGD, in line with our theoretical analysis.
We also prove exponential convergence of MaSS in more general convex setting under additional conditions.
We further analyze the dependence of the convergence rate [Equation] t and optimal hyper-parameters on the mini-batch size m .
We identify three distinct regimes of dependence deﬁned by two critical values m ∗ 1 and m ∗ 2 : linear scaling, diminishing returns and saturation, as illustrated in Figure 2.
The convergence speed per iteration s ( m ) , as well as the optimal hyper-parameters, increase linearly as m in the linear scaling regime, sub-linearly in the diminishing returns regime, and can only increase by a small constant factor in the saturation regime.
The critical values m ∗ 1 and m ∗ 2 are derived analytically.
We note that the intermediate “diminishing terurns” regime is new and is not found in SGD (12).
To the best of our knowledge, this is the ﬁrst analysis of mini-batch dependence for accelerated stochastic gradient methods.
We also experimentally evaluate MaSS on deep neural networks, which are non-convex.
We show that MaSS outperforms SGD, SGD+Nesterov and Adam (10) both in optimization and generalization, on different architectures of deep neural networks including convolutional networks and
ResNet (7).
The paper is organized as follows:
In section 2, we introduce notations and preliminary results.
In section 3, we discuss the non-acceleration of SGD+Nesterov.
In section 4 we introduce MaSS and analyze its convergence and optimal hyper-parameter selection.
In section 5, we analyze the mini-batch MaSS.
In Section 6, we show experimental results.
1. R ELATED W ORK
Over-parameterized models have drawn increasing attention in the literature as many modern machine learning models, especially neural networks, are over-parameterized (5) and show strong generalization performance (16; 23; 2).
Over-parameterized models usually result in nearly perfect ﬁt (or interpolation) of the training data (23; 18; 3).
Exponential convergence of SGD with constant step size under interpolation and its dependence on the batch size is analyzed in (12).
There are a few works that show or indicate the non-acceleration of existing stochastic momentum methods.
First of all, the work (9) theoretically proves non-acceleration of stochastic Heavy Ball method (SGD+HB) over SGD on certain synthetic data.
Furthermore, these authors provide experimental evidence that SGD+Nesterov also converges at the same rate as SGD on the same data.
The work (22) theoretically shows that, for sufﬁciently small step-sizes, SGD+Nesterov and SGD+HB is equivalent to SGD with a larger step size.
However, the results in (22) do not exclude the possibility that acceleration is possible when the step size is larger.
The work (11) concludes that “momentum hurts the convergence within the neighborhood of global optima”, based on a theoretical analysis of
SGD+HB.
These results are consistent with our analysis of the standard SGD+Nesterov.
However, this conclusion does not apply to all momentum methods.
Indeed, we will show that MaSS provably improves convergence over SGD.
There is a large body of work, both practical and theoretical, on SGD with momentum, including (10; 8; 1).
Adam (10), and its variant AMSGrad (17), are among the most practically used SGD methods with momentum.
Unlike our method, Adam adaptively adjusts the step size according to a weight-decayed accumulation of gradient history.
In (8) the authors proposed an accelerated
SGD algorithm, which can be written in the form shown on the right hand side in Eq.8, but with different hyper-parameter selection.
Their ASGD algorithm also has a tail-averaging step at the ﬁnal stage.
In the interpolated setting (no additive noise) their analysis yields a convergence rate of O
( Poly ( κ, ˜ κ ) exp( − t 9 √ κ 1 ˜ κ )) compared to O (exp( − t √ κ 1 ˜ κ )) for our algorithm with batch size 1.
We provide some experimental comparisons between their ASGD algorithm and MaSS in Fig. 4.
The work (21) proposes and analyzes another ﬁrst-order momentum algorithm and derives convergence rates under a different set of conditions – the strong growth condition for the loss function in addition to convexity.
As shown in Appendix F.3, on the example of a Gaussian distributed data, the rates obtained in (21) can be slower than those for SGD.
In contrast, our algorithm is guaranteed to never have a slower convergence rate than SGD.
Furthermore, in the same Gaussian setting MaSS matches the optimal accelerated full-gradient Nesterov rate.
Additionally, in our work we consider the practically important dependence of the convergence rate and optimal parameter selection on the mini-batch size, which to the best of our knowledge, has not been analyzed for momentum methods.
N OTATIONS AND P RELIMINARIES
Given dataset D = { ( x i , y i ) } ni =1 ⊂ R d × C , we consider an objective function of the form f ( w ) =n (cid:80) ni
=
f i ( w ) , where f i only depends on a single data point ( x i , y i ) .
Let ∇ f denote the exact gradient, and ˜ ∇ m f denote the unbiased stochastic gradient evaluated based on a mini-batch of size m .
For simplicity, we also denote ˜ ∇ f ( w ) :
= ˜ ∇ 1 f ( w ) .
We use the concepts of strong convexity and smoothness of functions, see deﬁnitions in Appendix B.1.
For loss function with µ -strong convexity and L -smoothness, the condition number κ is deﬁned as κ = L/µ .
In the case of the square loss, f i ( w ) = 12 ( w T x i − y i ) 2 , and the Hessian matrix is H :
=n (cid:80) ni
=1 x i x Ti .
Let L and µ be the largest and the smallest non-zero eigenvalues of the Hessian respectively.
Then the condition number is then κ = L/µ (note that zero eigenvalues can be ignored in our setting, see Section 4).
Stochastic Condition Numbers.
For a quadratic loss function, let ˜ H m :=
1 m (cid:80) mi =1 ˜ x i ˜ x
Ti denotes a mini-batch estimate of H .
Deﬁne L 1 be the smallest positive number such that E (cid:2) (cid:107)
˜ x (cid:107) 2 ˜ x ˜ x T (cid:3) (cid:22)
L 1 H, and denote
[Equation]
Given a mini-batch size m , we deﬁne the m -stochastic condition number as κ m :=
L m /µ .
Following (8), we introduce the quantity ˜ κ
(called statistical condition number in (8)), which is the smallest positive real number such that E (cid:2) (cid:107) ˜ x (cid:107) 2 H − 1 ˜ x ˜ x T (cid:3) (cid:22)
˜ κH.
Remark 1.
We note that L 1 ≥ L , since E (cid:2) (cid:107) ˜ x (cid:107) 2 ˜ x ˜ x T (cid:3) =
E [ ˜ H 21 ]
=
H 2 + E [( ˜ H 1 − H ) 2 ] (cid:23) H 2 .
Consequently, according to the deﬁnition of L m in Eq.2, we have
[Equation]
Hence, the quadratic loss function is also L m -smooth, for all m ≥ 1 .
By the deﬁnition of κ m , we also have
[Equation]
Remark 2.
It is important to note that ˜ κ ≤ κ 1 , since E (cid:2) (cid:107) ˜ x (cid:107) 2 H − 1 ˜ x ˜ x T (cid:3) (cid:22) 1 µ E (cid:2) (cid:107) ˜
x (cid:107) 2 ˜ x ˜ x T (cid:3) (cid:22) κ 1 H .
2. C ONVERGENCE OF SGD FOR O VER - PARAMETRIZED M ODELS AND O PTIMAL S TEP S IZE
We consider over-parametrized models that have zero training loss solutions on the training data (e.g., (23)).
A solution f i ( w ) which ﬁts the training data perfectly f i ( w ) = 0 , ∀ i
= 1 , 2 , · · · , n, is known as interpolating .
In the linear setting, interpolation implies that the linear system { x Ti w = y i } ni =1 has at least one solution.
A key property of interpolation is Automatic Variance Reduction (AVR), where the variance of the stochastic gradient decreases to zero as the weight w approaches the optimal w ∗ . [Equation]
[Equation]
For a detailed discussion of AVR see Appendix B.2.
Thanks to AVR, plain SGD with constant step size can be shown to converge exponentially for strongly convex loss functions (13; 19; 14; 12).
The set of acceptable step sizes is (0 , 2 /L m ) , where
L m is deﬁned in Eq.2 and m is the mini-batch size.
Moreover, the optimal step size η ∗ ( m ) of SGD that induces fastest convergence guarantee is proven to be 1 /L m (12).
N ON - ACCELERATION OF SGD+N ESTEROV
In this section we prove that SGD+Nesterov, with any constant hyper-parameter setting, does not generally improve convergence over optimal SGD.
Speciﬁcally, we demonstrate a setting where
SGD+Nesterov can be proved to have convergence rate of (1 − O (1 /κ ))
t , which is same (up to a constant factor) as SGD.
In contrast, the classical accelerated rate for the deterministic Nesterov’s method is (1 − 1 / √ κ ) t .
We will consider the following two-dimensional data-generating component decoupled model.
Fix an arbitrary w ∗ ∈ R 2 and randomly sample z from N (0 , 2) .
The data points ( x , y ) are constructed as follow:
[Equation]
where e 1 , e 2 ∈ R 2 are canonical basis vectors, σ 1 > σ 2 > 0 .
It can be seen that L 1 = σ 21 , κ 1 = 6 σ 21 /σ 22 and ˜ κ = 6 (See Appendix F.1).
This model is similar to that used to analyze the stochastic Heavy Ball method in (9).
The following theorem gives a lower bound for the convergence of SGD+Nesterov, regarding the linear regression problem on the component decoupled data model.
See Appendix C for the proof.
Theorem 1 (Non-acceleration of SGD+Nesterov) .
Let { ( x i , y i ) } ni
=1 be a dataset generated according to the component decoupled model.
Consider the optimization problem of minimizing quadratic function 12 n (cid:80) i ( x Ti w − y i ) 2 .
For any step size η > 0 and momentum parameter γ ∈ (0 , 1) of
SGD+Nesterov with random initialization, with probability one, there exists a T ∈ N such that
[Equation]
where C > 0 is a constant.
Compared with the convergence rate (1 − 1 /κ ) t of SGD (12), this theorem shows that SGD+Nesterov does not accelerate over SGD.
This result is very different from that in the deterministic gradient scenario, where the classical Nesterov’s method has a strictly faster convergence guarantee than gradient descent (15).
Intuitively, the key reason for the non-acceleration of SGD+Nesterov is a condition on the step size η required for non-divergence of the algorithm.
Speciﬁcally, when momentum parameter γ is close to 1, η is required to be less than 2(1 − γ ) / [-
 +-]3+ O ((1 − γ ) 2 ) (precise formulation is given in Lemma 1 in
Appendix C).
The slow-down resulting from the small step size necessary to satisfy that condition cannot be compensated by the beneﬁt of the momentum term.
In particular, the condition on the step-size of SGD+Nesterov excludes η ∗ that achieves fastest convergence for SGD.
We show in the following corollary that, with the step size η ∗ , SGD+Nesterov diverges.
This is different from the deterministic scenario, where the Nesterov method accelerates using the same step size as gradient descent.
Corollary 1.
Consider the same optimization problem as in Theorem 1.
Let step-size η = 1 L 1 = 16 σand acceleration parameter γ ∈ [0 .
6 , 1] , then SGD+Nesterov, with random initialization, diverges with probability 1.
We empirically verify the non-acceleration of SGD+Nesterov as well as Corollary 1, in Sectionand Appendix F.2.
M A SS: A CCELERATING SGD
In this section, we propose MaSS, which introduces a compensation term (see Eq.1) onto
SGD+Nesterov.
We show that MaSS can converge exponentially for all the step sizes that result in convergence of SGD, i.e., η ∈ (0 , 2 /L m ) .
Importantly, we derive a convergence rate exp( − t/ √ κ 1 ˜ κ ) , where ˜ κ ≤ κ 1 , for MaSS which is faster than the convergence rate for SGD exp( − t/κ 1 ) .
Moreover, we give an analytical expression for the optimal hyper-parameter setting.
For ease of analysis, we rewrite update rules of MaSS in Eq.1 in the following equivalent form (introducing an additional variable v ): (cid:26) w t +1 ← u t − η 1 ˜ ∇ [Equation] u
[Equation]
1 ← (1 + γ ) w t +1 −
[Equation]
There is a bijection between the hyper-parameters ( η 1 , η 2 , γ ) and ( η, α, δ ), which is given by: [Equation] [Equation] α ) / (1 + α ) ,
[Equation]
Remark 3 (SGD+Nesterov) .
In the literature, the Nesterov’s method is sometimes written in a similar form as the R.H.S. of Eq.8.
Since SGD+Nesterov has no compensation term, δ has to be ﬁxed as η/α , which is consistent with the parameter setting in (15).
Assumptions.
We ﬁrst assume square loss function, and later extend the analysis to general convex loss functions under additional conditions.
For square loss function, the solution set W ∗ :
= { w ∈ R d | f ( w ) = 0 } is an afﬁne subspace in the parameter space R d .
Given any w , we denote its closest solution as w ∗ :=
arg min v ∈W ∗ (cid:107) w − v (cid:107) , and deﬁne the error (cid:15) =
w − w ∗ .
Be aware that different w may correspond to different w ∗ , and that (cid:15) and (stochastic) gradients are always perpendicular to
W ∗ (see discussion in Appendix B.3).
Hence, no actual update happens along W ∗ .
For this reason, we can ignore zero eigenvalues of H and restrict our analysis to the span of the eigenvectors of the
Hessian with non-zero eigenvalues.
Based on the equivalent form of MaSS in Eq.8, the following theorem shows that, for square loss function in the interpolation setting, MaSS is guaranteed to have exponential convergence when hyper-parameters satisfy certain conditions.
Theorem 2 (Convergence of MaSS) .
Consider minimizing a quadratic loss function in the interpolation setting.
Let µ be the smallest non-zero eigenvalue of the Hessian matrix H .
Let L m be as deﬁned in Eq.2.
Denote ˜ κ m :=
˜ κ/m + ( m − 1) /m .
In MaSS with mini batch of size m , if the positive hyper-parameters η, α, δ satisfy the following two conditions:
[Equation]
then, after t iterations,
[Equation]
Consequently,
[Equation]
for some constant C > 0 which depends on the initialization.
Remark 4.
By condition Eq.10, the admissible step size η is (0 , 2 /L m ) , exactly the same as SGD for interpolated setting (12).
Remark 5.
One can easily check that the hyper-parameter setting of SGD+Nesterov does not satisfy the conditions in Eq.10.
Proof sketch for Theorem 2.
Denote F t := E (cid:2) (cid:107) v t +1 − w ∗ (cid:107) 2 H − 1 + δα (cid:107) w t
+1 − w ∗ (cid:107) 2 (cid:3) , we show that, under the update rules of MaSS in Eq.8,
[Equation]
By the condition in Eq.10, c 1 ≤ 0 , c 2 ≤ 0 , then the last two terms are non-positive.
Hence,
[Equation]
Using that (cid:107) w t − w ∗ (cid:107) 2 ≤ α F t /δ , we get the ﬁnal conclusion.
See detailed proof in Appendix D.
Hyper-parameter Selection.
From Theorem 2, we observe that the convergence rate is determined by (1 − α ) t .
Therefore, larger α is preferred for faster convergence.
Combining the conditions in Eq.10, we have
[Equation]
By setting η ∗ = 1 /L m , which maximizes the right hand side of the inequality, we obtain the optimal selection α ∗ = 1 / √ κ m ˜ κ m .
Note that this setting of η ∗ and α ∗ determines a unique δ ∗ = α ∗ /µ by the conditions in Eq.10.
In summary,
[Equation]
By Eq.9, the optimal selection of ( η 1 , η 2 , γ ) would be:
[Equation]
˜ κ m is usually larger than 1, which implies that the coefﬁcient η ∗ 2 of the compensation term is non-negative.
The non-negative coefﬁcient η 2 indicates that the weight u t is “over-descended” in
SGD+Nesterov and needs to be compensated along the gradient direction.
It is important to note that the optimal step size for MaSS as in Eq.13 is exactly the same as the optimal one for SGD (12).
With such hyper-parameter selection given in Eq.14, we have the following theorem for optimal convergence:
Theorem 3 (Acceleration of MaSS) .
Under the same assumptions as in Theorem 2, if we set hyperparameters in MaSS as in Eq.13, then after t iteration of MaSS with mini batch of size m ,
[Equation] [Equation]
for some constant C > 0 which depends on the initialization.
Remark 6.
With the optimal hyper-parameters in Eq.13, the asymptotic convergence rate of MaSS is
[Equation]
which is faster than the rate O ( e − t/κ m ) of SGD (see (12)), since κ m ≥ ˜ κ m .
Remark 7 (MaSS Reduces to the Nesterov’s method for full batch) .
In the limit of full batch m → ∞ , we have κ m → κ, ˜ κ m → 1 , the optimal parameter selection in Eq.14 reduces to
[Equation]
It is interesting to observe that, in the full batch (deterministic) scenario, the compensation term vanishes and η ∗ 1 and γ ∗ are the same as those in Nesterov’s method.
Hence MaSS with the optimal hyper-parameter selection reduces to Nesterov’s method in the limit of full batch.
Moreover, the convergence rate in Theorem 3 reduces to O ( e − t/ √ κ ) , which is exactly the well-known convergence rate of Nesterov’s method (15; 4).
Extension to Convex Case.
First, we extend the deﬁnition of L 1 to convex functions, L 1 :=
inf { c ∈ R | E
[ (cid:107) ˜ ∇ f ( w ) (cid:107) 2 ] ≤ 2 c ( f ( w ) − f ∗ ) } , and keep the deﬁnition of L m the same as Eq.2.
It can be shown that these deﬁnitions of L m are consistent with those in the quadratic setting.
We assume that the smallest positive eigenvalue of Hessian H ( x ) is lower bounded by µ > 0 , for all x .
Theorem 4.
Suppose there exists a 1 L -strongly convex and 1 µ -smooth non-negative function g :
R d → R such that g ( w ∗ ) = 0 and (cid:104)∇ g ( x ) , ∇ f ( z ) (cid:105) ≥ (1 − (cid:15) ) (cid:104) x − w ∗ , z − w ∗ (cid:105) , ∀ x , z ∈ R d , for some (cid:15) > 0 . In MaSS, if the hyper-parameters are set to be: η = 1 / (2 L m ) , α = ( [Equation] − (cid:15) ) / (
[Equation] m ) , δ = 1 / ( [Equation] L m ) , (18) then after t iterations, there exists a constant C such that, E [ f ( w t )] ≤ C · (cid:0) 1 − 1 − (cid:15)
[Equation]
m (cid:1) t .
L INEAR S CALING R ULE AND THE D IMINISHING R ETURNS
Based on our analysis, we discuss the effect of selection of mini-batch size m .
We show that the domain of mini-batch size m can be partitioned into three intervals by two critical points: m ∗ 1 = min
( L 1 /L, ˜ κ ) , m ∗ 2 = max( L 1 /L, ˜ κ ) .
The three intervals/regimes are depicted in Figure 2, and the detailed analysis is in Appendix G.
Linear Scaling: m < m ∗ 1 .
In this regime, we have L m ≈ L 1 /m, κ m ≈ κ 1 /m and ˜ κ m ≈ ˜ κ/m .
The optimal selection of hyper-parameters is approximated by: η ∗ ( m ) ≈ m · η ∗ (1) , α ∗ ( m ) ≈ m · α ∗ (1) , δ ∗ ( m ) ≈ m · δ ∗ (1) , and the convergence rate in Eq.16 is approximately O ( e − m · t/ √ κ 1 ˜ κ ) .
This indicates linear gains in convergence when m increases.
In the linear scaling regime the hyper-parameter selections follow a Linear Scaling Rule (LSR): When the mini-batch size is multiplied by k , multiply all hyperparameters ( η, α, δ ) by k .
This parallels the linear scaling rule for SGD which is an accepted practice for training neural networks (6).
Moreover, increasing m results in linear gains in the convergence speed, i.e., one MaSS iteration with mini-batch size m is almost as effective as m MaSS iterations with mini-batch size 1.
Diminishing Returns: m ∈ [ m ∗ 1 , m ∗ 2 )
In this regime, increasing m results in sublinear gains in convergence speed.
One MaSS iteration with mini-batch size m is less effective than m MaSS iterations with mini-batch size 1.
Saturation: m ≥ m ∗ 2 .
One MaSS iteration with mini-batch size m is nearly as effective (up to a multiplicative factor of 2) as one iteration with full gradient.
This three regimes partition is different from that for SGD (12), where only linear scaling and saturation regimes present.
An empirical veriﬁcation of the dependence of the convergence speed on m is shown in Figure 3.
See the setup in Appendix G.
E MPIRICAL E VALUATION
Synthetic Data.
We empirically verify the non-acceleration of SGD+Nesterov and the fast convergence of MaSS on synthetic data.
Speciﬁcally, we optimize the quadratic function 12 n (cid:80) i
( x Ti w − y i ) 2 , where the dataset { ( x i , y i ) } ni =1 is generated by the component decoupled model described in Section 3.
We compare the convergence behavior of SGD+Nesterov with SGD, as well as our proposed method, MaSS, and several other methods: SGD+HB, ASGD (8).
We select the best hyper-parameters from dense grid search for SGD+Nesterov (step-size and momentum parameter),
SGD+HB (step-size and momentum parameter) and SGD (step-size).
For MaSS, we do not tune the hyper-parameters but use the hyper-parameter setting suggested by our theoretical analysis in
Section 4; For ASGD, we use the setting provided by (8).
Hyperparameters: we use optimal parameters for SGD+Nesterov
SGD and SGD; the setting in (8) for
ASGD; Eq. 13 for
Fig.
4 shows the convergence behaviors of these algorithms on the setting of σ 21 = 1 , σ 22 = 1 / 2 9 .
We observe that the fastest convergence of SGD+Nesterov is almost identical to that of SGD, indicating the non-acceleration of
SGD+Nesterov.
We also observe that our proposed method,
MaSS, clearly outperforms the others.
In Appendix F.2, we provide additional experiments on more settings of the component decoupled data, and Gaussian distributed data.
We also show the divergence of SGD+Nesterov with the same step size as SGD and MaSS in Appendix F.2.
Real data: MNIST and CIFAR-10.
We compare the optimization performance of SGD, SGD+Nesterov and MaSS on the following tasks: classiﬁcation of MNIST with a fullyconnected network (FCN), classiﬁcation of CIFAR-10 with a convolutional neural network (CNN) and Gaussian kernel regression on MNIST.
See detailed description of the architectures in Appendix H.1.
In all the tasks and for all the algorithms, we select the best hyper-parameter setting over dense grid search, except that we ﬁx the momentum parameter γ = 0 .
9 for both SGD+Nesterov and MaSS, which is typically used in practice.
All algorithms are implemented with mini batches of size 64 for neural network training.
Fig.
5 shows the training curves of MaSS, SGD+Nesterov and SGD, which indicate the fast convergence of MaSS on real tasks, including the non-convex optimization problems on neural networks.
Test Performance.
We show that the solutions found by MaSS have good generalization performance.
We evaluate the classiﬁcation accuracy of MaSS, and compare with SGD, SGD+Nesterov and Adam, on different modern neural networks: CNN and ResNet (7).
See description of the architectures in Appendix H.1.
In the training processes, we follow the standard protocol of data augmentation and reduction of learning rate , which are typically used to achieve state-of-the-art results in neural networks.
In each task, we use the same initial learning rate for MaSS, SGD and
SGD+Nesterov, and run the same number of epochs ( 150 epochs for CNN and 300 epochs for
ResNet-32).
Detailed experimental settings are deferred to Appendix H.2.
[Table]
Table 6 compares the classiﬁcation accuracy of these algorithms on the test set of CIFAR-10 (average ofindependent runs).
We observe that MaSS produces the best test performance.
We also note that increasing initial learning rate may improves performance of
MaSS and SGD, but degrades that of
SGD+Nesterov.
Moreover, in our experiment, SGD+Nesterov with large step size η = 0 . 3 diverges in 5 out of 8 runs on CNN and 2 out of 5 runs on ResNet-32 (for random initialization), while MaSS and SGD converge on every run. A CKNOWLEDGEMENTS This research was in part supported by NSF funding and a Google Faculty Research Award.
GPUs donated by Nvidia were used for the experiments. We thank Ruoyu Sun for helpful comments concerning convergence rates. We thank Xiao Liu for helping with the empirical evaluation of our proposed method A P SEUDOCODE FOR M A SS
Require : Step-size η 1 , secondary step-size η 2 , acceleration parameter γ ∈ (0 , 1) .
Initialize : u 0 = w 0 .
while not converged do
[Equation]
u
[Equation]
end while
Output : weight w t .
Note that the proposed algorithm initializes the variables w 0 and u 0 with the same vector, which could be randomly generated.
As discussed in section 4, MaSS can be equivalently implemented using the following update rules:
[Equation]
19b
[Equation]
(19c)
In this case, variables u 0 , v 0 and w 0 should be initialized with the same vector.
There is a bijection between the hyper-parameters ( η 1 , η 2 , γ ) and ( η, α, δ ), which is given by:
[Equation]
[Equation]
B A DDITIONAL P RELIMINARIES B. S TRONG C ONVEXITY AND S MOOTHNESS OF F UNCTIONS
Deﬁnition 1 (Strong Convexity) .
A differentiable function f : R d → R is µ -strongly convex ( µ > 0 ), if
[Equation]
Deﬁnition 2 (Smoothness) .
A differentiable function f : R d → R is L -smooth
( L > 0 ),
if
[Equation]
B. A UTOMATIC V ARIANCE R EDUCTION
In the interpolation setting, one can write the square loss as
[Equation]
A key property of interpolation is that the variance of the stochastic gradient of decreases to zero as the weight w approaches an optimal solution w ∗ .
Proposition 1 (Automatic Variance Reduction) .
For the square loss function f in the interpolation setting, the stochastic gradient at an arbitrary point w can be written as
[Equation]
Moreover, the variance of the stochastic gradient
[Equation]
Since E [( ˜ H m − H ) 2 ] is independent of w , the above proposition unveils a linear dependence of variance of stochastic gradient on the norm square of error (cid:15) .
This observation underlies exponential convergence of SGD in certain convex settings (20; 13; 19; 14; 12).
B. O N IGNORING ZERO EIGENVALUES OF THE H ESSIAN
Consider the square loss function, f ( w ) = 12 n (cid:80) i ( x Ti w − y i ) 2 .
The (stochastic) gradient is
[Equation]
where the stochastic gradient is computed based on a randomly sampled batch of size m .
Recall that the solution set W ∗ := { w ∈ R d | f ( w ) = 0 } is an afﬁne subspace in the parameter space, and that w ∗ is the solution in W ∗ that is closest to w .
Hence, w − w ∗ is perpendicular to
W ∗ , i.e., w − w ∗ ∈
( W ∗ ) ⊥ .
Note that ( W ∗ ) ⊥ is an invariant space of H m , hence ˜ ∇ m f ( w ) =
H m ( w − w ∗ ) ∈
( W ∗ ) ⊥ .
Hence the (stochastic) gradient is perpendicular to W ∗ .
C P ROOF OF T HEOREM
The key proof technique is to consider the asymptotic behavior of SGD+Nesterov in the decoupled model of data when the condition number becomes large.
Notations and proof setup.
Recall that the square loss function based on the component decoupled data D , deﬁne in Eq.6, is in the interpolation regime, then for SGD+Nesterov, we have the recurrence relation
[Equation]
(26) where ˜ H = diag(( x [1] ) 2 , ( x [2] ) 2 ) .
It is important to note that each component of w t evolves independently, due to the fact that ˜ H is diagonal.
With (cid:15) :
= w − w ∗ , we deﬁne for each component j = 1 , 2 that
[Equation]
j = 1 , 2 , (27) where (cid:15)
[ j ] is the j -th component of vector (cid:15) .
The recurrence relation in Eq.26 can be rewritten as Φ [ j ] t +1 =
B [ j ] Φ [ j ] t , (28) with
B [ j ] =
E 
[Equation]
[Equation] [Equation]
) 0     =   (1 + γ
[Equation]
2 A [ j ] − γ (1 + γ )
A [ j ] − γ (1 + γ
[Equation]
A [ j ] γ 2 A [ j ] (1 + γ )(1 − ησ 2 j ) − γ (1 − ησ 2 j ) (1 + γ )(1 − ησ 2 j ) − γ (1 − ησ 2 j ) 0    
where A [ j ] :
= (1 − ησ 2 j ) 2 + 5( ησ 2 j ) 2 .
For the ease of analysis, we deﬁne u := 1 − γ ∈ (0 , 1] and t j :=
ησ 2 j , j = 1 , 2 .
Without loss of generality, we assume σ 21 = 1 in this section.
In this case, t 1 = η and t 2 =
η/κ , where κ is the condition number.
gives
B
[Equation]
where
[Equation]
t
[Equation]
+ 24 u
[Equation]
−
[Equation]
2058 ut
[Equation]
− 2646 u
[Equation] [Equation]
+1862 u 3 t 3 j − 756 u 4 t 3 j + 168 u 5 t 3 j − 16 u 6 t 3 j .
Proof idea.
For the two-dimensional component decoupled data, we have
[Equation]
By deﬁnition of Φ in Eq.27, we can see that the convergence rate is lower bounded by the convergence rates of the sequences {(cid:107) Φ [ j ] t (cid:107)} t .
By the relation Eq.28, we have that the convergence rate of the sequence {(cid:107) Φ t (cid:107)} t is controlled by the magnitude of the top eigenvalue λ max of B , if Φ t has nonzero component along the eigenvector of B with eigenvalue λ max ( B ) .
Speciﬁcally, if | λ max | > 1 , (cid:107) Φ
[ j ] t (cid:107) grows at a rate of | λ max | t , indicating the divergence of SGD+Nesterov; if | λ max | < 1 , then (cid:107) Φ [ j ] t (cid:107) converges at a rate of | λ max | t .
In the following, We use the eigen-systems of matrices B [ j ] , especially the top eigenvalue, to analyze the convergence behavior of SGD+Nesterov with any hyper-parameter setting.
We show that, for any choice of hyper-parameters (i.e., step-size and momentum parameter), at least one of the following statements must holds:
• B [1] has an eigenvalue larger than 1.
• B [2] has an eigenvalue of magnitude 1 − O (1 /κ ) .
This is formalized in the following two lemmas.
Lemma 1.
For any u ∈ (0 , 1] , if step size
[Equation]
then, B [1] has an eigenvalue larger than 1.
We will analyze the dependence of the eigenvalues on κ , when κ is large to obtain
Lemma 2.
For any u ∈ (0 , 1] , if step size
[Equation]
then, B [2] has an eigenvalue of magnitude 1 − O (1 /κ ) .
Finally, we show that Φ t has non-zero component along the eigenvector of B with eigenvalue λ max , hence the convergence of SGD+Nesterov is controlled by the eigenvalue of B [ j ] with the largest magnitude.
Lemma 3.
Assume SGD+Nesterov is initialized with w 0 such that both components (cid:104) w 0 − w ∗ , e 1 (cid:105) and (cid:104) w 0 − w ∗ , e 2 (cid:105) are non-zero.
Then, for all t > 2 , Φ [ j ] t has a non-zero component in the eigen direction of B [ j ] that corresponds to the eigenvalue with largest magnitude.
Remark 8.
When w is randomly initialized, the conditions (cid:104) w 0 − w ∗ , e 1 (cid:105) (cid:54) = 0 and (cid:104) w 0 − w ∗ , e 2 (cid:105) (cid:54) = 0 are satisﬁed with probability 1, since complementary cases form a lower dimensional manifold which has measure 0.
By combining Lemma 1, 2 and 3, we have that SGD+Nesterov either diverges or converges at a rate of (1 − O (1 /κ )) t , and hence, we conclude the non-acceleration of SGD+Nesterov.
In addition,
Corollary 1 is a special case of Theorem 1 and is proven by combining Lemma 1 and 3.
In high level, the proof ideas of Lemma 1 and 3 is analogous to those of (9), which proves the non-acceleration of stochastic Heavy Ball method over SGD.
But the proof idea of Lemma 2 is unique.
Proof of Lemma 1.
The characteristic polynomial of B j , j = 1 , 2 , are:
[Equation]
[Equation]
First note that lim λ →∞ D j ( λ ) =
+ ∞ > 0 .
In order to show B 1 has an eigenvalue larger than 1, it sufﬁces to verity that D 1 ( λ = 1) < 0 , because D j ( λ ) is continuous.
Replacing γ by 1 − u and ησ 21 by t 1 , we have
[Equation]
Solving for the inequality D 1 (1) < 0 , we have
[Equation]
for positive step size η .
Proof of Lemma 2.
We will show that at least one of the eigenvalues of B [2] is 1 − O (1 /κ ) , under the condition in Eq.32.
First, we note that t 2 = t 1 /κ =
η/κ , which is O (1 /κ ) .
We consider the following cases separately:
1) u is Θ( t 0 .
5 2 ) ; 2) u is o ( t 0 .
5 2 ) and ω ( t 2 ) ; 3) u is O ( t 2 ) ; 4) u is ω ( t 0 .
5 2 ) and o (1) and 5) u is Θ(1)
, the last of which includes the case where momentum parameter is a constant.
Note that, for cases 1-4, u is o (1) .
In such cases, the step size condition Eq.32 can be written as
[Equation]
It is interesting to note that η must be o (1) to not diverge, when u is o (1) .
This is very different to
SGD where a constant step size can result in convergence, see (12).
Case 1: u is Θ( t 0 .
In this case, the terms u 6 , u 4 t 2 , u 2 t 2 2 and t 3 2 are of the same order.
We ﬁnd that
[Equation]
Hence,
[Equation]
Write t 2 = cu 2 asymptotically for some constant c .
If 4 t 2 ≥ u 2 , i.e., 4 c − 1 ≥ 0 , then
[Equation]
If 4 t 2 ≤ u 2 , i.e., 4 c − 1 ≤ 0 , then
[Equation]
In either case, the ﬁrst-order term is of order u .
Recall that t 2 = η/κ , then we have
[Equation]
36) hence, u < c/κ = O (1 /κ ) .
Therefore, λ i , i = 1 , 2 , 3 , 4 are 1 − O (1 /κ ) .
Case 2: u is o ( t 0 .
5 2 ) and ω ( t 2 ) .
In this case,
[Equation] [Equation]
72 u
[Equation]
+ o ( t 22 ) .
Hence,
[Equation]
Assume u ∼ t α 2 .
When α ∈ (0 . 5 , 1) , note that t 2 = η/κ ≤ 2 u 3 κ = O
( t α 2 /κ ) , we have t 1 − α=
O (1 /κ ) , hence t 2 =
o
(1 /κ 2 ) .
This implies that t 0 .
5= o (1 /κ ) and u
= o (1 /κ ) .
Therefore, all the eigenvalues λ
i are of order 1 − O (1 /κ ) .
Case 3: u is O ( t 2 ) .
This case if forbidden by the assumption of this lemma.
This is because, t 2 =
η/κ ≤ 2 u 3 κ = o ( u ) ( 1 /κ is o (1) ).
This is contradictory to u is O ( t 2 ) .
Case 4: u is Ω( t 0 .
5 2 ) and o (1) .
In this case, we ﬁrst consider the terms independent of t 2 , i.e., constant term and u -only terms.
These terms can be obtained by putting t 2 = 0 .
In such a setting, the eigenvalues are simpliﬁed as:
[Equation]
= 1 − u.
Note that the u -only terms cancel in λ 2 , so the ﬁrst order after the constant term must be of t 2 (could be t 2 /u 2 , t 2 /u etc.).
In the following we are going to analyze the t 2 terms.
Since u is Ω( t 0 .
5 2 ) , u 2 has lower order than t 2 , and t 2 /u 2 is o (1) .
This allows us to do Taylor expansion:
[Equation]
where f ( u ) and g ( u ) are u -terms only, which, by the above analysis in Eq.37, are shown to contribute nothing to λ 2 .
Hence, we use the ﬁrst terms of T 1 and T 2 above to analyze the ﬁrst order term of λ 2 .
Plugging in these term to the expression of λ 2 , and keeping the lowest order of t 2 , we ﬁnd a zero coefﬁcient of the lowest order t 2 -term: t 2 /u 2 .
Hence, λ 2 can be written as:
[Equation]
where c is the coefﬁcient.
On the other hand, by Eq.35 and t 2 = η/κ , we have
[Equation]
Therefore, we can write Eq.38 as λ 2 = 1 − O (1 /κ ) .
Case 5: u is O (1) .
This is the case where the momentum parameter is κ -independent.
Using the same argument as in case 4, we have zero u -only terms.
Then, directly taking Taylor expansion with respect to t 2 results in:
[Equation]
Proof of Lemma 3.
This proof follows the idea of the proof for stochastic Heavy Ball method in (9).
The idea is to examine the subspace spanned by Φ [ j ] t , t = 0 , 1 , 2 , · · · , j = 1 , 2 , and to prove that the eigenvector of B [ j ] corresponding to top eigenvalue (i.e., eigenvalue with largest magnitude) is not orthogonal to this spanned subspace.
This in turn implies that there exists a non-zero component of Φ [ j ] t in the eigen direction of B [ j ] corresponding to top eigenvalue, and this decays/grows at a rate of λ tmax ( B [ j ] ) .
Recall that Φ [ j ] t +1 =
B
[ j ] Φ [ j ] t .
Hence, if Φ [ j ] t has non-zero component in the eigen direction of B [ j ] with top eigenvalue, then Φ [ j ] t should also have non-zero component in the same direction.
Thus, it sufﬁces to show that at least one of Φ [ j ] 0 , Φ [ j ] 1 , Φ [ j ] 2 and Φ [ j ] 3 has non-zero component in the eigen direction with top eigenvalue.
Since ˜ H is diagonal for this two-dimensional decoupled data, w [1] and w [2] evolves independently, and we can analyze each component separately.
In addition, it can be seen that each of the initial values w [ j ] 0 − ( w ∗ )
[ j ] , which is non-zero by the assumption of this lemma, just acts as a scale factor during the training.
Hence, without loss of generality, we can assume w [ j ] 0 − ( w ∗ ) [ j ] = 1 , for each j .
Then, according to the recurrence relation of SGD+Nesterov in Eq.26,
[Equation]
where s [ j ] t = 1 − η (˜ x [ j ] t ) 2 , t = 1 , 2 , 3 , · · · .
Denote the vectorized form of Φ [ j ] t as vec (Φ [ j ] t ) , which is a 4 × 1 column vector.
We stack the vectorized forms of Φ [ j ] 0 , Φ [ j ] 1 , Φ [ j ] 2 , Φ [ j ] 3 to make a 4 × 4 matrix, denoted as M [ j ] :
[Equation]
Note that Φ [ j ] t , t = 0 , 1 , 2 , 3 , are symmetric tensors, which implies that M [ j ] contains two identical rows.
Speciﬁcally, the second and third row of M [ j ] are identical.
Therefore, the vector v = (0 , − 1 / √ 2 , 1 / √ 2 , 0) T is an eigenvector of M [ j ] with eigenvalue 0.
In fact, v is also an eigenvector of B [ j ] with eigenvalue γ (1 − ησ 2 j ) .
Note that
[Equation]
Hence, v is not the eigenvector along top eigenvalue, and therefore, is orthogonal to the eigen space with top eigenvalue.
In order to prove at least one of Φ [ j ] t , t = 0 , 1 , 2 , 3 , has a non-zero component along the eigen direction of top eigenvalue, it sufﬁces to verify that M [ j ] is rank 3, i.e., spans a three-dimensional space.
Equivalently, we consider the following matrix
[Equation]
(cid:15)
[Equation]
−
[Equation]
(cid:15)
[Equation]
(cid:15)
[Equation]
[Equation]
where we omitted the superscript [ j ] for simplicity of the expression.
If the determinant of M (cid:48)
[ j ] is not zero, then it is full rank, and hence M [ j ] spans a three-dimensional space.
Plug in the expressions in Eq.41, then we have
[Equation]
where t j = ησ 2 j and u = 1 − γ .
det( M (cid:48)
[ j ] ) =
if and only if the polynomial 36 t 2 j − 18 ut 2 j + 6 ut j + 3 t j − 3 u + 1 = 0 .
Solving for this equation, we have
[Equation]
We note that, for all u ∈ [0 , 1) both t j are not positive.
This means that, for all u and positive t j , the determinant det( M (cid:48)
[ j ] ) can never be zero.
Therefore, for each j = 1 , 2 , M (cid:48)
[ j ] is full rank, and M [ j ] spans a three-dimensional space, which includes the eigenvector with the top eigenvalue of B [ j ] .
Hence, at least one of Φ [ j ] t , t ∈ { 0 , 1 , 2 , 3 } has non-zero component in the eigen direction with top eigenvalue.
By Φ [ j ] t +1 = B
[ j ] Φ [ j ] t , all succeeding Φ [ j ] t also have non-zero component in the eigen direction with top eigenvalue of B [ j ] .
Proof of Theorem 1.
Lemma 1 and 2 show that, for any hyper-parameter setting ( η, γ ) with η >and γ ∈ (0 , 1) , either top eigenvalue of B [1] is larger than 1 or top eigenvalue of B [2] is 1 − O (1 /κ ) .
Hence, | λ max | is either greater than 1 or is 1 − O (1 /κ ) .
Lemma 3 shows that Φ t has non-zero component along the eigenvector of B with eigenvalue λ max ( B ) .
By Eq.28 and Lemma 1 and 2, the sequence {(cid:107) Φ t (cid:107)} t either diverges or converges at a rate of (1 − O (1 /κ ) t .
By deﬁnition of Φ in Eq.27, we have that {(cid:107) (cid:15) t (cid:107)} t either diverges or converges at a rate of (1 − O (1 /κ )) t .
Note that, for the two-dimensional component decoupled data, we have
[Equation]
Therefore, the convergence rate of SGD+Nesterov is lower bounded by (1 − O (1 /κ )) t .
Note that the convergence rate of SGD on this data is (1 − O (1 /κ )) t , hence SGD+Nesterov does not accelerate
SGD on the two-dimensional component decoupled dataset.
Proof of Corollary 1.
When η = 1 /L 1 and γ ∈ [0 . 6 , 1] , the condition in Eq.31 is satisﬁed.
By
Lemma 1, the top eigenvalue λ [1] max of B [1] is larger than 1.
By Lemma 3, Φ [1] has non-zero component along the eigenvector with this top eigenvalue λ [1] max .
Hence, |(cid:104) w t − w ∗ , e 1 (cid:105)| grows at a rate of ( λ [1] max ) t .
D P ROOF OF T HEOREM
We ﬁrst give a lemma that is useful for dealing with the mini-batch scenario:
Lemma 4.
If square loss f is in the interpolated setting, i.e., there exists w ∗ such that f ( w ∗ ) = 0 , then E [ ˜ H m H − 1 ˜
H m ] − H (cid:22) 1 m (˜ κ − 1) H.
Proof.
[Equation]
Proof of Theorem 2.
By Eq.8, we have
[Equation]
Using the convexity of the norm (cid:107) · (cid:107) H − 1 and the fact that µ is the smallest non-zero eigenvalue of the Hessian
[Equation]
we get
[Equation]
Applying Lemma 4 on the term ˜ B
[Equation]
we have
[Equation]
Note that E [ ˜ H m ]
= H , then
[Equation] [Equation]
Therefore,
E (cid:2)
[Equation]
On the other hand
[Equation]
by the fact that E [ ˜ H 2 m ] (cid:22) 1 m E [ ˜ H 21 ] + m − 1 m H 2 , (see (12)),
[Equation]
Hence,
[Equation]
By the condition in Eq.
[Equation]
c 1 ≤
[Equation]
c 2 ≤
[Equation]
then the last two terms are non-positive.
Hence,
[Equation]
E P ROOF OF T HEOREM
Proof.
The update rule for variable v is, as in Eq.8:
[Equation]
By 1 /µ -strong convexity of g , we have
[Equation]
Taking expectation on both sides
[Equation]
we get
[Equation]
where in the last inequality we used the convexity of g and the assumption in the Theorem
[Equation]
By Eq.
[Equation]
By the strong convexity of g ,
[Equation]
Hence,
[Equation]
On the other hand,
[Equation]
where in the last inequality we used the convexity of f .
Multiply a factor of δ (1 − (cid:15) ) 2 α onto Eq.53 and add it to Eq.52, then
[Equation]
If the hyper-parameters are selected as:
[Equation]
then the last two terms in Eq.54 are non-positive.
Hence,
[Equation]
which implies
[Equation]
Since f ( w t ) ≤ L/ 2 · (cid:107) w t − w ∗ (cid:107) 2 (by smoothness), then we have the ﬁnal conclusion
[Equation]
58) with C being a constant.
F E VALUATION ON S YNTHETIC D ATA F. D ISCUSSION ON S YNTHETIC D ATASETS
Component Decoupled Data.
The data is deﬁned as follows (also deﬁned in section 3):
Fix an arbitrary w ∗ ∈ R 2 and let z be randomly drawn from the zero-mean Gaussian distribution with variance E [ z 2 ] = 2 , i.e. z ∼ N (0 , 2) .
The data points ( x , y ) ∈
D are constructed as follow:
[Equation]
y = (cid:104)
[Equation]
[Equation]
where e 1 , e 2 ∈ R 2 are canonical basis vectors, σ 1 > σ 2 > 0 .
Note that the corresponding square loss function on D is in the interpolation regime, since f ( w ∗ ) = 0 .
The Hessian and stochastic Hessian matrices turn out to be
[Equation]
[Equation]
Note that ˜ H is diagonal, which implies that stochastic gradient based algorithms applied on this data evolve independently in each coordinate.
This allows a simpliﬁed directional analysis of the algorithms applied.
Here we list some useful results for our analysis.
The fourth-moment of Gaussian variable E [ z 4 ] =
3 E [ z 2 ] 2 = 12 .
Hence, E [( x [ j ] ) 2 ] = σ 2 j and E [( x [ j ] ) 4 ] = 6 σ 4 j , where superscript j = 1 , 2 is the index for coordinates in R 2 .
It is easy to check that κ 1 = 6 σ 2 1 /σ 2 2 and ˜ κ = 6 .
Gaussian Data.
Suppose the data feature vectors { x i } are zero-mean Gaussian distributed, and
y i
= (cid:104) w ∗ , x i (cid:105) , ∀ i , where w ∗ is ﬁxed but unknown.
Then, by the fact that E [ z 1 z 2 z 3 z 4 ] =
E [ z 1 z 2 ] E [ z 3 z 4 ] + E
[ z 1 z 3 ] E [ z 2 z 4 ] + E
[ z 1 z 4 ] E [ z 2 z 3 ] for zero-mean Gaussian random variables z 1 , z 2 , z 3 and z 4 , we have
[Equation]
where d is the dimension of the feature vectors.
Hence L 1 = 2 λ max ( H ) + tr ( H ) and ˜ κ = 2 + d , and κ 1 = L 1 /µ .
This implies a convergence rate of O ( e − t/ √ (2+ d ) κ 1 ) of MaSS when batch size is 1.
Particularly, if the feature vectors are n -dimensional, e.g., as in kernel learning, then MaSS with mini batches of size 1 has a convergence rate of O ( e − t/ √ nκ 1 ) .
F. E VALUATION OF F AST C ONVERGENCE OF M A SS AND NON - ACCELERATION OF SGD+N ESTEROV
In this subsection, we show additional empirical veriﬁcation for the fast convergence of MaSS, as well as the non-acceleration of SGD+Nesterov, on synthetic data.
In addition, we show the divergence of SGD+Nesterov when using the same step size as SGD and MaSS, as indicated by
Corollary 1.
We consider two families of synthetic datasets:
• Component decoupled: (as deﬁned in Section 3).
Fix an arbitrary w ∗ ∈ R 2 with all components non-zero.
x i is drawn from N ( 0 , diag (2 σ 21 , 0)) or N ( 0 , diag (0 , 2 σ 22 )) with probability 0.5 each.
y i
= (cid:104) w ∗ , x i (cid:105) for all i .
• 3-d Gaussian : Fix an arbitrary w ∗ ∈ R 3 with all components non-zero.
x i are independently drawn from N ( 0 , diag ( σ 21 , σ 21 , σ 22 )) , and y i = (cid:104) w ∗ , x i (cid:105) for all i .
Non-acceleration of SGD+Nesterov and accelerated convergence of MaSS.
We compare MaSS with SGD and SGD+Nesterov on linear regression with the above datasets.
Each comparison is performed on either 3-d Gaussian or component decoupled data with ﬁxed σ 1 and σ 2 .
For each setting of ( σ 1 , σ 2 ) , we randomly select w ∗ , and generate 2000 samples for the dataset.
Batch sizes for all algorithms are set to be 1.
We report the performances of SGD, SGD+Nesterov and SGD+HB using their best hyper-parameter setting selected from dense grid search.
On the other hand, we do not tune hyper-parameters of MaSS, but use the suggested setting by our theoretical analysis, Eq. 14.
Speciﬁcally, we use
[Equation]
For ASGD, we use the setting suggested by (8).
Figure 6 (in addition to Fig 4) and Figure 7 show the curves of the compared algorithms under various data settings.
We observe that: 1)
SGD+Nesterov with its best hyper-parameters is almost identical to the optimal SGD; 2) MaSS, with the suggested hyper-parameter selections, converges faster than all of the other algorithms, especially SGD.
These observations are consistent with our theoretical results about non-acceleration of SGD+Nesterov, Theorem 1, and accelerated convergence of MaSS, Theorem 3.
Recall that MaSS differs from SGD+Nesterov by only a compensation term, this experiment illustrates the importance of this term.
Note that the vertical axis is log scaled.
Then the linear decrease of log losses in the plots implies an exponential loss decrease, and the slopes correspond to the coefﬁcients in the exponents.
Divergence of SGD+Nesterov with large step size.
As discussed in Corollary 1, SGD+Nesterov diverges with step size η ∗ = 1 /L 1 (when γ ∈ [0 . 6 , 1] ), which is the optimal choice of step size for both SGD and MaSS.
We run SGD+Nesterov, with step size η ∗ = 1 /L 1 , to optimize the square loss function on component decoupled data mentioned above.
Figure 8 shows the divergence of
SGD+Nesterov with two common choices of momentum parameter γ : 0 . 9 and 0 . 99 .
F. C OMPARISON OF V ASWANI ’ S METHOD (21) WITH SGD AND M A SS ON G AUSSIAN - DISTRIBUTED DATA
The analysis in Vaswani et.
al.
(21) is based on the strong growth condition (SGC).
Assuming SGC with the parameter ρ on the loss function they prove convergence rate (cid:16) 1 − (cid:112) 1 /ρ 2 κ (cid:17) t of their method (called SGD with Nesterov acceleration in their paper), where t is the iteration number.
In the following, we show that, on a simple (zero-mean) Gaussian distributed data, this rate is slower than that of SGD, which has a rate of (1 − 1 /κ ) t .
On the other hand, MaSS achieves the accelerated rate (cid:16) 1 − 1 / (cid:112) (2 + d ) κ (cid:17) t .
Consider the problem of minimizing the squared loss, f ( w )
=
(cid:80)
i f i ( w )
= 12 (cid:80)
i ( w T x i − y i ) 2 , over a zero-mean Gaussian distributed dataset, as deﬁned in F.1.
Then,
[Equation]
whereas,
[Equation]
According to the deﬁnition of SGC,
[Equation]
[Equation]
Hence the SGC parameter ρ must satisfy
[Equation]
where κ is the condition number.
In this case, the convergence rate (cid:16) 1 − (cid:112) 1 /ρ 2 κ (cid:17) t of Vaswani’s method would be slower than (cid:0) 1 − 1 /κ 3 / 2 (cid:1) t , which is slower than SGD.
On the other hand, MaSS accelerates over SGD on this dataset.
Recall from Section F.1 that, for this
Gaussian data, ˜ κ
= 2 + d , where d is the dimension of the the data.
According to Theorem 3, the convergence rate of MaSS is (cid:16) 1 − 1 / (cid:112) (2 + d ) κ (cid:17) t , which is faster than that of SGD.
G M INI - BATCH D EPENDENCE OF C ONVERGENCE S PEED AND O PTIMAL H YPER - PARAMETERS G. A NALYSIS
The two critical points are deﬁned as follow:
[Equation]
When m < m ∗ 1 , we have m <
L 1 /L and m < ˜ κ , which implies L m ≈ L 1 /m, κ m ≈ κ 1 /m and ˜ κ m ≈ ˜ κ/m .
Plugging into Eq.13, we ﬁnd that the optimal selection of hyper-parameters is approximated by:
[Equation]
and the convergence rate in Eq.16 is approximately O
( e − m · t/ √ κ 1 ˜ κ ) , the latter of which indicates a linear gains in convergence when m increases.
Now consider the following two cases: (i) For m ≥ L 1 /L , we have κ m ≤ 2 κ following the deﬁnition of L m in Eq.2; (ii) For m ≥ ˜ κ , ˜ κ m = ˜ κ/m + ( m − 1) /m ≤ 2 .
When either case holds m ≥ m ∗ 1 , the convergence rate (Eq.16) becomes
[Equation]
indicating that increasing the mini-batch size results in sublinear gain in the convergence speed, of at most √ m .
Moreover, in the saturation regime m > m ∗ 2 (i.e., when both conditions (i) and (ii) hold), the convergence rate is then upper-bounded by O (exp( − t 2 √ κ )) .
That implies that a single iteration of MaSS with mini-batch size m is equivalent up to a multiplicative factor of 2 to an iteration with full gradient.
G. E MPIRICAL V ERIFICATION
We empirically verify the three-regime partition observed in section 5 using zero-mean Gaussian data.
In this evaluation, we set the covariant matrix of the (zero-mean) Gaussian to be:
[Equation]
and generate 2000 samples following the Gaussian distribution N ( 0 , Σ) .
Recall from Examplethat, for zero-mean Gaussian data, L 1 = 2 λ max ( H )+ tr ( H ) and ˜ κ = 2+ d .
In this case, L 1 /L ≈and
˜ κ
≈ 50 .
The two critical values m ∗ 1 , m ∗ 2 of mini-batch size are then:
[Equation]
In the experiments, we run MaSS with a variaty of mini-batch size m , ranging from 1 to 160, on this Gaussian dataset.
For each training process, we compute the convergence speed s ( m ) , which is deﬁned to be the inverse of the number of iterations needed to achieve a training error of ε .
Running 1 iteration of MaSS with minibatch of size m is almost as effective as running s ( m ) /s
(1) iterations of MaSS with mini-batch of size 1.
Figure 9 demonstrates the convergence speed s ( m ) as a function of the mini-batch size m .
We see that the three regimes deﬁned by m ∗and m ∗ 2 coincide with the analysis in subsection 5: left (
H E XPERIMENTAL S ETUP H. N EURAL N ETWORK A RCHITECTURES
Fully-connected Network.
The fully-connected neural network has 3 hidden layers, with
ReLU-activated neurons in each layer.
After each hidden layer, there is a dropout layer with keep probability 0.5.
This network takes 784-dimensional vectors as input, and has 10 softmax-activated output neurons.
It has ≈ 99k trainable parameters in total.
Convolutional Neural Network (CNN).
The CNN we considered has three convolutional layers with kernel size of 5 × 5 and without padding.
The ﬁrst two convolutional layers have 64 channels each, while the last one has 128 channels.
Each convolutional layer is followed by a 2 × 2 max pooling layer with stride of 2.
On top of the last max pooling layer, there is a fully-connected
ReLU-activated layer of size 128 followed by the output layer of size 10 with softmax non-linearity.
A dropout layer with keep probability 0.5 is applied after the full-connected layer.
The CNN has ≈ 576k trainable parameters in total.
Residual Network (ResNet).
We train a ResNet (7) with 32 convolutional layers.
The ResNethas a sequence of 15 residual blocks: the ﬁrst 5 blocks have an output of shape 32 × 32 × 16 , the following 5 blocks have an output of shape 16 × 16 × 32 and the last 5 blocks have an output of shape 8 × 8 × 64 .
On top of these blocks, there is a 2 × 2 average pooling layer with stride of 2, followed by a output layer of size 10 with softmax non-linearity.
The ResNet-32 has ≈ 467k trainable parameters in total.
We use the fully-connected network to classify the MNIST dataset, and use CNN and ResNet to classify the CIFAR-10 dataset.
H. E XPERIMENTAL SETUP FOR TEST PERFORMANCE OF M A SS
The 3-layer CNN we use for this experiment is slightly different from the aforementioned one.
We insert a batch normalization (BN) layer after each convolution computation, and remove the dropout layer in the fully-connected phase.
Reduction of Learning Rate.
On both CNN and ResNet-32, we initialize the learning rate of
SGD, SGD+Nesterov and Mass using the same value, while that of Adam is set to 0.001, which is common default setting.
On CNN, the learning rates for all algorithms drop by 0.1 at 60 andepochs, and we train for total 150 epochs.
On ResNet-32, the learning rates drop by 0.1 at 150 and 225 epochs, and we train for total 300 epochs.
Whenever the learning rate of MaSS reduced, we restart the MaSS with the latest learned weights.
The reason for restarting is to avoid the mismatch between the large momentum term and small gradient descent update after the reduction of learning rate.
Data Augmentation.
We augment the Cifar-10 training data by enabling random horizontal ﬂip, random horizontal shift and random vertical shift of the images.
For the random shift of images, we allow a shift range of 10% of the image width or height.
Hyper-parameter Selection for MaSS.
Since the reduction of learning rate may affect the suggested value of δ (c.f. Eq.13), we consider ( η, α, ˜ κ m ) as independent hyper-parameters instead, where ˜ κ m =
η/ ( αδ ) .
Observing the fact that ˜ κ m ≤ κ m , we select ˜ κ m in the range (1 , 1 /α ) .
In our experiments, we set α = 0 .
05 , corresponding to the “momentum parameter” γ being 0 .
90 , which is commonly used in Nesterov’s method.
We ﬁnd that good choices of ˜ κ m often locate in the interval [2 , 25] for mini-batch size m = 64 in our experiments.
The classiﬁcation results of MaSS in Table 6 are obtained under the following hyper-parameter settings:
• CNN : η = 0 .
01 (initial), α = 0 .
05 , ˜ κ m = 3 ; η = 0 .
3 (initial), α = 0 .
05 , ˜ κ m = 6 .
• ResNet-32 : η = 0 .
1 (initial), α = 0 .
05 , ˜ κ m = 2 ; η = 0 .
3 (initial), α = 0 .
05 , ˜ κ m = 24 .