Revisiting Batch Norm Initialization

Jim Davis, Logan FrankECCV 2022

Abstract

Batch Normalization (BN) has become a fundamental component in modern convolutional neural networks (CNNs). While the industry standard is to initialize BN parameters to $\gamma=1$ and $\beta=0$, this paper demonstrates that such defaults may be suboptimal. By initializing the scale parameter $\gamma$ to a small value and implementing a reduced learning rate for this parameter, significant accuracy gains can be achieved across multiple architectures and datasets with zero additional computational overhead.

Introduction

Batch Normalization is often treated as a "set it and forget it" component in deep learning pipelines. It serves as the "glue" for modern CNNs, stabilizing training by normalizing internal activations. However, the common practice of initializing the affine transformation parameters to identity values ($\gamma=1, \beta=0$) may lead to "Feature Saturation" and an "Identity Trap," where the network fails to find the most optimal configuration.

The BN Architecture and the Identity Trap

A standard BN layer operates in two distinct stages. First, the "head" normalizes a batch of data to have zero mean and unit variance. Second, the "tail" applies a learnable affine transformation: scaling by $\gamma$ and shifting by $\beta$.

Structural decomposition of a Batch Normalization (BN) layer into its normalization 'head' and affine 'tail'.

The authors identify two primary issues with standard initialization:

  1. The Identity Trap: Parameters often remain near their initial values, suggesting that the default initialization might be trapping the optimization in a local sub-optimum.
  2. Feature Saturation: The normalization head can produce large values that, when passed through activation functions like ReLU, lead to undesirable training dynamics.

Proposed Methodology

The researchers propose a two-pronged adjustment to the standard BN layer that integrates seamlessly into existing frameworks like PyTorch or TensorFlow:

1. Small Scale Initialization

Instead of the default $\gamma=1$, the initial $\gamma$ is treated as a hyperparameter within the $(0, 1]$ range. Initializing $\gamma$ to a smaller value (e.g., 0.05 or 0.1) immediately scales down features at the onset of training, preventing early saturation.

2. Learning Rate Reduction (LRR)

To prevent the scale parameter from drifting too quickly, the authors propose reducing the learning rate specifically for $\gamma$ by a factor (e.g., $c=100$). This enables a more fine-grained search in the parameter space, keeping $\gamma$ within a beneficial range.

3. Online Input Normalization

The method also supports using a BN layer at the network's start to automate input data normalization, eliminating the need for manual "offline" calculations of mean and standard deviation.

Experimental Results

The approach was evaluated on CIFAR-10, CIFAR-100, CUB-200 (Birds), and Stanford Cars (ST-Cars) using architectures ranging from ResNet-18 to ResNet-152, as well as MobileNetV2, RepVGG, and ResNeXt. To ensure statistical significance, the researchers conducted 15 runs for every experiment and utilized paired t-tests.

Key findings include:

  • Accuracy Gains: On CIFAR-10 with ResNet-18, accuracy rose from 89.44% to 90.80%. On the fine-grained CUB-200 task, accuracy jumped from 46.26% to 58.52%.
  • Architecture Agnostic: The benefits were consistent across various depths and model types.
  • Competitive Performance: This simple tuning outperformed complex specialized layers like Representative BN (RBN) and Instance Enhancement BN (IEBN).

Discussion: The Gradient Factor and Shift Reach

The authors provide a mathematical derivation showing that $\gamma$ acts as a "gradient factor," influencing the magnitude of gradients flowing back to previous layers. Furthermore, by scaling down data with a small $\gamma$, the shift parameter $\beta$ becomes more effective at "nudging" data across activation thresholds (e.g., ReLU), granting the model greater flexibility in feature activation.

Conclusion

"Revisiting Batch Norm Initialization" highlights that significant performance improvements are available through simple hyperparameter tuning of existing layers. By rethinking the default initialization of $\gamma$, practitioners can achieve "free lunch" gains in model accuracy without increasing parameter counts or inference latency. Future work may explore automated tuning heuristics and the application of these strategies to Layer or Group Normalization.

Summary updated

BibTeX
@inproceedings{davis2022revisiting,
  author = {Jim Davis and Logan Frank},
  title = {{Revisiting Batch Norm Initialization}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19803-8\_13},
}
Figure