TL;DR
Batch Normalization (BN) is a staple of deep learning, but it breaks down when training with small or biased minibatches. Batch Renormalization (BR) fixes this by introducing a simple affine correction that allows models to use stable population statistics during training without losing the gradient benefits of standard BN. This ensures that training and inference activations match, leading to significantly better performance in data-constrained or non-i.i.d. scenarios.
What Problem Does This Paper Address?
Batch Normalization works by using the mean and variance of the current minibatch to normalize activations. While highly effective, it has a fundamental flaw: the way a model processes an image during training depends on which other images happen to be in the same minibatch.
This "minibatch dependence" causes two major issues:
- Small Minibatches: When batch sizes are small (e.g., 2 or 4), the calculated mean and variance are noisy estimates of the true data distribution. This noise compounds with depth, degrading model quality.
- Non-i.i.d. Data: In tasks like metric learning, minibatches are often intentionally biased (e.g., containing multiple images of the same category). Standard BN causes the model to overfit to these specific batch distributions, leading to a massive performance drop during inference when images are processed individually.
Essentially, there is a "distribution shift" between training (using batch statistics) and inference (using moving averages). Batch Renormalization aims to bridge this gap.
Methods
The core idea of Batch Renormalization is to perform normalization using the moving averages ($\mu, \sigma$) even during training, but in a way that doesn't break the optimization process.
If we simply replaced minibatch statistics with moving averages during training, the model would likely "blow up" because the normalization wouldn't respond to gradient updates (a problem known as the model and normalization "counteracting" each other).
Instead, BR expresses the "correct" normalization (using moving averages) as an affine transformation of the "standard" BN: $$\hat{x}_i = \frac{x_i - \mu_B}{\sigma_B} \cdot r + d$$ Where:
- $r = \sigma_B / \sigma$
- $d = (\mu_B - \mu) / \sigma$
The trick: During backpropagation, $r$ and $d$ are treated as constants (using a stop_gradient operation). This allows the network to see the "correct" activations that it will encounter during inference, while the gradients still flow through the minibatch statistics $\mu_B$ and $\sigma_B$, maintaining the stability that made BN famous.
To keep training stable, the authors clip $r$ and $d$ to maximum values ($r_{max}, d_{max}$) and gradually relax these constraints as training progresses.
Datasets
The authors evaluated Batch Renormalization using:
- ImageNet: The standard benchmark for image classification with 1000 classes.
- Inception v3: A state-of-the-art architecture used as the baseline model.
- Custom Non-i.i.d. Splits: To test biased batches, they created minibatches by sampling 2 images for each of 16 labels, rather than sampling 32 images independently.
Key Insights and Ideas
- The Affine Bridge: The realization that any two normalizations are related by a simple linear shift ($r$ and $d$). This allows for a "best of both worlds" approach: training on inference-like data while optimizing on batch-like gradients.
- Identity in Expectation: Since $\sigma \approx E[\sigma_B]$ and $\mu \approx E[\mu_B]$, the expected values of $r$ and $d$ are 1 and 0, respectively. This means the correction is "transparent" on average but crucial for individual, noisy batches.
- Eliminating Batch Bias: By making the activation of a single example independent of its neighbors in the batch, BR effectively "de-biases" the training process for non-i.i.d. data.
Key Results
- Standard Training: On large, i.i.d. minibatches (size 32), BR slightly outperformed standard BN, reaching 78.5% top-1 accuracy on ImageNet vs. 78.3%.
- Small Batches: When the normalization was restricted to "microbatches" of size 4, standard BN's accuracy dropped to 74.2%. Batch Renorm recovered much of this, reaching 76.5%.
- Non-i.i.d. Batches: This is where BR shines. When trained on highly biased batches, standard BN plummeted to 67.0% accuracy. Batch Renormalization completely solved this, achieving 78.6%—the same performance as if the data were sampled perfectly.
Limitations and Future Work
- Hyperparameter Complexity: BR introduces new hyperparameters ($r_{max}, d_{max}$) and requires a schedule to ramp them up. This adds a layer of tuning that standard BN avoids.
- Batch Size Still Matters: While BR helps small batches, it doesn't fully close the gap to large-batch training. The authors note that larger batches still provide better gradient estimates.
- New Frontiers: The authors suggest BR could be particularly useful for Recurrent Neural Networks (RNNs), where applying BN is notoriously difficult because statistics vary across time steps, and Generative Adversarial Networks (GANs), where minibatch dependence can cause unwanted non-determinism.
Summary updated