Why Batch Normalization Damage Federated Learning on Non-IID Data?

Yanmeng Wang, Qingjiang Shi, Tsung-Hui Chang

TL;DR

This paper provides the first theoretical explanation for why Batch Normalization (BN) degrades Federated Learning (FL) performance on non-IID data, identifying a critical mismatch in both BN statistics and their associated gradients. To solve this, the authors introduce FedTAN, a novel algorithm that uses layer-wise aggregation to synchronize these parameters, successfully restoring FL performance to near-centralized levels.

What Problem Does This Paper Address?

Federated Learning allows multiple clients to collaboratively train a model without sharing their private raw data. While Batch Normalization is a standard tool for stabilizing and accelerating deep neural network training in centralized settings, it fails spectacularly in FL when clients have heterogeneous (non-IID) data. For example, a ResNet-20 model that achieves 85% accuracy on IID data might drop to just 60% in a non-IID federated setting.

Existing research had noted this "BN damage" but lacked a rigorous theoretical explanation. Previous attempts to fix it—such as keeping BN parameters local or using alternative normalization like Group Normalization—often failed to match the performance of a centralized model. This paper seeks to uncover the mathematical root cause and provide a robust algorithmic remedy.

Centralized vs Federated Learning architectures.

Methods

The authors first present a formal convergence analysis, proving that BN introduces a "gradient deviation" in non-IID settings. They identify two distinct types of mismatches:

  1. Forward Mismatch: Local batch means and variances differ from the global population statistics.
  2. Backward Mismatch: The gradients calculated with respect to these local statistics deviate from the true global gradients.

To address these, they propose FedTAN (Federated learning algorithm Tailored for batch Normalization). Unlike standard FedAvg, which aggregates full models at the end of local training, FedTAN performs iterative layer-wise aggregation during the very first local update step of each round:

  • Forward Pass: Clients compute and upload local batch means; the server aggregates and returns a global mean. Clients then use this to compute and upload local variances, receiving a global variance in return.
  • Backward Pass: Clients compute and upload gradients with respect to these BN statistics, which the server averages and sends back.

This ensures that for the initial update, every client is synchronized with global-consistent BN parameters and gradients. They also introduce FedTAN-II, a communication-efficient variant that freezes BN parameters after an initial training phase to reduce the number of message exchanges.

Architecture of a DNN with BN layers showing the interdependence of parameters.

Datasets

The researchers evaluated FedTAN across several standard computer vision benchmarks with varying degrees of non-IID distribution (e.g., limiting clients to only 2 classes out of 10):

  • CIFAR-10 & CIFAR-100: Used with ResNet-20 to test large-scale DNN performance.
  • MNIST: Used with a 3-layer DNN for baseline comparisons.
  • Office-Caltech10: Used with AlexNet to test robustness against "feature shift" (same labels, different image styles).
  • DomainNet: Used for additional validation on feature shifts.

Key Insights and Ideas

  • The Gradient Deviation is the Culprit: The paper proves that simply matching means and variances in the forward pass isn't enough. Mismatched gradients in the backward pass bias the entire optimization process, leading to a sub-optimal stationary solution that doesn't improve with more training time.
  • Layer-wise Dependency: BN layers are interdependent. The statistics of layer $L$ depend on the normalized output of layer $L-1$. This necessitates the sequential, layer-by-layer synchronization approach used in FedTAN.
  • Biased Solutions: The theoretical analysis shows that BN in non-IID FL doesn't just slow down convergence; it introduces a persistent bias (term (b) in Theorem 1) that prevents the model from ever reaching the true global optimum.
Comparison of testing accuracy on IID vs non-IID data, showing the dramatic drop for standard FL with BN.

Key Results

  • Accuracy Recovery: On non-IID CIFAR-10, FedTAN achieved 87.66% accuracy, nearly matching the centralized baseline (91.53%) and vastly outperforming vanilla FedAvg+BN, which stalled at 45.90%.
  • Robustness to Distribution Shifts: FedTAN remained stable even as the data became more non-IID (fewer classes per client), whereas baselines like FedBN and FedAvg saw performance collapse.
  • Communication Efficiency: While FedTAN requires more communication rounds ($3L+1$ per iteration), the actual volume of data exchanged (bits) only increases by about 1.02% to 1.52% because BN parameters are a tiny fraction of the total model size.
  • Superiority over Group Norm: FedTAN outperformed Federated Learning using Group Normalization (FedAvg+GN) in both accuracy and convergence speed.

Limitations and Future Work

  • Communication Rounds: The high number of communication rounds per iteration could be a bottleneck in high-latency networks. While FedTAN-II helps, further optimization for communication-constrained environments is needed.
  • Privacy Concerns: Exchanging BN statistics and their gradients could theoretically be exploited by an adversary to reconstruct client data. The authors suggest integrating Differential Privacy or Secure Multi-party Computation as a future direction to mitigate this risk.
  • Hyperparameter Sensitivity: The performance of the "two-step" FedTAN-II depends on choosing the right iteration $M$ to freeze parameters, which currently requires empirical tuning.

Summary updated

BibTeX
@article{wang2025why,
  author = {Yanmeng Wang and Qingjiang Shi and Tsung-Hui Chang},
  title = {{Why Batch Normalization Damage Federated Learning on Non-IID Data?}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2025},
  doi = {10.1109/tnnls.2023.3323302},
}
Figure