Publication meant for knowledge sharing.
Publication meant for knowledge sharing.
Subscribe to DecodeX
Subscribe to DecodeX
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers


When you’re working with Neural Networks — especially deep ones — the output signals from each hidden layer often shift and scale unpredictably. This inconsistency between layers is known as internal covariate shift, and it can severely slow down or destabilize the training process.
The problem gets worse when your data is spread across varying ranges. Some features dominate the training dynamics, while others get ignored. A natural fix is to make your data more uniform — ideally, Gaussian-distributed with a mean of 0 and unit variance — which helps your model train more efficiently.
But why stop at just the input data?
That’s where Batch Normalization (BN) comes in.
Batch Normalization (BN), introduced in the 2015 paper “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift” by Ioffe and Szegedy, tackles this very problem not only at the input layer but also at intermediate hidden layers of a neural network.
At its core, Batch Normalization inserts a normalization step right before the non-linearity in each layer. Here’s what happens step-by-step during training:
Compute the mean and variance of the mini-batch:

Normalize the inputs:

Scale and shift (the learnable part):

Where:
γ(gain) is a learnable scaling parameter
β(bias) is a learnable shifting parameter
You might wonder: if we normalize to zero mean and unit variance, wouldn’t that kill the network’s ability to represent complex functions?
That’s where the genius of γ and β comes in. These parameters allow the network to learn back any distribution it might need — essentially giving it the ability to undo normalization if that’s beneficial for the task.
This flexibility enables batch norm to standardize the activations in a stable way, while still allowing the model to retain its representational power.
Faster Convergence: BN allows you to use higher learning rates and makes training more stable.
Reduced Dependence on Initialization: Less need to obsess overweight initialization strategies.
Regularization Effect: Acts like a regularizer (reducing the need for dropout in some cases).
Mitigates Vanishing/Exploding Gradients: Keeps the activations within a manageable range.
During inference (i.e., testing or deployment), we no longer rely on batch statistics. Instead, the model uses exponentially moving averages of the mean and variance computed during training:

These running averages are updated during training and ensure consistency across inputs during inference.
Batch Normalization is not just about normalizing data — it’s about giving every layer the best possible conditions for learning. By stabilizing the distribution of layer inputs, BN allows us to train deeper networks, faster and with better generalization. And thanks to learnable parameters γ and β, the model never loses its expressive power.
If you’re into original research, check out:
Ioffe & Szegedy, 2015 — Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
When you’re working with Neural Networks — especially deep ones — the output signals from each hidden layer often shift and scale unpredictably. This inconsistency between layers is known as internal covariate shift, and it can severely slow down or destabilize the training process.
The problem gets worse when your data is spread across varying ranges. Some features dominate the training dynamics, while others get ignored. A natural fix is to make your data more uniform — ideally, Gaussian-distributed with a mean of 0 and unit variance — which helps your model train more efficiently.
But why stop at just the input data?
That’s where Batch Normalization (BN) comes in.
Batch Normalization (BN), introduced in the 2015 paper “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift” by Ioffe and Szegedy, tackles this very problem not only at the input layer but also at intermediate hidden layers of a neural network.
At its core, Batch Normalization inserts a normalization step right before the non-linearity in each layer. Here’s what happens step-by-step during training:
Compute the mean and variance of the mini-batch:

Normalize the inputs:

Scale and shift (the learnable part):

Where:
γ(gain) is a learnable scaling parameter
β(bias) is a learnable shifting parameter
You might wonder: if we normalize to zero mean and unit variance, wouldn’t that kill the network’s ability to represent complex functions?
That’s where the genius of γ and β comes in. These parameters allow the network to learn back any distribution it might need — essentially giving it the ability to undo normalization if that’s beneficial for the task.
This flexibility enables batch norm to standardize the activations in a stable way, while still allowing the model to retain its representational power.
Faster Convergence: BN allows you to use higher learning rates and makes training more stable.
Reduced Dependence on Initialization: Less need to obsess overweight initialization strategies.
Regularization Effect: Acts like a regularizer (reducing the need for dropout in some cases).
Mitigates Vanishing/Exploding Gradients: Keeps the activations within a manageable range.
During inference (i.e., testing or deployment), we no longer rely on batch statistics. Instead, the model uses exponentially moving averages of the mean and variance computed during training:

These running averages are updated during training and ensure consistency across inputs during inference.
Batch Normalization is not just about normalizing data — it’s about giving every layer the best possible conditions for learning. By stabilizing the distribution of layer inputs, BN allows us to train deeper networks, faster and with better generalization. And thanks to learnable parameters γ and β, the model never loses its expressive power.
If you’re into original research, check out:
Ioffe & Szegedy, 2015 — Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
Mohamed Abubakkar M
Mohamed Abubakkar M
No activity yet