Federated Averaging (FedAvg) is a distributed optimization algorithm that trains a single, shared global model across decentralized clients without exchanging raw data. The central server orchestrates rounds where it selects a subset of clients, sends them the current global model, and each client performs local stochastic gradient descent (SGD) on its private data. Clients then send only their updated model parameters back to the server, which averages them to produce a new global model, preserving data privacy at the source.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
Federated Averaging (FedAvg) is the foundational and most widely used algorithm for training machine learning models in a federated learning setting.
The algorithm's efficiency stems from performing more computation locally (multiple local epochs) to reduce communication rounds, a major bottleneck. However, FedAvg assumes IID (Independent and Identically Distributed) data and reliable clients, which rarely holds in practice. Non-IID data across clients leads to client drift, where local models diverge, harming convergence. This limitation spurred advanced variants like FedProx and SCAFFOLD, which add constraints or control variates to stabilize training on heterogeneous data.
Core Characteristics of FedAvg
Federated Averaging (FedAvg) is the foundational algorithm for decentralized training, defined by its iterative process of local client updates followed by secure global aggregation. Its core characteristics address the fundamental constraints of privacy, communication efficiency, and statistical heterogeneity inherent to federated systems.
Decentralized Data Sovereignty
FedAvg's primary characteristic is that raw training data never leaves the client device. Instead of centralizing datasets, the algorithm operates by sending only the model updates (e.g., weight deltas or gradients) to a coordinating server. This architecture is the cornerstone of its privacy promise, as sensitive user data remains locally stored. It enables training across data silos where legal, competitive, or ethical barriers prevent data pooling, such as in healthcare between hospitals or in finance between banks.
Iterative Averaging Protocol
The algorithm proceeds in synchronized communication rounds. Each round consists of:
- Server Broadcast: The central server selects a subset of clients and sends the current global model.
- Local Computation: Each client performs multiple steps of Stochastic Gradient Descent (SGD) on its local data.
- Secure Aggregation: Clients send their updated model weights back to the server.
- Weighted Averaging: The server computes a new global model by averaging the client updates, typically weighted by the number of local training examples. This creates a feedback loop where the global model iteratively improves through decentralized knowledge consolidation.
Communication Efficiency Focus
FedAvg is explicitly designed to minimize the communication bottleneck, which is often the primary constraint in cross-device federated learning. It reduces the frequency of communication by performing substantial local computation (multiple SGD epochs) on each client between aggregation rounds. This trades off communication cost for increased client compute, which is favorable given that modern edge devices (smartphones, sensors) have abundant local processing power but limited or metered bandwidth. Advanced variants incorporate gradient compression, sparsification, and quantization to further reduce the size of transmitted updates.
Statistical Heterogeneity (Non-IID Data)
A defining challenge FedAvg must handle is non-IID data across clients. In real-world deployments, each client's local dataset is not a representative sample of the global distribution. For example, a user's phone contains photos unique to them, or a hospital's patient demographics are local. This statistical heterogeneity causes client drift, where local models diverge, potentially harming global convergence. FedAvg's robustness to non-IID conditions is limited, leading to the development of improved algorithms like FedProx (which adds a proximal term) and SCAFFOLD (which uses control variates) to correct for this drift.
Partial Participation & System Heterogeneity
FedAvg operates under the assumption of partial participation—in each round, only a fraction of the total client population is available for training due to device availability, network connectivity, or power constraints. It must also accommodate system heterogeneity, where clients have vastly different computational capabilities (e.g., old vs. new phones), storage, and network speeds. A robust FedAvg implementation must handle stragglers and dropouts gracefully, often using asynchronous updates or timeout mechanisms to ensure progress is not blocked by the slowest participants in the federation.
Privacy as a Property, Not a Guarantee
While FedAvg enhances privacy by keeping data local, the model updates themselves can leak information. Without additional safeguards, a malicious server could perform model inversion or membership inference attacks on the shared gradients/weights. Therefore, FedAvg is typically combined with complementary privacy-enhancing technologies (PETs) to provide rigorous guarantees:
- Differential Privacy (DP): Adding calibrated noise to client updates before aggregation.
- Secure Multi-Party Computation (SMPC): Cryptographic protocols for secure aggregation that prevent the server from seeing individual updates.
- Homomorphic Encryption (HE): Allowing computation on encrypted updates. FedAvg provides the architectural foundation; these PETs build the verifiable privacy layer on top.
FedAvg vs. Other Federated Optimization Algorithms
A feature and mechanism comparison of the foundational Federated Averaging (FedAvg) algorithm against prominent alternatives designed to address its limitations in heterogeneous (non-IID) and unreliable environments.
| Algorithm / Feature | Federated Averaging (FedAvg) | FedProx | SCAFFOLD |
|---|---|---|---|
Primary Innovation | Periodic weighted averaging of client model weights | Adds a proximal term to local loss to constrain client updates | Uses control variates (correction terms) to reduce client update variance |
Core Objective | Communication efficiency via local SGD steps | Stability under systems & statistical heterogeneity (non-IID) | Convergence acceleration & variance reduction in non-IID settings |
Mitigates Client Drift | |||
Handles Partial Participation | |||
Requires Client-Side State | |||
Communication Cost per Round | Model weights (full or compressed) | Model weights (full or compressed) | Model weights + control variates (increased) |
Convergence Guarantees (non-IID) | Weaker; sensitive to client heterogeneity | Stronger with bounded dissimilarity assumptions | Stronger; provably faster than FedAvg under heterogeneity |
Byzantine Robustness | |||
Common Use Case | Cross-device FL with relatively homogeneous data | Cross-silo FL with significant data skew across organizations | Cross-silo FL requiring fast, stable convergence on heterogeneous data |
Frameworks and Platforms Implementing FedAvg
Federated Averaging (FedAvg) is implemented in several open-source and commercial frameworks, each designed to abstract the complexities of distributed coordination, secure aggregation, and heterogeneous system management.
Frequently Asked Questions
Federated Averaging (FedAvg) is the foundational algorithm for decentralized machine learning. These questions address its core mechanisms, challenges, and practical applications.
Federated Averaging (FedAvg) is the canonical algorithm for Federated Learning that trains a shared global model by periodically averaging the locally updated parameters from a subset of participating clients, without centralizing their raw data. The process operates in synchronized communication rounds: 1) The central server selects a subset of clients and broadcasts the current global model. 2) Each selected client performs local stochastic gradient descent (SGD) on its private data for a specified number of epochs. 3) Clients send their updated model weights (or gradients) back to the server. 4) The server aggregates these updates, typically via a weighted average based on the number of training samples per client, to produce a new global model. This cycle repeats until convergence.
Key Formula: The server update for round t is: w_{t+1} = Σ_{k=1}^{K} (n_k / n) * w_{t+1}^k, where n_k is the number of samples on client k, n is the total samples across selected clients, and w_{t+1}^k is the model from client k.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Federated Averaging (FedAvg) operates within a broader ecosystem of techniques and concepts designed for decentralized, privacy-preserving machine learning. Understanding these related terms is essential for designing robust federated systems.
Federated Learning (FL)
The overarching decentralized machine learning paradigm where a shared global model is trained collaboratively across multiple client devices or servers holding local data samples, without exchanging the raw data itself. FedAvg is the foundational algorithm for this paradigm.
- Core Principle: Keep training data localized.
- Key Challenge: Coordinating learning across heterogeneous, potentially unreliable devices.
- Primary Goal: Learn a global model from decentralized data silos.
Differential Privacy (DP)
A rigorous mathematical framework that provides a quantifiable privacy guarantee for individuals in a dataset. It ensures the output of a computation (e.g., a model update) is statistically indistinguishable whether any single individual's data is included or excluded.
- Applied in FL: Often used to add calibrated noise to client updates before aggregation.
- Privacy Budget (ε): A parameter controlling the strength of the guarantee; lower ε means stronger privacy.
- Relation to FedAvg: DP can be integrated into FedAvg to create a private federated averaging algorithm.
Non-IID Data
Refers to Non-Independent and Identically Distributed data, the statistical heterogeneity that is the norm, not the exception, in federated learning. Each client's local dataset has a unique distribution.
- Example: Smartphone keyboards learning from different users' typing habits.
- Challenge for FedAvg: Causes client drift, where local models diverge, impairing global convergence.
- Mitigation: Algorithms like FedProx and SCAFFOLD are designed to handle non-IID data more effectively than vanilla FedAvg.
Secure Aggregation
A cryptographic protocol that allows a central server in federated learning to compute the sum (or average) of client model updates without being able to inspect any individual client's contribution.
- Privacy Enhancement: Prevents the server from performing model inversion or membership inference attacks on individual updates.
- How it works: Often uses masking techniques where clients add secret shares that cancel out upon aggregation.
- Use with FedAvg: The secure aggregation protocol is applied to the client weight updates before the averaging step.
Cross-Device vs. Cross-Silo FL
The two primary deployment scales for federated learning, which dictate system design and algorithm choice.
- Cross-Device FL: Involves a massive number of unreliable, resource-constrained edge devices (e.g., millions of smartphones). Focuses on partial participation, communication efficiency, and handling dropouts.
- Cross-Silo FL: Involves a small number of reliable, resource-rich organizations (e.g., 10 hospitals). Focuses on data privacy between entities, higher model complexity, and full participation.
- FedAvg's Role: The core averaging logic is used in both, but system-level implementations differ drastically.
Federated Optimization
The suite of algorithms and techniques designed to efficiently train models in the federated setting, addressing core challenges beyond simple averaging.
- Key Problems Tackled: Statistical heterogeneity (non-IID data), communication costs, system constraints, and partial participation.
- Advanced Algorithms:
- FedProx: Adds a proximal term to local loss to limit client drift.
- SCAFFOLD: Uses control variates (variance reduction) to correct for client drift.
- Evolution from FedAvg: These algorithms are direct successors that improve upon the stability and convergence of the original FedAvg algorithm.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us