Title: THEORETICAL ANALYSIS OF AUTO RATE-TUNING BY BATCH NORMALIZATION

Abstract: Batch Normalization (BN) has become a cornerstone of deep learning across diverse architectures, appearing to help optimization as well as generalization. While the idea makes intuitive sense, theoretical analysis of its effectiveness has been lacking. Here theoretical support is provided for one of its conjectured properties, namely, the ability to allow gradient descent to succeed with less tuning of learning rates. It is shown that even if we fix the learning rate of scale-invariant parameters (e.g., weights of each layer with BN) to a constant (say, 0.3), gradient descent still approaches a stationary point (i.e., a solution where gradient is zero) in the rate of T -1/2 in T iterations, asymptotically matching the best bound for gradient descent with well-tuned learning rates. A similar result with convergence rate T -1/4 is also shown for stochastic gradient descent.

1. INTRODUCTION:

Batch Normalization (abbreviated as BatchNorm or BN) (Ioffe & Szegedy, 2015) is one of the most important innovation in deep learning, widely used in modern neural network architectures such as ResNet (He et al., 2016) , Inception (Szegedy et al., 2017) , and DenseNet (Huang et al., 2017) . It also inspired a series of other normalization methods (Ulyanov et al., 2016; Ba et al., 2016; Ioffe, 2017; Wu & He, 2018) .

BatchNorm consists of standardizing the output of each layer to have zero mean and unit variance. For a single neuron, if x 1 , . . . , x B is the original outputs in a mini-batch, then it adds a BatchNorm layer which modifies the outputs to

EQUATION

where µ = 1 B B i=1 x i and σ 2 = 1 B B i=1 (x i -µ) 2 are the mean and variance within the minibatch, and γ, β are two learnable parameters. BN appears to stabilize and speed up training, and improve generalization. The inventors suggested (Ioffe & Szegedy, 2015) that these benefits derive from the following:

1. By stabilizing layer outputs it reduces a phenomenon called Internal Covariate Shift, whereby the training of a higher layer is continuously undermined or undone by changes in the distribution of its inputs due to parameter changes in previous layers., 2. Making the weights invariant to scaling, appears to reduce the dependence of training on the scale of parameters and enables us to use a higher learning rate;

3. By implictly regularizing the model it improves generalization.

But these three benefits are not fully understood in theory. Understanding generalization for deep models remains an open problem (with or without BN). Furthermore, in demonstration that intuition can sometimes mislead, recent experimental results suggest that BN does not reduce internal covariate shift either (Santurkar et al., 2018) , and the authors of that study suggest that the true explanation for BN's effectiveness may lie in a smoothening effect (i.e., lowering of the Hessian norm) on the objective. Another recent paper (Kohler et al., 2018) tries to quantify the benefits of BN for simple machine learning problems such as regression but does not analyze deep models.

Provable quantification of Effect 2 (learning rates). Our study consists of quantifying the effect of BN on learning rates. Ioffe & Szegedy (2015) observed that without BatchNorm, a large learning rate leads to a rapid growth of the parameter scale. Introducing BatchNorm usually stabilizes the growth of weights and appears to implicitly tune the learning rate so that the effective learning rate adapts during the course of the algorithm. They explained this intuitively as follows. After BN the output of a neuron z = BN(w x) is unaffected when the weight w is scaled, i.e., for any scalar c > 0, BN(w x) = BN((cw) x).

Taking derivatives one finds that the gradient at cw equals to the gradient at w multiplied by a factor 1/c. Thus, even though the scale of weight parameters of a linear layer proceeding a BatchNorm no longer means anything to the function represented by the neural network, their growth has an effect of reducing the learning rate.

Our paper considers the following question: Can we rigorously capture the above intuitive behavior? Theoretical analyses of speed of gradient descent algorithms in nonconvex settings study the number of iterations required for convergence to a stationary point (i.e., where gradient vanishes). But they need to assume that the learning rate has been set (magically) to a small enough number determined by the smoothness constant of the loss function -which in practice are of course unknown. With this tuned learning rate, the norm of the gradient reduces asymptotically as T -1/2 in T iterations.

In case of stochastic gradient descent, the reduction is like T -1/4 . Thus a potential way to quantify the rate-tuning behavior of BN would be to show that even when the learning rate is fixed to a suitable constant, say 0.1, from the start, after introducing BN the convergence to stationary point is asymptotically just as fast (essentially) as it would be with a hand-tuned learning rate required by earlier analyses. The current paper rigorously establishes such auto-tuning behavior of BN (See below for an important clarification about scale-invariance).

We note that a recent paper (Wu et al., 2018) introduced a new algorithm WNgrad that is motivated by BN and provably has the above auto-tuning behavior as well. That paper did not establish such behavior for BN itself, but it was a clear inspiration for our analysis of BN.

Scale-invariant and scale-variant parameters. The intuition of Ioffe & Szegedy (2015) applies for all scale-invariant parameters, but the actual algorithm also involves other parameters such as γ and β whose scale does matter. Our analysis partitions the parameters in the neural networks into two groups W (scale-invariant) and g (scale-variant). The first group, W = {w (1) , . . . , w (m) }, consists of all the parameters whose scales does not affect the loss, i.e., scaling w (i) to cw (i) for any c > 0 does not change the loss (see Definition 2.1 for a formal definition); the second group, g, consists of all other parameters that are not scale-invariant. In a feedforward neural network with BN added at each layer, the layer weights are all scale-invariant. This is also true for BN with p normalization strategies (Santurkar et al., 2018; Hoffer et al., 2018) and other normalization layers, such as Weight Normalization (Salimans & Kingma, 2016 ), Layer Normalization (Ba et al., 2016) , Group Normalization (Wu & He, 2018) (see Table 1 in Ba et al. (2016) for a summary).

1.1. OUR CONTRIBUTIONS:

In this paper, we show that the scale-invariant parameters do not require rate tuning for lowering the training loss. To illustrate this, we consider the case in which we set learning rates separately for scale-invariant parameters W and scale-variant parameters g. Under some assumptions on the smoothness of the loss and the boundedness of the noise, we show that 1. In full-batch gradient descent, if the learning rate for g is set optimally, then no matter how the learning rates for W is set, (W ; g) converges to a first-order stationary point in the rate

O(T -1/2

), which asymptotically matches with the convergence rate of gradient descent with optimal choice of learning rates for all parameters (Theorem 3.1);

2. In stochastic gradient descent, if the learning rate for g is set optimally, then no matter how the learning rate for W is set, (W ; g) converges to a first-order stationary point in the rate O(T -1/4 polylog(T )), which asymptotically matches with the convergence rate of gradient descent with optimal choice of learning rates for all parameters (up to a polylog(T ) factor) (Theorem 4.2).

In the usual case where we set a unified learning rate for all parameters, our results imply that we only need to set a learning rate that is suitable for g. This means introducing scale-invariance into neural networks potentially reduces the efforts to tune learning rates, since there are less number of parameters we need to concern in order to guarantee an asymptotically fastest convergence.

In our study, the loss function is assumed to be smooth. However, BN introduces non-smoothness in extreme cases due to division by zero when the input variance is zero (see equation 1). Note that the suggested implementation of BN by Ioffe & Szegedy (2015) uses a smoothening constant in the whitening step, but it does not preserve scale-invariance. In order to avoid this issue, we describe a simple modification of the smoothening that maintains scale-invariance. Also, our result cannot be applied to neural networks with ReLU, but it is applicable for its smooth approximation softplus (Dugas et al., 2001) .

We include some experiments in Appendix D, showing that it is indeed the auto-tuning behavior we analysed in this paper empowers BN to have such convergence with arbitrary learning rate for scale-invariant parameters. In the generalization aspect, a tuned learning rate is still needed for the best test accuracy, and we showed in the experiments that the auto-tuning behavior of BN also leads to a wider range of suitable learning rate for good generalization.

1.2. RELATED WORKS:

Previous work for understanding Batch Normalization. Only a few recent works tried to theoretically understand BatchNorm. Santurkar et al. (2018) was described earlier. Kohler et al. (2018) aims to find theoretical setting such that training neural networks with BatchNorm is faster than without BatchNorm. In particular, the authors analyzed three types of shallow neural networks, but rather than consider gradient descent, the authors designed task-specific training methods when discussing neural networks with BatchNorm. Bjorck et al. (2018) observes that the higher learning rates enabled by BatchNorm improves generalization.

Convergence of adaptive algorithms. Our analysis is inspired by the proof for WNGrad (Wu et al., 2018) , where the author analyzed an adaptive algorithm, WNGrad, motivated by Weight Normalization (Salimans & Kingma, 2016) . Other works analyzing the convergence of adaptive methods are (Ward et al., 2018; Li & Orabona, 2018; Zou & Shen, 2018; Zhou et al., 2018) .

Invariance by Batch Normalization. Cho & Lee (2017) proposed to run riemmanian gradient descent on Grassmann manifold G(1, n) since the weight matrix is scaling invariant to the loss function. Hoffer et al. (2018) observed that the effective stepsize is proportional to ηw wt 2 .

2. GENERAL FRAMEWORK:

In this section, we introduce our general framework in order to study the benefits of scale-invariance.

2.1. MOTIVATING EXAMPLES OF NEURAL NETWORKS:

Scale-invariance is common in neural networks with BatchNorm. We formally state the definition of scale-invariance below:

Definition 2.1. (Scale-invariance) Let F(w, θ ) be a loss function. We say that w is a scale-invariant parameter of F if for all c > 0, F(w, θ ) = F(cw, θ ); if w is not scale-invariant, then we say w is a scale-variant parameter of F.

We consider the following L-layer "fully-batch-normalized" feedforward network Φ for illustration:

L(θ) = E Z∼D B 1 B B b=1 f y b (BN(W (L) σ(BN(W (L-1) • • • σ(BN(W (1) x b )))))) .

(2) Z = {(x 1 , y 1 ), . . . , (x B , y B )} is a mini-batch of B pairs of input data and ground-truth label from a data set D. f y is an objective function depending on the label, e.g., f y could be a cross-entropy loss in classification tasks. W (1) , . . . , W (L) are weight matrices of each layer. σ : R → R is a nonlinear activation function which processes its input elementwise (such as ReLU, sigmoid). Given a batch of inputs z 1 , . . . , z B ∈ R m , BN(z b ) outputs a vector zb defined as

EQUATION

where

µ k = E b∈[B] [z b,k ] and σ 2 k = E b∈[B] [(z b,k -µ k ) 2

] are the mean and variance of z b , γ k and β k are two learnable parameters which rescale and offset the normalized outputs to retain the representation power. The neural network Φ is thus parameterized by weight matrices W (i) in each layer and learnable parameters γ k , β k in each BN.

BN has the property that the output is unchanged when the batch inputs z 1,k , . . . , z B,k are scaled or shifted simultaneously. For z b,k = w k xb being the output of a linear layer, it is easy to see that w k is scale-invariant, and thus each row vector of weight matrices W (1) , . . . , W (L) in Φ are scaleinvariant parameters of L(θ). In convolutional neural networks with BatchNorm, a similar argument can be done. In particular, each filter of convolutional layer normalized by BN is scale-invariant.

With a general nonlinear activation, other parameters in Φ, the scale and shift parameters γ k and β k in each BN, are scale-variant. When ReLU or Leaky ReLU (Maas et al., 2013) are used as the activation σ, the vector (γ 1 , . . . , γ m , β 1 , . . . , β m ) of each BN at layer 1 ≤ i < L (except the last one) is indeed scale-invariant. This can be deduced by using the the (positive) homogeneity of these two types of activations and noticing that the output of internal activations is processed by a BN in the next layer. Nevertheless, we are not able to analyse either ReLU or Leaky ReLU activations because we need the loss to be smooth in our analysis. We can instead analyse smooth activations, such as sigmoid, tanh, softplus (Dugas et al., 2001) , etc.

2.2. FRAMEWORK:

Now we introduce our general framework. Let Φ be a neural network parameterized by θ. Let D be a dataset, where each data point z ∼ D is associated with a loss function F z (θ) (D can be the set of all possible mini-batches). We partition the parameters θ into (W ; g), where W = {w (1) , . . . , w (m) } consisting of parameters that are scale-invariant to all F z , and g contains the remaining parameters. The goal of training the neural network is to minimize the expected loss over the dataset:

L(W ; g) := E z∼D [F z (W ; g)].

In order to illustrate the optimization benefits of scaleinvariance, we consider the process of training this neural network by stochastic gradient descent with separate learning rates for W and g:

EQUATION

2.3. THE INTRINSIC OPTIMIZATION PROBLEM:

Thanks to the scale-invariant properties, the scale of each weight w (i) does not affect loss values. However, the scale does affect the gradients. Let V = {v (1) , . . . , v (m) } be the set of normalized weights, where

v (i) = w (i) / w (i) 2 .

The following simple lemma can be easily shown: Lemma 2.2 (Implied by Ioffe & Szegedy (2015) ). For any W and g,

EQUATION

To make ∇ w (i) F z (W ; g) 2 to be small, one can just scale the weights by a large factor. Thus there are ways to reduce the norm of the gradient that do not reduce the loss.

For this reason, we define the intrinsic optimization problem for training the neural network. Instead of optimizing W and g over all possible solutions, we focus on parameters θ in which w (i) 2 = 1 for all w (i) ∈ W . This does not change our objective, since the scale of W does not affect the loss. Definition 2.3 (Intrinsic optimization problem). Let U = {θ | w (i) 2 = 1 for all i} be the intrinsic domain. The intrinsic optimization problem is defined as optimizing the original problem in U:

EQUATION

For {θ t } being a sequence of points for optimizing the original optimization problem, we can define { θt }, where θt = (V t ; g t ), as a sequence of points optimizing the intrinsic optimization problem.

In this paper, we aim to show that training neural network for the original optimization problem by gradient descent can be seen as training by adaptive methods for the intrinsic optimization problem, and it converges to a first-order stationary point in the intrinsic optimization problem with no need for tuning learning rates for W .

2.4. ASSUMPTIONS ON THE LOSS:

We assume F z (W ; g) is defined and twice continuously differentiable at any θ satisfying none of w (i) is 0. Also, we assume that the expected loss L(θ) is lower-bounded by L min .

Furthermore, for V = {v (1) , . . . , v (m) }, where v (i) = w (i) / w (i) 2 , we assume that the following bounds on the smoothness:

∂ ∂v (i) ∂v (j) F z (V ; g) 2 ≤ L vv ij , ∂ ∂v (i) ∂g F z (V ; g) 2 ≤ L vg i , ∇ 2 g F z (V ; g) 2 ≤ L gg .

In addition, we assume that the noise on the gradient of g in SGD is upper bounded by G g :

E ∇ g F z (V ; g) -E z∼D [∇ g F z (V ; g)] 2 2 ≤ G 2 g .

Smoothed version of motivating neural networks. Note that the neural network Φ illustrated in Section 2.1 does not meet the conditions of the smooothness at all since the loss function could be non-smooth. We can make some mild modifications to the motivating example to smoothen it 1 :

(1). The activation could be non-smooth. A possible solution is to use smooth nonlinearities, e.g., sigmoid, tanh, softplus (Dugas et al., 2001) , etc. Note that softplus can be seen as a smooth approximation of the most commonly used activation ReLU.

(2). The formula of BN shown in equation 3 may suffer from the problem of division by zero. To avoid this, the inventors of BN, Ioffe & Szegedy (2015) , add a small smoothening parameter > 0 to the denominator, i.e., zb,k :

EQUATION

However, when z b,k = w k xb , adding a constant directly breaks the scale-invariance of w k .

We can preserve the scale-invariance by making the smoothening term propositional to w k 2 , i.e., replacing with w k 2 . By simple linear algebra and letting u :

= E b∈[B] [ xb ], S := Var b∈[B] ( xb ),

this smoothed version of BN can also be written as

EQUATION

)

Since the variance of inputs is usually large in practice, for small , the effect of the smoothening term is negligible except in extreme cases.

Using the above two modifications, the loss function is already smooth. However, the scale of scale-variant parameters may be unbounded during training, which could cause the smoothness unbounded. To avoid this issue, we can either project scale-variant parameters to a bounded set, or use weight decay for those parameters (see Appendix C for a proof for the latter solution).

2.5. KEY OBSERVATION: THE GROWTH OF WEIGHTS:

The following lemma is our key observation. It establishes a connection between the scale-invariant property and the growth of weight scale, which further implies an automatic decay of learning rates:

Lemma 2.4. For any scale-invariant weight w (i) in the network Ψ, we have:

(1). w

(i) t and ∇ w (i) t

F zt (θ t ) are always perpendicular;

(2). w

(i) t+1 2 2 = w (i) t 2 2 + η 2 w,t ∇ w (i) t F zt (θ t ) 2 2 = w (i) t 2 2 + η 2 w,t w (i) t 2 2 ∇ v (i) t F zt ( θt ) 2 2 .

Proof. Let θ t be all the parameters in θ t other than w (i)

t . Taking derivatives with respect to c for the both sides of F zt (w

(i) t , θ t ) = F zt (cw (i) t , θ t ), we have 0 = ∂ ∂c F zt (cw (i) t , θ t ). The right hand side equals ∇ cw (i) t F zt (cw (i) t , θ t ) w (i)

t , so the first proposition follows by taking c = 1. Applying Pythagorean theorem and Lemma 2.2, the second proposition directly follows.

Using Lemma 2.4, we can show that performing gradient descent for the original problem is equivalent to performing an adaptive gradient method for the intrinsic optimization problem:

Theorem 2.5. Let G (i) t = w (i) t 2 2 .

Then for all t ≥ 0,

EQUATION

)

where Π is a projection operator which maps any vector w to w/ w 2 .

Remark 2.6. Wu et al. ( 2018) noticed that Theorem 2.5 is true for Weight Normalization by direct calculation of gradients. Inspiring by this, they proposed a new adaptive method called WNGrad.

Our theorem is more general since it holds for any normalization methods as long as it induces scale-invariant properties to the network. The adaptive update rule derived in our theorem can be seen as WNGrad with projection to unit sphere after each step.

Proof for Theorem 2.5. Using Lemma 2.2, we have

w (i) t+1 = w (i) t - η w,t w (i) t 2 ∇ v (i) t F zt ( θt ) = w (i) t 2 v (i) t - η w,t G (i) t ∇ v (i) t F zt ( θt ) ,

which implies the first equation. The second equation is by Lemma 2.4.

While popular adaptive gradient methods such as AdaGrad (Duchi et al., 2011) , RMSprop (Tieleman & Hinton, 2012) , Adam (Kingma & Ba, 2014) adjust learning rates for each single coordinate, the adaptive gradient method described in Theorem 2.5 sets learning rates η w,t /G (i)

t for each scaleinvariant parameter respectively. In this paper, we call η w,t /G

(i) t the effective learning rate of v (i) t or w (i) t , because it is η w,t / w (i) t 2

3.1. SETTINGS AND MAIN THEOREM:

Assumptions on learning rates. We consider the case that we use fixed learning rates for both W and g, i.e., η w,0 =

• • • = η w,T -1 = η w and η g,0 = • • • = η g,T -1 = η g .

We assume that η g is tuned carefully to η g = (1 -c g )/L gg for some constant c g ∈ (0, 1). For η w , we do not make any assumption, i.e., η w can be set to any positive value. Theorem 3.1. Consider the process of training Φ by gradient descent with η g = 2(1 -c g )/L gg and arbitrary η w > 0. Then Φ converges to a stationary point in the rate of

EQUATION

)

where

V t = {v (1) t , . . . , v (m) t } with v (i) t = w (i) t / w (i) t 2 , Õ suppresses polynomial factors in L vv ij , L vg i , L gg , w (i) 0 2 , w (i) 0 -1

2 , L(θ 0 ) -L min for all i, j, and we see L gg = Ω(1).

This matches the asymptotic convergence rate of GD by Carmon et al. (2018) .

3.2. PROOF SKETCH:

The high level idea is to use the decrement of loss function to upper bound the sum of the squared norm of the gradients. Note that ∇L(V t ;

g t ) 2 2 = m i=1 ∇ v (i) t L(V t ; g t ) 2 2 + ∇ gt L(V t ; g t ) 2 2 . For the first part m i=1 ∇ v (i) t L(V t ; g t ) 2

2 , we have

m i=1 T -1 t=0 ∇ v (i) t L(V t ; g t ) 2 2 = m i=1 T -1 t=0 w (i) t 2 2 ∇ w (i) t L(W t ; g t ) 2 2 ≤ m i=1 w (i) T 2 2 • w (i) T 2 2 -w (i) 0 2 2 η 2 w (11)

Thus the core of the proof is to show that the monotone increasing w

(i)

T 2 has an upper bound for all T . It is shown that for every w (i) , the whole training process can be divided into at most two phases. In the first phase, the effective learning rate η w / w

(i) t 2

2 is larger than some threshold 1

Ci:

(defined in Lemma 3.2) and in the second phase it is smaller.

Lemma 3.2 (Taylor Expansion).

Let C i := 1 2 m j=1 L vv ij + L vg i 2 m/(c g L gg ) = Õ(1). Then L(θ t+1 ) -L(θ t ) = - m i=1 η w ∇ w (i) t L(θ t ) 2 2 1 - C i η w w (i) t 2 2 - 1 2 c g η g ∇ gt L(θ t ) 2 2 . (12) If w (i) t

2 is large enough and that the process enters the second phase, then by Lemma 3.2 in each step the loss function L will decrease by ηw

2 ∇ w (i) t L(θ t ) 2 2 = w (i) t+1 2 2 -w (i) t 2 2 2ηw (Recall that w (i) t+1 2 2 -w (i) t 2 2 = η 2 w,t ∇ w (i) t L(θ t ) 2 2 by Lemma 2.4). Since L is lower-bounded, we can conclude w (i) t 2

2 is also bounded . For the second part, we can also show that by Lemma 3.2

T -1 t=0 ∇ gt L(V t ; g t ) 2 2 ≤ 2 η g c g L(θ 0 ) -L(θ T ) + m i=1 C i w (i) T 2 2 w (i) 0 2 2

Thus we can conclude Õ( 1 √ T ) convergence rate of ∇L(θ t ) 2 as follows.

min 0≤t<T ∇L(V t ; g t ) 2 2 ≤ 1 T T -1 t=0 m i=1 ∇ v (i) t L(V t ; g t ) 2 2 + m i=1 ∇ gt L(V t ; g t ) 2 2 ≤ Õ( 1 T )

The full proof is postponed to Appendix A.

4. TRAINING BY STOCHASTIC GRADIENT DESCENT:

In this section, we analyze the effect related to the scale-invariant properties when training a neural network by stochastic gradient descent. We use the framework introduced in Section 2.2 and assumptions from Section 2.4.

Assumptions on learning rates. As usual, we assume that the learning rate for g is chosen carefully and the learning rate for W is chosen rather arbitrarily. More specifically, we consider the case that the learning rates are chosen as

η w,t = η w • (t + 1) -α , η g,t = η g • (t + 1) -1/2 .

We assume that the initial learning rate η g of g is tuned carefully to η g = (1 -c g )/L gg for some constant c g ∈ (0, 1). Note that this learning rate schedule matches the best known convergence rate O(T -1/4 ) of SGD in the case of smooth non-convex loss functions (Ghadimi & Lan, 2013) .

For the learning rates of W , we only assume that 0 ≤ α ≤ 1/2, i.e., the learning rate decays equally as or slower than the optimal SGD learning rate schedule. η w can be set to any positive value. Note that this includes the case that we set a fixed learning rate η w,0 = • • • = η w,T -1 = η w for W by taking α = 0. Remark 4.1. Note that the auto-tuning behavior induced by scale-invariances always decreases the learning rates. Thus, if we set α > 1/2, there is no hope to adjust the learning rate to the optimal strategy Θ(t -1/2 ). Indeed, in this case, the learning rate 1/G t in the intrinsic optimization process decays exactly in the rate of Θ(t -α ), which is the best possible learning rate can be achieved without increasing the original learning rate. Theorem 4.2. Consider the process of training Φ by gradient descent with η w,t = η w • (t + 1) -α and η g,t = η g • (t + 1) -1/2 , where η g = 2(1 -c g )/L gg and η w > 0 is arbitrary. Then Φ converges to a stationary point in the rate of

EQUATION

)

where

V t = {v (1) t , . . . , v (m) t } with v (i) t = w (i) t / w (i) t 2 , Õ suppresses polynomial factors in η w , η -1 w , η -1 g , L vv ij , L vg i , L gg , w (i) 0 2 , w (i) 0 -1

2 , L(θ 0 ) -L min for all i, j, and we see L gg = Ω(1).

Note that this matches the asymptotic convergence rate of SGD, within a polylog(T ) factor.

We delay the full proof into Appendix B and give a proof sketch in a simplified setting where there is no g and α ∈ [0, 1 2 ). We also assume there's only one w i , that is, m = 1 and omit the index i. By Taylor expansion, we have

E [L(θ t+1 )] ≤ L(θ t ) - η w,t v t 2 ∇ wt L(θ t ) 2 2 + E η 2 w,t L vv w t 2 2 ∇ wt F zt (θ t ) 2 2 (14)

We can lower bound the effective learning rate η w,T w T 2 and upper bound the second order term respectively in the following way:

(1). For all 0 ≤ α < 1 2 , the effective learning rate

η w,T w T 2 = Ω(T -1/2 );

(2).

T t=0

η 2 w,t L vv wt 2 2 ∇ wt F zt (θ t ) 2 2 = Õ log w 2 T w 2 0 = Õ(log T ).

Taking expectation over equation 14 and summing it up, we have

E T -1 t=0 η w,t w t 2 ∇ vt L(θ t ) 2 2 ≤ L(θ 0 ) -E[L(θ T )] + E T -1 t=0 η 2 w,t L vv w t 2 2 ∇ wt F zt (θ t ) 2 2 .

Plug the above bounds into the above inequality, we complete the proof.

Ω(T -1/2 ) • E T -1 t=0 ∇ vt L(θ t ) 2 2 ≤ L(θ 0 ) -E[L(θ T )] + Õ(log T ).

5. CONCLUSIONS AND FUTURE WORKS:

In this paper, we studied how scale-invariance in neural networks with BN helps optimization, and showed that (stochastic) gradient descent can achieve the asymptotic best convergence rate without tuning learning rates for scale-invariant parameters. Our analysis suggests that scale-invariance in nerual networks introduced by BN reduces the efforts for tuning learning rate to fit the training data.

However, our analysis only applies to smooth loss functions. A PROOF FOR FULL-BATCH GRADIENT DESCENT By the scale-invariant property of w (i) , we know that L(W ; g) = L(V ; g). Also, the following identities about derivatives can be easily obtained:

∂ ∂w (i) ∂w (j) L(W ; g) = 1 w (i) 2 w (j) 2 ∂ ∂v (i) ∂v (j) L(V ; g) ∂ ∂w (i) ∂g L(W ; g) = 1 w (i) 2 w (j) 2 ∂ ∂v (i) ∂g L(V ; g) ∇ 2 g L(W ; g) = ∇ 2 g L(V ; g).

Thus, the assumptions on the smoothness imply

EQUATION

)

Proof for Lemma 3.2. Using Taylor expansion, we have ∃γ ∈ (0, 1), such that for w

(i ) t = (1 - γ)w (i) t + γw (i) t+1 , L(θ t+1 ) -L(θ t ) ≤ m i=1 ∆w (i) t ∇ w (i) t L(θ t ) + ∆g t ∇ gt L(θ t ) + 1 2 m i=1 m j=1 ∆w (i) t 2 ∆w (j) t 2 L vv ij w (i ) t 2 w (j ) t 2 + m i=1 ∆w (i) t 2 ∆g t 2 L vg i w (i ) t 2 + 1 2 m i=1 ∆g t 2 2 L gg .

Note that w

(i) t+1 -w (i) t = η w ∇ w (i) t L(θ t ) is perpendicular to w (i) t , we have w (i ) t 2 ≥ γ(w (i) t+1 -w (i) t ) + w (i) t 2 ≥ w (i) t 2 .

Thus,

L(θ t+1 ) -L(θ t ) ≤ m i=1 ∆w (i) t ∇ w (i) t L(θ t ) + ∆g t ∇ gt L(θ t ) + 1 2 m i=1 m j=1 ∆w (i) t 2 ∆w (j) t 2 L vv ij w (i) t 2 w (j) t 2 + m i=1 ∆w (i) t 2 ∆g t 2 L vg i w (i) t 2 + 1 2 m i=1 ∆g t 2 2 L gg .

By the inequality of arithmetic and geometric means, we have

∆w (i) t 2 ∆w (j) t 2 L vv ij w (i) t 2 w (j) t 2 ≤ 1 2 ∆w (i) t 2 2 L vv ij w (i) t 2 2 + 1 2 ∆w (j) t 2 2 L vv ij w (j) t 2 2 ∆w (i) t 2 ∆g t 2 L vg i w (i) t 2 ≤ ∆w (i) t 2 2 L vg i 2 m/(c g L gg ) w (i) t 2 2 + 1 4 c g ∆g t 2 2 L gg m .

Taking ∆w

(i) t = -η w ∇ w (i) t L(θ t ), ∆g t = -η g ∇ gt L(θ t ), we have L(θ t+1 ) -L(θ t ) ≤ - m i=1 η w ∇ w (i) t L(θ t ) 2 2 -η g ∇ gt L(θ t ) 2 2 + 1 2 m i=1   m j=1 L vv ij + 2L vg i 2 m/(c g L gg )   η 2 w w (i) t 2 2 ∇ w (i) t L(θ t ) 2 2 + 1 2 (1 + c g /2)η 2 g ∇ gt L(θ t ) 2 2 L gg .

We can complete the proof by replacing

1 2 m j=1 L vv ij + L vg i 2 m/(c g L gg ) with C i .

Using the assumption on the smoothness, we can show that the gradient with respect to w (i) is essentially bounded: Lemma A.1. For any W and g, we have

EQUATION

)

Proof. A.1 Fix all the parameters except w (i) . Then L(W ; g) can be written as a function f (w (i) ) on the variable w (i) . Let S = {w (i) | w (i) 2 = 1}. Since f is continuous and S is compact, there must exist v

(i) min ∈ S such that f (v (i) min ) ≤ f (w (i) ) for all w (i) ∈ S. Note that w (i) is scale-invariant, so w (i)

min is also a minimum in the entire domain and ∇f (w i) , and h goes along the geodesic from v (i) min to v (i) on the unit sphere S with constant speed. Let H(τ ) = ∇f (h(τ )). By Taylor expansion, we have

(i) min ) = 0.

For an arbitrary w:

(i) , let v (i) = w (i) / w (i) 2 . Let h : [0, 1] → S be a curve such that h(0) = v (i) min , h(1) = v (

∇f (v (i) ) = H(1) = H(0) + H (ξ) = ∇ 2 f (h(ξ))h (ξ). Thus, ∇f (v (i) ) 2 ≤ πL vv i and ∇ w (i) L(W ; g) 2 ≤ πL vv ii w (i) 2 .

The following lemma gives an upper bound to the weight scales.

Lemma A.2. For all T ≥ 0, we have 1. for i = 1, . . . , m, let t i be the maximum time 0 ≤ τ < T satisfying w

(i) τ 2 2 ≤ 2C i η w (t i = -1 if no such τ exists), then w (i)

ti+1 2 can be bounded by

EQUATION

)

2. the following inequality on weight scales at time T holds:

EQUATION

)

where

K i = Ciηw w (i) 0 2 2 + 1 2 2C i + (πL vv i ) 2 ηw w (i) 0 2 2 = Õ(η 2 w + 1). Proof. A.2 For every i = 1, . . . , m, let S (i) t := -η w t-1 τ =0 ∇ w (i) τ L(θ τ ) 2 2 1 -Ciηw w (i) τ 2 2

. Also

let G t := -(1/2)c g η g t-1 τ =0 ∇ gt L(θ t ) 2 2 . By Lemma 3.2 we know that L(θ T ) ≤ L(θ 0 ) + m i=1 S (i) T + G T .

Upper Bound for Weight Scales at t i + 1.

If t i = -1, then w (i) ti+1 2 2 = w (i) 0 2 2 . For t i ≥ 0, we can bound w (i) ti+1 2 2 by Lemma A.1: w (i) ti+1 2 2 = w (i) ti 2 2 + η 2 w ∇ w (i) t i L(θ ti ) 2 2 ≤ 2C i η w + η 2 w πL vv i w (i) 0 2 2 = η w 2C i + (πL vv i ) 2 η w w (i) 0 2 2 .

In either case, we have w

(i) ti+1 2 2 ≤ w (i) 0 2 2 + η w 2C i + (πL vv i ) 2 ηw w (i) 0 2 2 .

Upper Bound for Weight Scales at T . Since w

(i) τ 2

2 is non-decreasing with τ and w

(i) ti+1 2 2 > 2C i η w , S (i) T -S (i) ti+1 = -η w T -1 τ =t i +1 ∇ w (i) τ L(θ τ ) 2 2 1 - C i η w w (i) τ 2 2 ≤ - η w 2 T -1 τ =t i +1 ∇ w (i) τ L(θ τ ) 2 2 = - 1 2η w w (i) T 2 2 -w (i) t i +1 2 2 ≤ - 1 2η w w (i) T 2 2 + 1 2η w w (i) 0 2 2 + η w 2C i + (πL vv i ) 2 η w w (i) 0 2 2 ≤ - w (i) T 2 2 2η w + w (i) 0 2 2 2η w + 1 2 2C i + (πL vv i ) 2 η w w (i) 0 2 2

, where we use the fact that w

(i) t 2 2 = w (i) 0 2 2 + η 2 w t-1 τ =0 ∇ w (i) τ L(θ τ ) 2 2 at the third line. We can bound S (i) ti+1 by S (i) ti+1 ≤ η w ti τ =0 ∇ w (i) τ L(θ τ ) 2 2 C i η w w (i) 0 2 2 ≤ ( w (i) ti+1 2 2 -w (i) 0 2 2 ) • C i w (i) 0 2 2 ≤ η w 2C i + (πL vv i ) 2 η w w (i) 0 2 2 • C i w (i) 0 2 2

.

Combining them together, we have

w (i) T 2 2 -w (i) 0 2 2 2η w ≤ -S (i) T + S (i) ti+1 + 1 2 2C i + (πL vv i ) 2 η w w (i) 0 2 2 ≤ -S (i) T + C i η w w (i) 0 2 2 + 1 2 2C i + (πL vv i ) 2 η w w (i) 0 2 2 ≤ -S (i) T + K i .

Taking sum over all i = 1, . . . , m and also subtracting G T on the both sides, we have

m i=1 w (i) T 2 2 -w (i) 0 2 2 2η w + (1/2)c g η g T -1 t=0 ∇ gt L(θ t ) 2 2 ≤ - m i=1 S (i) T -G T + m i=1 K i ≤ L(θ 0 ) -L min + m i=1 K i .

where

L min ≤ L(θ T ) ≤ L(θ 0 ) + m i=1 S (i)

T + G T is used at the second line.

Combining the lemmas above together, we can obtain our results.

Proof for Theorem 3.1. By Lemma A.2, we have

m i=1 T -1 t=0 ∇ v (i) t L(V t ; g t ) 2 2 = m i=1 T -1 t=0 w (i) t 2 2 ∇ w (i) t L(W t ; g t ) 2 2 ≤ m i=1 w (i) T 2 2 • w (i) T 2 2 -w (i) 0 2 2 η 2 w ≤ max 1≤i≤m w (i) T 2 2 η w • m i=1 w (i) T 2 2 -w (i) 0 2 2 η w ≤ 4 L(θ 0 ) -L min + m i=1 K i + m i=1 w (i) 0 2 2 η w L(θ 0 ) -L min + m i=1 K i ≤ Õ 1 η w + η 4 w . T -1 t=0 ∇ gt L(V t ; g t ) 2 2 ≤ 2 c g η g L(θ 0 ) -L min + m i=1 K i ≤ Õ 1 + 1η 2 w η g .

Combining them together we have

T • min 0≤t<T m i=1 ∇ v (i) t L(V t ; g t ) 2 2 + g t 2 2 ≤ m i=1 T -1 t=0 ∇ v (i) t L(V t ; g t ) 2 2 + T -1 t=0 ∇ gt L(V t ; g t ) 2 2 ≤ Õ 1 η w + η 4 w + 1 + η 2 w η g .

Thus min 0≤t<T ∇L(V t , g t ) 2 converges in the rate of

min 0≤t<T ∇L(V t , g t ) 2 = Õ 1 √ T 1 √ η w + η 2 w + 1 + η w √ η g .

B PROOF FOR STOCHASTIC GRADIENT DESCENT:

Let F t = σ{z 0 , . . . , z t-1 } be the filtration, where σ{•} denotes the sigma field.

We use L t := L zt (θ t ), F t := F zt (θ t ) for simplicity. As usual, we define v

(i) t = w (i) t / w (i) t 2 . We use the notations ∇ v (i) t L t := ∇ v (i) t L zt (V t , g t ) and ∇ v (i) t F t := ∇ v (i) t F zt (V t , g t ) for short. Let ∆w (i) t = -η w,t ∇ w (i) t F t , ∆g t = -η g,t ∇ gt F t . Lemma B.1. For any a 0 , . . . , a T ∈ [0, B] with a 0 > 0, T t=1 a t t-1 τ =0 a τ ≤ log 2 T -1 t=0 a t /a 0 + 1 + 2B/a 0 Proof. Let t i be the minimum 1 ≤ t ≤ T such that t-1 τ =0 a τ ≥ a 0 • 2 i . Let k be the maximum i such that t i exists. Let t k+1 = T + 1. Then we know that ti+1-1 t=ti a t t-1 τ =0 a τ ≤ a 0 • 2 i + B a 0 • 2 i ≤ 1 + B a 0 • 2 -i .

Thus,

T t=1 at t-1 τ =0 aτ ≤ k i=0 1 + B a0 • 2 -i = k + 1 + 2B a0 ≤ log 2 T -1 t=0 a t /a 0 + 1 + 2B/a 0 . Lemma B.2. Fix T > 0. Let C i := 1 2 m j=1 L vv ij + L vg i 2 m/(c g L gg ) U := 1 + c g /2 2 L gg G 2 g S i := - T -1 t=0 η w,t w (i) t 2 2 ∇ v (i) t L t 2 2 + C i T -1 t=0 η 2 w,t w (i) t 4 2 ∇ v (i) t F t 2 2 R := - 1 2 c g T -1 t=0 η g,t ∇ gt L t 2 2 + U T -1 t=0 η 2 g,t G g Then E[L T ] -L 0 ≤ m i=1 E[S i ] + E[R].

Proof. Conditioned on F t , by Taylor expansion, we have

EQUATION

where Q t is

Q t = 1 2 m i=1 m j=1 L vv ij w (i) t 2 w (j) t 2 ∆w (i) t 2 ∆w (j) t 2 + m i=1 L vg i w (i) t 2 ∆w (i) t 2 ∆g t 2 + 1 2 L gg ∆g t 2 2

By the inequality

√ ab ≤ 1 2 a + 1 2 b, we have ∆w (i) t 2 ∆w (j) t 2 L vv ij w (i) t 2 w (j) t 2 ≤ 1 2 ∆w (i) t 2 2 L vv ij w (i) t 2 2 + 1 2 ∆w (j) t 2 2 L vv ij w (j) t 2 2 ∆w (i) t 2 ∆g t 2 L vg i w (i) t 2 ≤ ∆w (i) t 2 2 L vg i 2 m/(c g L gg ) w (i) t 2 2 + 1 4 c g ∆g t 2 2 L gg m . Note that E[ ∆g t 2 2 | F t ] ≤ η 2 g,t ∇ gt F t 2 2 + G 2 g . Thus, E[Q t | F t ] ≤ m i=1 1 2   m j=1 L vv ij + 2L vg i 2 m/(c g L gg )   η 2 w,t w (i) t 2 2 ∇ w (i) t F t 2 2 + 1 + c g /2 2 L gg • η 2 g,t ∇ gt F t 2 2 + G 2 g ≤ m i=1 C i η 2 w,t w (i) t 2 2 ∇ w (i) t F t 2 2 + (1 -c g /2)η g,t ∇ gt F t 2 2 + U η 2 g,t

Taking this into equation 21 and summing up for all t, we have

E[L T ] -L 0 ≤ - m i=1 T -1 t=0 E η w,t w (i) t 2 2 ∇ v (i) t L t 2 2 - 1 2 c g T -1 t=0 E η g,t ∇ gt L t 2 2 + m i=1 C i T -1 t=0 E η 2 w,t w (i) t 2 2 ∇ w (i) t F t 2 2 + U T -1 t=0 η 2 g,t G g ,

and the right hand side can be expressed as

m i=1 E[S i ] + E[R] by definitions.

Lemma B.3. For any T ≥ 0, 1 ≤ i ≤ m, we have

η w,T w (i) T 2 2 ≥ Ω(T -1/2 ) if 0 ≤ α < 1/2; Ω((T log T ) -1/2 ) if α = 1/2.

Proof. By Lemma 2.4, we have

w (i) t+1 4 2 = w (i) t 2 2 + η 2 w,t w (i) t 2 2 ∇ v (i) t F t 2 2 2 = w (i) t 4 2 + 2η 2 w,t ∇ v (i) t F t 2 2 + η 4 w,t w (i) t 4 2 ∇ v (i) t F t 4 2 ≤ w (i) t 4 2 + 2η 2 w (t + 1) -2α (πL vv ii ) 2 + η 4 w (t + 1) -4α πL vv ii w (i) 0 2 4 ≤ w (i) t 4 2 + (t + 1) -2α   2η 2 w (πL vv ii ) 2 + η 4 w πL vv ii w (i) 0 2 4   ≤ w (i) 0 4 2 + t τ =0 1 (τ + 1) 2α   2η 2 w (πL vv ii ) 2 + η 4 w πL vv ii w (i) 0 2 4   . For 0 ≤ α < 1/2, T -1 τ =0 1 (τ +1) 2α = O(T 1-2α ), so η w,T w (i) T 2 2 = Ω(T -1/2 ); for α = 1/2, T -1 τ =0 1 (τ +1) 2α = O(log T ), so η w,T w (i) T 2 2

= Ω((T log T ) -1/2 ).

Lemma B.4. For T > 0,

• S i can be bounded by S i ≤ -

η w,T w (i) T 2 2 T -1 t=0 ∇ v (i) t L t 2 2 + Õ(log T ); • R can be bounded by R ≤ -Ω(T -1/2 ) T -1 t=0 ∇ gt L t 2 2 + Õ(log T ).

Proof. Fix i ∈ {1, . . . , m}. First we bound S i . Recall that

S i := - T -1 t=0 η w,t w (i) t 2 2 ∇ v (i) t L t 2 2 + C i T -1 t=0 η 2 w,t v (i) t 2 2 ∇ v (i) t F t 2 2 .

Note that ηw,t

w (i) t 2 2

is non-increasing, so

EQUATION

)

Also note that w

EQUATION

)

We can get the bound for S i by combining equation 22 and equation 23.

Now we bound R. Recall that

R := - 1 2 c g T -1 t=0 η g,t ∇ gt L t 2 2 + U T -1 t=0 η 2 g,t G g .

The first term can be bounded by -

EQUATION

2 by noticing that η g,t ≥ η g,T = Ω(T -1/2 ). The second term can be bounded by Õ(log T ) since

T -1 t=0 η 2 g,t = T -1 t=0 Õ(1/t) = Õ(log T ).

Proof for Theorem 4.2. Combining Lemma B.2 and Lemma B.4, for 0 ≤ α < 1/2, we have

L min -L 0 ≤ E[L T ] -L 0 ≤ -Ω(T -1/2 ) T -1 t=0 E ∇L(V t ; g t ) 2 2 + Õ(log T ).

Thus,

min 0≤t<T E ∇L(V t ; g t ) 2 2 ≤ 1 T T -1 t=0 E ∇L(V t ; g t ) 2 2 ≤ Õ log T √ T .

Similarly, for α = 1/2, we have

L min -L 0 ≤ E[L T ] -L 0 ≤ -Ω((T log T ) -1/2 ) T -1 t=0 E ∇L(V t ; g t ) 2 2 + Õ(log T ).

Thus,

min 0≤t<T E ∇L(V t ; g t ) 2 2 ≤ 1 T T -1 t=0 E ∇L(V t ; g t )

For x b , we have

∇ x b u = 1 B I ∇ x b w 2 S+ I = ∇ x b   1 B B b =1 (x b w) 2 - 1 B B b =1 x b w 2   = 2 B ww (x b -u).

Then

∇ x b z b = γ (1 b=b -1/B) w S+ I w -w (x b -u) • 1 w S+ I • 2 B ww (x b -u) w 2 S+ I Since (w (x b -u)) 2 ≤ B w 2 S+ I , ∇ x b z b 2 ≤ γ 1 w S+ I (1 b=b -1/B) w 2 + 1 w S+ I • 2 w 2 ≤ 3γ .

Thus,

∇ x b y 2 ≤ B b =1 ∂y ∂z b 2 1/2 B b =1 ∇ x b z b 2 2 1/2 ≤ 3γ G √ B.

Lemma C.2. If g 0 2 is bounded by a constant, there exists some constant K such that g t 2 ≤ K.

Proof. Fix a time t in the training process. Consider the process of back propagation. Define

R i = B b=1 mi k=1 ∂ ∂x (i) b,k F z (θ) 2 ,

where x (i) b,k is the output of the k-th neuron in the i-th layer in the b-th data sample in the batch. By the Lipschitzness of the objective, R L can be bounded by a constant. If R i can be bounded by a constant, then by the Lipschitzness of σ and Lemma C.1, the gradient of γ and β in layer i can also be bounded by a constant. Note that

g t+1,k = g t,k -η g,t ∂ ∂g t,k F z (θ t ) -λη g,t g t,k

Thus γ and β in layer i can be bounded by a constant since

|g t+1,k | ≤ (1 -η g,t λ)|g t,k | + η g,t λ • 1 λ ∂ ∂g t,k F z (θ t ) .

Also Lemma C.1 and the Lipschitzness of σ imply that R i-1 can be bounded if R i and γ in the layer i can be bounded by a constant. Using a simple induction, we can prove the existence of K for bounding the norm of g t 2 for all time t.

Theorem C.3. If g 0 2 is bounded by a constant, then Φ satisfies the assumptions in Section 2.4.

Proof. Let C be the set of parameters θ satisfying g ≤ K and w (i) 2 = 1 for all 1 ≤ i ≤ m. By Lemma C.2, C contains the set of θ associated with the points lying between each pair of θ t and θ t+1 (including the endpoints).

It is easy to show that F z ( θ) is twice continously differentiable. Since C is compact, by the Extreme Value Theorem, there must exist such constants L vv ij , L vg i , L gg , G g for upper bounding the smoothness and the difference of gradients.

D EXPERIMENTS:

In this section, we provide experimental evidence showing that the auto rate-tuning behavior does empower BN in the optimization aspect.

We trained a modified version of VGGNet (Simonyan & Zisserman, 2014) on Tensorflow. This network has 2 × conv64, pooling, 3 × conv128, pooling, 3 × conv256, pooling, 3 × conv512, pooling, 3 × conv512, pooling, fc512, fc10 layers in order. Each convolutional layer has kernel size 3 × 3 and stride 1. ReLU is used as the activation function after each convolutional or fullyconnected layer. We add a BN layer right before each ReLU. We set = 0 in each BN, since we observed that the network works equally well for being 0 or an small number (such as 10 -3 , the default value in Tensorflow). We initialize the parameters according to the default configuration in Tensorflow: all the weights are initialized by Glorot uniform initializer (Glorot & Bengio, 2010) ; β and γ in BN are initialized by 0 and 1, respectively.

In this network, every kernel is scale-invariant, and for every BN layer except the last one, the concatenation of all β and γ parameters in this BN is also scale-invariant. Only β and γ parameters in the last BN are scale-variant (See Section 2.1). We consider the training in following two settings:

1. Train the network using the standard SGD (No momentum, learning rate decay, weight decay and dropout);

2. Train the network using Projected SGD (PSGD): at each iteration, one first takes a step proportional to the negative of the gradient calculated in a random batch, and then projects each scale-invariant parameter to the sphere with radius equal to its 2-norm before this iteration, i.e., rescales each scale-invariant parameter so that each maintains its length during training.

Note that the projection in Setting 2 removes the adaptivity of the learning rates in the corresponding intrinsic optimization problem, i.e., G

t in equation 9 remains constant during the training. Thus, by comparing Setting 1 and Setting 2, we can know whether or not the auto-tuning behavior of BN shown in theory is effective in practice. 

D.1 SEPARATE LEARNING RATES:

As in our theoretical analysis, we consider what will happen if we set two learning rates separately for scale-invariant and scale-variant parameters. We train the network in either setting with different learning rates ranging from 10 -2 to 10 2 for 100 epochs.

First, we fix the learning rate for scale-variant ones to 0.1, and try different learning rates for scaleinvariant ones. As shown in Figure 1 , for small learning rates (such as 0.1), the training processes of networks in Setting 1 and 2 are very similar. But for larger learning rates, networks in Setting 1 can still converge to 0 for all the learning rates we tried, while networks in Setting 2 got stuck with relatively large training loss. This suggests that the auto-tuning behavior of BN does takes effect when the learning rate is large, and it matches with the claimed effect of BN in (Ioffe & Szegedy, 2015) that BN enables us to use a higher learning rate. Though our theoretical analysis cannot be directly applied to the network we trained due to the non-smoothness of the loss function, the experiment results match with what we expect in our analysis.

D.2 UNIFIED LEARNING RATE:

Next, we consider the case in which we train the network with a unified learning rate for both scaleinvariant and scale-variant parameters. We also compare Setting 1 and 2 with the setting in which we train the network with all the BN layers removed using SGD (we call it Setting 3).

As shown in Figure 2 , the training loss of networks in Setting 1 converges to 0. On the contrast, the training loss of networks in Setting 2 and 3 fails to converge to 0 when a large learning rate is used, and in some cases the loss diverges to infinity or NaN. This suggests that the auto-tuning behavior of BN has an effective role in the case that a unified learning rate is set for all parameters.

For a fair comparison, we also trained neural networks in Setting 3 with initialization essentially equivalent to the ones with BN. This is done in the same way as (Krähenbühl et al., 2015; Mishkin & Matas, 2015) and Section 3 of (Salimans & Kingma, 2016) : we first randomly initialize the parameters, then feed the first batch into the network and adjust the scaling and bias of each neuron to make its outputs have zero mean and unit variance. In this way, the loss of the networks converges to 0 when the learning rate is smaller than 10 -2.0 , but for a slightly larger learning rate such as 10 -1.8 , the loss fails to converge to 0, and sometimes even diverges to infinity or NaN. Compared with experimental results in Setting 1, this suggests that the robustness of training brought by BN is independent of the fact that BN changes the effective initialization of parameters.

D.3 GENERALIZATION:

Despite in Setting 1 the convergence of training loss for different learning rates, the convergence points can be different, which lead to different performances on test data.

In Figure 3 , we plot the test accuracy of networks trained in Setting 1 and 2 using different unified learning rates, or separate learning rates with the learning rate for scale-variant parameters fixed to 0.1. As shown in the Figure 3 , the test accuracy of networks in Setting 2 decreases as the learning rate increases over 0.1, while the test accuracy of networks in Setting 1 remains higher than 75%. The main reason that the network in Setting 2 doesn't perform well is underfitting, i.e. the network in Setting 2 fails to fit the training data well when learning rate is large. This suggests that the autotuning behavior of BN also benefits generalization since such behavior allows the algorithm to pick learning rates from a wider range while still converging to small test error.

:

Our results to this network are rather conceptual, since the smoothness upper bound can be as large as M O(L) , where L is the number of layers and M is the maximum width of each layer.

instead of η w,t alone that really determines the trajectory of gradient descent given the normalized scale-invariant parameter v (i) t . In other words, the magnitude of the initialization of parameters before BN is as important as their learning rates: multiplying the initialization of scale-invariant parameter by constant C is equivalent to dividing its learning rate by C 2 . Thus we suggest researchers to report initialization as well as learning rates in the future experiments.

TRAINING BY FULL-BATCH GRADIENT DESCENTIn this section, we rigorously analyze the effect related to the scale-invariant properties in training neural network by full-batch gradient descent. We use the framework introduced in Section 2.2 and assumptions from Section 2.4. We focus on the full-batch training, i.e., z t is always equal to the whole training set and F zt (θ) = L(θ).

≤ Õ (log T )

3/2 √ T .

Figures and Tables:

Figure 1: The relationship between the training loss and the learning rate for scale-invariant parameters, with learning rate for scale-variant ones set to 0.1. Left: The average training loss of the last 5 epochs (averaged across 10 experiments). In rare cases, the training loss becomes NaN in the experiments for the yellow curve (SGD, separate) with learning rate larger than 10. Right: The average training loss of each epoch (each curve stands for a single experiment).

Figure 2: The relationship between the training loss and the learning rate. For learning rate larger than 10, the training loss of PSGD or SGD with BN removed is always either very large or NaN, and thus not invisible in the figure. Left: The average training loss of the last 5 epochs (averaged across 10 experiments). In rare cases, the training loss becomes NaN in the experiments for the green curve (SGD, BN removed) with learning rate larger than 10 -0.7 . We removed such data when taking the average. Right: The average training loss of each epoch (each curve stands for a single experiment).

Figure 3: The relationship between the test accuracy and the learning rate. Left: The average test accuracy of the last 5 epochs (averaged across 10 experiments). Right: The test accuracy after each epoch (each curve stands for a single experiment). Due to the implementation of Tensorflow, outputing NaN leads to a test accuracy of 10%. Note that the magenta dotted curve (PSGD, lr=100), red dashed curve (SGD, BN removed, lr=1) and cyan dashed curve (SGD, BN removed, lr=10) are covered by the magenta dashed curve (SGD, BN removed, lr=100). They all have 10% test accuracy.

In modern neural networks, ReLU or Leaky ReLU are often used, which makes the loss non-smooth. It would have more implications by showing similar results in non-smooth settings. Also, we only considered gradient descent in this paper. It can be shown that if we perform (stochastic) gradient descent with momentum, the norm of scale-invariant parameters will also be monotone increasing. It would be interesting to use it to show similar convergence results for more gradient methods. Xiaoxia Wu, Rachel Ward, and Lé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.

Table content: <table><tr><td>Dongruo Zhou, Yiqi Tang, Ziyan Yang, Yuan Cao, and Quanquan Gu. On the convergence of</td></tr><tr><td>adaptive gradient methods for nonconvex optimization. arXiv preprint arXiv:1808.05671, 2018.</td></tr><tr><td>Fangyu Zou and Li Shen. On the convergence of adagrad with momentum for training deep neural</td></tr><tr><td>networks. arXiv preprint arXiv:1808.03408, 2018.</td></tr></table>

Peer review (iclr2019):
 * Description The work is motivated by the empirical performance of Batch Normalization and in particular the observed better robustness of the choice of the learning rate. Authors analyze theoretically the asymptotic convergence rate for objectives involving normalization, not necessarily BN, and show that for scale-invariant groups of parameters (appearing as a result of normalization) the initial learning rate may be set arbitrary while still asymptotic convergence is guaranteed with the same rate as the best known in the general case. Offline gradient descent and stochastic gradient descent cases are considered. * Strengths The work addresses better theoretical understanding of successful heuristics in deep learning, namely batch normalization and other normalizations. The technical results obtained are non-trivial and detailed proofs are presented. Also I did not verify the proofs the paper appears technically correct and technically clear. The result may be interpreted in the following form: if one chooses to use BN or other normalization, the paper gives a recommendation that only the learning rate of scale-variant parameters need to be set, which may have some practical advantages. Perhaps more important than the rate of convergence, is the guarantee that the method will not diverge (and will not get stuck in a non-local minimum). * Criticism This paper presents non-trivial theoretical results that are worth to be published but as I argue below its has a weak relevance to practice and the applicability of the obtained results is unclear. -- Concerns regarding the clarity of presentation and interpretation of the results. The properties of BN used as motivation for the study, are observed non-asymptotically with constant or empirically decreased learning rate schedules for a limited number of iterations. In contrast, the studied learning rates are asymptotic and there is a big discrepancy. SGD is observed to be significantly faster than batch gradient when far from convergence (experimental evidence), and this is with or without normalization. In practice, the training is stopped much before convergence, in the hope of finding solutions close to minimum with high probability. There is in fact no experimental evidence that the practical advantages of BN are relevant to the results proven. It makes a nice story that the theoretical properties justify the observations, but they may be as well completely unrelated. As seen from the formal construction, the theoretical results apply equally well to all normalization methods. It occludes the clarity that BN is emphasized amongst them. Considering theoretically, what advantages truly follow from the paper for optimizing a given function? Let’s consider the following cases. 1. For optimizing a general smooth function with all parameters forming a single scale-invariant vector. In this case, the paper proves that no careful selection of the learning rate is necessary. This result is beyond machine learning and unfortunately I cannot evaluate its merit. Is it known / not known in optimization? 2. The case of data-independent normalization (such as weight normalization). Without normalization, we have to tune learning rate to achieve the optimal convergence. With normalization we still have to tune the learning rate (as scale-variant parameters remain or are reintroduced with each invariance to preserve the degrees of freedom), then we have to wait for the phase two of Lemma 3.2 so that the learning rate of scale-invariant parameters adapts, and from then on the optimal convergence rate can be guaranteed. 3. The case of Batch Normalization. Note that there is no direct correspondence between the loss of BN-normalized network (2) and the loss of the original network because of dependence of the normalization on the batches. In other words, there is no setting of parameters of the original network that would make its forward pass equivalent to that of BN network (2) for all batches. The theory tells the same as in case 2 above but with an additional price of optimizing a different function. These points remain me puzzled regarding either practical or theoretical application of the result. It would be great if authors could elaborate. -- Difference from Wu et al. 2018 This works is cited as a source of inspiration in several places in the paper. As the submission is a theoretical result with no immediate applicability, it would be very helpful if the authors could detail the technical improvements over this related work. Note, ICLR policy says that arxiv preprints earlier than one month before submission are considered a prior art. Could the authors elaborate more on possible practical/theoretical applications? * Side Notes (not affecting the review recommendation) I believe that the claim that “BN reduces covariate shift” (actively discussed in the intro) was an imprecise statement in the original work. Instead, BN should be able to quickly adapt to the covariate shift when it occurs. It achieves this by using the parameterization in which the mean and variance statistics of neurons (the quantities whose change is called the covariate shift) depend on variables that are local to the layer (gamma, beta in (1)) rather than on the cumulative effect of all of the preceding layers. * Revision I took into account the discussion and the newly added experiments and increased the score. The experiments verify the proven effect and make the paper more substantial. Some additional comments about experiments follow. Training loss plots would be more clear in the log scale. Comparison to "SGD BN removed" is not fair because the initialization is different (application of BN re-initializes weight scales and biases). The same initialization can be achieved by performing one training pass with BN with 0 learning rate and then removing it, see e.g. Gitman, I. and Ginsburg, B. (2017). Comparison of batch normalization and weight normalization algorithms for the large-scale image classification. The use of Glorot uniform initializer is somewhat subtle. Since BN is used, Glorot initialization has no effect for a forward pass. However, it affects the gradient norm. Is there a rationale in this setting or it is just a more tricky method to fix the weight norm to some constant, e.g. ||w||=1?