Inferensys

Glossary

FedBN

FedBN (Federated Batch Normalization) is a federated learning algorithm where batch normalization statistics (mean and variance) are not aggregated but remain local to each client, improving performance on non-IID data.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
FEDERATED AVERAGING ALGORITHMS

What is FedBN?

FedBN (Federated Batch Normalization) is a specialized federated learning algorithm designed to improve model performance on statistically heterogeneous (non-IID) client data by localizing batch normalization parameters.

FedBN (Federated Batch Normalization) is a federated averaging variant where the batch normalization (BN) layers within a neural network are excluded from server aggregation. During each communication round, clients train locally, but only share updates for non-BN parameters (e.g., convolutional or linear layer weights) with the server. The BN statistics—the mean and variance used to normalize activations—are calculated from and remain specific to each client's local data distribution. This method directly addresses feature distribution shift, a core challenge of non-IID data in federated systems.

By keeping batch normalization local, FedBN prevents the aggregation of mismatched statistics that would otherwise degrade model performance. The global model converges with a set of shared feature extractors, while each client's BN layers adapt to its unique data environment. This approach is particularly effective for personalized federated learning and vision tasks, often outperforming standard FedAvg on heterogeneous datasets without adding significant communication or computational overhead. It is a foundational technique within the broader Federated Edge Learning pillar.

FEDERATED AVERAGING ALGORITHMS

Key Features of FedBN

FedBN (Federated Batch Normalization) is a specialized federated learning algorithm designed to handle feature distribution shift across clients by localizing batch normalization statistics.

01

Local Batch Normalization Statistics

The core mechanism of FedBN is that batch normalization (BN) layers are not aggregated. Each client maintains its own local running mean and variance statistics for its BN layers. During local training, a client uses its own stored statistics for normalization. This allows the model to adapt to the unique feature distribution (e.g., lighting, style, sensor calibration) of each client's data without forcing a harmful consensus on these statistics.

02

Mitigation of Feature-Shift Non-IID Data

FedBN specifically addresses covariate shift and feature distribution shift, a common form of non-IID data in real-world federated settings. Examples include:

  • Medical imaging from different hospitals with varying scanner protocols.
  • Autonomous vehicles operating in distinct geographic regions with different weather and lighting.
  • Mobile keyboards used by populations with different linguistic styles. By not averaging BN statistics, the model's feature normalization is tailored to each client's environment, preventing performance degradation caused by conflicting statistical signals.
03

Selective Parameter Aggregation

The server aggregation step in FedBN is modified. Only non-BN parameters (e.g., weights from convolutional or linear layers) are averaged using standard Federated Averaging (FedAvg). The parameters of the BN layers (scale gamma and shift beta) are also typically aggregated, as they represent learned affine transformations. However, the critical statistical moments (mean, variance) remain exclusively local, decoupling the collaborative learning of features from the client-specific normalization of activations.

04

Improved Convergence & Final Accuracy

On tasks with significant feature shift, FedBN demonstrates:

  • Faster convergence compared to vanilla FedAvg, as clients aren't fighting over divergent BN statistics.
  • Higher final test accuracy on both local client data and global test sets.
  • Reduced client drift, because the local optimization landscape is stabilized by client-appropriate normalization. Empirical results on benchmark datasets like DomainNet show accuracy improvements of over 10% in some domains compared to FedAvg.
05

Architectural Assumption & Limitation

FedBN assumes the neural network architecture contains batch normalization layers. Its benefits are most pronounced in architectures like CNNs and Vision Transformers where BN is standard. A key limitation is that it does not directly address label distribution skew (concept shift), which requires other personalization techniques. The method also introduces slight additional client-side memory overhead to store local BN statistics.

06

Foundation for Personalized FL

FedBN is a precursor to many personalized federated learning methods. Its principle—keeping certain parameters client-specific—inspires approaches like FedPer (personalized classifier heads) and FedRep (personalized representations). It establishes a hybrid model where a global feature extractor is shared, but the interface to client-specific data distributions is localized, balancing collaboration with adaptation.

ALGORITHM COMPARISON

FedBN vs. Standard FedAvg

A technical comparison of the Federated Batch Normalization (FedBN) algorithm against the foundational Federated Averaging (FedAvg) protocol, focusing on architectural differences and performance under data heterogeneity.

Feature / MetricStandard FedAvgFedBN (Federated Batch Normalization)

Core Aggregation Method

Weighted averaging of all model parameters

Weighted averaging of all parameters except batch norm statistics

Batch Normalization Handling

Statistics (mean, variance) are aggregated globally

Statistics (mean, variance) remain strictly local per client

Primary Design Goal

Learn a single, globally optimal model

Improve global model performance on non-IID (statistically heterogeneous) data

Mitigates Client Drift via

Proximal terms (FedProx), control variates (SCAFFOLD), normalized averaging (FedNova)

Local feature distribution alignment via un-aggregated batch norm layers

Communication Cost per Round

Identical (transmits full model delta)

Identical (transmits full model delta, excluding local stats)

Server Computation Overhead

Standard weighted average

Standard weighted average (with parameter masking for BN layers)

Client-Side Computation Overhead

Standard local SGD

Standard local SGD with local batch norm stat calculation

Typical Accuracy Gain on Non-IID Data

3-10% (domain-dependent)

Model Personalization Capability

Requires separate algorithms (e.g., FedPer, FedRep)

Provides implicit personalization via local feature normalization

Compatibility with Other FedOpt Techniques

True (can be combined with FedProx, SCAFFOLD, etc.)

FEDERATED BATCH NORMALIZATION

Frequently Asked Questions

FedBN addresses a core challenge in federated learning: training on statistically heterogeneous (non-IID) client data. These questions clarify its mechanism, advantages, and implementation.

FedBN (Federated Batch Normalization) is a federated learning algorithm where the batch normalization (BN) layers within a neural network are not aggregated by the central server but remain local to each client. In standard federated averaging, all model parameters, including BN statistics (mean and variance), are averaged. FedBN decouples these statistics, allowing each client to maintain and use its own feature distribution estimates during local inference, which significantly improves performance on non-IID data.

Mechanism:

  1. The server initializes a global model with BN layers.
  2. During each communication round, clients receive the global model but freeze and do not transmit the parameters of their local BN layers.
  3. Clients train locally, updating all other parameters (e.g., convolutional weights) while also updating their local BN statistics based on their private data.
  4. Clients send back updates for all non-BN parameters.
  5. The server aggregates these updates (e.g., via weighted averaging) to form a new global model, while the BN parameters remain untouched and distinct on each device.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.