Making Batch Normalization Great in Federated Deep Learning

Jike Zhong, Hong-You Chen, Wei-Lun Chao · DOI

Abstract

In Federated Learning (FL), Batch Normalization (BN) is frequently replaced by Group Normalization (GN) to mitigate the effects of data heterogeneity. This paper challenges that convention, demonstrating that BN is often superior in many FL settings. We introduce FIXBN, a simple, zero-cost two-stage training strategy that freezes BN statistics to bridge the performance gap between decentralized and centralized learning.

The Problem: The BN Mismatch in Federated Learning

Batch Normalization (BN) is a cornerstone of modern deep learning, providing stability and faster convergence. However, in Federated Learning—where data is distributed across many clients and often "non-IID" (not identically distributed)—BN struggles.

The core issue is a "mismatch": during local training, BN uses statistics from a client's specific, biased data. But during testing, the model uses global averaged statistics. This discrepancy leads to biased gradients and poor generalization. Consequently, the FL community has largely moved toward Group Normalization (GN) as an "ad hoc" fix. This research asks: Is BN truly the problem, or are we just using it wrong in a federated context?

Methods: The FIXBN Strategy

The authors propose a two-stage training approach called FIXBN (Federated Learning with Fixed Batch Statistics). It requires no architecture changes and adds zero communication overhead.

  1. Stage I (Exploration): The model trains using standard Federated Averaging (FedAvg). Clients use their local mini-batch statistics for normalization while simultaneously accumulating global statistics at the server. This allows the model to benefit from BN’s ability to stabilize early training when weights are changing rapidly.
  2. Stage II (Calibration): After a certain number of rounds (typically 50%), the BN layers are "frozen." For the remainder of training, clients stop using local mini-batch statistics and instead use the fixed, global accumulated statistics for normalization. This eliminates the training/testing mismatch and allows the model to recover gradients similar to those in centralized training.
Figure 1: Accuracy comparison showing the significant performance jump when FIXBN transitions to Stage II (frozen statistics) compared to standard BN.

Additionally, the authors highlight the importance of maintaining SGD momentum across communication rounds, which further helps the federated model match centralized performance.

Why It Works: The "Aha" Moment

The authors observed that the variation in local statistics decreases as training progresses. As shown in the figure below, the difference between local and global statistics ($\|\Delta S^{(t)}\|_1$) and the variance of those statistics stabilize over time. This convergence provides the perfect window to "freeze" the statistics, resolving the mismatch issue just as the model enters its fine-tuning phase.

Figure 5: Analysis of statistics stabilization. (a) shows the decreasing difference between local and global statistics, while (b) shows the reduction in variance over training completion.

Key Results and Insights

  • BN is surprisingly resilient: Contrary to popular belief, BN actually outperforms GN in many FL settings, particularly when communication is infrequent (i.e., when clients perform many local steps). GN only tends to win in extreme non-IID cases with very high-frequency communication.
  • Bridging the Gap: On CIFAR-10 (extreme non-IID), FIXBN achieved 76.56% accuracy, significantly higher than standard BN (53.97%) and GN (59.69%).
  • ImageNet Success: On ImageNet-1K, FIXBN provided a +4.1% accuracy boost over standard BN.
  • Task Generalization: In Cityscapes segmentation, FIXBN improved the Mean IoU by approximately 4.6% to 5.1% across different backbones (ResNet50 and MobileNet-v2).
  • Efficiency: Unlike other proposed fixes like FEDTAN, which requires extra communication rounds proportional to the number of BN layers, FIXBN is "free"—it changes the logic of the training loop without adding a single byte to the network payload.

Conclusion

FIXBN demonstrates that the perceived failures of Batch Normalization in Federated Learning are not inherent to the normalization technique itself, but rather to the mismatch between training and testing statistics. By simply freezing these statistics once they have stabilized, researchers can leverage the power of BN to achieve performance parity with centralized training in decentralized environments.

Summary updated

BibTeX
@inproceedings{zhong2023making,
  author = {Jike Zhong and Hong-You Chen and Wei-Lun Chao},
  title = {{Making Batch Normalization Great in Federated Deep Learning}},
  booktitle = {Federated Learning @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=iKQC652XIk},
}
Figure