Federated Averaging (FedAvg) is a distributed optimization algorithm where a central server initializes a global model, distributes it to a random subset of clients, and each client performs multiple steps of stochastic gradient descent (SGD) on its local private data. The server then constructs a new global model by computing a weighted average of the resulting client model updates, typically weighted by the number of local training samples, thereby reducing the communication rounds required for convergence compared to naive distributed SGD.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
The core optimization algorithm that enables decentralized model training by combining local stochastic gradient descent on client devices with iterative server-side model averaging to minimize communication overhead.
The algorithm directly addresses the communication efficiency bottleneck in federated learning by increasing local computation per round. By allowing clients to take multiple gradient steps before synchronizing, FedAvg tolerates the statistical heterogeneity of non-IID data distributions across devices, though this can introduce client drift. The technique remains the foundational baseline for most modern federated systems, including cross-device deployments on smartphones and cross-silo collaborations between institutions.
Key Characteristics of FedAvg
The core architectural properties that make Federated Averaging the dominant optimization strategy for decentralized training, balancing communication efficiency with statistical convergence.
Local Stochastic Gradient Descent (SGD)
Each client performs multiple steps of stochastic gradient descent on its local data partition before communicating. This contrasts with single-step gradient sharing by:
- Reducing communication rounds by a factor proportional to local epochs
- Allowing clients to make meaningful progress on non-IID distributions
- Trading increased local computation for decreased network bandwidth
The server does not see raw data—only the resulting weight updates after local optimization completes.
Iterative Server-Side Averaging
The central server computes a weighted average of client model updates to form the new global model. The aggregation rule is:
w_global = Σ (n_k / n) * w_k
Where n_k is the number of samples on client k and n is the total samples across selected clients. This weighting ensures clients with more data exert proportionally greater influence on the global model, improving statistical efficiency.
Communication Round Structure
FedAvg operates in discrete synchronized rounds:
- Server broadcasts current global model to selected clients
- Clients train locally for E epochs on their private data
- Clients upload only model weights (not gradients or data)
- Server aggregates and produces the next global model
This structure decouples training from data centralization, making it suitable for bandwidth-constrained and privacy-sensitive deployments.
Handling Statistical Heterogeneity
FedAvg is designed to operate under non-IID data distributions where client datasets differ significantly. Key mechanisms include:
- Weighted averaging that accounts for dataset size disparities
- Multiple local epochs that allow clients to adapt to local distributions
- Implicit regularization from averaging diverse client updates
However, extreme non-IID conditions can cause client drift, where local models diverge from the global optimum, slowing convergence. Variants like FedProx address this limitation.
Privacy by Architecture
FedAvg provides a baseline privacy guarantee through data locality:
- Raw training data never leaves the client device
- Only model weight updates are transmitted to the server
- Individual updates are ephemeral and aggregated before use
This architectural privacy is often enhanced with secure aggregation (cryptographic masking of individual updates) and differential privacy (noise injection) to protect against gradient leakage attacks that could reconstruct training samples.
Client Selection and Scalability
In cross-device deployments with millions of clients, FedAvg uses random subset sampling:
- Only a fraction of available clients participate in each round
- Selection can be uniform random or weighted by device capability
- Stragglers (slow clients) may be dropped to maintain round timing
This sampling introduces stochasticity that can actually improve generalization while keeping communication costs manageable at massive scale.
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 machine learning.
Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that combines local stochastic gradient descent (SGD) on distributed clients with iterative server-side model averaging to train a global model without centralizing raw data. The process works in synchronous communication rounds: the server initializes a global model and distributes it to a selected subset of clients. Each client performs multiple epochs of local SGD on its private dataset, producing an updated local model. These local updates are then transmitted back to the server, which computes a weighted average of the received models—typically weighted by the number of local training samples—to produce a new global model. This cycle repeats until convergence. By moving computation to the data rather than data to the computation, FedAvg dramatically reduces communication overhead compared to naive distributed SGD while preserving data locality and privacy.
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
Core algorithms and concepts that extend, stabilize, or compete with the foundational Federated Averaging algorithm in distributed machine learning systems.
FedProx
A generalized optimization framework that extends FedAvg by introducing a proximal term to the local objective function. This term penalizes large deviations from the global model, stabilizing training when clients have heterogeneous compute resources or non-IID data. Unlike standard FedAvg, FedProx allows for partial work—clients can perform variable amounts of local computation and still contribute meaningfully to the global model, preventing stragglers from being dropped entirely.
Client Drift
The primary pathology that FedAvg attempts to solve, but which worsens under extreme statistical heterogeneity. Client drift occurs when local models diverge from the global optimum because each client overfits to its local data distribution. This divergence causes the simple averaging step in FedAvg to produce a suboptimal global model. Key contributing factors include:
- Non-IID data across silos
- Varying local dataset sizes
- Different numbers of local epochs
Gradient Compression
A family of techniques that reduce the communication bottleneck inherent in FedAvg's upload phase. Instead of transmitting full 32-bit floating-point gradients, clients apply quantization (reducing to 8-bit or fewer) or sparsification (sending only the top-k largest gradient elements). These methods can reduce upload sizes by 100x or more, but introduce noise that must be compensated for by error accumulation or momentum correction on the server side.
Hierarchical Federated Learning
A multi-tier architecture that introduces edge aggregators between clients and the central cloud server. Instead of all clients sending updates directly to a distant server, intermediate nodes perform local aggregation first. This reduces wide-area network latency and communication costs. FedAvg runs at each tier: client-to-edge and edge-to-cloud, creating a tree-structured averaging process that scales to millions of geographically distributed devices.
Decentralized Federated Learning
A peer-to-peer alternative that eliminates the central aggregation server entirely. Instead of a star topology, nodes exchange models directly using gossip protocols or blockchain consensus. Each node averages its model with randomly selected peers, propagating updates through the network. This removes the single point of failure and trust concentration inherent in standard FedAvg, but introduces challenges in convergence guarantees and auditability.

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