Title: TOWARDS UNDERSTANDING REGULARIZATION IN BATCH NORMALIZATION

Abstract: Batch Normalization (BN) improves both convergence and generalization in training neural networks. This work understands these phenomena theoretically. We analyze BN by using a basic block of neural networks, consisting of a kernel layer, a BN layer, and a nonlinear activation function. This basic network helps us understand the impacts of BN in three aspects. First, by viewing BN as an implicit regularizer, BN can be decomposed into population normalization (PN) and gamma decay as an explicit regularization. Second, learning dynamics of BN and the regularization show that training converged with large maximum and effective learning rate. Third, generalization of BN is explored by using statistical mechanics. Experiments demonstrate that BN in convolutional neural networks share the same traits of regularization as the above analyses.

1. INTRODUCTION:

Batch Normalization (BN) is an indispensable component in many deep neural networks (He et al., 2016; Huang et al., 2017) . BN has been widely used in various areas such as machine vision, speech and natural language processing. Experimental studies (Ioffe & Szegedy, 2015) suggested that BN improves convergence and generalization by enabling large learning rate and preventing overfitting when training deep networks. Understanding BN theoretically is a key question. This work investigates regularization of BN as well as its optimization and generalization in a singlelayer perceptron, which is a building block of deep models, consisting of a kernel layer, a BN layer, and a nonlinear activation function such as ReLU. The computation of BN is written by y = g( ĥ), ĥ = γ h -µB σB + β and h = w T x.

(1)

This work denotes a scalar and a vector by using lowercase letter (e.g. x) and bold lowercase letter (e.g. x) respectively. In Eqn.(1), y is the output of a neuron, g(•) denotes an activation function, h and ĥ are hidden values before and after batch normalization, w and x are kernel weight vector and network input respectively. In BN, µ B and σ B represent the mean and standard deviation of h. They are estimated within a batch of samples for each neuron independently. γ is a scale parameter and β is a shift parameter. In what follows, Sec.1.1 overviews assumptions and main results, and Sec.1.2 presents relationships with previous work.

1.1. OVERVIEW OF RESULTS:

We overview results in three aspects.

• First, Sec.2 decomposes BN into population normalization (PN) and gamma decay. To better understand BN, we treat a single-layer perceptron with ReLU activation function as an illustrative case. Despite the simplicity of this case, it is a building block of deep networks and has been widely adopted in theoretical analyses such as proper initialization (Krogh & Hertz, 1992; Advani & Saxe, 2017) , dropout (Wager et al., 2013) , weight decay and data augmentation (Bös, 1998) . The results in Sec.2 can be extended to deep neural networks as presented in Appendix C.4.

Our analyses assume that neurons at the BN layer are independent similar to (Salimans & Kingma, 2016; van Laarhoven, 2017; Teye et al., 2018) , as the mean and the variance of BN are estimated individually for each neuron of each layer. The form of regularization in this study does not rely on

Gaussian assumption on the network input and the weight vector, meaning our assumption is milder than those in (Yoshida et al., 2017; Ba et al., 2016; Salimans & Kingma, 2016) .

Sec.2 tells us that BN has an explicit regularization form, gamma decay, where µ B and σ B have different impacts: (1) µ B discourages reliance on a single neuron and encourages different neurons to have equal magnitude, in the sense that corrupting individual neuron does not harm generalization. This phenomenon was also found empirically in a recent work (Morcos et al., 2018) , but has not been established analytically.

(2) σ B reduces kurtosis of the input distribution as well as correlations between neurons.

(3) The regularization strengths of these statistics are inversely proportional to the batch size M , indicating that BN with large batch would decrease generalization. (4) Removing either one of µ B and σ B could imped convergence and generalization.

• Second, by using ordinary differential equations (ODEs), Sec.3 shows that gamma decay enables the network trained with BN to converge with large maximum learning rate and effective learning rate, compared to the network trained without BN or trained with weight normalization (WN) (Salimans & Kingma, 2016) that is a counterpart of BN. The maximum learning rate (LR) represents the largest LR value that allows training to converge to a fixed point without diverging, while effective LR represents the actual LR in training. Larger maximum and effective LRs imply faster convergence rate.

• Third, Sec.4 compares generalization errors of BN, WN, and vanilla SGD by using statistical mechanics. The "large-scale" regime is of interest, where number of samples P and number of neurons N are both large but their ratio P/N is finite. In this regime, the generalization errors are quantified both analytically and empirically.

Numerical results in Sec.5 show that BN in CNNs has the same traits of regularization as disclosed above.

1.2. RELATED WORK:

Neural Network Analysis. Many studies conducted theoretical analyses of neural networks (Opper et al., 1990; Saad & Solla, 1996; Bs & Opper, 1998; Pennington & Bahri, 2017; Zhang et al., 2017b; Brutzkus & Globerson, 2017; Raghu et al., 2017; Mei et al., 2016; Tian, 2017) . For example, for a multilayer network with linear activation function, Glorot & Bengio (2010) explored its SGD dynamics and Kawaguchi (2016) showed that every local minimum is global. Tian (2017) studied the critical points and convergence behaviors of a 2-layered network with ReLU units. Zhang et al. (2017b) investigated a teacher-student model when the activation function is harmonic. In (Saad & Solla, 1996) , the learning dynamics of a committee machine were discussed when the activation function is error function erf(x). Unlike previous work, this work analyzes regularization emerged in BN and its impact to both learning and generalization, which are still unseen in the literature.

Normalization. Many normalization methods have been proposed recently. For example, BN (Ioffe & Szegedy, 2015) was introduced to stabilize the distribution of input data of each hidden layer.

Weight normalization (WN) (Salimans & Kingma, 2016) decouples the lengths of the network parameter vectors from their directions, by normalizing the parameter vectors to unit length. The dynamic of WN was studied by using a single-layer network (Yoshida et al., 2017) . Li et al. (2018) diagnosed the compatibility of BN and dropout (Srivastava et al., 2014) by reducing the variance shift produced by them.

Moreover, van Laarhoven (2017) showed that weight decay has no regularization effect when using together with BN or WN. Ba et al. (2016) demonstrated when BN or WN is employed, backpropagating gradients through a hidden layer is scale-invariant with respect to the network parameters. Santurkar et al. (2018) gave another perspective of the role of BN during training instead of reducing the covariant shift. They argued that BN results in a smoother optimization landscape and the Lipschitzness is strengthened in networks trained with BN. However, both analytical and empirical results of regularization in BN are still desirable. Our study explores regularization, optimization, and generalization of BN in the scenario of online learning.

Regularization. Ioffe & Szegedy (2015) conjectured that BN implicitly regularizes training to prevent overfitting. Zhang et al. (2017a) categorized BN as an implicit regularizer from experimental results. Szegedy et al. (2015) also conjectured that in the Inception network, BN behaves similar to dropout to improve the generalization ability. Gitman & Ginsburg (2017) experimentally compared BN and WN, and also confirmed the better generalization of BN. In the literature there are also implicit regularization schemes other than BN. For instance, random noise in the input layer for data augmentation has long been discovered equivalent to a weight decay method, in the sense that the inverse of the signal-to-noise ratio acts as the decay factor (Krogh & Hertz, 1992; Rifai et al., 2011) . Dropout (Srivastava et al., 2014) was also proved able to regularize training by using the generalized linear model (Wager et al., 2013) .

2. A PROBABILISTIC INTERPRETATION OF BN:

The notations in this work are summarized in Appendix Table 2 for reference.

Training the above single-layer perceptron with BN in Eqn.

(1) typically involves minimizing a negative log likelihood function with respect to a set of network parameters θ = {w, γ, β}. Then the loss function is defined by

EQUATION

where p(y j | ĥj ; θ) represents the likelihood function of the network and P is number of training samples. As Gaussian distribution is often employed as prior distribution for the network parameters, we have a regularization term ζ θ 2 2 known as weight decay (Krizhevsky et al., 2012) that is a popular technique in deep learning, where ζ is a coefficient.

To derive regularization of BN, we treat µ B and σ B as random variables. Since one sample x is seen many times in the entire training course, and at each time x is presented with the other samples in a batch that is drawn randomly, µ B and σ B can be treated as injected random noise for x.

Prior of µ B , σ B . By following (Teye et al., 2018) , we find that BN also induces Gaussian priors for µ B and σ B . We have µ B ∼ N (µ P ,

EQUATION

), where M is batch size, µ P and σ P are population mean and standard deviation respectively, and ρ is kurtosis that measures the peakedness of the distribution of h. These priors tell us that µ B and σ B would produce Gaussian noise in training. There is a tradeoff regarding this noise. For example, when M is small, training could diverge because the noise is large. This is supported by experiment of BN (Wu & He, 2018) where training diverges when M = 2 in ImageNet (Russakovsky et al., 2015) . When M is large, the noise is small because µ B and σ B get close to µ P and σ P . It is known that M > 30 would provide a moderate noise, as the sample statistics converges in probability to the population statistics by the weak Law of Large Numbers. This is also supported by experiment (Ioffe & Szegedy, 2015) where BN with M = 32 already works well in ImageNet.

2.1. A REGULARIZATION FORM:

The loss function in Eqn.(2) can be written as an expected loss by integrating over the priors of µ B and σ B , that is, 1

P P j=1 E µ B ,σ B [ ( ĥj )]

where E[•] denotes expectation. We show that µ B and σ B impose regularization on the scale parameter γ by decomposing BN into population normalization (PN) and gamma decay. To see this, we employ a single-layer perceptron and ReLU activation function as an illustrative example. A more rigorous description is provided in Appendix C.1.

Regularization of µ B , σ B . Let ( ĥ) be the loss function defined in Eqn.(2) and ReLU be the activation function. We have

1 P P j=1 Eµ B ,σ B ( ĥj ) 1 P P j=1 ( hj ) PN + ζ(h)γ 2 gamma decay

, and

EQUATION

where hj = γ h j -µ P σ P + β and h j = w T x j represent the computations of PN. ζ(h)γ 2 represents gamma decay, where ζ(h) is an adaptive decay factor depended on the hidden value h. Moreover, ρ is the kurtosis of distribution of h, I(γ) represents an estimation of the Fisher information of γ and

I(γ) = 1 P P j=1 ( ∂ ( ĥj )

∂γ ) 2 , and σ(•) is a sigmoid function. From Eqn.(3), we have several observations that have both theoretical and practical values.

• First, PN replaces the batch statistics µ B , σ B in BN by the population statistics µ P , σ P . In gamma decay, computation of ζ(h) is data-dependent, making it differed from weight decay where the coefficient is determined manually. In fact, Eqn.(3) recasts the randomness of BN in a deterministic manner, not only enabling us to apply methodologies such as ODEs and statistical mechanics to analyze BN, but also inspiring us to imitate BN's performance by WN without computing batch statistics in empirical study.

• Second, PN is closely connected to WN, which is independent from sample mean and variance. WN (Salimans & Kingma, 2016) is defined by υ w T x ||w||2 that normalizes the weight vector w to have unit variance, where υ is a learnable parameter. Let each diagonal element of the covariance matrix of x be a and all the off-diagonal elements be zeros. hj in Eqn.(3) can be rewritten as

EQUATION

where υ = γ a and b = -γµ P a||w||2 + β. Eqn.(4) removes the estimations of statistics and eases our analyses of regularization for BN.

• Third, µ B and σ B produce different strengths in ζ(h). As shown in Eqn.(3), the strength from µ B depends on the expectation of σ( hj ) ∈ [0, 1], which represents excitation or inhibition of a neuron, meaning that a neuron with larger output may exposure to larger regularization, encouraging different neurons to have equal magnitude. This is consistent with empirical result (Morcos et al., 2018) which prevented reliance on single neuron to improve generalization. The strength from σ B works as a complement for µ B . For a single neuron, I(γ) represents the norm of gradient, implying that BN punishes large gradient norm. For multiple neurons, I(γ) is the Fisher information matrix of γ, meaning that BN would penalize correlations among neurons. Both σ B and µ B are important, removing either one of them would imped performance.

Extensions to Deep Networks. The above results can be extended to deep networks as shown in Appendix C.4 by decomposing the expected loss at a certain hidden layer. We also demonstrate the results empirically in Sec.5, where we observe that CNNs trained with BN share similar traits of regularization as discussed above.

3. OPTIMIZATION WITH REGULARIZATION:

Now we show that BN converges with large maximum and effective learning rate (LR), where the former one is the largest LR when training converged, while the latter one is the actual LR during training. With BN, we find that both LRs would be larger than a network trained without BN. Our result explains why BN enables large learning rates used in practice (Ioffe & Szegedy, 2015) .

Our analyses are conducted in three stages. First, we establish dynamical equations of a teacherstudent model in the thermodynamic limit and acquire the fixed point. Second, we investigate the eigenvalues of the corresponding Jacobian matrix at this fixed point. Finally, we calculate the maximum and the effective LR.

Teacher-Student Model. We first introduce useful techniques from statistical mechanics (SM). With SM, a student network is dedicated to learn relationship between a Gaussian input and an output by using a weight vector w as parameters. It is useful to characterize behavior of the student by using a teacher network with w * as a ground-truth parameter vector. We treat single-layer perceptron as a student, which is optimized by minimizing the euclidian distance between its output and the supervision provided by a teacher without BN. The student and the teacher have identical activation function.

Loss Function. We define a loss function of the above teacher-student model by 1

P P j=1 (x j ) = 1 P P j=1 g(w * T x j ) -g( √ N γ w T x j w 2 ) 2 + ζγ 2

, where g(w * T x j ) represents supervision from the teacher, while g(

√ N γ w T x j w 2 )

is the output of student trained to mimic the teacher. This student is defined by following Eqn.(4) with ν = √ N γ and the bias term is absorbed into w. The above loss function represents BN by using WN with gamma decay, and it is sufficient to study the learning rates of different approaches. Let θ = {w, γ} be a set of parameters updated by SGD, i.e.

θ j+1 = θ j -η ∂ (x j )

∂θ j where η denotes learning rate. The update rules for w and γ are

EQUATION

where wj denotes a normalized weight vector of the student, that is, wj = √ N γ j w j w j 2 , and δ j = g ( wjT x j )[g(w * T x j ) -g( wjT x j )] represents the gradient1 for clarity of notations.

Order Parameters. As we are interested in the "large-scale" regime where both N and P are large and their ratio P/N is finite, it is difficult to examine a student with parameters in high dimensions directly. Therefore, we transform the weight vectors to order parameters that fully characterize interactions between the student and the teacher network. In this case, the parameter vector can be reparameterized by using a vector of three elements including γ, R, and L. In particular, γ measures length of the normalized weight vector w, that is, wT w = N γ 2 w T w w 2 2 = N γ 2 . The parameter R measures angle (overlapping ratio) between the weight vectors of student and teacher. We have

R = wT w * w w * = 1 N γ

wT w * , where the norm of the ground-truth vector is 1 N w * T w * = 1. Moreover, L represents length of the original weight vector w and L 2 = 1 N w T w. Learning Dynamics. The update equations ( 5) can be transformed into a set of differential equations (ODEs) by using the above order parameters. This is achieved by treating the update step j as a continuous time variable t = j N . They can be turned into differential equations because the contiguous step ∆t = 1 N approaches zero in the thermodynamic limit when N → ∞. We obtain a dynamical system of three order parameters

dγ dt = η I 1 γ -ηζγ, dR dt = η γ L 2 I 3 -η R L 2 I 1 -η 2 γ 2 R 2L 4 I 2 ,

and

EQUATION

where

I 1 = E x [δ wT x], I 2 = E x [δ 2 x T x],

and

I 3 = E x [δw * T

x] are defined to simplify notations. The derivations of Eqn.( 6) can be found in Appendix C.5.

3.1. FIXED POINT OF THE DYNAMICAL SYSTEM:

(γ0, R0, L0) ηmax (R) η eff (R) BN (γ0, 1, L0) ∂(γ 0 I 3 -I 1 ) γ 0 ∂R - ζγ0 / ∂I 2 2∂R ηγ 0 L 2 0 WN (1, 1, L0) ∂(I 3 -I 1 ) ∂R / ∂I 2 2∂R η L 2 0 SGD (1, 1, 1) ∂(I 3 -I 1 ) ∂R / ∂I 2 2∂R η

Table 1 : Comparisons of fixed points, ηmax for R, and η eff for R. A fixed point is denoted as (γ0, R0, L0).

To find the fixed points of ( 6), we set dγ/dt = dR/dt = dL/dt = 0. The fixed points of BN, WN, and vanilla SGD (without BN and WN) are given in Table 1 . In the thermodynamic limit, the optima denoted as (γ 0 , R 0 , L 0 ) would be (γ 0 , R 0 , L 0 ) = (1, 1, 1). Our main interest is the overlapping ratio R 0 between the student and the teacher, because it optimizes the direction of the weight vector regardless of its length. We see that R 0 for all three approaches attain optimum '1'. Intuitively, in BN and WN, this optimal solution does not depend on the value of L 0 because their weight vectors are normalized. In other words, WN and BN are easier to optimize than vanilla SGD, unlike SGD where both R 0 and L 0 have to be optimized to '1'. Furthermore, γ 0 in BN depends on the activation function. For ReLU, we have γ bn 0 = 1 2ζ+1 (see Proposition 1 in Appendix C.5), meaning that norm of the normalized weight vector relies on the decay factor ζ. In WN, we have γ wn 0 = 1 as WN has no regularization on γ.

3.2. MAXIMUM AND EFFECTIVE LEARNING RATES:

With the above fixed points, we derive the maximum and the effective LR. Specifically, we analyze eigenvalues and eigenvectors of the Jacobian matrix corresponding to Eqn.( 6). We are interested in the LR to approach R 0 . We find that this optimum value only depends on its corresponding eigenvalue denoted as λ R . We have

λ R = ∂I2 ∂R ηγ0 2L 2 0 (η max -η eff )

, where η max and η eff represent the maximum and effective LR (proposition 2 in Appendix C.5), which are given in Table 1 . We demonstrate that λ R < 0 if and only if η max > η eff , such that the fixed point R 0 is stable for all approaches (proposition 3 in Appendix C.6). Moreover, it is also able to show that η max of BN (η bn max ) is larger than WN and SGD, enabling R to converge with a larger learning rate. For ReLU as an example, we find that η bn max ≥ η {wn,sgd} max + 2ζ (proposition 4 in Appendix C.7). The larger maximum LRs enables the network to be trained more stably and has the potential to be combined with other stabilization techniques (Fagan & Iyengar, 2018) 

4. GENERALIZATION ANALYSIS:

Here we investigate generalization of BN by using a teacher-student model that minimizes a loss function 1 P P j=1 ((y * ) j -y j ) 2 , where y * represents the teacher's output and y is the student's output. We compare BN with WN+gamma decay and vanilla SGD. All of them share the same teacher network whose output is a noise-corrupted linear function y * = w * T x + s, where x is drawn from N (0, 1 N ) and s is an unobserved Gaussian noise. We are interested to see how the above methods resist this noise by using student networks with both identity (linear) and ReLU activation functions.

For vanilla SGD, the student is computed by y = g(w T x) with g(•) being either identity or ReLU, and w being the weight vector to optimize, where w has the same dimension as w * . The loss function of vanilla SGD is sgd = 1 P P j=1 y * -g(w T x j )

2 . For BN, the student is defined as

y = γ w T x-µ B σ B + β.

As our main interest is the weight vector, we freeze the bias by setting β = 0. Therefore, the batch average term µ B is also unnecessary to avoid additional parameters, and the loss function is written as bn = 1 P P j=1 (y * ) j -γw T x j /σ B 2 . For WN+gamma decay, the student is computed similar to Eqn.(4) by using y = √ N γ w T x w 2 . Then the loss function is defined by wn = 1

P P j=1 (y * ) j - √ N γ w T x j w 2 2 + ζ γ 2 2 .

With the above definitions, the three approaches are studied under the same teacher-student framework, where their generalization errors can be strictly compared with the other factors ruled out. We provide closed-form solutions of the generalization errors (see Appendix D.1) for vanilla SGD with both linear and ReLU student networks. The theoretical solution of WN+gamma decay can also be solved for the linear student, but still remains difficult for ReLU student whose numerical verification is provided instead. Both vanilla SGD and WN+gamma decay are compared with numerical solutions of BN.

vanilla SGD. In an identity (linear) student, the solution of generalization error depends on the rank of correlation matrix Σ = x T x. Here we define an effective load α = P/N that is the ratio between number of samples P and number of input neurons N (number of learnable parameters).

The generalization error of the identity student is denoted as sgd id , which can be acquired by using the distribution of eigenvalues of Σ following (Advani & Saxe, 2017) 

. If α < 1, sgd id = 1 -α + αS/(1 -α). Otherwise, sgd id = S/(α -1)

where S is the variance of the injected noise to the teacher network. The values of sgd id with respect to α are plotted in blue curve of Fig. 1(a) . It first decreases but then increases as α increases from 0 to 1. sgd id diverges at α = 1. And it would decrease again when α > 1.

In a ReLU student, the nonlinear activation yields difficulty to derive the theoretical solution. Here we utilize the statistical mechanics and calculate that sgd relu = 1 -α/4 + αS 2(2-α) and α < 2 (see AppendixD.2). When comparing to the lower bound (trained without noisy supervision) shown as the red curve in Fig. 1 (b), we see that sgd relu (blue curve) diverges at α = 2. This is because the student overfits the noise in the teacher's output. The curve of numerical solution is also plotted in dashed line in Fig. 1 (b) and it captures the diverging trend well. It should be noted that obtaining the theoretical curve empirically requires an infinitely long time of training and an infinitely small learning rate. This unreachable limit explains the discrepancies between the theoretical and the numerical solution.

WN+gamma decay. In a linear student, the gamma decay term turns the correlation matrix to Σ = x T x + ζI , which is positive definite. Following statistical mechanics (Krogh & Hertz, 1992) , the generalization error is

wn id = δ 2 ∂(ζG) ∂ζ -ζ 2 ∂G ∂ζ where G = 1 -α -ζ + ζ + (1 + √ α) 2 1 2 ζ + (1 - √ α) 2 1 2 2ζ.

We see that wn id can be computed quantitatively given the values of ζ and α. Let the variance of noise injected to the teacher be 0.25. In the ReLU student, the setting is mostly the same as the linear case, except that we employ a smaller batch size M = 16. The results are shown as black squares in Fig. 1(b) . For ReLU units, the equivalent ζ of gamma decay is ζ = 1 4M . If one compares the generalization error of BN with 'WN+gamma decay' (green curve), a clear correspondence is found, which also validates the derivations for the ReLU activation function.

5. EXPERIMENTS IN CNNS:

This section shows that BN in CNNs follows similar traits of regularization as the above analyses.

To compare different methods, the CNN architectures are fixed while only the normalization layers are changed. We adopt CIFAR10 (Krizhevsky, 2009) that contains 60k images of 10 categories (50k images for training and 10k images for test). All models are trained by using SGD with momentum, while the initial learning rates are scaled proportionally (Goyal et al., 2017) when different batch sizes are presented. More empirical setting can be found in Appendix B.

Evaluation of PN+Gamma Decay. This work shows that BN can be decomposed into PN and gamma decay. We empirically compare 'PN+gamma decay' with BN by using ResNet18 (He et al., 2016) . For 'PN+gamma decay', the population statistics of PN and the decay factor of gamma decay are estimated by using sufficient amount of training samples. For BN, BN trained with a normal batch size M = 128 is treated as baseline as shown in Fig. 2 (a&b). We see that when batch size increases, BN would imped both loss and accuracy. For example, when increasing M to 1024, performance decreases because the regularization from the batch statistics reduces in large batch, resulting in overtraining (see the gap between train and validation loss in (a) when M = 1024).

In comparison, we train PN by using 10k training samples to estimate the population statistics. Note that this further reduces regularization. We see that the release of regularization can be complemented by gamma decay, making PN outperformed BN. This empirical result verifies our derivation of regularization for BN. Similar trend can be observed by experiment in a down-sampled version of ImageNet (see Appendix B.1). We would like to point out that 'PN+gamma decay' is of interest in theoretical analyses, but it is computation-demanding when applied in practice because evaluating µ P , σ P and ζ(h) may require sufficiently large number of samples.

Comparisons of Regularization. We study the regulation strengths of vanilla SGD, BN, WN, WN+mean-only BN, and WN+variance-only BN. At first, the strength of regularization terms from both µ B and σ B are compared by using a simpler network with 4 convolutional and 2 fully connected layers as used in (Salimans & Kingma, 2016) . Fig. 2 (c&d) compares their training and validation losses. We see that the generalization error of BN is much lower than WN and vanilla SGD. The reason has been disclosed in this work: stochastic behaviors of µ B and σ B in BN improves generalization.

To investigate µ B and σ B individually, we decompose their contributions by running a WN with mean-only BN as well as a WN with variance-only BN, to simulate their respective regularization. As shown in Fig. 2 (c&d), improvements from the mean-only and the variance-only BN over WN verify our conclusion that noises from µ B and σ B have different regularization strengths. Both of them are essential to produce good result.

Regularization and parameter norm. We further demonstrate impact of BN to the norm of parameters. We compare BN with vanilla SGD. A network is first trained by BN in order to converge to a local minima where the parameters do not change much. At this local minima, the weight vector is frozen and denoted as w bn . Then this network is finetuned by using vanilla SGD with a small learning rate 10 -3 and its kernel parameters are initialized by w sgd = γ w bn σ , where σ is the moving average of σ B . Fig. 4 in Appendix B.2 visualizes the results. As µ B and σ B are removed in vanilla SGD, it is found that the training loss decreases while the validation loss increases, implying that reduction in regularization makes the network converged to a sharper local minimum that generalizes less well. The magnitudes of kernel parameters w sgd at different layers are also observed to increase after freezing BN, due to the release of regularization on these parameters.

Batch size. To study BN with different batch sizes, we train different networks but only add BN at one layer at a time. The regularization on the γ parameter is compared in Fig. 2 (e) when BN is located at different layers. The values of γ 2 increase along with the batch size M due to the weaker regularization for the larger batches. The increase of γ 2 also makes all validation losses increased as shown in Fig. 2(f) .

BN and WN trained with dropout. As PN and gamma decay requires estimating the population statistics that increases computations, we utilize dropout as an alternative to improve regularization of BN. We add a dropout after each BN layer. Fig. 2 (g&h) plot the classification results using ResNet18. The generalization of BN deteriorates significantly when M increases from 128 to 1024. This is observed by the much higher validation loss (Fig. 2(g) ) and lower validation accuracy (Fig. 2(h )) when M = 1024. If a dropout layer with ratio 0.1 is added after each residual block layer for M = 1024 in ResNet18, the validation loss is suppressed and accuracy increased by a great margin. This superficially contradicts with the original claim that BN reduces the need for dropout (Ioffe & Szegedy, 2015) . As discussed in Appendix B.3, we find that there are two differences between our study and previous work (Ioffe & Szegedy, 2015) . Fig. 2 (g&h) also show that WN can also be regularized by dropout. We apply dropout after each WN layer with ratio 0.2 and the dropout is applied at the same layers as that for BN. We found that the improvement on both validation accuracy and loss is surprising. The accuracy increases from 0.90 to 0.93, even close to the results of BN. Nevertheless, additional regularization on WN still cannot make WN on par with the performance BN. In deep neural networks the distribution after each layer would be far from a Gaussian distribution, in which case WN is not a good substitute for PN.

6. CONCLUSIONS:

This work investigated an explicit regularization form of BN, which was decomposed into PN and gamma decay where the regularization strengths from µ B and σ B were explored. Moreover, optimization and generalization of BN with regularization were derived and compared with vanilla SGD, WN, and WN+gamma decay, showing that BN enables training to converge with large maximum and effective learning rate, as well as leads to better generalization. Our analytical results explain many existing empirical phenomena. Experiments in CNNs showed that BN in deep networks share the same traits of regularization. In future work, we are interested in analyzing optimization and generalization of BN in deep networks, which is still an open problem. Moreover, investigating the other normalizers such as instance normalization (IN) (Ulyanov et al., 2016) and layer normalization (LN) (Ba et al., 2016) is also important. Understanding the characteristics of these normalizers should be the first step to analyze some recent best practices such as whitening (Luo, 2017b; a) , switchable normalization (Luo et al., 2019; 2018; Shao et al., 2019) , and switchable whitening (Pan et al., 2019) . 

APPENDICES A NOTATIONS:



B MORE EMPIRICAL SETTINGS AND RESULTS:

All experiments in Sec.5 are conducted in CIFAR10 by using ResNet18 and a CNN architecture similar to (Salimans & Kingma, 2016) that is summarized as 'conv(3,32)-conv(3,32)-conv(3,64)conv(3,64)-pool(2,2)-fc(512)-fc(10)', where 'conv(3,32)' represents a convolution with kernel size 3 and 32 channels, 'pool(2,2)' is max-pooling with kernel size 2 and stride 2, and 'fc' indicates a full connection. We follow a configuration for training by using SGD with a momentum value of 0.9 and continuously decaying the learning rate by a factor of 10 -4 each step. For different batch sizes, the initial learning rate is scaled proportionally with the batch size to maintain a similar learning dynamics (Goyal et al., 2017) .

B.1 RESULTS IN DOWNSAMPLED IMAGENET:

Besides CIFAR10, we also evaluate 'PN+gamma decay' by employing a downsampled version of ImageNet (Loshchilov & Hutter, 2016) , which contains identical 1.2 million data and 1k categories as the original ImageNet, but each image is scaled to 32×32. We train ResNet18 in downsampled ImageNet by following the training protocol used in (He et al., 2016) . In particular, ResNet18 is trained by using SGD with momentum of 0.9 and the initial learning rate is 0.1, which is then decayed by a factor of 10 after 30, 60, and 90 training epochs.

In downsampled ImageNet, we observe similar trends as those presented in CIFAR10. For example, we see that BN would imped both loss and accuracy when batch size increases. When increasing M to 1024 as shown in Fig. 3 , both the loss and validation accuracy decrease because the regularization from the random batch statistics reduces in large batch size, resulting in overtraining. This can be seen by the gap between the training and the validation loss. Nevertheless, we see that the reduction of regularization can be complemented when PN is trained with adaptive gamma decay, which makes PN performed comparably to BN in downsampled ImageNet.

B.2 IMPACT OF BN TO THE NORM OF PARAMETERS:

We demonstrate the impact of BN to the norm of parameters. We compare BN with vanilla SGD, where a network is first trained by BN in order to converge to a local minima when the parameters do not change much. At this local minima, the weight vector is frozen and denoted as w bn . Then this network is finetuned by using vanilla SGD with a small learning rate 10 -3 with the kernel parameters initialized by w sgd = γ w bn σ , where σ is the moving average of σ B . 

B.3 BN AND WN WITH DROPOUT:

BN+dropout. Despite the better generalization of BN with smaller batch sizes, large-batch training is more efficient in real cases. Therefore, improving generalization of BN with large batch is more desiring. However, gamma decay requires estimating the population statistics that increases computations. We also found that treating the decay factor as a constant hardly improves generalization for large batch. Therefore, we utilize dropout as an alternative to compensate for the insufficient regularization. Dropout has also been analytically viewed as a regularizer (Wager et al., 2013) . We add a dropout after each BN layer to impose regularization. Fig. 2 (g&h) in the main paper plot the classification results using ResNet18. The generalization of BN deteriorates significantly when M increases from 128 to 1024. This is observed by the much higher validation loss (Fig. 2(g) ) and lower validation accuracy (Fig. 2(h )) when M = 1024. If a dropout layer with ratio 0.1 is added after each residual block layer for M = 1024 in ResNet18, the validation loss is suppressed and accuracy increased by a great margin. This superficially contradicts with the original claim that BN reduces the need for dropout (Ioffe & Szegedy, 2015) . We find that there are two differences between our study and (Ioffe & Szegedy, 2015) .

First, in pervious study the batch size was fixed at a quite small value (e.g. 32), at which the regularization was already quite strong. Therefore, an additional dropout could not further cause better regularization, but on the contrary increases the instability in training and yields a lower accuracy. However, our study explores relatively large batch that degrades the regularization of BN, and thus dropout with a small ratio can complement. Second, usual trials put dropout before BN and cause BN to have different variances during training and test. In contrast, dropout follows BN in this study and the distance between two dropout layers is large (a residual block separation), thus the problem can be alleviated. The improvement by applying dropout after BN has also been observed by a recent work (Li et al., 2018) .

WN+dropout. Since BN can be treated as WN trained with regularization as shown in this study, combining WN with regularization should be able to match the performance of BN. As WN outperforms BN in running speed (without calculating statistics) and it suits better in RNNs than BN, an improvement of its generalization is also of great importance. Fig. 2 (g&h) also show that WN can also be regularized by dropout. We apply dropout after each WN layer with ratio 0.2 and the dropout is applied at the same layers as that for BN. We found that the improvement on both validation accuracy and loss is surprising. The accuracy increases from 0.90 to 0.93, even close to the results of BN. Nevertheless, additional regularization on WN still cannot make WN on par with the performance BN. In deep neural networks the distribution after each layer would be far from a Gaussian distribution, in which case WN is not a good substitute for PN. A potential substibute of BN would require us for designing better estimations of the distribution to improve the training speed and performance of deep networks.

C PROOF OF RESULTS:



C.1 PROOF OF EQN.(3):

Theorem 1 (Regularization of µ B , σ B ). Let a single-layer perceptron with BN and ReLU activation function be defined by y = max(0, ĥ), ĥ = γ h-µ B σ B +β and h = w T x, where x and y are the network input and output respectively, h and ĥ are the hidden values before and after batch normalization, and w is the weight vector. Let ( ĥ) be the loss function. Then

1 P P j=1 E µ B ,σ B ( ĥj ) 1 P P j=1 ( hj ) + ζ(h)γ 2 and ζ(h) = ρ + 2 8M I(γ) + 1 2M 1 P P j=1 σ( hj ),

where hj = γ w T x j -µ P ( ĥj ) ∂γ ) 2 , and σ(•) is a sigmoid function.

Proof. We have ĥj = γ w T x j -µ B σ B + β and hj = γ w T x j -µ P σ P + β. We prove theorem 1 by performing a Taylor expansion on a function A( ĥj ) at hj , where A( ĥj ) is a function of ĥj defined according to a particular activation function. The negative log likelihood function of the above single-layer perceptron can be generally defined as -log p(y j | ĥj ) = A( ĥj ) -y j ĥj , which is similar to the loss function of the generalized linear models with different activation functions. Therefore, we have

1 P P j=1 E µ B ,σ B [l( ĥj )] = 1 P P j=1 E µ B ,σ B A( ĥj ) -y j ĥj = 1 P P j=1

(A( hj ) -y j hj ) + 1

P P j=1 E µ B ,σ B -y j ( ĥj -hj ) + A( ĥj ) -A( hj ) = 1 P P j=1 l( hj ) + 1 P P j=1 E µ B ,σ B (A ( hj ) -y j )( ĥj -hj ) + 1 P P j=1 E µ B ,σ B A ( hj ) 2 ( ĥj -hj ) 2 = 1 P P j=1 l( hj ) + R f + R q ,

where A (•) and A (•) denote the first and second derivatives of function A(•). The first and second order terms in the expansion are represented by R f and R q respectively. To derive the analytical forms of R f and R q , we take a second-order Taylor expansion of of 1 σ B and 1

σ 2 B around σ P , it suffices to have 1 σ B ≈ 1 σ P + (- 1 σ 2 P )(σ B -σ P ) + 1 σ 3 P (σ B -σ P ) 2 and 1 σ 2 B ≈ 1 σ 2 P + (- 2 σ 3 P )(σ B -σ P ) + 3 σ 4 P (σ B -σ P ) 2 .

By applying the distributions of µ B and σ B introduced in section 2, we have µ B ∼ N (µ P ,

σ 2 P M

) and σ B ∼ N (σ P , ρ+2 4M ). Hence, R f can be derived as in the paper, R f can be derived as

R f = 1 P P j=1 E µ B ,σ B (A ( hj ) -y j )( ĥj hj ) = 1 P P j=1 E µ B ,σ B (A ( hj ) -y j ) γ w T x j -µ B σ B -γ w T x j -µ P σ P = 1 P P j=1 E µ B ,σ B (A ( hj y j ) γw T x j 1 σ B - 1 σ P + γ - µ B σ B + µ P σ P = 1 P P j=1 γ(A ( hj ) -y j )(w T x j -µ P )E σ B 1 σ B - 1 σ P = 1 P P j=1 ρ + 2 4M γ(A ( hj ) -y j ) w T x j -µ P σ P .

This R f term can be understood as below. Let h = w T x-µ P σ P and the distribution of the population data be p xy . We establish the following relationship

E (x,y)∼pxy E µ B ,σ B (A ( h) -y)h = E µ B ,σ B E x∼px E y|x∼p y|x (A ( h) -y)h = E µ B ,σ B E x∼px (E [y|x] -E y|x∼p y|x [y])h = 0.

Since the sample mean converges in probability to the population mean by the Weak Law of Large Numbers, for all > 0 and a constant number K (∃K > 0 and ∀P > K), we have p R f -E (x,y)∼pxy E µ B ,σ B (A ( h) -y)h ≥ ρ+2 4M = 0. This equation implies that R f is sufficiently small with a probability of 1 given moderately large number of data points P (the above inequality holds when P > 30).

On the other hand, R q can be derived as

R q = 1 P P j=1 E µ B ,σ B A ( hj ) 2 ( ĥj -hj ) 2 = 1 P P j=1 A ( hj ) 2 E µ B ,σ B (γ w T x j -µ B σ B + β -γ w T x j -µ P σ P + β) 2 = 1 P P j=1 A ( hj ) 2 E µ B ,σ B (γw T x j ) 2 ( 1 σ B - 1 σ P ) 2 -2γµ P w T x j ( 1 σ B - 1 σ P ) 2 + ( µ B σ B - µ P σ P ) 2 1 P P j=1 γ 2 A ( hj ) 2 (w T x j -µ P ) 2 E µ B ,σ B ( 1 σ B - 1 σ P ) 2 + E µ B ,σ B µ B -µ P σ B 2 = 1 P P j=1 γ 2 A ( hj ) 2 ( w T x j -µ P σ P ) 2 ρ + 2 4M + 1 M (1 + 3(ρ + 2) 4M

) .

Note that ∂ 2 l( hj )

∂γ 2 = A ( hj )( w T x j -µ P σ P

) 2 , we have I(γ) = 1 P P j=1 A ( hj )( w T x j -µ P σ P

) 2 been an estimator of the Fisher information with respect to the scale parameter γ. Then, by neglecting O(1/M 2 ) high-order term in R q , we get

R q ρ + 2 8M I(γ)γ 2 + µ d 2 A 2M γ 2 ,

where µ d 2 A indicates the mean of the second derivative of A(h).

The results of both ReLU activation function and identity function are provided as below.

C.2 RELU ACTIVATION FUNCTION:

For the ReLU non-linear activation function, that is g(h) = max(h, 0), we use its continuous approximation softplus function g(h) = log(1 + exp(h)) to derive the partition function A(h). In this case, we have µ d 2 A = 1 3) is also possible for such linear regression problem. Under the condition of Gaussian input x ∼ N (0, 1/N ), h = w T x is also a random variable satisfying a normal distribution N (0, 1). It can be derived that

E σ -1 B = √ M √ 2σ P Γ( M -2 2 ) Γ( M -1 2 ) and E σ -2 B = M σ 2 P Γ( M -1 2 -1) Γ( M -1 2 )

. Therefore

ζ = λ 1 + M Γ (M -3)/2 2Γ (M -1)/2 - √ 2M Γ (M -2)/2 Γ (M -1)/2 .

Furthermore, the expression of ζ can be simplified as ζ = 3 4M . If the bias term is neglected in a simple linear regression, contributions from µ B to the regularization term is neglected and thus ζ = 1 4M . Note that if one uses mean square error without being divided by 2 during linear regression, the values for ζ should be multiplied by 2 as well, where ζ = 1 2M .

Let t = j N is a normalized sample index that can be treated as a continuous time variable. We have ∆t = 1 N that approaches zero in the thermodynamic limit when N → ∞. In this way, the learning dynamic of Q 2 , RL and L 2 can be formulated as the following differential equations:

EQUATION

where I 1 = δ wT x x , I 2 = δ 2 x T x x , and I 3 = δw * T x x , which are the terms presented in dQ 2 dt , dRL dt , and dL 2 dt and • x denotes expectation over the distribution of x. They are used to simplify notations. Note that we neglect the last term of dL 2 /dt in Eqn.(8) since η 2 N (L 2 ) δ 2 ( wT x) 2 can be approximately equal to zero when N approaches infinity. On the other hand, we have dQ 2 = 2QdQ, dRL = RdL + LdR and dL 2 = 2LdL. Hence, Eqn.( 9) can be reduced to

EQUATION

)

Proposition 1. Let (Q 0 , R 0 , L 0 ) denote a fixed point with parameters Q, R and L of Eqn.( 10). Assume the learning rate η is sufficiently small when training converges and x ∼ N (0, 1 N I). If activation function g is ReLU, then we have Q 0 = 1 2ζ+1 , R 0 = 1 and L 0 could be arbitrary.

Proof. First, L has no influence on the output of student model since w is normalized, which implies that if (Q 0 , R 0 , L 0 ) is a fixed point of Eqn.( 10), L 0 could be arbitrary. Besides, we have η η 2 because the learning rate η is sufficiently small. Therefore, the terms in Eqn.(10) proportional to η 2 can be neglected. If (Q 0 , R 0 , L 0 ) is a fixed point, it suffices to have

EQUATION

EQUATION

To calculate I 1 and I 3 , we define s and t as wT x and w T x. Since x ∼ N (0, 1 N I), we can acquire

EQUATION

so probability measure of [s, t] T can be written as

DsDt = 1 2πQ √ 1 -R 2 exp - 1 2 s t T Q 2 QR QR 1 -1 s t

Then,

EQUATION

and

EQUATION

By substituting Eqn.( 13) and ( 14) into Eqn.( 11) and ( 12), we get Q 0 = 1 2ζ+1 and R 0 = 1.

Proposition 2. Given conditions in proposition1, let λ bn Q , λ bn R be the eigenvalues of the Jacobian matrix at fixed point (Q 0 , R 0 , L 0 ) corresponding to the order parameters Q and R respectively in BN. Then

λ bn Q = η Q0 ∂I1 ∂Q -ηζQ 0 , λ bn R = ∂I2 2∂R ηQ0 2L 2 0 (η bn max -η bn eff ),

where η bn max and η bn eff are the maximum and effective learning rates respectively in BN.

Proof. At fixed point (Q 0 , R 0 , L 0 ) = ( 1 2ζ+1 , 1, L 0 ) obtained in proposition1, the Jacobian of dynamic equations of BN can be derived as

J bn =     η Q0 ∂I1 ∂Q -2ηζ η Q0 ∂I1 ∂R 0 0 η L 2 0 Q0∂I3 ∂R -∂I1 ∂R -ζQ 2 0 - η 2 Q 2 0 2L 4 0 ∂I2 ∂R 0 0 η 2 Q 2 0 2L 3 0 ∂I2 ∂R 0     ,

and the eigenvalues of J bn can be obtained by inspection

     λ bn Q = η Q0 ∂I1 ∂Q -2ηζ, λ bn R = η L 2 0 Q0∂I3 ∂R -∂I1 ∂R -ζQ 2 0 - η 2 Q 2 0 2L 4 0 ∂I2 ∂R = ∂I2 ∂R ηQ0 2L 2 0 η bn max -η bn eff , λ bn L = 0. Since γ 0 = Q 0 , we have η bn max = ( ∂(γ0I3-I1) γ0∂R -ζγ 0 )/ ∂I2 2∂R and η bn eff = ηγ0 L 2 0 .

C.6 STABLE FIXED POINTS OF BN Proposition 3. Given conditions in proposition1, when activation function is ReLU, then (i) λ bn Q < 0, and (ii) λ bn R < 0 iff η bn max > η bn eff .

Proof. When activation function is ReLU, we derive

I 1 = Q(πR+2 √ 1-R 2 +2R arcsin(R)) 4π -Q 2 2 , which gives ∂I 1 ∂Q = -Q + πR + 2 √ 1 -R 2 + 2R arcsin(R) 4π .

Therefore at the fixed point of BN (Q 0 , R 0 , L 0 ) = ( 1 2ζ+1 , 1, L 0 ), we have

λ bn Q = η( 1 Q 0 ∂I 1 ∂Q -2ζ) = η( 1 Q 0 (-1 + 1 2Q 0 -2ζ) = -ζ - 1 2 < 0.

Note that x T x approximately equals 1. We get

EQUATION

At the fixed point we have indicate the maximum learning rates of BN, WN, and vanilla SGD respectively.

Proof. From the above results, we have

I 1 = Q(πR+2 √ 1-R 2 +2R arcsin(R)) 4π

-Q 2 2 , which gives ∂I 1 /∂R ≥ 0 at the fixed point of BN. Then it can be derived that ∂I2 ∂R < 0. Furthermore, at the fixed point of BN, Q 0 = γ 0 = 1 2ζ+1 < 1, then we have

η bn max = ( ∂(γ 0 I 3 -I 1 ) γ 0 ∂R -ζγ 0 )/ ∂I 2 2∂R = ∂(I 3 -I 1 ) ∂R / ∂I 2 2∂R + (1 - 1 γ 0 ) ∂I 1 ∂R / ∂I 2 2∂R -ζγ 0 / ∂I 2 2∂R ≥ ∂(I 3 -I 1 ) ∂R / ∂I 2 2∂R + 2ζ

where the inequality sign holds because (1 -1 γ0 ) ∂I1 ∂R / ∂I2 2∂R is positive. Note that ∂(I3-I1) ∂R / ∂I2 2∂R is also defined as maximum learning rates of WN, and vanilla SGD in Yoshida et al. (2017) . Hence, we conclude that η bn max ≥ η {wn,sgd} max + 2ζ.

D PROOFS REGARDING GENERALIZATION AND STATISTICAL MECHANICS (SM):

In this section, we build an analytical model for the generalization ability of a single-layer network.

The framework is based on the Teacher-Student model, where the teacher network output y * = g * w * T • x + s is learned by a student network. The weight parameter of the teacher network satisfies 1 N (w * ) T • w * =1 and the bias term s is a random variable s ∼ N (0, S) fixed for each training example x to represent static errors in training data from observations. In the generalization analysis, the input is assumed to be drawn from x ∼ N 0, 1 N I . The output of the student can also be written as a similar form y = g ( w • x), where the activation function g (•) can be either linear or ReLU in the analysis and w is a general weight parameter which can be used in either WN or common linear perceptrons. Here we take WN for example, since it has been derived in this study that BN can be decomposed into WN with a regularization term on γ. In WN w = γ w w 2 and we defined the same order parameter as the previous section that γ 2 = 1 N w T • w and γR = 1 N w T • w * .

D.1 GENERALIZATION ERROR:

Since the learning task is a regression problem with teacher output biased by a Gaussian noise, it comes natural that we can use the the average mean square error loss t = 1 P j y * j -y j 2 for the regression. The generalization error defined as the estimation over the distribution of input x and is written as

EQUATION

)

where • x denotes an average over the distribution over x. The generalization error is a function of its weight parameter and can be converted to a function only with regard to the aformentioned order parameters, detailed derivation can be seen in (Bös, 1998; Krogh & Hertz, 1992) .

gen (γ, R) = Dh 1 Dh 2 g * (h 1 ) -g(γRh

EQUATION

where h 1 and h 2 are variables drawn from standard Gaussian distribution and Dh 1 := N (0, 1) dh 1 .

When both the teacher network and student network have a linear activation function, the above integration can be easily solved and

EQUATION

As for the case where the teacher network is linear and the student network has a ReLU activation, it can still be solved first by decomposing the loss function

gen (γ, R) = Dh 1 Dh 2 h 1 -g(γRh 1 + γ 1 -R 2 h 2 ) 2 = Dh 1 Dh 2 h 2 1 + g(γRh 1 + γ 1 -R 2 h 2 ) 2 -2h 1 g(γRh 1 + γ 1 -R 2 h 2 ) 2 = 1 + γ 2 2 -2 Dh 1 Dh 2 h 1 g(γRh 1 + γ 1 -R 2 h 2 ) 2

It should be noted that the last two terms should only be integrated over the half space γRh 1 + γ √ 1 -R 2 h 2 > 0, and therefore if we define the angle of this line with the h 2 axis θ 0 = arccos (R) the integration is transformed to polar coordinate

EQUATION

2 ) γRr 2 sin 2 (θ) + γ 1 -R 2 r 2 cos (θ) sin (θ) = 1 + γ 2 2 -γR

D.2 EQUILIBRIUM ORDER PARAMETERS:

Following studies on statistical mechanics, the learning process of a neural network resembles a Langevin process (Mandt et al., 2017) and at the equilibrium the network parameters θ follow a Gibbs distribution. That is, the weight vector that yields lower training error produces higher probability.

We have p(θ) = Z -1 exp{-β t (θ; x)}, where β = 1/T and T is temperature, representing the variance of noise during training and implicitly controlling the learning process. t (θ; x) is an energy term of the training loss function, Z = dP(θ) exp{t (θ; x)/T } is the partition function, and P(θ) is a prior distribution.

Instead of directly minimizing the energy term above, statistical mechanics finds the minima of free energy, f , which is a function over T , considering the fluctuations of θ at finite temperatures. We have -βf = ln Z x .

By substituting the parameters that minimize f back into the generalization errors calculated above, we are able to calculate the averaged generalization error, at a certain temperature.

The solution of SM requires the differentiation of f with respect to the order parameters.

:

g (x) denotes the first derivative of g(x).

Figures and Tables:

Figure 1: (a) shows generalization error v.s. effective load α using a linear student (identity units). 'WN+gamma decay' has two curves ζ = 1 2M and ζ = 0.25. BN is trained with M = 32. (b) shows generalization error v.s. effective load α using a ReLU student. 'WN+gamma decay' has ζ = 14M and is compared to BN with batch size M = 32. The theoretical curve for vanilla SGD is also shown in blue. The red line is the generalization error of vanilla SGD with no noise in the teacher and thus serves as a lower bound.

Fig.1(a) shows that no other curves could outperform the red curve when ζ = 0.25, a value equal to the noise magnitude. The ζ smaller than 0.25 (green curve ζ = 1 2M and M = 32) would exhibit overtraining around α = 1, but they still perform significantly better than vanilla SGD. For the ReLU student in Fig,1(b), a direct solution of the generalization error wn relu remains an open problem. Therefore, the numerical results of 'WN+gamma decay' (green curve) are run at each α value. It effectively reduces over-fitting compared to vanilla SGD.Numerical Solutions of BN. In the linear student, we employ SGD with M = 32 to find solutions of w for BN. The number of input neurons is 4096 and the number of training samples can be varied to change α. The results are marked as black squares in Fig.1(a). After applying the analyses for linear student (Appendix C.3), BN is equivalent to 'WN+gamma decay' when ζ = 1 2M (green curve). It is seen that BN gets in line with the curve 'ζ = 1/2M ' (M = 32) and thus quantitatively validates our derivations.

Figure 2: (a) & (b) compare the loss (both training and evaluation) and validation accuracy between BN and PN on CIFAR10 using a ResNet18 network; (c) & (d) compare the training and validation loss curve with WN + mean-only BN and WN + variance-only BN; (e) & (f) validate the regularization effect of BN on both γ 2 and the validation loss with different batch sizes; (g) & (h) show the loss and top-1 validation accuracy of ResNet18 with additional regularization (dropout) on large-batch training of BN and WN.

Figure 3: Results of downsampled ImageNet. (a) plots training and evaluation loss. (b) shows validation accuracy. The models are trained on 8 GPUs.

Figure 4: Study of parameter norm. Vanilla SGD is finetuned from a network pretrained by BN on CIFAR10. The first four figures show the magnitude of the kernel parameters in different layers in finetuning, compared to the effective norm of BN defined as γ w σ B . The last two figures compare the training and validation losses in finetuning.

β represents population normalization (PN), ζ(h)γ 2 represents gamma decay and ζ(h) is a data-dependent decay factor. ρ is the kurtosis of the distribution of h, I(γ) is an estimation of the Fisher information of γ and I(γ)

hj ). Therefore, we have ζ(h) = ρ+2 8M I(γ) hj ) as shown in Eqn.(3).C.3 LINEAR STUDENT NETWORK WITH IDENTITY ACTIVATION FUNCTIONFor a loss function with identity (linear) units, 1P P j=1 w * T x j -γ(w T x j -µ B )/σ B 2 ,we have I(γ) = 2λ and ρ = 0 for Gaussian input distribution. The exact expression of Eqn.(

during optimization. The effective LRs shown in Table 1 are consistent with previous work (van Laarhoven, 2017).

Table content: <table/>

Several notations are summarized for reference.

Table content: <table><tr><td>µB, σ 2 B µP , σ 2 P</td><td>batch mean, batch variance population mean, population variance</td></tr><tr><td>x, y</td><td>input of a network, output of a network</td></tr><tr><td>y  *</td><td>ground truth of an output</td></tr><tr><td>h, ĥ</td><td>hidden value before and after BN</td></tr><tr><td>h</td><td>hidden value after population normalization</td></tr><tr><td>γ, β</td><td>scale parameter, shift parameter</td></tr><tr><td>g(•)</td><td>activation function</td></tr><tr><td>w, w  *</td><td>weight vector, ground truth weight vector</td></tr><tr><td>w</td><td>normalized weight vector</td></tr><tr><td>M, N, P</td><td>batch size, number of neurons, sample size</td></tr><tr><td>α</td><td>an effective load value α = P/N</td></tr><tr><td>ζ</td><td>regularization strength (coefficient)</td></tr><tr><td>ρ</td><td>Kurtosis of a distribution</td></tr><tr><td>δ</td><td>gradient of the activation function</td></tr><tr><td>η eff , ηmax R</td><td>effective, maximum learning rate overlapping ratio (angle) between w and w  *</td></tr><tr><td>L</td><td>norm (length) of w</td></tr><tr><td>λmax, λmin</td><td>maximum, minimum eigenvalue</td></tr></table>

∂I2 ∂R = -Q 0 < 0. Therefore, we conclude that λ bn R < 0 iff η bn max > η bn eff .

Table content: <table><tr><td colspan="2">C.7 MAXIMUM LEARNING RATE OF BN</td><td/></tr><tr><td colspan="2">Proposition 4. When the activation function is ReLU, then η bn max ≥ η</td><td>{wn,sgd} max</td><td>+ 2ζ, where η bn max and</td></tr><tr><td>η</td><td>{wn,sgd} max</td><td/></tr></table>

Peer review (iclr2019):
 This is a thought provoking paper that aims to understand the regularization effects of batch-normalization (BN) under a probabilistic interpretation. The authors connect BN to population normalization (PN) and a gamma-decay term that penalizes the scale of the weights. They analyze the generalization error of BN for a single-layer perceptron using ideas in statistical physics. Detailed comments: 1. Theorem 1 uses the loss function of a single-layer perceptron in the proof. This is not mentioned in the main writeup. This theorem is not valid in general. 2. The main contribution of this paper is Theorem 1 which connects BN to population normalization and weight normalization. It shows that the regularization of BN can be split into two components that depend on the mini-batch mean and variances: the former penalizes the magnitude of activations while the latter penalizes their correlation. 3. Although the theoretical analysis is conducted under simplistic models, this paper corroborates a number of widely-known observations about BN in practice. It validates these predictions on standard experiments. 4. The scaling of BN regularization with batch-size can be easily seen from Teye et al., 2018, so I think the experiments that validate this prediction are not strictly necessary. 5. It is difficult to use these techniques for deep non-linear networks. 6. The predictions in Section 3.3 are very interesting: it is often seen that fully-connected layers (where BN helps significantly) need small learning rates to train without BN; with BN one can use larger learning rates. 7. The experimental section is very rough. In particular the experiments on CIFAR-10 and downsampled-ImageNet with CNNs seem to have very high errors and it is difficult to understand whether some of the predictions about generalization error apply here. Why not use a more recent architecture for CIFAR-10? 8. There is a very large number of grammatical and linguistic errors in the narrative. 9. The presentation of the paper is very dense, I would advise the authors to move certain parts to the appendix and remove the inlining of important equations to improve readability.