AN EXPONENTIAL LEARNING RATE SCHEDULE FOR DEEP LEARNING
Year: 2020

Abstract:
Intriguing empirical evidence exists that deep learning can work well with exotic schedules for varying the learning rate. This paper suggests that the phenomenon may be due to Batch Normalization or BN(Ioffe & Szegedy, 2015), which is ubiquitous and provides benefits in optimization and generalization across all standard architectures. The following new results are shown about BN with weight decay and momentum (in other words, the typical use case which was not considered in earlier theoretical analyses of stand-alone BN (Ioffe & Szegedy, 2015; Santurkar et al., 2018; Arora et al., 2018) • Training can be done using SGD with momentum and an exponentially increasing learning rate schedule, i.e., learning rate increases by some (1 + α) factor in every epoch for some α > 0. (Precise statement in the paper.) To the best of our knowledge this is the first time such a rate schedule has been successfully used, let alone for highly successful architectures. As expected, such training rapidly blows up network weights, but the network stays wellbehaved due to normalization. • Mathematical explanation of the success of the above rate schedule: a rigorous proof that it is equivalent to the standard setting of BN + SGD + Standard Rate Tuning + Weight Decay + Momentum. This equivalence holds for other normalization layers as well, Group Normalization(Wu & He, 2018), Layer Normalization(Ba et al., 2016), Instance Norm(Ulyanov et al., 2016), etc. • A worked-out toy example illustrating the above linkage of hyperparameters. Using either weight decay or BN alone reaches global minimum, but convergence fails when both are used.

text: • Training can be done using SGD with momentum and an exponentially increasing learning rate schedule, i.e., learning rate increases by some (1 + α) factor in every epoch for some α > 0. (Precise statement in the paper.) To the best of our knowledge this is the first time such a rate schedule has been successfully used, let alone for highly successful architectures. As expected, such training rapidly blows up network weights, but the network stays wellbehaved due to normalization.
• Mathematical explanation of the success of the above rate schedule: a rigorous proof that it is equivalent to the standard setting of BN + SGD + Standard Rate Tuning + Weight Decay + Momentum. This equivalence holds for other normalization layers as well, Group Normalization(Wu & He, 2018), Layer Normalization(Ba et al., 2016), Instance Norm(Ulyanov et al., 2016), etc.
• A worked-out toy example illustrating the above linkage of hyperparameters. Using either weight decay or BN alone reaches global minimum, but convergence fails when both are used.
1 INTRODUCTION
Batch Normalization (BN) offers significant benefits in optimization and generalization across architectures, and has become ubiquitous. Usually best performance is attained by adding weight decay and momentum in addition to BN.
Usually weight decay is thought to improve generalization by controlling the norm of the parameters. However, it is fallacious to try to separately think of optimization and generalization because we are dealing with a nonconvex objective with multiple optima. Even slight changes to the training surely lead to a different trajectory in the loss landscape, potentially ending up at a different solution! One needs trajectory analysis to have a hope of reasoning about the effects of such changes.
In the presence of BN and other normalization schemes, including GroupNorm, LayerNorm, and InstanceNorm, the optimization objective is scale invariant to the parameters, which means rescaling parameters would not change the prediction, except the parameters that compute the output which do not have BN. However, Hoffer et al. (2018b) shows that fixing the output layer randomly doesn’t harm the performance of the network. So the trainable parameters satisfy scale invariance.(See more in Appendix E) The current paper introduces new modes of analysis for such settings. This rigorous analysis yields the surprising conclusion that the original learning rate (LR) schedule and weight decay(WD) can be folded into a new exponential schedule for learning rate: in each iteration multiplying it by (1 + α) for some α > 0 that depends upon the momentum and weight decay rate.
Theorem 1.1 (Main, Informal). SGD on a scale-invariant objective with initial learning rate η, weight decay factor λ, and momentum factor γ is equivalent to SGD with momentum factor γ where at iteration t, the learning rate η̃t in the new exponential learning rate schedule is defined as η̃t = α −2t−1η without weight decay(λ̃ = 0) where α is a non-zero root of equation
x2 − (1 + γ − λη)x+ γ = 0, (1)
Specifically, when momentum γ = 0, the above schedule can be simplified as η̃t = (1−λη)−2t−1η.
The above theorem requires that the product of learning rate and weight decay factor, λη, is small than (1−√γ)2, which is almost always satisfied in practice. The rigorous and most general version of above theorem is Theorem 2.12, which deals with multi-phase LR schedule, momentum and weight decay.
There are other recently discovered exotic LR schedules, e.g. Triangular LR schedule(Smith, 2017) and Cosine LR schedule(Loshchilov & Hutter, 2016), and our exponential LR schedule is an extreme example of LR schedules that become possible in presence of BN. Such an exponential increase in learning rate seems absurd at first sight and to the best of our knowledge, no deep learning success has been reported using such an idea before. It does highlight the above-mentioned viewpoint that in deep learning, optimization and regularization are not easily separated. Of course, the exponent trumps the effect of initial lr very fast (See Figure 4), which explains why training with BN and WD is not sensitive to the scale of initialization, since with BN, tuning the scale of initialization is equivalent to tuning the initial LR η while fixing the product of LR and WD, ηλ (See Lemma 2.7).
Note that it is customary in BN to switch to a lower LR upon reaching a plateau in the validation loss. According to the analysis in the above theorem, this corresponds to an exponential growth with a smaller exponent, except for a transient effect when a correction term is needed for the two processes to be equivalent (see discussion around Theorem 2.12).
Thus the final training algorithm is roughly as follows: Start from a convenient LR like 0.1, and grow it at an exponential rate with a suitable exponent. When validation loss plateaus, switch to an exponential growth of LR with a lower exponent. Repeat the procedure until the training loss saturates.
In Section 3, we demonstrate on a toy example how weight decay and normalization are inseparably involved in the optimization process. With either weight decay or normalization alone, SGD will achieve zero training error. But with both turned on, SGD fails to converge to global minimum.
In Section 4, we experimentally verify our theoretical findings on CNNs and ResNets. We also construct better exponential LR schedules by incorporating the Cosine LR schedule on CIFAR10, which opens the possibility of even more general theory of rate schedule tuning towards better performance.
1.1 RELATED WORK
There have been other theoretical analyses of training models with scale-invariance. (Cho & Lee, 2017) proposed to run Riemanian gradient descent on Grassmann manifold G(1, n) since the weight matrix is scaling invariant to the loss function. observed that the effective stepsize is proportional to
ηw ‖wt‖2 . (Arora et al., 2019) show the gradient is always perpendicular to the current parameter vector which has the effect that norm of each scale invariant parameter group increases monotonically, which has an auto-tuning effect. (Wu et al., 2018) proposes a new adaptive learning rate schedule motivated by scale-invariance property of Weight Normalization.
Previous work for understanding Batch Normalization. (Santurkar et al., 2018) suggested that the success of BNhas does not derive from reduction in Internal Covariate Shift, but by making landscape smoother. (Kohler et al., 2018) essentially shows linear model with BN could achieve exponential convergence rate assuming gaussian inputs, but their analysis is for a variant of GD with an inner optimization loop rather than GD itself. (Bjorck et al., 2018) observe that the higher learning rates enabled by BN empirically improves generalization. (Arora et al., 2019) prove that with certain mild assumption, (S)GD with BN finds approximate first order stationary point with any fixed learning rate. None of the above analyses incorporated weight decay, but (Zhang et al., 2019; Hoffer et al., 2018a; van Laarhoven, 2017) argued qualitatively that weight decay makes parameters
have smaller norms, and thus the effective learning rate, ηw‖wt‖2 is larger. They described experiments showing this effect but didn’t have a closed form theoretical analysis like ours. None of the above analyses deals with momentum rigorously.
1.2 PRELIMINARIES AND NOTATIONS
For batch B = {xi}Bi=1, network parameter θ, we denote the network by fθ and the loss function at iteration t by Lt(fθ) = L(fθ,Bt) . When there’s no ambiguity, we also use Lt(θ) for convenience. We say a loss function L(θ) is scale invariant to its parameter θ is for any c ∈ R+, L(θ) = L(cθ). In practice, the source of scale invariance is usually different types of normalization layers, including Batch Normalization (Ioffe & Szegedy, 2015), Group Normalization (Wu & He, 2018), Layer Normalization (Ba et al., 2016), Instance Norm (Ulyanov et al., 2016), etc.
Implementations of SGD with Momentum/Nesterov comes with subtle variations in literature. We adopt the variant from Sutskever et al. (2013), also the default in PyTorch (Paszke et al., 2017). L2 regularization (a.k.a. Weight Decay) is another common trick used in deep learning. Combining them together, we get the one of the mostly used optimization algorithms below.
Definition 1.2. [SGD with Momentum and Weight Decay] At iteration t, with randomly sampled batch Bt, update the parameters θt and momentum vt as following:
θt =θt−1 − ηt−1vt (2) vt =γvt−1 +∇θ ( Lt(θt−1) +
λt−1 2
‖θt−1‖2 ) , (3)
where ηt is the learning rate at epoch t, γ is the momentum coefficient, and λ is the factor of weight decay. Usually, v0 is initialized to be 0.
For ease of analysis, we will use the following equivalent of Definition 1.2.
θt − θt−1 ηt−1 = γ θt−1 − θt−2 ηt−2 −∇θ
( (L(θt−1) +
λt−1 2
‖θt−1‖22 ) , (4)
where η−1 and θ−1 must be chosen in a way such that v0 = θ0−θ−1
η−1 is satisfied, e.g. when v0 = 0,
θ−1 = θ0 and η−1 could be arbitrary.
A key source of intuition is the following simple lemma about scale-invariant networks Arora et al. (2019). The first property ensures GD (with momentum) always increases the norm of the weight.(See Lemma C.1 in Appendix C) and the second property says that the gradients are smaller for parameteres with larger norm, thus stabilizing the trajectory from diverging to infinity.
Lemma 1.3 (Scale Invariance). If for any c ∈ R+, L(θ) = L(cθ), then (1). 〈∇θL,θ〉 = 0; (2). ∇θL ∣∣ θ=θ0 = c∇θL ∣∣ θ=cθ0 , for any c > 0
2 DERIVING EXPONENTIAL LEARNING RATE SCHEDULE
As a warm-up in Section 2.1 we show that if momentum is turned off then Fixed LR + Fixed WD can be translated to an equivalent Exponential LR. In Section 2.2 we give a more general analysis on the equivalence between Fixed LR + Fixed WD + Fixed Momentum Factor and Exponential LR + Fixed Momentum Factor. While interesting, this still does completely apply to real-life deep learning where reaching full accuracy usually requires multiple phases in training where LR is fixed within a phase and reduced by some factor from one phase to the next. Section 2.3 shows how to interpret such a multi-phase LR schedule + WD + Momentum as a certain multi-phase exponential LR schedule with Momentum.
2.1 REPLACING WD BY EXPONENTIAL LR IN MOMENTUM-FREE SGD
We use notation of Section 1.2 and assume LR is fixed over iterations, i.e. ηt = η0, and γ (momentum factor) is set as 0. We also use λ to denote WD factor and θ0 to denote the initial parameters.
The intuition should be clear from Lemma 1.3, which says that shrinking parameter weights by factor ρ (where ρ < 1) amounts to making the gradient ρ−1 times larger without changing its direction. Thus in order to restore the ratio between original parameter and its update (LR×Gradient), the easiest way would be scaling LR by ρ2. This suggests that scaling the parameter θ by ρ at each step is equivalent to scaling the LR η by ρ−2.
To prove this formally we use the following formalism. We’ll refer to the vector (θ, η) the state of a training algorithm and study how this evolves under various combinations of parameter changes. We will think of each step in training as a mapping from one state to another. Since mappings can be composed, any finite number of steps also correspond to a mapping. The following are some basic mappings used in the proof.
1. Run GD with WD for a step: GDρt (θ, η) = (ρθ − η∇Lt(θ), η); 2. Scale the parameter θ: Πc1(θ, η) = (cθ, η);
3. Scale the LR η: Πc2(θ, η) = (θ, cη).
For example, when ρ = 1, GD1t is vanilla GD update without WD, also abbreviated as GDt. When ρ = 1−λη0, GD1−λη0t is GD update with WD λ and LR η0. Here Lt is the loss function at iteration t, which is decided by the batch of the training samples Bt in tth iteration. Below is the main result of this subsection, showing our claim that GD + WD ⇔ GD+ Exp LR (when Momentum is zero). It will be proved after a series of lemmas.
Theorem 2.1 (WD ⇔ Exp LR). For every ρ < 1 and positive integer t following holds:
GDρt−1 ◦ · · · ◦ GD ρ 0 =
[ Πρ t
1 ◦Π ρ2t 2
] ◦Πρ −1 2 ◦ GDt−1 ◦Π ρ−2 2 ◦ · · · ◦ GD1 ◦Π ρ−2 2 ◦ GD0 ◦Π ρ−1 2 .
With WD being λ, ρ is set as 1 − λη0 and thus the scaling factor of LR per iteration is ρ−2 = (1− λη0)−2, except for the first iteration it’s ρ−1 = (1− λη0)−1. We first show how to write GD update with WD as a composition of above defined basic maps.
Lemma 2.2. GDρt = Π ρ 2 ◦Π ρ 1 ◦ GDt ◦Π
ρ−1 2 .
Below we will define the proper notion of equivalence such that (1). Πρ1 ∼ Π ρ−2
2 , which implies GDρt ∼ Π ρ−1 2 ◦ GDt ◦Π ρ−1 2 ; (2) the equivalence is preserved under future GD updates.
We first extend the equivalence between weights (same direction) to that between states, with additional requirement that the ratio between the size of GD update and that of parameter are the same among all equivalent states, which yields the notion of Equivalent Scaling.
Definition 2.3 (Equivalent States). (θ, η) is equivalent to (θ′, η′) iff ∃c > 0, (θ̃, η̃) = [Πc1 ◦ Πc 2
2 ](θ, η) = (cθ, c 2η), which is also denoted by (θ̃, η̃) c∼ (θ, η). Πc1 ◦ Πc 2
2 is called Equivalent Scaling for all c > 0.
The following lemma shows that equivalent scaling commutes with GD update with WD, implying that equivalence is preserved under GD update (Lemma 2.4). This anchors the notion of equivalence — we could insert equivalent scaling anywhere in a sequence of basic maps(GD update, LR/parameter scaling), without changing the final network.
Lemma 2.4. For any constant c, ρ > 0 and t ≥ 0, GDρt ◦ [Πc1 ◦Πc 2 2 ] = [Π c 1 ◦Πc 2 2 ] ◦ GD ρ t .

heading: In other words, (θ, η) c∼ (θ′, η′) =⇒ GDρt (θ, η)
text: c∼ GDρt (θ′, η′).
Now we formally define equivalence relationship between maps using equivalent scalings.
Definition 2.5 (Equivalent Maps). Two maps F,G are equivalent iff ∃c > 0, F = Πc1 ◦ Πc 2 2 ◦ G, which is also denoted by F c∼ G.
Proof of Theorem 2.1. By Lemma 2.2,, GDρt ρ∼ Πρ
−1 2 ◦ GDt ◦ Π ρ−1
2 . By Lemma 2.4, GD update preserves map equivalence, i.e. F c∼ G ⇒ GDρt ◦ F c∼ GDρt ◦G, ∀c, ρ > 0. Thus,
GDρt−1 ◦ · · · ◦ GD ρ 0
ρt∼ Πρ −1 2 ◦ GDt−1 ◦Π ρ−2 2 ◦ · · · ◦ GD1 ◦Π ρ−2 2 ◦ GD0 ◦Π ρ−1 2 .
η̃t
= constant. Reason being that according to the proof it is essentially the norm square of
the weights when trained with Fixed LR + WD + Momentum, and published hyperparameters kept this norm roughly constant during training.
2.2 REPLACING WD BY EXPONENTIAL LR: CASE OF CONSTANT LR WITH MOMENTUM
In this subsection the setting is the same to that in Subsection 2.1 except that the momentum factor is γ instead of 0. Suppose the initial momentum is v0, we set θ−1 = θ0 − v0η. Presence of momentum requires representing the state of the algorithm with four coordinates, (θ, η,θ′, η′), which stand respectively for the current parameters/LR and the buffered parameters/LR (from last iteration) respectively. Similarly, we define the following basic maps and equivalence relationships.
1. Run GD with WD for a step: GDρt (θ, η,θ ′, η′) =
( ρθ + η ( γ θ−θ ′ η′ −∇Lt(θ) ) , η,θ, η ) ;
2. Scale Current parameter θ Πc1(θ, η,θ ′, η′) = (cθ, η,θ′, η′); 3. Scale Current LR η: Πc2(θ, η,θ ′, η′) = (θ, cη,θ′, η′); 4. Scale Buffered parameter θ′: Πc3(θ, η,θ ′, η′) = (θ, η, cθ′, η′); 5. Scale Buffered parameter η′: Πc4(θ, η,θ ′, η′) = (θ, η,θ′, cη′).
Definition 2.6 (Equivalent States). (θ, η,θ′, η′) is equivalent to (θ̃, η̃, θ̃′, η̃′) iff ∃c > 0, (θ, η,θ′, η′) = [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] (θ̃, η̃, θ̃′, η̃′) = (cθ̃, c2η̃, cθ̃′, c2η̃′), which is also denoted
by (θ, η,θ′, η′) c∼ (θ̃, η̃, θ̃′, η̃′). We call Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 Equivalent Scalings for all c > 0.
Again by expanding the definition, we show equivalent scalings commute with GD update. Lemma 2.7. ∀c, ρ > 0 and t ≥ 0, GDρt ◦ [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] = [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] ◦ GDρt .
Similarly, we can rewrite GDρt as a composition of vanilla GD update and other scalings by expanding the definition, when the current and buffered LR are the same in the input of GDρt . Lemma 2.8. For any input (θ, η,θ′, η), if α > 0 is a root of α+ γα−1 = ρ+ γ, then GDρt (θ, η,θ ′, η) = [ Πα4 ◦Πα2 ◦Πα1 ◦ GDt ◦Πα −1 2 ◦Πα3 ◦Πα4 ] (θ, η,θ′, η). In other words,
GDρt (θ, η,θ ′, η)
α∼ [ Πα −1 3 ◦Πα −1 4 ◦Πα −1 2 ◦ GDt ◦Πα −1 2 ◦Πα3 ◦Πα4 ] (θ, η,θ′, η). (5)
Though looking complicated, the RHS of Equation 5 is actually the desired Πα −1 2 ◦ GDt ◦ Πα −1 2 conjugated with some scaling on momentum part Πα3 ◦Πα4 , and Πα −1 3 ◦Πα −1
4 in the current update cancels with the Πα3 ◦ Πα4 in the next update. Now we are ready to show the equivalence between WD and Exp LR schedule when momentum is turned on for both.
Theorem 2.9 (GD + WD ⇔ GD+ Exp LR; With Momentum). The following defined two sequences of parameters ,{θt}∞t=0 and {θ̃t}∞t=0, satisfy θ̃t = αtθt, thus they correspond to the same networks in function space, i.e. fθt = fθ̃t , ∀t ∈ N, given θ̃0 = θ0, θ̃−1 = θ−1α, and η̃t = η0α −2t−1.
1. θt−θt−1η0 = γ(θt−1−θt−2) η0 −∇θ(L(θt−1) + λ2 ‖θt−1‖ 2 2)
2. θ̃t−θ̃t−1η̃t = γ(θ̃t−1−θ̃t−2) η̃t−1 −∇θL(θ̃t−1)
where α is a positive root of equation x2 − (1 + γ − λη0)x+ γ = 0, which is always smaller than 1(See Appendix B.1). When γ = 0, α = 1− λη0 is the unique non-zero solution. Remark 2.10. Above we implicitly assume that λη0 ≤ (1 − √ γ)2 such that the roots are real and this is always true in practice. For instance of standard hyper-parameters where γ = 0.9, η0 = 0.1,λ = 0.0005, λη0(1−√γ)2 ≈ 0.019 ≪ 1. Proof. Note that (θ̃0, η̃0, θ̃−1, η̃−1) = [ Πα −1 2 ◦Πα3 ◦Πα4 ] (θ0, η0,θ0, η0), it suffices to show that [ Πα −1 3 ◦Πα −1 4 ◦Πα −1 2 ◦ GDt−1 ◦Πα −2 2 ◦ · · · ◦ GD1 ◦Πα −2 2 ◦ GD0 ◦Πα −1 2 ◦Πα3 ◦Πα4 ] (θ0, η0,θ0, η0)
αt∼ GD1−λη0t−1 ◦ · · · ◦ GD 1−λη0 0 (θ0, η0,θ0, η0), ∀t ≥ 0.
which follows immediately from Lemma 2.7 and Lemma 2.8 by induction.
2.3 REPLACING WD BY EXPONENTIAL LR: CASE OF MULTIPLE LR PHASES
Usual practice in deep learning shows that reaching full training accuracy requires reducing the learning rate a few times. Definition 2.11. Step Decay is the (standard) learning rate schedule, where training has K phases I = 0, 1, . . . ,K − 1, where phase I starts at iteration TI (T0 = 0), and all iterations in phase I use a fixed learning rate of η∗I .
The algorithm state in Section 2.2, consists of 4 components including buffered and current LR. When LR changes, the buffered and current LR are not equal, and thus Lemma 2.8 cannot be applied any more. In this section we show how to fix this issue by adding extra momentum correction. In detail, we show the below defined Exp LR schedule leads the same trajectory of networks in function space, with one-time momentum correction at the start of each phase. We empirically find on CIFAR10 that ignoring the correction term does not change performance much. Theorem 2.12 (Tapered-Exponential LR Schedule). There exists a way to correct the momentum only at the first iteration of each phase, such that the following Tapered-Exponential LR schedule (TEXP) {η̃t} with momentum factor γ and no WD, leads the same sequence networks in function space as that of Step Decay LR schedule(Definition 2.11) with momentum factor γ and WD λ.
η̃t = { η̃t−1 × (α∗I−1)−2 if TI−1 + 1 ≤ t ≤ TI − 1, I ≥ 1; η̃t−1 × η ∗ I
η∗I−1 × (α∗I)−1(α∗I−1)−1 if t = TI , I ≥ 1,
(6)
where α∗I = 1+γ−λη∗I+
√ (1+γ−λη∗I )
2−4γ 2 , η̃0 = η0 · (α ∗ 0)
−1 = η∗0 · (α∗0)−1. The analysis in previous subsection give the equivalence within each phase, where the same LR is used throughout the phase. To deal with the difference between buffered LR and current LR when entering new phases, the idea is to pretend ηt−1 = ηt and θt−1 becomes whatever it needs to maintain θt−θt−1ηt−1 such that we can again apply Lemma 2.8, which requires the current LR of the input state is equal to its buffered LR. Because scaling α in RHS of Equation 5 is different in different phases, so unlike what happens within each phase, they don’t cancel with each other at phase transitions, thus remaining as a correction of the momentum. The proofs are delayed to Appendix B, where we proves a more general statement allowing phase-dependent WD, {λI}K−1I=0 .
Alternative interpretation of Step Decay to exponential LR schedule:Below we present a new LR schedule, TEXP++, which is exactly equivalent to Step Decay without the need of one-time correction of momentum when entering each phase. We further show in Appendix B.1 that when translating from Step Decay, the TEXP++ we get is very close to the original TEXP(Equation 9), i.e. the ratio between the LR growth per round, η̃t+1η̃t / η̃′t+1 η̃′t
converges to 1 exponentially each phase. For example, with WD 0.0005, max LR 0.1, momentum factor 0.9, the ratio is within 1± 0.0015 ∗ 0.9t−TI , meaning TEXP and TEXP++ are very close for Step Decay with standard hyperparameters.
Theorem 2.13. The following two sequences of parameters ,{θt}∞t=0 and {θ̃t}∞t=0, define the same sequence of network functions, i.e. fθt = fθ̃t , ∀t ∈ N, given the initial conditions, θ̃0 = P0θ0, θ̃−1 = P−1θ−1.
1. θt−θt−1ηt−1 = γ θt−1−θt−2 ηt−2 −∇θ
( (L(θt−1) + λt−1 2 ‖θt−1‖ 2 2 ) , for t = 1, 2, . . .;
2. θ̃t−θ̃t−1η̃t−1 = γ θ̃t−1−θ̃t−2 η̃t−2 −∇θL(θ̃t−1), for t = 1, 2, . . .,
where η̃t = PtPt+1ηt, Pt = t∏
i=−1 α−1i , ∀t ≥ −1 and αt recursively defined as
αt = −ηt−1λt−1 + 1 + ηt−1 ηt−2 γ(1− α−1t−1), ∀t ≥ 1. (7)
The LR schedule {η̃t}∞t=0 is called Tapered Exponential ++, or TEXP++.
3 EXAMPLE ILLUSTRATING INTERPLAY OF WD AND BN
The paper so far has shown that effects of different hyperparameters in training are not easily separated, since their combined effect on the trajectory is complicated. We give a simple example to illustrate this, where convergence is guaranteed if we use either BatchNorm or weight decay in isolation, but convergence fails if both are used. (Momentum is turned off for clarity of presentation)
Setting: Suppose we are fine-tuning the last linear layer of the network, where the input of the last layer is assumed to follow a standard Gaussian distribution N (0, Im), and m is the input dimension of last layer. We also assume this is a binary classification task with logistic loss, l(u, y) = ln(1 + exp(−uy)), where label y ∈ {−1, 1} and u ∈ R is the output of the neural network. The training algorithm is SGD with constant LR and WD, and without momentum. For simplicity we assume the batch size B is very large so we could assume the covariance of each batch Bt concentrates and is approximately equal to identity, namely 1B ∑B i=1 xt,bx ⊤ t,b ≈ Im. We also assume the the input of the last layer are already separable, and w.l.o.g. we assume the label is equal to the sign of the first coordinate of x ∈ Rm, namely sign (x1) . Thus the training loss and training error are simply
L(w) = E x∼N (0,Im),y=sign(x1)
[ ln(1 + exp(−x⊤wy)) ] , Pr
x∼N (0,Im),y=sign(x1)
[ x⊤wy ≤ 0 ] = 1
π arccos w1 ‖w‖
Case 1: WD alone: Since both the above objective with L2 regularization is strongly convex and smooth in w, vanilla GD with suitably small learning rate could get arbitrarily close to the global minimum for this regularized objective. In our case, large batch SGD behaves similarly to GD and can achieve O( √
ηλ B ) test error following the standard analysis of convex optimization.
Case 2: BN alone: Add a BN layer after the linear layer, and fix scalar and bias term to 1 and 0. The objective becomes
LBN (w) = E x∼N (0,Im),y=sign(x1) [LBN (w,x)] = E x∼N (0,Im),y=sign(x1) [ ln(1 + exp(−x⊤ w‖w‖y)) ] .
From Appendix B.6, there’s some constant C, such that ∀w ∈ Rm with constant probability, ‖∇wLBN (w,x)‖ ≥ C‖w‖ . By Pythagorean Theorem, ‖wt+1‖
4 = (‖wt‖2 + η2‖∇wLBN (wt,x)‖2)2 ≥ ‖wt‖4 + 2η2‖wt‖2‖∇wLBN (wt,x)‖2. As a result, for any fixed learning rate, ‖wt+1‖4 ≥ 2 ∑t i=1 η
2‖w‖2‖∇wLBN (wi,x)‖2 grows at least linearly with high probability. Following the analysis of Arora et al. (2019), this is like reducing the effective learning
rate, and when ‖wt‖ is large enough, the effective learning rate is small enough, and thus SGD can find the local minimum, which is the unique global minimum.
Case 3: Both BN and WD: Suppose WD factor is λ, LR is η, we have the following theorem: Theorem 3.1. [Nonconvergence] Starting from iteration any T0, with probability 1 − δ over the randomness of samples, the training error will be larger than επ at least once for the following consecutive 12(ηλ−2ε2) ln 64‖wT0‖ 2ε √ B η √ m−2 + 9 ln 1 δ iterations.
Sketch. (See full proof in Appendix B.) The high level idea of this proof is that if the test error is low, the weight is restricted in a small cone around the global minimum, and thus the amount of the gradient update is bounded by the size of the cone. In this case, the growth of the norm of the weight by Pythagorean Theorem is not large enough to cancel the shrinkage brought by weight decay. As a result, the norm of the weight converges to 0 geometrically. Again we need to use the lower bound for size of the gradient, that ‖∇wLt‖ = Θ( η √ m
‖wt‖ ) holds with constant probability. Thus the size of the gradient will grow along with the shrinkage of ‖wt‖ until they’re comparable, forcing the weight to leave the cone in next iteration.
4 EXPERIMENTS
The translation to exponential LR schedule is exact except for one-time momentum correction term entering new phases. The experiments explore the effect of this correction term. The Tapered Exponential(TEXP) LR schedule contains two parts when entering a new phase I: an instant LR decay ( ηIηI−1 ) and an adjustment of the growth factor (α ∗ I−1 → α∗I ). The first part is relative small compared to the huge exponential growing. Thus a natural question arises: Can we simplify TEXP LR schedule by dropping the part of instant LR decay?
Also, previously we have only verified our equivalence theorem in Step Decay LR schedules. But it’s not sure how would the Exponential LR schedule behave on more rapid time-varying LR schedules such as Cosine LR schedule.
Settings: We train PreResNet32 on CIFAR10. The initial learning rate is 0.1 and the momentum is 0.9 in all settings. We fix all the scalar and bias of BN, because otherwise they together with the following conv layer grow exponentially, sometimes exceeding the range of Float32 when trained with large growth rate for a long time. We fix the parameters in the last fully connected layer for scale invariance of the objective.
4.1 THE BENEFIT OF INSTANT LR DECAY
We tried the following LR schedule (we call it TEXP--). Interestingly, up to correction of momentum when entering a new phase, this schedule is equivalent to a constant LR schedule, but with the weight decay coefficient reduced correspondingly at the start of each phase. (See Theorem B.2 and Figure 6)
TEXP--: η̃t+1 = { η̃t × (α∗I−1)−2 if TI−1 + 1 ≤ t ≤ TI − 1, I ≥ 1; η̃t × (α∗I)−1(α∗I−1)−1 if t = TI , I ≥ 1,
(8)
where α∗I = 1+γ−λη∗I+
√ (1+γ−λη∗I )
2−4γ 2 , η̃0 = η0 · (α ∗ 0) −1 = η∗0 · (α∗0)−1.
4.2 BETTER EXPONENTIAL LR SCHEDULE WITH COSINE LR
We applied the TEXP LR schedule (Theorem 2.12) on the Cosine LR schedule (Loshchilov & Hutter, 2016), where the learning rate changes every epoch, and thus correction terms cannot be ignored. The LR at epoch t ≤ T is defined as: ηt = η0 1+cos( tT π)
2 . Our experiments show this hybrid schedule with Cosine LR performs better on CIFAR10 than Step Decay, but this finding needs to be verified on other datasets.
5 CONCLUSIONS
The paper shows rigorously how BN allows a host of very exotic learning rate schedules in deep learning, and verifies these effects in experiments. The lr increases exponentially in almost every
iteration during training. The exponential increase derives from use of weight decay, but the precise expression involves momentum as well. We suggest that the efficacy of this rule may be hard to explain with canonical frameworks in optimization.
Our analyses of BN is a substantial improvement over earlier theoretical analyses, since it accounts for weight decay and momentum, which are always combined in practice.
Our tantalising experiments with a hybrid of exponential and cosine rates suggest that more surprises may lie out there. Our theoretical analysis of interrelatedness of hyperparameters could also lead to faster hyperparameter search.
REFERENCES
Sanjeev Arora, Nadav Cohen, and Elad Hazan. On the optimization of deep networks: Implicit acceleration by overparameterization. In International Conference on Machine Learning, pp. 244–253, 2018.
Sanjeev Arora, Zhiyuan Li, and Kaifeng Lyu. Theoretical analysis of auto rate-tuning by batch normalization. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id=rkxQ-nA9FX.
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
Nils Bjorck, Carla P Gomes, Bart Selman, and Kilian Q Weinberger. Understanding batch normalization. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 7705–7716. Curran Associates, Inc., 2018.
Minhyung Cho and Jaehyung Lee. Riemannian approach to batch normalization. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 5225–5235. Curran Associates, Inc., 2017.
Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of johnson and lindenstrauss. Random Structures & Algorithms, 22(1):60–65, 2003.
Robert Mansel Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richtárik. Sgd: General analysis and improved rates. arXiv preprint arXiv:1901.09401, 2019.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b.
Elad Hoffer, Ron Banner, Itay Golan, and Daniel Soudry. Norm matters: efficient and accurate normalization schemes in deep networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 2164–2174. Curran Associates, Inc., 2018a.
Elad Hoffer, Itay Hubara, and Daniel Soudry. Fix your classifier: the marginal value of training the last weight layer. In International Conference on Learning Representations, 2018b. URL https://openreview.net/forum?id=S1Dh8Tg0-.
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
Jonas Kohler, Hadi Daneshmand, Aurelien Lucchi, Ming Zhou, Klaus Neymeyr, and Thomas Hofmann. Exponential convergence rates for batch normalization: The power of length-direction decoupling in non-convex optimization. arXiv preprint arXiv:1805.10694, 2018.
Ilya Loshchilov and Frank Hutter. SGDR: Stochastic Gradient Descent with Warm Restarts. arXiv e-prints, art. arXiv:1608.03983, Aug 2016.
David Page. How to train your resnet 6: Weight decay? URL https://myrtle.ai/ how-to-train-your-resnet-6-weight-decay/.
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.
Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. CesaBianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 2488– 2498. Curran Associates, Inc., 2018.
Leslie N Smith. Cyclical learning rates for training neural networks. In 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 464–472. IEEE, 2017.
Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML’13, pp. III–1139– III–1147. JMLR.org, 2013. URL http://dl.acm.org/citation.cfm?id=3042817. 3043064.
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016.
Twan van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017.
Xiaoxia Wu, Rachel Ward, and Léon Bottou. WNGrad: Learn the Learning Rate in Gradient Descent. arXiv preprint arXiv:1803.02865, 2018.
Yuxin Wu and Kaiming He. Group normalization. In The European Conference on Computer Vision (ECCV), September 2018.
Yang You, Igor Gitman, and Boris Ginsburg. Large Batch Training of Convolutional Networks. arXiv e-prints, art. arXiv:1708.03888, Aug 2017.
Guodong Zhang, Chaoqi Wang, Bowen Xu, and Roger Grosse. Three mechanisms of weight decay regularization. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id=B1lz-3Rct7.
A VIEWING EXP LR VIA CANONICAL OPTIMIZATION FRAMEWORK
This section tries to explain why the efficacy of exponential LR in deep learning is mysterious to us, at least as viewed in the canonical framework of optimization theory.
Canonical framework for analysing 1st order methods This focuses on proving that each —or most—steps of GD noticeably reduce the objective, by relying on some assumption about the spectrum norm of the hessian of the loss, and most frequently, the smoothness, denoted by β. Specifically, for GD update θt+1 = θt − η∇L(θt), we have
L(θt+1)− L(θt) ≤ (θt+1 − θt)⊤∇L(θt) + β
2 ‖θt+1 − θt‖2 = −η(1−
βη
2 )‖∇L(θt)‖2.
When β < 2η , the first order term is larger than the second order one, guaranteeing the loss value decreases. Since the analysis framework treats the loss as a black box (apart from the assumed bounds on the derivative norms), and the loss is non-convex, the best one can hope for is to prove speedy convergence to a stationary point (where gradient is close to 0). An increasing body of work proves such results.
Now we turn to difficulties in understanding the exponential LR in context of the above framework and with scale-invariance in the network.
1. Since loss is same for θ and c · θ for all c > 0 a simple calculation shows that along any straight line through the origin, smoothness is a decreasing function of c, and is very high close to origin. (Note: it is also possible to one can show the following related fact: In any ball containing the origin, the loss is nonconvex.) Thus if one were trying to apply the canonical framework to argue convergence to a stationary point, the natural idea would be to try to grow the norm of the parameters until smoothness drops enough that the above-mentioned Canonical Framework starts to apply. Arora et al. (2019) showed this happens in GD with fixed LR (WD turned off), and furthermore the resulting convergence rate to stationary point is asymptotically similar to analyses of nonconvex optimization with learning rate set as in the Canonical framework. Santurkar et al. (2018) observed similar phenomenon in experiments, which they described as a smoothening of the objective due to BN.
2. The Canonical Framework can be thought of as a discretization of continuous gradient descent (i.e., gradient flow): in principle it is possible to use arbitrarily small learning rate, but one uses finite learning rate merely to keep the number of iterations small. The discrete process approximates the continuous process due to smoothness being small. In case of gradient flow with weight decay (equivalently, with exponential LR schedule) the discrete process cannot track the continuous process for very long, which suggests that any explanation of the benefits of exponential LR may need to rely on discrete process being somehow better. The reason being that for gradient flow one can decouple the speed of the θt into the tangential and the radial components, where the former one has no effect on the norm and the latter one has no effect on the objective but scales the tangential gradient exponentially. Thus the Gradient Flow with WD gives exactly the same trajectory as vanilla Gradient Flow does, excepting a exponential reparametrization with respect to time t.
3. It can be shown that if the local smoothness is upperbounded by 2η (as stipulated in Canonical Framework) during a sequence θt (t = 1, 2, . . .) of GD updates with WD and constant LR then such sequence satisfies θt → 0. This contrasts with the usual experimental observation that θt stays bounded away from 0. One should thus conclude that in practice, with constant LR and WD, smoothness doesn’t always stay small (unlike the above analyses where WD is turned off).
B OMITTED PROOFS
B.1 OMITTED PROOF IN SECTION 2
Lemma B.1 (Some Facts about Equation 1). Suppose z1, z2(z1 ≥ z2) are the two real roots of the the following equation, we have
x2 − (1 + γ − λη)x+ γ = 0
1. z1 = 1+γ−λη+ √
(1−γ)2−2(1+γ)λη+λ2η2 2 , z 2 = 1+γ−λη−
√ (1−γ)2−2(1+γ)λη+λ2η2
2
2. z1, z2 are real ⇐⇒ λη ≤ (1−√γ)2;
3. z1z2 = γ, z1 + z2 = (1 + γ − λη);
4. γ ≤ z2 ≤ z1 ≤ 1;
5. Let t = λη1−γ , we have z 1 ≥ 11+t ≥ 1− t = 1− λη 1−γ .
6. if we view z1(λη), z2(λη) as functions of λη, then z1(λη) is monotone decreasing, z2(η) is monotone increasing.

heading: Proof.
text: 4. Let f(x) = x2 − (1 + γ − λη)x+ γ, we have f(1) = f(γ) = λη ≥ 0. Note the minimum of f is taken at x = 1+γ−λη2 ∈ [0, 1], the both roots of f(x) = 0 must lie between 0 and 1, if exists.
5
1− z1 = 1− γ + λη −
√ (1− γ)2 − 2(1 + γ)λη + λ2η2
2
= (1− γ) 1 + t−
√ 1− 1+γ1−γ t+ t2
2
= (1− γ) 2t+ 2 1+γ1−γ t
2(1 + t+ √ 1− 1+γ1−γ t+ t2)
≤ (1− γ) 4 1−γ t
4(1 + t)
= t
(1 + t)
6. Note that (z1− z2)2 = (z1+ z2)2− 4z1z2 = (1+γ−λη)2− 4γ is monotone decreasing, since z1(λη) + z2(λη) is constant, z1(λη) ≥ z2(λη), z1(λη) must be decreasing and z2(λη) must be increasing.
B.2 OMITTED PROOFS IN SECTION 2.1
Proof of Lemma 2.2. For any (θ, η), we have
GDρt (θ, η) = (ρθ − η∇Lt(θ), η) = [Π ρ 1 ◦Π ρ 2 ◦ GDt](θ,
η ρ ) = [Πρ1 ◦Π ρ 2 ◦ GDt ◦Π ρ−1 2 ](θ, η).
Proof of Lemma 2.4. For any (θ, η), we have [ GDt ◦Πc1 ◦Πc 2 2 ] (θ, η) = GDt(cθ, c2η) = (cθ − c2θ∇Lt(cθ), c2η) ∗ = (c(θ −∇Lt(θ)), c2η)
= [ Πc1 ◦Πc 2 2 ◦ GDt ] (θ, η). ( ∗ =: Scale Invariance, Lemma 1.3)
B.3 OMITTED PROOFS IN SECTION 2.2
Proof of Lemma 2.7. For any input (θ, η,θ′, η′), it’s easy to check both composed maps have the same outputs on the 2,3,4th coordinates, namely (c2η, cθ, c2η′). For the first coordinate, we have
[ GDρ(cθ, c2η, cθ′, c2η) ] 1 = ρcθ + c2η ( γ θ − θ′ η′ −∇Lt (cθ) ) ∗ = c ( θ + η ( γ θ − θ′ η′ −∇Lt(θ) ))
=c [GDρ(θ, η,θ′, η)]1 . ∗ =: Scale Invariance, Lemma 1.3
Proof of Lemma 2.8. For any input (θ, η,θ′, η′), it’s easy to check both composed maps have the same outputs on the 2,3,4th coordinates, namely (η,θ, η). For the first coordinate, we have
[[ Πα3 ◦Πα4 ◦Πα2 ◦ GDt ◦Πα −1 2 ◦Πα3 ◦Πα4 ] (θ, η,θ′, η) ]
1 = α
[ GDt(θ,α−1η,αθ′,αη) ] 1
=α ( θ + α−1η ( γ θ − θ′
η −∇Lt(θ)
))
= ( α+ γα−1 ) θ − η∇Lt(θ)− ηγ θ′
η
=(ρ+ γ)θ − η∇Lt(θ)− γθ′ = [GDρt (θ, η,θ′, η)]1
B.4 OMITTED PROOFS OF THEOREM 2.12
In this subsection we will prove a stronger version of Theorem 2.12(restated below), allowing the WD,λI changing each phase. Theorem B.2 (A stronger version of Theorem 2.12). There exists a way to correct the momentum only at the first iteration of each phase, such that the following Tapered-Exponential LR schedule (TEXP) {η̃t} with momentum factor γ and no WD, leads the same sequence networks in function space compared to that of Step Decay LR schedule(Definition 2.11) with momentum factor γ and phase-dependent WD λ∗I in phase I , where phase I lasts from iteration TI to iteration TI+1, T0 = 0.
η̃t+1 = { η̃t × (α∗I−1)−2 if TI−1 + 1 ≤ t ≤ TI − 1, I ≥ 1 η̃t × η ∗ I
η∗I−1 × (α∗I)−1(α∗I−1)−1 if t = TI , I ≥ 1
, (9)
where α∗I = 1+γ−λ∗Iη ∗ I+
√ (1+γ−λ∗Iη∗I )
2−4γ 2 , η̃0 = η0(α ∗ 0) −1 = η∗0(α ∗ 0) −1.
Towards proving Theorem 2.12, we need the following lemma which holds by expanding the definition, and we omit its proof. Lemma B.3 (Canonicalization). We define the Canonicalization map as N(θ, η,θ′, η′) = (θ, η,θ− η η′ (θ − θ ′), η), and it holds that
1. GDρt ◦N = GD ρ t , ∀ρ > 0, t ≥ 0. 2. N ◦ [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] = [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] ◦N , ∀c > 0.
Similar to the case of momentum-free SGD, we define the notion of equivalent map below Definition B.4 (Equivalent Maps). For two maps F and G, we say F is equivalent to G iff ∃c > 0, F = [ Πc1 ◦Πc 2 2 ◦Πc3 ◦Πc 2 4 ] ◦G, which is also denoted by F c∼ G.
Note that for any (θ, η,θ′, η′), [N(θ, η,θ′, η′)]2 = [N(θ, η,θ ′, η′)]4. Thus as a direct consequence of Lemma 2.8, the following lemma holds.
Lemma B.5. ∀ρ,α > 0, GDρt ◦N α∼ Πα−13 ◦Πα −1 4 ◦Πα −1 2 ◦ GDt ◦Πα −1 2 ◦Πα3 ◦Πα4 ◦N .
Proof of Theorem2.12. Starting with initial state (θ0, η0,θ−1, η−1) where η−1 = η0 and a given LR schedule {ηt}t≥0, the parameters generated by GD with WD and momentum satisfies the following relationship:
(θt+1, ηt+1,θt, ηt) =
[ Π ηt+1 ηt
2 ◦ GD 1−ηtλt t ] (θt, ηt,θt−1, ηt−1).
Define b
© t=a Ft = Fb ◦ Fb−1 ◦ . . . ◦ Fa, for a ≤ b. By Lemma B.3 and Lemma B.5, letting αt be the
root of x2 − (γ + 1− ηt−1λt−1)x+ γ = 0, we have
T−1 © t=0
[ Π ηt+1 ηt
2 ◦ GD 1−ηtλt t
]
= T−1 © t=0
[ Π ηt+1 ηt
2 ◦ GD 1−ηtλt t ◦N
]
T−1∏ i=0 αi
∼ T−1 © t=0
[ Π ηt+1 ηt 2 ◦Π α−1t+1 3 ◦Π α−1t+1 4 ◦Π α−1t+1 2 ◦ GDt ◦Π α−1t+1 2 ◦Π αt+1 3 ◦Π αt+1 4 ◦N ]
=Π ηT
ηT−1 2 ◦Π α−1T−1 3 ◦Π α−1T−1 4 ◦Π α−1T 2 ◦ GDT−1 ◦ ( T−1 © t=1 [ Π α−1t+1α −1 t 2 ◦Ht ◦ GDt−1 ]) ◦Πα −1 1 2 ◦Π α1 3 ◦Π α1 4 ◦N,
(10)
where
T−1∏ i=0 αi
∼ is because of Lemma B.5, and Ht is defined as
Ht = Π αt 2 ◦Π
ηt−1 ηt
2 ◦Π αt+1 3 ◦Π αt+1 4 ◦N ◦Π α−1t 3 ◦Π α−1t 4 ◦Π α−1t 2 ◦Π ηt ηt−1 2 .
Since the canonicalization map N only changes the momentum part of the state, it’s easy to check that Ht doesn’t touch the current parameter θ and the current LR η. Thus Ht only changes the momentum part of the input state. Now we claim that Ht ◦ GDt−1 = GDt−1 whenever ηt = ηt−1. This is because when ηt = ηt−1, αt = αt+1 , thus Ht ◦ GDt−1 = GDt−1. In detail,
Ht ◦ GDt−1
=Παt2 ◦Π αt 3 ◦Π αt 4 ◦N ◦Π α−1t 3 ◦Π α−1t 4 ◦Π α−1t 2 ◦ GDt−1
∗ =Παt2 ◦Π αt 3 ◦Π αt 4 ◦Π α−1t 3 ◦Π α−1t 4 ◦Π α−1t 2 ◦ GDt−1 =GDt−1,
where ∗= is because GD update GDt sets η′ the same as η, and thus ensures the input of N has the same momentum factor in buffer as its current momentum factor, which makes N an identity map. Thus we could rewrite Equation 10 with a “sloppy”version of Ht, H ′t = { Ht ηt ∕= ηt−1; Id o.w. :
T−1 © t=0
[ Π ηt+1 ηt
2 ◦ GD 1−ηtλt t
]
=Π ηT
ηT−1 2 ◦Π α−1T−1 3 ◦Π α−1T−1 4 ◦Π α−1T 2 ◦ GDT−1 ◦ ( T−1 © t=1 [ Π α−1t+1α −1 t 2 ◦H ′t ◦ GDt−1 ]) ◦Πα −1 1 2 ◦Π α1 3 ◦Π α1 4 ◦N
=Π ηT
ηT−1 2 ◦Π α−1T−1 3 ◦Π α−1T−1 4 ◦Π α−1T 2 ◦ ( T−1 © t=1 [ GDt ◦Π α−1t+1α −1 t 2 ◦H ′t ]) ◦ GD0 ◦Π α−11 2 ◦Π α1 3 ◦Π α1 4 ◦N,
(11)
Now we construct the desired sequence of parameters achieved by using the Tapered Exp LR schedule 9 and the additional one-time momentum correction per phase. Let (θ̃0, η̃0, θ̃−1, η̃−1) = (θ0, η0,θ−1, η0), and
(θ̃1, η̃1, θ̃0, η̃0) = [ GD0 ◦Π α−11 2 ◦Π α1 3 ◦Π α1 4 ◦N ] (θ̃0, η̃0, θ̃−1, η̃−1)
= [ GD0 ◦Π α−11 2 ◦Π α1 3 ◦Π α1 4 ] (θ̃0, η̃0, θ̃−1, η̃−1);
(θ̃t+1, η̃t+1, θ̃t, η̃t) = [ GDt ◦Π α−1t+1α −1 t 2 ◦H ′t ] (θ̃t, η̃t, θ̃t−1, η̃t−1).
we claim {θ̃t}t=0 is the desired sequence of parameters. We’ve already shown that θt ∼ θ̃t, ∀t. Clearly {θ̃t}t=0 is generated using only vanilla GD, scaling LR and modifying the momentum part of the state. When t ∕= TI for any I , ηt = ηt−1 and thus H ′t = Id. Thus the modification on the momentum could only happen at TI(I ≥ 0). Also it’s easy to check that αt = α∗I , if TI + 1 ≤ t ≤ TI+1.
B.5 OMITTED PROOFS OF THEOREM 2.13
Theorem B.6. The following two sequences of parameters ,{θt}∞t=0 and {θ̃t}∞t=0, define the same sequence of network functions, i.e. fθt = fθ̃t , ∀t ∈ N, given the initial conditions, θ̃0 = P0θ0, θ̃−1 = P−1θ−1.
1. θt−θt−1ηt−1 = γ θt−1−θt−2 ηt−2 −∇θ
( (L(θt−1) + λt−1 2 ‖θt−1‖ 2 2 ) , for t = 1, 2, . . .;
2. θ̃t−θ̃t−1η̃t−1 = γ θ̃t−1−θ̃t−2 η̃t−2 −∇θL(θ̃t−1), for t = 1, 2, . . .,
where η̃t = PtPt+1ηt, Pt = t∏
i=−1 α−1i , ∀t ≥ −1 and αt recursively defined as
αt = −ηt−1λt−1 + 1 + ηt−1 ηt−2 γ(1− α−1t−1), ∀t ≥ 1. (12)
needs to be always positive. Here α0,α−1 are free parameters. Different choice of α0,α−1 would lead to different trajectory for {θ̃t}, but the equality that θ̃t = Ptθt is always satisfied. If the initial condition is given via v0, then it’s also free to choose η−1,θ−1, as long as
θ0−θ−1 η−1 = v0.
Proof of Theorem 2.13. We will prove by induction. By assumption S(t) : Ptθt = θ̃t for t = −1, 0. Now we will show that S(t) =⇒ S(t+ 1), ∀t ≥ 0.
θt − θt−1 ηt−1 = γ θt−1 − θt−2 ηt−2 −∇θ
( (L(θt−1) +
λt−1 2
‖θt−1‖22 )
Take gradient ======⇒θt − θt−1
ηt−1 = γ θt−1 − θt−2 ηt−2 −∇θL(θt−1) + λt−1θt−1
Scale Invariance ========⇒θt − θt−1
ηt−1 = γ θt−1 − θt−2 ηt−2 − Pt−1∇θL(θ̃t−1) + λt−1θt−1
Rescaling =====⇒Pt(θt − θt−1)
PtPt−1ηt−1 = γ Pt−2(θt−1 − θt−2) Pt−1Pt−2ηt−2 −∇θL(θ̃t−1)− λt−1 θt−1 Pt−1
Simplfying ======⇒Ptθt − α −1 t θ̃t−1
η̃t−1 = γ αt−1θ̃t−1 − θ̃t−2 η̃t−2 −∇θL(θ̃t−1)− ηt−1λt−1 Ptθt−1 ηt−1Pt−1Pt
Simplfying ======⇒Ptθt − α −1 t θ̃t−1
η̃t−1 = γ αt−1θ̃t−1 − θ̃t−2 η̃t−2 −∇θL(θ̃t−1)− ηt−1λt−1 α−1t θ̃t−1 η̃t−1
Simplfying ======⇒Ptθt − α −1 t (1− ηt−1λt−1)θ̃t−1
η̃t−1 = γ αt−1θ̃t−1 − θ̃t−2 η̃t−2 −∇θL(θ̃t−1)
To conclude that Ptθt = θ̃t, it suffices to show that the coefficients before θ̃t−1 is the same to that in (2). In other words, we need to show
−1 + α−1t (1− ηt−1λt−1) η̃t−1 = γ(1− αt−1) η̃t−2 ,
which is equivalent to the definition of αt, Equation 12.
Lemma B.7 (Sufficient Conditions for positivity of αt). Let λmax = maxt λt, ηmax = maxt ηt. Define zmin is the larger root of the equation x2 − (1 + γ − λmaxηmax)x + γ = 0. To guarantee the existence of zmax we also assume ηmaxλmax ≤ (1− √ γ)2. Then we have
∀α−1, α0 = 1 =⇒ zmin ≤ αt ≤ 1, ∀t ≥ 0 (13)
Proof. We will prove the above theorem with a strengthened induction —
S(t) : ∀0 ≤ t′ ≤ t, zmin ≤ αt′ ≤ 1 ∧ α−1t′ − 1
ηt′−1 ≤ z −1 min − 1 ηmax .
Since α0 = 1, S(0) is obviously true. Now suppose S(t) is true for some t ∈ N, we will prove S(t+ 1).
First, since 0 < αt ≤ 1, αt+1 = −ηtλt + 1 + ηtηt−1 γ(1− α −1 t ) ≤ 1.
Again by Equation 12, we have
1− αt+1 = ηtλt + α−1t − 1 ηt−1 ηtγ = ηtλt + z−1min − 1 ηmax ηtγ ≤ ηtλt + (z−1min − 1)γ = 1− zmin,
which shows αt+1 ≥ zmin. Here the last step is by definition of zmin. Because of αt+1 ≥ zmin, we have
α−1t+1 − 1 ηt ≤ z−1min 1− αt+1 ηt ≤ z−1min(λt+ α−1t − 1 ηt−1 γ) ≤ z−1min(λmax+ z−1min − 1 ηmax γ) = z−1min 1− zmin ηmax = z−1min − 1 ηmax .
Now we are ready to give the formal statement about the closeness of Equation 9 and the reduced LR schedule by Theorem 2.13.
Theorem B.8. Given a Step Decay LR schedule with {TI}K−1I=0 , {η∗I} K−1 I=0 , {λ∗I} K−1 I=0 , the TEXP++ LR schedule in Theorem 2.13 is the following(α0 = α−1 = 1, T0 = 0):
αt =
{ −η∗Iλ∗I + 1 + γ(1− α −1 t−1), ∀TI + 2 ≤ t ≤ TI+1, I ≥ 0;
−η∗Iλ∗I + 1 + η∗I η∗I−1 γ(1− α−1t−1), ∀t = TI + 1, I ≥ 0;
Pt =
t∏
i=−1 α−1t ;
η̂t = PtPt+1ηt.
It’s the same as the TEXP LR schedule({η̃t}) in Theorem 2.12 throughout each phase I , in the sense that ∣∣∣∣ η̂t−1 η̂t / η̃t−1 η̃t − 1 ∣∣∣∣ < 3 λmaxηmax 1− γ ( γ z2min )t−TI−1 ≤ 3λmaxηmax 1− γ [ γ(1 + λmaxηmax 1− γ ) 2 ](t−TI−1) , ∀TI+1 ≤ t ≤ TI+1.
where zmin is the larger root of x2 − (1 + γ − λmaxηmax)x + γ = 0. In Appendix B, we show that z−1min ≤ 1 + ηmaxλmax 1−γ . When λmaxηmax is small compared to 1 − γ, which is usually the case in practice, one could approximate zmin by 1. For example, when γ = 0.9, λmax = 0.0005, ηmax = 0.1, the above upper bound becomes
∣∣∣∣ η̂t−1 η̂t / η̃t−1 η̃t − 1 ∣∣∣∣ ≤ 0.0015× 0.9009 t−TI−1.
Proof of Theorem B.8. Assuming z1I and z 2 I (z 1 I ≥ z2I ) are the roots of Equation 1 with η = ηI and
λ = λI , we have γ ≤ z2I′ ≤ √ γ ≤ zmin ≤ z1I ≤ 1, ∀I, I ′ ∈ [K − 1] by Lemma B.1.
We can rewrite the recursion in Theorem 2.13 as the following:
αt = −ηIλI + 1 + γ(1− α−1t−1) = −(z1I + z2I ) + z1Iz2Iα −1 t−1. (14)
In other words, we have
αt − z1I = z2I
αt−1 (αt−1 − z1I ), t ≥ 1. (15)
By Lemma B.7, we have αt ≥ zmin, ∀t ≥ 0. Thus |αtz1I − 1| = zI2 αt−1 |αt−1 z1I − 1| ≤ γ z2min |αt−1 z1I − 1| =
γ z2min |αt−1 z1I − 1| ≤ γ(1 + λη1−γ ) 2|αt−1 z1I |, which means αt geometrically converges to its stable fixed point z1I . and η̃t−1 η̃t = (z1I ) 2. Since that zmin ≤ αt ≤ 1, zmin ≤ z1I ≤ 1, we have | αTI z1I
− 1| ≤ 1−zmin zmin = λmaxηmax1−γ ≤ 1 , and thus | αt z1I − 1| ≤ λmaxηmax1−γ ( γ z2min )t−TI−1 ≤ 1, ∀TI +1 ≤ t ≤ TI+1.
Note that α∗I = z 1 I , η̂t−1 η̂t = αtαt+1 By definition of TEXP and TEXP++, we have
η̃t−1 η̃t =
{ (z1I−1)
2 if TI−1 + 1 ≤ t ≤ TI − 1 η∗I−1 η∗I z1Iz 1 I−1 if t = TI , I ≥ 1
(16)
η̂t−1 η̂t = ηt−1 ηt αt+1αt = { αt+1αt if TI−1 + 1 ≤ t ≤ TI − 1 η∗I−1 η∗I αTI+1αTI if t = TI , I ≥ 1 (17)
Thus we have when t = TI , ∣∣∣∣ η̂t−1 η̂t / η̃t−1 η̃t − 1 ∣∣∣∣ ≤ ∣∣∣∣ αTI+1 z1I αTI z1I−1 − 1 ∣∣∣∣ ≤ ∣∣∣∣ αTI+1 z1I − 1 ∣∣∣∣+ ∣∣∣∣ αTI z1I−1 − 1 ∣∣∣∣+ ∣∣∣∣ αTI+1 z1I − 1 ∣∣∣∣ ∣∣∣∣ αTI z1I−1 − 1 ∣∣∣∣
≤3λmaxηmax 1− γ .
When TI + 1 ≤ t ≤ TI+1, we have ∣∣∣∣ η̂t−1 η̂t / η̃t−1 η̃t − 1 ∣∣∣∣ = ∣∣∣∣ αt+1 z1I−1 αt z1I−1 − 1 ∣∣∣∣ ≤ ∣∣∣∣ αt+1 z1I−1 − 1 ∣∣∣∣+ ∣∣∣∣ αt z1I−1 − 1 ∣∣∣∣+ ∣∣∣∣ αt+1 z1I−1 − 1 ∣∣∣∣ ∣∣∣∣ αt z1I−1 − 1 ∣∣∣∣
≤3λmaxηmax 1− γ ( γ z2min )t−TI−1.
Thus we conclude ∀I ∈ [K − 1], TI + 1 ≤ t ≤ TI+1, we have ∣∣∣∣ η̂t−1 η̂t / η̃t−1 η̃t − 1 ∣∣∣∣ ≤ 3 λmaxηmax 1− γ ( γ z2min )t−TI−1 ≤ 3λmaxηmax 1− γ ·γ t−TI−1(1+ λmaxηmax 1− γ ) 2(t−TI−1).
B.6 OMITTED PROOFS IN SECTION 3
We will use ŵ to denote w‖w‖ and ∠uw to arccos(û⊤ŵ). Note that training error ≤ ε π is equivalent to ∠e1wt < ε.
Case 1: WD alone Since the objective is strongly convex, it has unique argmin w∗. By symmetry, w∗ = βe1, for some β > 0. By KKT condition, we have
λβ = E x1∼N (0,1)
[ |x1|
1 + exp(β|x1|)
] ≤ E
x1∼N (0,1) [|x1|] =
√ 2
π ,
which implies ‖w∗‖ = O( 1λ ).
By Theorem 3.1 of Gower et al. (2019), for sufficiently large t, we have E ‖wt −w∗‖2 = O( ηBλ ). Note that ∠e1wt = ∠w∗wt ≤ 2 sin∠w∗wt ≤ 2‖w ∗−wt‖ ‖w∗‖ , we have E (∠e1wt)2 = O( ηλ B ), so the expected error = E (∠e1wt)/π ≤ √ E (∠e1wt)2/π = O( √ ηλ B ).
Case 3: Both BN and WD We will need the following lemma when lower bounding the norm of the stochastic gradient.
Lemma B.9 (Concentration of Chi-Square). Suppose X1, . . . , Xk i.i.d.∼ N (0, 1), then
Pr
[ k∑
i=1
X2i < kβ
] ≤ ( βe1−β ) k 2 . (18)
Proof. This Chernoff-bound based proof is a special case of Dasgupta & Gupta (2003).
Pr
[ k∑
i=1
X2i < kβ
] ≤ ( βe1−β ) k 2 = Pr [ exp ( ktβ − t k∑
i=1
X2i
) ≥ 1 ]
≤E [ exp ( ktβ − t k∑
i=1
X2i
)] (Markov Inequality)
=ektβ(1 + 2t)− k 2 .
(19)
The last equality uses the fact that E [ tX2i ] = 1√ 1−2t for t < 1 2 . The proof is completed by taking t = 1−β2β .
Setting for Theorem B.6: Suppose WD factor is λ, LR is η, the width of the last layer is m ≥ 3, Now the SGD updates have the form
wt+1 =wt − η
B
B∑
b=1
∇ ( ln(1 + exp(−xt,b⊤
wt ‖wt‖ yt,b)) + λ 2 ‖wt‖2
)
=(1− λη)wt − η
B
B∑
b=1
yt,b 1 + exp(xt,b⊤
wt ‖wt‖yt,b)
Π⊥wtxt,b
‖wt‖ ,
where xt,b i.i.d.∼ N (0, Im), yt,b = sign ([xt,b]1), and Π⊥wt = I −
wtw ⊤ t ‖wt‖2 .
Proof of Theorem B.6.
Step 1: Let T1 = 12(ηλ−2ε2) ln 64‖wT0‖
2ε √ B
η √ m−2 , and T2 = 9 ln 1 δ . Thus if we assume the training
error is smaller than ε from iteration T0 to T0 + T1 + T2, then by spherical triangle inequality, ∠wtwt′ ≤ ∠e1wt′ + ∠e1wt = 2ε, for T0 ≤ t, t′ ≤ T0 + T1 + T2. Now let’s define w′t = (1 − ηλ)wt and for any vector w, and we have the following two relationships:
1. ‖w′t‖ = (1− ηλ)‖w‖.
2. ‖wt+1‖ ≤ ‖w ′ t‖
cos 2ε .
The second property is because by Lemma 1.3, (wt+1 − w′t) ⊥ w′t and by assumption of small error, ∠wt+1w′t ≤ 2ε. Therefore
‖wT1+T0‖2 ‖wT0‖2 ≤ ( 1− ηλ cos 2ε )2T1 ≤ ( 1− ηλ 1− 2ε2 )2T1 ≤ ( 1− (ηλ− 2ε2) )2T1 ≤ e−2T1(ηλ−2ε 2) =
η
64‖wT0‖2ε
√ m− 2 B .
(20)
In other word, ‖wT0+T1‖2 ≤ η
64ε √ m−2 B . Since ‖wT0+t‖ is monotone decreasing, ‖wT0+t‖
2 ≤ η
64ε √ m−2 B holds for any t = T1, . . . , T1 + T2.
Step 2: We show that the norm of the stochastic gradient is lower bounded with constant probability. In other words, we want to show the norm of ξt = ∑B b=1 yt,b 1+exp(xt,b⊤
wt ‖wt‖ yt,b)
Π⊥wtxt,b
‖wt‖ is lower
bounded with high probability.
Let Π⊥wt,e1 be the projection matrix for the orthogonal space spanned by wt and e1. W.L.O.G, we can assume the rank of Π⊥wt,e1 is 2. In case wt = e1, we just exclude a random direction to make Π⊥wt,e1 rank 2. Now we have Π ⊥ wt,e1xt,b are still i.i.d. multivariate gaussian random variables, for b = 1, . . . , B, and moreover, Π⊥wt,e1xt,b is independent to yt,b
1+exp(xt,b⊤ wt
‖wt‖ yt,b) . When m ≥ 3, we can lower bound ‖ξt‖ by dealing with ‖Π⊥wt,e1ξt‖.
It’s not hard to show that conditioned on {xt,b⊤ wt‖wt‖ , [xt,b]1} B b=1,
B∑
b=1
yt,b 1 + exp(xt,b⊤
wt ‖wt‖yt,b)
Π⊥wtxt,b d =
√√√√ B∑
b=1
( yt,b
1 + exp(xt,b⊤ wt
‖wt‖yt,b)
)2 Π⊥wt,e1x, (21)
where x ∼ N (0, Im). We further note that ‖Π⊥wt,e1x‖ 2 ∼ χ2(m− 2). By Lemma B.9,
Pr [ ‖Π⊥wt,e1xt‖ 2 ≥ m− 2 8 ] ≥ 1− ( 1 8e 7 8 ) m−2 2 ≥ 1− ( 1 8e 7 8 ) 1 2 ≥ 1 3 . (22)
Now we will give a high probability lower bound for ∑B
b=1
( yt,b
1+exp(xt,b⊤ wt
‖wt‖ yt,b)
)2 . Note that
x⊤t wt ‖wt‖ ∼ N (0, 1), we have
Pr [ |x⊤t,b
wt ‖wt‖
| < 1 ] ≥ 1
2 , (23)
which implies the following, where At,b is defined as 1 [ |x⊤t,b wt‖wt‖ | < 1 ≥ 1 2 ] :
EAt,b = Pr [ ‖ yt,b 1 + exp(x⊤t,b wt ‖wt‖yt) ‖ ≥ 1 1 + e ] ≥ 1 2 . (24)
Note that ∑B b=1 At,b ≤ B, and E ∑B b=1 At,b ≥ B2 , we have Pr [∑B b=1 At,b < B 4 ] ≤ 23 . Thus,
Pr
  B∑
b=1
( yt,b
1 + exp(xt,b⊤ wt
‖wt‖yt,b)
)2 ≥ B
4(1 + e)2
  ≥ Pr [ B∑
b=1
At,b ≥ B
4
] ≥ 1
3 . (25)
Thus w.p. at least 19 , equation 25 and equation 22 happen together, which implies
‖ η B
B∑
b=1
∇ ln(1+exp(−x⊤t,b wt
‖wt‖ yt,b))‖ = ‖
η
B
B∑
b=1
yt,b 1 + exp(x⊤t,b wt ‖wt‖yt)
Π⊥wtxt,b
‖wt‖ ‖ ≥ η 1 + e √ m− 2 8‖wt‖ ≥ η 32‖wt‖ √ m− 2 B
(26)
Step 3. To stay in the cone {w|∠we1 ≤ ε}, the SGD update ‖wt+1 −w′t‖ = ‖ ηB ∑B
b=1 ∇ ln(1 + exp(−x⊤t,b wt‖wt‖yt,b))‖ has to be smaller than ‖wt‖ sin 2ε for any t = T0 + T1, . . . , T0 + T1 + T2. However, step 1 and 2 together show that ‖∇ ln(1 + exp(−x⊤t wt‖wt‖yt))‖ ≥ 2‖wt‖ε w.p. 1 9 per iteration. Thus the probability that wt always stays in the cone for every t = T0 + T1, . . . , T0 + T1 + T2 is less than ( 8 9 )T2 ≤ δ.
Remark B.10. It’s interesting that the only property of the global minimum we use is that the if both wt, wt+1 are + optimal, then the angle between wt and wt+1 is at most 2+. Thus we indeed have proved a stronger statement: At least once in every 12(ηλ−2ε2) ln 64‖wT0‖ 2ε √ B η √ m−2 +9 ln 1 δ iterations, the angle between wt and wt+1 will be larger than 2+. In other words, if the the amount of the update stablizes in terms of angle, then this angle must be larger than √ 2ηλ for this simple model.
B.7 OMITTED PROOFS IN SECTION A
Lemma B.11. Suppose loss L is scale invariant, then L is non-convex in the following two sense:
1. The domain is non-convex: scale invariant loss can’t be defined at origin;
2. There exists no ball containing origin such that the loss is locally convex, unless the loss is constant function.
Proof. Suppose L(θ∗) = supθ∈B L(θ). W.L.O.G, we assume ‖θ∗‖ < 1. By convexity, every line segment passing θ∗ must have constant loss, which implies the loss is constant over set B−{c θ ∗
‖θ∗‖ | −1 ≤ c ≤ 0}. Applying the above argument on any other maximum point θ′ implies the loss is constant over B − {0}.
Theorem B.12. Suppose the momentum factor γ = 0, LR ηt = η is constant, and the loss function L is lower bounded. If ∃c > 0 and T ≥ 0 such that ∀t ≥ T , f(θt+1) − f(θt) ≤ −cη‖∇L(θt)‖2, then limt→∞ ‖θt‖ = 0.
Proof in Item 3. By Lemma 1.3 and the update rule of GD with WD, we have
‖θt‖2 = ‖(1− λη)‖θ‖t−1 + η∇L(θt−1)‖2 = (1− λη)2‖θt−1‖2 + η2‖∇L(θt−1)‖2,
which implies
‖θt‖2 = t−1∑
i=T
(1− λη)2(t−i−1)η2‖∇L(θt−1)‖2 + (1− λη)2(t−T )‖θT ‖2.
Thus for any T ′ > T ,
T ′∑
t=T
‖θt‖2 ≤ 1
1− (1− λη)2
  T ′−1∑
t=T
‖∇L(θt)‖2 + ‖θT ‖2 
 ≤ 1 λη
  T ′−1∑
t=T
‖∇L(θt)‖2 + ‖θT ‖2   .
Note that by assumption we have ∑T ′−1
t=T ‖∇L(θt)‖2 = 1cηf(θT )− f(θT ′).
As a conclusion, we have ∑∞
t=T ‖θt‖2 ≤ f(θT )−minθ f(θ) cη2λ + ‖θT ‖2 λη , which implies limt→∞ ‖θt‖ 2 =
0.
C OTHER RESULTS
Now we rigorously analyze norm growth in this algorithm. This greatly extends previous analyses of effect of normalization schemes (Wu et al., 2018; Arora et al., 2018) for vanilla SGD. Theorem C.1. Under the update rule 1.2 with λt = 0, the norm of scale invariant parameter θt satisfies the following property:
• Almost Monotone Increasing: ‖θt+1‖2 − ‖θt‖2 ≥ −γt+1 ηtη0 (‖θ0‖ 2 − ‖θ−1‖2).
• Assuming ηt = η is a constant, then
‖θt+1‖2 = t∑
i=0
1− γt−i+1 1− γ ( ‖θi − θi+1‖2 + γ‖θi−1 − θi‖2 ) −γ 1− γ t+1 1− γ (‖θ0‖ 2−‖θ−1‖2)
Proof. Let’s use Rt, Dt, Ct to denote ‖θt‖2, ‖θt+1 − θt‖2,θ⊤t (θt+1 − θt) respectively. The only property we will use about loss is ∇θL⊤t θt = 0. Expanding the square of ‖θt+1‖2 = ‖(θt+1 − θt) + θt‖2, we have
∀t ≥ −1 S(t) : Rt+1 −Rt = Dt + 2Ct.
We also have Ct ηt = θ⊤t θt+1 − θt ηt = θ⊤t (γ θt − θt−1 ηt−1 − λtθt) = γ ηt−1 (Dt + Ct−1)− λtRt,
namely,
∀t ≥ 0 P (t) : Ct ηt − γDt ηt−1 = γ ηt−1 Ct−1 − λtRt.
Simplify S(t)ηt − γS(t−1) ηt−1 + P (t), we have
Rt+1 −Rt ηt − γRt −Rt−1 ηt−1 = Dt ηt + γ Dt−1 ηt−1 − 2λtRt. (27)
When λt = 0, we have
Rt+1 −Rt ηt = γt+1 R0 −R−1 η−1 +
t∑
i=0
γt−i( Di ηi + γ Di−1 ηi−1 ) ≥ γt+1R0 −R−1 η0 .
Further if ηt = η is a constant, we have
Rt+1 = R0 +
t∑
i=0
1− γt−i+1 1− γ (Di + γDi−1)− γ 1− γt+1 1− γ (R0 −R−1),
which covers the result without momentum in (Arora et al., 2019) as a special case:
Rt+1 = R0 +
t∑
i=0
Di.
For general deep nets, we have the following result, suggesting that the mean square of the update are constant compared to the mean square of the norm. The constant is mainly determined by ηλ, explaining why the usage of weight decay prevents the parameters to converge in direction. 1
Theorem C.2. For SGD with constant LR η, weight decay λ and momentum γ, when the limits R∞ = limT→∞ 1 T ∑T−1 t=0 ‖wt‖2, D∞ = limT→∞ 1T ∑T−1 t=0 ‖wt+1 −wt‖2 exist, we have
D∞ = 2ηλ
1 + γ R∞.
Proof of Theorem C.2. Take average of Equation 27 over t, when the limits R∞ = limT→∞ 1 T ∑T−1 t=0 ‖wt‖2, D∞ = limT→∞ 1T ∑T−1 t=0 ‖wt+1 −wt‖2 exists, we have
1 + γ
η D∞ = 2λR∞.
D ADDITIONAL EXPERIMENTAL FIGURES
E SCALE INVARIANCE IN MODERN NETWORK ARCHITECTURES
In this section, we will discuss how Normalization layers make the output of the network scaleinvariant to its parameters. Viewing a neural network as a DAG, we give a sufficient condition for the scale invariance which could be checked easily by topological order, and apply this on several standard network architectures such as Fully Connected(FC) Networks, Plain CNN, ResNet(He et al., 2016a), and PreResNet(He et al., 2016b). For simplicity, we restrict our discussions among networks with ReLU activation only. Throughout this section, we assume the linear layers and the bias after last normalization layer are fixed to its random initialization, which doesn’t harm the performance of the network empirically(Hoffer et al., 2018b).
1(Page) had a similar argument for this phenomenon by connecting this to the LARS(You et al., 2017), though it’s not rigorous in the way it deals with momentum and equilibrium of norm.
E.1 NOTATIONS
Definition E.1 (Degree of Homogeneity). Suppose k is an integer and θ is all the parameters of the network, then f is said to be homogeneous of degree k, or k-homogeneous, if ∀c > 0, f(cθ) = ckf(θ). The output of f can be multi-dimensional. Specifically, scale invariance means degree of homogeneity is 0.
Suppose the network only contains following modules, and we list the degree of homogeneity of these basic modules, given the degree of homogeneity of its input.
(I) Input (L) Linear Layer, e.g. Convolutional Layer or Fully Connected Layer (B) Bias Layer(Adding Trainable Bias to the output of the previous layer) (+) Addition Layer (adding the outputs of two layers with the same dimension2.) (N) Normalization Layer without affine transformation(including BN, GN, LN, IN etc.)
(NA) Normalization Layer with affine transformation
Remark E.2. For the purpose of deciding the degree of homogeneity of a network, there’s no difference among convolutional layers, fully connected layer and the diagonal linear layer in the affine transformation of Normalization layer, since they’re all linear and the degree of homogeneity is increased by 1 after applying them.
On the other hand, BN and IN has some benefit which GN and LN doesn’t have, namely the bias term (per channel) immediately before BN or IN has zero effect on the network output and thus can be removed. (See Figure 15)
We also demonstrate the homogeneity of the output of the modules via the following figures, which will be reused to later to define network architectures. Theorem E.3. For a network only consisting of modules defined above and ReLU activation, we can view it as a Directed acyclic graph and check its scale invariance by the following algorithm.
Input : DAG G = (V,E) translated from a neural network; the module type of each node vi ∈ V .
1 for v in topological order of G do 2 Compute the degree of homogeneity of v using Table 1; 3 if v is not homogeneous then 4 return False; 5 if vouptut is 0-homogeneous then 6 return True; 7 else 8 return False.
2 Addition Layer(+) is mainly used in ResNet and other similar architectures. In this section, we also use it as an alternative definition of Bias Layer(B). See Figure 7
E.2 NETWORKS WITHOUT AFFINE TRANSFORMATION AND BIAS
We start with the simple cases where all bias term(including that of linear layer and normalization layer) and the scaling term of normalization layer are fixed to be 0 and 1 element-wise respectively, which means the bias and the scaling could be dropped from the network structure. We empirically find this doesn’t affect the performance of network in a noticeable way. We will discuss the full case in the next subsection.
Plain CNN/FC networks: See Figure 8.
ResNet: See Figure 10. To ensure the scaling invariance, we add an additional normalizaiton layer in the shortcut after downsampling. This implementation is sometimes used in practice and doesn’t affect the performance in a noticeable way.
Preactivation ResNet: See Figure 11. Preactivation means to change the order between convolutional layer and normalization layer. For similar reason, we add an additional normalizaiton layer in the shortcut before downsampling.
E.3 NETWORKS WITH AFFINE TRANSFORMATION
Now we discuss the full case where the affine transformation part of normalization layer is trainable. Due to the reason that the bias of linear layer (before BN) has 0 gradient as we mentioned in E.2, the bias term is usually dropped from network architecture in practice to save memory and accelerate training( even with other normalization methods)(See PyTorch Implementation (Paszke et al., 2017)). However, when LN or GN is used, and the bias term of linear layer is trainable, the network could be scale variant (See Figure 15).
Plain CNN/FC networks: See Figure 12.
ResNet: See Figure 13. To ensure the scaling invariance, we add an additional normalizaiton layer in the shortcut after downsampling. This implementation is sometimes used in practice and doesn’t affect the performance in a noticeable way.
Preactivation ResNet: See Figure 14. Preactivation means to change the order between convolutional layer and normalization layer. For similar reason, we add an additional normalizaiton layer in the shortcut before downsampling.

Review summaries:
This work makes an interesting observation that it is possible to use exponentially growing learning rate schedule when training with neural networks with batch normalization. This paper provides both theoretical insights and empirical demonstration of this remarkable property. In detail, the authors prove that for stochastic gradient descent (SGD) with momentum, this exponential learning rate schedule is equivalent to constant learning rate + weight decay, for any scale invariant networks, including networks with Batch Normalization and other normalization methods. This paper also contains an interesting toy example where  gd converges when normalization or weight decay is used alone while not when normalization and weight decay are used together.

This exciting and insightful paper presents theorems (and illustrating examples and experiments) describing an equivalence of commonly used learning rate schedules and weight decay settings with an exponentially increasing learning rate schedule and no weight decay, for neural networks with scale-invariant weights. Hence, the results apply to a large set of commonly employed settings. The paper contains an interesting example of a neural network for which gradient descent converges if with batch normalization as well as with L2 regularization, but not when both are used.