Training Deep Neural Networks Without Batch Normalization

Divya Gaur, Joachim Folz, Andreas DengelarXiv 2020

Abstract

Batch Normalization (BN) has become a standard component in deep learning for its ability to stabilize training and provide implicit regularization. However, its reliance on batch statistics introduces significant memory overhead and complicates training in scenarios with small batch sizes or multi-GPU setups. This paper investigates whether a combination of weight normalization, adaptive gradient clipping, and dropout can effectively replace BN. Our results show that while these methods allow ResNet-18 and ResNet-34 to achieve near-state-of-the-art accuracy on ImageNet with an 80% reduction in memory usage, deeper architectures like ResNet-50 still face a "depth wall" where generalization remains a challenge.

Introduction

Since its introduction in 2015, Batch Normalization has been the "glue" of deep learning optimization. By normalizing activations, it allows for higher learning rates and faster convergence. Despite these benefits, BN is far from perfect. It creates a dependency on batch size, which is problematic for tasks like object detection or GANs where memory constraints limit batch capacity. Furthermore, the theoretical underpinnings of BN—originally attributed to reducing "Internal Covariate Shift"—remain a subject of debate. This research explores whether the benefits of normalization can be decoupled from batch-level calculations through alternative training strategies.

Methodology: The BN-Free Cocktail

To eliminate the need for BN, the authors propose a multi-faceted approach to stabilize the optimization landscape:

  1. Weight Normalization (WN): Instead of normalizing activations, the weights of convolutional layers are reparameterized to decouple magnitude from direction, helping to stabilize the optimization landscape.
  2. Adaptive Gradient Clipping: To prevent exploding gradients, the authors implement gradient clipping with a threshold that increases logarithmically over epochs, evolving alongside the training process.
  3. Modified Residual Blocks: The standard ResNet architecture is redesigned to remove BN layers entirely, replacing standard convolutions with weight-normalized versions.
  4. Sophisticated LR Schedules: The use of cyclic learning rates and "warm-up" schedules helps find the optimal convergence point without divergence.
  5. Dropout: This is utilized as the primary regularizer to compensate for the loss of the implicit regularization typically provided by batch statistics.
Comparison of (a) the original ResNet block with Batch Normalization and (b) the modified block utilizing weight normalization and removing BN layers.

Experimental Results and Insights

The experiments were conducted on the ImageNet (ILSVRC 2012) dataset, providing a rigorous benchmark for these BN-free techniques.

The Generalization Hurdle

A key finding of the study is that while it is relatively straightforward to get a non-BN network to minimize training loss, achieving high validation accuracy (generalization) is significantly more difficult. Without BN, the loss landscape is less smooth, and gradients tend to be more skewed. As illustrated in the loss curves below, the BN-free variants track the original ResNet-18 closely but face different convergence dynamics.

Cross entropy loss for the training (a) and validation (b) phases of ResNet-18, comparing the original model with gradient clipping and weight normalization variants.

Performance Metrics

  • Memory vs. Speed: Removing BN reduced peak GPU memory consumption by roughly 5x (from 7GB to 1.4GB for ResNet-18). However, the BN-free models were approximately 1.5x slower per epoch. This is attributed to the fact that BN is highly optimized in libraries like cuDNN, whereas weight normalization currently relies on less-optimized standard tensor operations.
  • Accuracy Gaps: For ResNet-18, the non-BN model achieved 65.1% validation accuracy (vs. 66.5% for vanilla BN). For ResNet-34, the gap was similarly small (68.0% vs. 70.1%).
  • The Depth Wall: The techniques struggled to scale to ResNet-50, which reached only 62.2% accuracy compared to the standard 72.6%. This suggests that deeper networks rely more heavily on the specific smoothing properties of BN to avoid overfitting.

Conclusion

This research demonstrates that for shallower ResNet architectures, Batch Normalization can be replaced by a combination of weight normalization and adaptive gradient clipping, offering massive memory savings. However, the performance gap in deeper models like ResNet-50 indicates that BN still provides unique optimization benefits that are difficult to replicate. Future work should focus on optimizing weight normalization operations and finding new architectural ways to bridge the generalization gap in very deep networks.

Summary updated

BibTeX
@misc{gaur2020training,
  author = {Divya Gaur and Joachim Folz and Andreas Dengel},
  title = {{Training Deep Neural Networks Without Batch Normalization}},
  year = {2020},
  eprint = {2008.07970},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.07970},
}
Figure