Abstract
Batch Normalization (BN) is a cornerstone of modern deep learning, yet its application in Federated Learning (FL) is severely hampered by data heterogeneity across decentralized clients. This paper identifies two primary failure modes in standard FL implementations: external covariate shift and biased variance aggregation. We propose Federated BatchNorm (FBN), a novel scheme that utilizes shared global statistics for normalization and applies a mathematical correction to eliminate bias in variance aggregation. Our experiments on CIFAR-10 demonstrate that FBN matches the accuracy of centralized training even in extreme non-IID scenarios and can be effectively hardened against adversarial attacks.
The Problem: Data Heterogeneity and BN Failure
In centralized settings, Batch Normalization stabilizes training by centering layer inputs using batch-specific statistics. However, in Federated Learning, clients often possess highly divergent data distributions (e.g., one client having only images of cats, another only dogs). This heterogeneity leads to two critical bottlenecks:
- External Covariate Shift: When clients normalize data using only local, biased statistics, they inadvertently map different classes into the same feature space. This "squashing" effect reduces the separability of the data, as seen in the overlap of clusters in naive federated settings.
- Biased Statistics: Standard FL implementations often average local running variances to compute global statistics. This approach violates the law of total variance by ignoring the variance between local means, resulting in inaccurate global statistics that degrade model evaluation.
Methodology: Federated BatchNorm (FBN)
To address these issues, the authors introduce Federated BatchNorm (FBN), which modifies the standard BN pipeline with two key innovations:
- Normalization via Shared Statistics: Instead of using local batch statistics during training, FBN employs shared running statistics from previous rounds. This ensures that all clients normalize their data against a consistent global reference, preserving class separability.
- Unbiased Variance Aggregation: FBN corrects the bias in global statistics by applying a term derived from the law of total variance. The server aggregates not just local variances but also accounts for the differences between local means, ensuring the global variance accurately represents the combined dataset.
Additionally, the paper introduces Robust FBN, which replaces simple averaging with robust aggregation techniques like the coordinate-wise median. This allows the model to remain resilient against "Byzantine" clients who may attempt to sabotage training by sending malicious statistics.
Experimental Results
The researchers evaluated FBN using the CIFAR-10 dataset, simulating varying levels of heterogeneity through $\gamma$-similarity and Dirichlet allocation.
Performance and Stability
In extreme non-IID settings, the accuracy of Naive BN collapsed to approximately 17%. While the previous state-of-the-art method, FixBN, improved this to 75%, FBN achieved 80%, effectively matching the performance of a centralized gold standard. Furthermore, FBN exhibited superior stability and smoother convergence compared to FixBN, which often fluctuated during early training stages.
Adversarial Resilience
Under a "Sign-Flipping" attack, where malicious clients invert their statistics, Naive BN failed to learn entirely (10% accuracy). In contrast, FBN paired with a median aggregator successfully mitigated the attack, maintaining its high performance levels.
Conclusion and Future Work
Federated BatchNorm (FBN) provides a mathematically sound and efficient solution to the challenges of BN in heterogeneous federated environments. By aligning local normalization with global statistics and correcting aggregation biases, FBN achieves centralized-level performance without increasing communication overhead. Future research will explore the application of FBN to non-vision architectures, such as Transformers, and its robustness under dynamic shifts in global data distributions.
Summary updated