Momentum Batch Normalization for Deep Learning with Small Batch Size

Hongwei Yong, Jianqiang Huang, Deyu Meng, Xian-Sheng Hua, Lei Zhang

Abstract

Batch Normalization (BN) is a cornerstone of modern deep learning, yet it suffers from significant performance degradation when training with small batch sizes. This paper identifies that BN's failure in small-batch regimes stems from excessive noise in mini-batch statistics, which leads to under-fitting. We propose Momentum Batch Normalization (MBN), a method that stabilizes training by using a dynamic moving average of statistics. MBN effectively decouples regularization strength from the physical batch size, enabling high performance even with batch sizes as small as two.

Introduction

Batch Normalization (BN) has revolutionized deep learning by stabilizing training, enabling higher learning rates, and providing implicit regularization. However, BN possesses a critical weakness: its performance collapses when the batch size is small. This limitation is particularly problematic in memory-intensive domains such as high-resolution video processing, 3D medical imaging, and complex object detection, where researchers are often restricted to tiny batch sizes (e.g., 2 or 4 samples per GPU).

When batch sizes are small, the mean and variance calculated from a mini-batch are noisy estimates of the true data distribution. While moderate noise can aid generalization, excessive noise leads to unstable training and poor convergence. This paper provides a theoretical framework for BN as a noise-based regularizer and introduces Momentum Batch Normalization (MBN) to address these challenges.

Theoretical Framework: BN as a Regularizer

The authors move beyond the traditional "Internal Covariate Shift" explanation, demonstrating through Taylor expansion that BN's noise generation mechanism acts as an explicit regularizer.

Visualization of the noise in batch statistics $\mu$ and $\sigma^2$ over training iterations.

As shown in Figure 1, the batch statistics $\mu$ and $\sigma^2$ exhibit significant variance over iterations. The paper proves that BN introduces both additive noise (via the mean) and multiplicative noise (via the variance), with the noise level being inversely proportional to the batch size.

Impact of noise level $\sigma$ on the decision boundary, illustrating BN's role as a regularizer.

Figure 2 illustrates how this noise affects the decision boundary. At low noise levels ($\sigma=0.1$), the model tends to overfit local fluctuations. As noise increases ($\sigma=1$), the boundary becomes smoother, demonstrating the regularizing effect. However, at extremely small batch sizes, this noise becomes so dominant that it causes under-fitting, where the model fails to learn the underlying signal.

Momentum Batch Normalization (MBN)

To mitigate the "small batch struggle," the authors propose Momentum Batch Normalization (MBN). The core innovation is the use of a momentum-based moving average of means and variances during the training phase, rather than relying solely on current mini-batch statistics.

Key Components

  1. Momentum Update: During training, the statistics used for normalization are updated using a momentum parameter $\lambda$. This allows the model to incorporate information from previous batches, effectively increasing the "virtual" batch size.
  2. Dynamic Momentum Parameter: Using a fixed momentum can be problematic early in training when statistics change rapidly. MBN employs a dynamic schedule where the momentum starts at zero (behaving like standard BN) and gradually increases as training stabilizes. The authors suggest default values like $m_0 = 64$ for the schedule.
  3. Adaptive Inference: An adaptive momentum setting is proposed for the inference stage to ensure that the running statistics accurately reflect the final state of the model.

Experimental Results

MBN was validated across standard benchmarks including CIFAR-10/100, Mini-ImageNet-100, and ImageNet.

  • Small Batch Stability: On CIFAR-100 with a batch size of 2, MBN significantly outperformed standard BN, which saw a sharp drop in accuracy.
  • Comparison with Alternatives: MBN consistently beat other normalization techniques like Group Normalization (GN), Instance Normalization (IN), and Layer Normalization (LN) in small-batch configurations.
  • Large-Scale Performance: On ImageNet using ResNet-50 with a batch size of 4 per GPU, MBN achieved a 2.5% improvement in top-1 accuracy over standard BN.
  • Training Dynamics: MBN produced much smoother training curves compared to BN at small batch sizes, indicating successful suppression of harmful gradient noise.

Conclusion

Momentum Batch Normalization offers a simple yet elegant solution to the small batch problem by decoupling regularization strength from physical batch size. While MBN shows great promise, future work could explore its sensitivity to the dynamic momentum schedule across different architectures and its performance in domains like GANs or Reinforcement Learning, where statistical stability is paramount.

Summary updated

BibTeX
@inproceedings{yong2020momentum,
  author = {Hongwei Yong and Jianqiang Huang and Deyu Meng and Xian-Sheng Hua and Lei Zhang},
  title = {{Momentum Batch Normalization for Deep Learning with Small Batch Size}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58610-2\_14},
}
Figure