"BNN - BN = ?": Training Binary Neural Networks Without Batch Normalization

Tianlong Chen, Zhenyu Zhang, Xu Ouyang, Zechun Liu, Zhiqiang Shen, Zhangyang Wang

Abstract

Binary Neural Networks (BNNs) are highly efficient models using 1-bit weights and activations, but they are notoriously difficult to train. Traditionally, Batch Normalization (BN) has been essential for stabilizing BNN training. However, BN requires high-precision floating-point operations, which undermines the efficiency of 1-bit hardware. This paper introduces the first "BN-Free" BNN framework. By employing Adaptive Gradient Clipping (AGC) and Scaled Weight Standardization, the authors achieve state-of-the-art accuracy on ImageNet without the computational overhead or batch-dependency of normalization layers.

Introduction

Binary Neural Networks represent a significant frontier in efficient deep learning, enabling massive speedups and energy savings on specialized hardware like FPGAs and ASICs. Despite their potential, BNNs are inherently unstable during training. For years, Batch Normalization (BN) has served as the critical component for smoothing the loss landscape and preventing gradient explosion.

However, BN comes with significant drawbacks: it necessitates high-precision calculations (sums of squares, square roots) and introduces sample dependencies within batches. These factors complicate hardware implementation and can lead to training-inference discrepancies. This research explores whether a high-performance BNN can be constructed without any normalization layers.

Methodology

The proposed framework adapts techniques from full-precision "Normalizer-Free" networks (NFNets) to the constraints of binarization.

Adaptive Gradient Clipping (AGC)

To prevent the gradient explosion typically seen when BN is removed, the authors implement AGC. Unlike fixed global clipping, AGC scales the clipping threshold based on the ratio of the gradient norm to the parameter norm, ensuring stable updates across different layers.

Scaled Weight Standardization (WS-Conv)

To maintain activation means without BN, the convolutional layers utilize Scaled Weight Standardization. Weights are standardized to zero mean and unit variance, then scaled by a fixed factor ($\gamma$), ensuring signal stability.

Variance-Preserving Architecture

The authors designed specialized bottleneck blocks that use hand-crafted scaling factors ($\alpha$ and $\beta$). These factors are mathematically derived to ensure that signal variance neither vanishes nor explodes as it propagates through the network.

Transition from baseline BN blocks to proposed BN-Free blocks

Knowledge Distillation

A high-performance full-precision teacher model (a BN-Free NFNet) is used to provide a "distribution loss," guiding the 1-bit student model to mimic the feature representations of a more powerful network.

Experimental Results

The framework was evaluated on CIFAR-10, CIFAR-100, and the ILSVRC12 ImageNet dataset.

ImageNet Performance

A primary finding is the "Naive Drop" disaster: simply removing BN from a state-of-the-art BNN like ReActNet causes ImageNet accuracy to plummet from ~69% to ~34%. In contrast, the proposed BN-Free ReActNet-A achieves 68.0% Top-1 accuracy, a marginal 1.4% difference from the BN-based version.

Top-1 Accuracy comparison on ImageNet across various BNN architectures

Stability and Efficiency

Training curves demonstrate that the combination of AGC and Weight Standardization provides stability comparable to BN. By removing BN, the network becomes more "hardware-native," eliminating the need for high-precision accumulators and complex operations like square roots during the forward pass.

Conclusion and Future Work

This work demonstrates that Batch Normalization is not strictly necessary for high-performance BNNs if variance is preserved through architectural design and adaptive clipping. While a small accuracy gap remains (1.4% on ImageNet), the BN-Free approach paves the way for more efficient on-chip training and deployment. Future research will focus on closing the remaining accuracy gap and measuring real-world wall-clock speedups on hardware platforms like FPGAs.

Summary updated

BibTeX
@inproceedings{chen2021bnn,
  author = {Tianlong Chen and Zhenyu Zhang and Xu Ouyang and Zechun Liu and Zhiqiang Shen and Zhangyang Wang},
  title = {{"BNN - BN = ?": Training Binary Neural Networks Without Batch Normalization}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw53098.2021.00520},
}
Figure