Inferensys

Glossary

Federated Averaging (FedAvg)

Federated Averaging (FedAvg) is the foundational federated learning algorithm that combines locally trained model weights from multiple clients by averaging them on a central server to create a global model without accessing raw data.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
FOUNDATIONAL ALGORITHM

What is Federated Averaging (FedAvg)?

The core optimization algorithm that enables decentralized model training by mathematically aggregating locally computed parameter updates into a single, robust global model without exposing raw data.

Federated Averaging (FedAvg) is the foundational federated learning algorithm where a central server initializes a global model, distributes it to participating clients, and then aggregates the locally trained model weights by computing a weighted average to produce an improved global model. This iterative process allows collaborative learning across decentralized datasets without ever centralizing or exposing the raw, privacy-sensitive data residing on each client.

The algorithm's core innovation is reducing communication rounds by having clients perform multiple local stochastic gradient descent (SGD) steps before sending updates. The server then fuses these updates proportionally to each client's dataset size, effectively optimizing a global objective while tolerating non-IID data distributions and limited client availability common in cross-silo healthcare networks.

ALGORITHM MECHANICS

Key Characteristics of FedAvg

Federated Averaging (FedAvg) is defined by a specific operational loop that balances local computation with global synchronization. The following characteristics define its behavior in production multi-institutional networks.

01

Local Stochastic Gradient Descent (SGD)

Unlike traditional distributed training that requires constant communication, FedAvg allows each client to perform multiple local epochs of training on its private data before communicating. This reduces communication rounds by 10–100x compared to federated SGD. The client computes weight updates by minimizing the local loss function on its own non-IID data partition, producing a partially optimized model state that captures site-specific statistical patterns before aggregation.

02

Weighted Parameter Averaging

The central server constructs the new global model by computing a weighted arithmetic mean of the local model parameters. The weighting coefficient is typically proportional to the number of training samples each client used, ensuring that clients with larger datasets exert proportionally greater influence on the global consensus. This aggregation step is mathematically equivalent to minimizing a global loss function that is the weighted sum of local empirical risks.

03

Client Selection and Fraction Control

In each communication round, the server selects a fraction C of available clients to participate, rather than waiting for all clients to respond. This partial participation mechanism is critical for scaling to cross-device deployments with unreliable endpoints. The selection fraction introduces a trade-off: lower C values reduce communication cost but increase variance in the aggregated update, potentially slowing convergence or introducing bias toward the selected subset.

04

Non-IID Robustness Limitations

FedAvg exhibits convergence instability when local data distributions are statistically heterogeneous. If client datasets are highly skewed—differing in label distribution, feature distribution, or concept drift—the local optima can diverge significantly. Averaging divergent weight vectors can produce a global model that performs poorly on any individual client. This phenomenon, known as weight divergence, motivates advanced variants like FedProx and SCAFFOLD that add corrective terms to local objectives.

05

Communication Efficiency Profile

FedAvg reduces communication by a factor proportional to the number of local epochs performed between synchronization rounds. The total communication cost per round is 2 × model size per participating client (upload and download). For large neural networks, this bandwidth requirement can become prohibitive. Compression techniques such as gradient quantization, sparsification, and structured updates are often layered on top of FedAvg to further reduce the bitrate without sacrificing convergence guarantees.

06

Privacy-By-Architecture Guarantee

FedAvg provides a foundational privacy property: raw data never leaves the client device. Only model weight updates are transmitted. However, these weight updates are not inherently private—gradient leakage attacks can reconstruct training samples from shared parameters. Production deployments therefore combine FedAvg with differential privacy (adding calibrated noise to updates) and secure aggregation (encrypting individual contributions so the server only sees the sum) to achieve formal privacy guarantees.

FEDERATED AVERAGING EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the foundational Federated Averaging (FedAvg) algorithm, its mechanisms, and its role in privacy-preserving collaborative machine learning.

Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that constructs a global machine learning model by iteratively averaging the locally computed model weight updates from multiple decentralized clients, without ever accessing their raw data. The process works in communication rounds: a central server initializes a global model and distributes it to a selected subset of participating clients. Each client trains the model on its local private dataset for a fixed number of local epochs, producing an updated set of model weights. These local weight updates—not the training data—are transmitted back to the central server. The server then computes a weighted average of all received updates, typically weighted by the number of local training samples each client used, to produce a new global model. This cycle repeats for many rounds until the global model converges. The core insight of FedAvg is that by increasing the amount of local computation per round (performing multiple local SGD steps), the algorithm reduces the number of communication rounds required for convergence, making it practical for bandwidth-constrained environments like mobile devices and hospital networks.

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.