encyclopegia.org

Batch normalization

In artificial neural networks, batch normalization (also known as batch norm) is a normalization technique used to make training faster and more stable by adjusting the inputs to each layer—re-centering them around zero and re-scaling them to a standard size. It was introduced by Sergey Ioffe and Christian Szegedy in 2015. Experts still debate why batch normalization works so well. It was initially thought to tackle internal covariate shift, a problem where parameter initialization and changes in the distribution of the inputs of each layer affect the learning rate of the network. However, newer research suggests it does not fix this shift but instead smooths the objective function—a mathematical guide the network follows to improve—enhancing performance. In very deep networks, batch normalization can initially cause a severe gradient explosion—where updates to the network grow uncontrollably large—but this is managed with shortcuts called skip connections in residual networks. Another theory is that batch normalization adjusts data by handling its size and path separately, speeding up training.

In artificial neural networks, batch normalization (also known as batch norm) is a normalization technique used to make training faster and more stable by adjusting the inputs to each layer—re-centering them around zero and re-scaling them to a standard size. It was introduced by Sergey Ioffe and Christian Szegedy in 2015. Experts still debate why batch normalization works so well. It was initially thought to tackle internal covariate shift, a problem where parameter initialization and changes in the distribution of the inputs of each layer affect the learning rate of the network. However, newer research suggests it does not fix this shift but instead smooths the objective function—a mathematical guide the network follows to improve—enhancing performance. In very deep networks, batch normalization can initially cause a severe gradient explosion—where updates to the network grow uncontrollably large—but this is managed with shortcuts called skip connections in residual networks. Another theory is that batch normalization adjusts data by handling its size and path separately, speeding up training. == Procedures== \mu_B = \frac 1 m \sum_{i=1}^m x_i and \sigma_B^2 = \frac 1 m \sum_{i=1}^m (x_i-\mu_B)^2 . For a layer of the network with d-dimensional input, x = (x^{(1)},...,x^{(d)}) , each dimension of its input is then normalized (i.e. re-centered and re-scaled) separately, \hat{x}_{i}^{(k)} = \frac {x_i^{(k)}-\mu_B^{(k)}} \sqrt{\left(\sigma_B^{(k)}\right)^2+\epsilon} , where k \in [1,d] and i \in [1,m] ; \mu_B^{(k)} and \sigma_B^{(k)} are the per-dimension mean and standard deviation, respectively. \epsilon is added in the denominator for numerical stability and is an arbitrarily small positive constant. The resulting normalized activation \hat{x}^{(k)} have zero mean and unit variance, if \epsilon is not taken into account. To restore the representation power of the network, a transformation step then follows as y_i^{(k)} = \gamma^{(k)} \hat{x}_{i}^{(k)} +\beta^{(k)} , where the parameters \gamma^{(k)} and \beta^{(k)} are subsequently learned in the optimization process. Formally, the operation that implements batch normalization is a transform BN_{\gamma^{(k)},\beta^{(k)}}: x^{(k)}_{1...m} \rightarrow y^{(k)}_{1...m} called the Batch Normalizing transform. The output of the BN transform y^{(k)} = BN_{\gamma^{(k)},\beta^{(k)}}(x^{(k)}) is then passed to other network layers, while the normalized output \hat{x}_{i}^{(k)} remains internal to the current layer. \frac{\partial l}{\partial \hat{x}_i^{(k)}} = \frac{\partial l}{\partial y_i^{(k)}}\gamma^{(k)} , \frac{\partial l}{\partial \gamma^{(k)}} = \sum_{i=1}^m \frac{\partial l}{\partial y_i^{(k)}}\hat{x}_i^{(k)} , \frac{\partial l}{\partial \beta^{(k)}} = \sum_{i=1}^m \frac{\partial l}{\partial y_i^{(k)}} , \frac{\partial l}{\partial \sigma_B^{(k)^2}} = \sum_{i=1}^m \frac{\partial l}{\partial y_i^{(k)}} (x_i^{(k)}-\mu_B^{(k)})\left(-\frac {\gamma^{(k)}} 2 (\sigma_B^{(k)^2}+\epsilon)^{-3/2}\right) , \frac{\partial l}{\partial \mu_B^{(k)}} = \sum_{i=1}^m \frac{\partial l}{\partial y_i^{(k)}}\frac{-\gamma^{(k)}}{\sqrt{\sigma_B^{(k)^2}+\epsilon}}+\frac{\partial l}{\partial \sigma_B^{(k)^2}}\frac{1}{m}\sum_{i=1}^m (-2)\cdot (x_i^{(k)}-\mu^{(k)}_B) , and \frac{\partial l}{\partial x_i^{(k)}} = \frac{\partial l}{\partial \hat{x}^{(k)}_i}\frac{1}{\sqrt{\sigma_B^{(k)^2}+\epsilon}}+\frac{\partial l}{\partial \sigma_B^{(k)^2}}\frac{2(x_i^{(k)}-\mu_B^{(k)})}{m}+\frac{\partial l}{\partial \mu_B^{(k)}}\frac{1}{m} . E[x^{(k)}] = E_{B}[\mu^{(k)}_B] , and \operatorname{Var}[x^{(k)}] = \frac{m}{m-1}E_{B}[\left(\sigma^{(k)}_B \right)^2] . The population statistics thus is a complete representation of the mini-batches. The BN transform in the inference step thus becomes y^{(k)} = BN^{\text{inf}}_{\gamma^{(k)},\beta^{(k)}}(x^{(k)})=\gamma^{(k)}\frac{x^{(k)} - E[x^{(k)}]}{\sqrt{\operatorname{Var}[x^{(k)}]+\epsilon}} + \beta^{(k)} , where y^{(k)} is passed on to next layers instead of x^{(k)} . Since the parameters are fixed in this transformation, the batch normalization procedure is essentially applying a linear transform to the activation function. Consider two identical networks, one contains batch normalization layers and the other does not, the behaviors of these two networks are then compared. Denote the loss functions as \hat{L} and L , respectively. Let the input to both networks be x , and the output be y , for which y = Wx , where W is the layer weights. For the second network, y additionally goes through a batch normalization layer. Denote the normalized activation as \hat{y} , which has zero mean and unit variance. Let the transformed activation be z = \gamma\hat{y}+\beta , and suppose \gamma and \beta are constants. Finally, denote the standard deviation over a mini-batch \hat{y_j} \in \R^m as \sigma_j . First, it can be shown that the gradient magnitude of a batch normalized network, ||\triangledown_{y_i}\hat{L}|| , is bounded, with the bound expressed as ||\triangledown_{y_i}\hat{L}||^2 \le \frac{\gamma^2}{\sigma_j^2}\Bigg(||\triangledown_{y_i}L||^2-\frac{1}{m}\langle 1,\triangledown_{y_i}L\rangle^2-\frac{1}{m}\langle\triangledown_{y_i}L,\hat{y}_j\rangle^2\bigg) . Since the gradient magnitude represents the Lipschitzness of the loss, this relationship indicates that a batch normalized network could achieve greater Lipschitzness comparatively. Notice that the bound gets tighter when the gradient \triangledown_{y_i}\hat{L} correlates with the activation \hat{y_i} , which is a common phenomena. The scaling of \frac{\gamma^2}{\sigma^2_j} is also significant, since the variance is often large. Secondly, the quadratic form of the loss Hessian with respect to activation in the gradient direction can be bounded as (\triangledown_{y_j}\hat{L})^T \frac{\partial \hat{L}}{\partial y_j \partial y_j}(\triangledown_{y_j}\hat{L}) \le \frac{\gamma^2}{\sigma^2} \bigg(\frac{\partial \hat{L}}{\partial y_j}\bigg)^T \bigg(\frac{\partial L}{\partial y_j \partial y_j}\bigg)\bigg(\frac{\partial \hat{L}}{\partial y_j}\bigg) -\frac{\gamma}{m\sigma^2}\langle\triangledown_{y_j}L,\hat{y_j}\rangle \bigg|\bigg|\frac{\partial \hat{L}}{\partial y_j}\bigg|\bigg|^2 . The scaling of \frac{\gamma^2}{\sigma^2_j} indicates that the loss Hessian is resilient to the mini-batch variance, whereas the second term on the right hand side suggests that it becomes smoother when the Hessian and the inner product are non-negative. If the loss is locally convex, then the Hessian is positive semi-definite, while the inner product is positive if \hat{g_j} is in the direction towards the minimum of the loss. It could thus be concluded from this inequality that the gradient generally becomes more predictive with the batch normalization layer. It then follows to translate the bounds related to the loss with respect to the normalized activation to a bound on the loss with respect to the network weights: \hat{g_j} \le \frac{\gamma^2}{\sigma_j^2}(g^2_j-m\mu^2_{g_j}-\lambda^2\langle \triangledown_{y_j}L,\hat{y}_j\rangle^2) , where g_j = max_ , and starting from \rho(w_0)\ne 0 , then \rho(w_t)-\rho(w^*)\le \bigg(1-\frac{\mu}{L}\bigg)^{2t}(\rho(w_0)-\rho(w^*)) . \min_{\tilde{w}\in R^d}f_{LH}(\tilde{w})=E_{y,x}[\phi(z^T\tilde{w})] , where z=-yx and \phi is an arbitrary loss function. Suppose that \phi is infinitely differentiable and has a bounded derivative. Assume that the objective function f_{LH} is \zeta -smooth, and that a solution \alpha^* = argmin_{\alpha}||\triangledown f(\alpha w)||^2 exists and is bounded such that -\infty . Also assume z is a multivariate normal random variable. With the Gaussian assumption, it can be shown that all critical points lie on the same line, for any choice of loss function \phi . Specifically, the gradient of f_{LH} could be represented as \triangledown_{\tilde{w}}f_{LH}(\tilde{w})=c_1(\tilde{w})u+c_2(\tilde{w})S\tilde{w} , where c_1(\tilde{w})=E_z[\phi^{(1)}(z^T\tilde{w})]-E_z[\phi^{(2)}(z^T\tilde{w})](u^T\tilde{w}) , c_2(\tilde{w})=E_z[\phi^{(2)}(z^T\tilde{w})] , and \phi^{(i)} is the i -th derivative of \phi . By setting the gradient to 0, it thus follows that the bounded critical points \tilde{w}_* can be expressed as \tilde{w}_* = g_*S^{-1}u , where g_* depends on \tilde{w}_* and \phi . Combining this global property with length-direction decoupling, it could thus be proved that this optimization problem converges linearly. First, a variation of gradient descent with batch normalization, Gradient Descent in Normalized Parameterization (GDNP), is designed for the objective function \min_{w\in R^d\backslash\{0\},\gamma\in R}f_{LH}(w,\gamma) , such that the direction and length of the weights are updated separately. Denote the stopping criterion of GDNP as h(w_t,\gamma_t)=E_z[\phi'(z^T\tilde{w}_t)](u^Tw_t)-E_z[\phi(z^T\tilde{w}_t)](u^Tw_t)^2 . Let the step size be s_t=s(w_t,\gamma_t)=-\frac {\mu^2} , where a_t^{(0)} and b_t^{0} are the two starting points of the bisection algorithm on the left and on the right, correspondingly. Further, for each iteration, the norm of the gradient of f_{LH} with respect to w converges linearly, such that ||w_t||_S^2||\triangledown f_{LH}(w_t,g_t)||_{S^{-1}}^2\le \bigg(1-\frac{\mu}{L}\bigg)^{2t}\Phi^2\gamma_t^2(\rho(w_0)-\rho^*) . Combining these two inequalities, a bound could thus be obtained for the gradient with respect to \tilde{w}_{T_d} : ||\triangledown_\tilde{w}f(\tilde{w}_{T_d})||^2\le \bigg(1-\frac{\mu}{L}\bigg)^{2T_d}\Phi^2(\rho(w_0)-\rho^*)+\frac{2^{-T_s}\zeta|b_t^{(0)}-a_t^{(0)}|}{\mu^2} , such that the algorithm is guaranteed to converge linearly. Although the proof stands on the assumption of Gaussian input, it is also shown in experiments that GDNP could accelerate optimization without this constraint. F_x(\tilde{W},\Theta)=\sum_{i=1}^{m}\theta_i\phi(x^T\tilde{w}^{(i)}) , where \tilde{w}^{(i)} and \theta_i are the input and output weights of unit i correspondingly, and \phi is the activation function and is assumed to be a tanh function. The input and output weights could then be optimized with \min_{\tilde{W},\Theta}(f_{NN}(\tilde{W},\Theta)=E_{y,x}[l(-yF_x(\tilde{W},\Theta))]) , where l is a loss function, \tilde{W}=\{\tilde{w}^{(1)},...,\tilde{w}^{(m)}\} , and \Theta=\{\theta^{(1)},...,\theta^{(m)}\} . Consider fixed \Theta and optimizing only \tilde{W} , it can be shown that the critical points of f_{NN}(\tilde{W}) of a particular hidden unit i , \hat{w}^{(i)} , all align along one line depending on incoming information into the hidden layer, such that \hat{w}^{(i)} = \hat{c}^{(i)}S^{-1}u , where \hat{c}^{(i)}\in R is a scalar, i =1,...,m . This result could be proved by setting the gradient of f_{NN} to zero and solving the system of equations. Apply the GDNP algorithm to this optimization problem by alternating optimization over the different hidden units. Specifically, for each hidden unit, run GDNP to find the optimal W and \gamma . With the same choice of stopping criterion and stepsize, it follows that ||\triangledown_{\tilde{w}^{(i)}}f(\tilde{w}_t^{(i)})||^2_{S^{-1}}\le\bigg(1-\frac{\mu}{L}\bigg)^{2t}C(\rho(w_0)-\rho^*)+\frac{2^{-T_s^{(i)}}\zeta|b_t^{(0)}-a_t^{(0)}|}{\mu^2} . Since the parameters of each hidden unit converge linearly, the whole optimization problem has a linear rate of convergence.

References

No reference rows published for this article.

Cite this article

MLA

"Batch normalization." encyclopegia.org, 2026, https://encyclopegia.org/wiki/batch-normalization. Accessed 24 November 2026.

Chicago

"Batch normalization." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/batch-normalization.

APA

encyclopegia.org. (2026). Batch normalization. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/batch-normalization

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Killarah

enwiki · references available

Ufo361

enwiki · references available

Zouhair Bouadoud

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375137441 · 0.5 · snapshot enwiki-001375137441

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.