Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that constructs a shared global model by aggregating and averaging the locally computed model updates from decentralized client devices, without ever centralizing raw data. In each communication round, a central server distributes the current global model to a subset of clients, which independently train on their local data using stochastic gradient descent (SGD). The server then collects the resulting model weights and computes a weighted average to form the updated global model.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that constructs a shared global model by aggregating and averaging the locally computed model updates from decentralized client devices, without ever centralizing raw data.
The algorithm's core innovation is reducing communication overhead by performing multiple local SGD steps before synchronizing, a concept formalized by McMahan et al. (2017). This approach directly addresses the statistical heterogeneity of non-IID data distributions across clients while providing mathematical convergence guarantees. FedAvg is the algorithmic backbone enabling privacy-preserving machine learning in healthcare diagnostics, where hospitals collaboratively train biomarker identification models without exposing sensitive patient records.
Key Characteristics of FedAvg
Federated Averaging (FedAvg) is the foundational algorithm that enables collaborative model training across decentralized data silos without raw data exchange. The following characteristics define its operational mechanics and strategic advantages.
Local Stochastic Gradient Descent (SGD)
Unlike traditional distributed training that relies on a single gradient step, FedAvg allows client devices to perform multiple local epochs of training on their private data partitions before communication. Each client computes weight updates by minimizing the loss function on its local dataset. This reduces the frequency of communication rounds and is critical for handling non-IID (non-Independently and Identically Distributed) data distributions, where a client's local dataset may not statistically represent the global population.
Server-Side Weighted Aggregation
The central server orchestrates the learning process by collecting locally-computed model updates, not raw data. The global model is updated by computing a weighted average of these client updates. The standard weighting scheme is proportional to the size of the local dataset:
- Formula:
w_global = Σ (n_k / n) * w_k - n_k: Number of samples on client k
- n: Total number of samples across all selected clients This ensures that clients with more data exert a proportionally greater influence on the global model.
Client Selection and Fraction Constraints
In each communication round, the server randomly samples a fraction C of available clients to participate. This is a critical hyperparameter that balances convergence speed against communication overhead and straggler effects. A typical value for C is between 0.1 and 1.0. Selecting a subset of clients introduces stochasticity into the optimization process, which has been shown empirically to improve the generalization of the final model by acting as an implicit regularizer.
Communication Efficiency
FedAvg is designed to minimize the communication bottleneck, which is the primary constraint in federated networks. By increasing the number of local epochs (E) and batch sizes (B), the algorithm reduces the total number of communication rounds required for convergence. This is essential for deployment on bandwidth-limited edge devices such as smartphones and IoT sensors. Techniques like gradient compression and quantization are often layered on top of FedAvg to further reduce the bitrate of uploaded model updates.
Privacy Preservation by Design
The core architectural principle of FedAvg is that raw data never leaves the client device. Only model updates (gradients or weights) are transmitted. This provides a baseline level of data minimization and privacy. However, it is not a complete privacy guarantee; model updates can leak sensitive information through gradient inversion attacks. Production systems typically combine FedAvg with formal privacy mechanisms like Differential Privacy or Secure Multi-Party Computation (SMPC) to provide provable cryptographic guarantees against such leakage.
Handling System Heterogeneity
Real-world federated networks consist of devices with vastly different compute capabilities, network connectivity, and availability. FedAvg is inherently robust to stragglers—slow or failing devices—because the server can simply drop clients that do not report updates within a deadline. The algorithm does not require synchronous updates from all clients, making it suitable for asynchronous environments. This tolerance for variable latency and hardware profiles is what distinguishes federated learning from tightly-coupled data-center distributed training.
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.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the foundational algorithm that powers privacy-preserving collaborative machine learning across decentralized data sources.
Federated Averaging (FedAvg) is a foundational optimization algorithm for federated learning that constructs a shared global model by averaging the locally-computed model parameter updates from multiple decentralized client devices, without ever centralizing the raw training data. The process operates in communication rounds: a central server initializes a global model and distributes it to a sampled subset of clients. Each client trains the model on its local dataset for a configurable number of local epochs, producing an updated set of model weights. These weight updates—not the underlying data—are transmitted back to the server, which computes a weighted average of the received updates, typically weighted by the size of each client's local dataset. The aggregated model becomes the new global model for the next round. This iterative process continues until convergence. The key insight is that averaging stochastic gradient descent (SGD) updates from independent data partitions approximates centralized training on the combined dataset, provided the local objective functions are sufficiently aligned.
Related Terms
Understanding Federated Averaging requires familiarity with the core privacy, optimization, and architectural concepts that enable decentralized model training.
Non-IID Data Distribution
A fundamental challenge in federated learning where the local datasets on client devices are not independent and identically distributed. This violates a key assumption of standard SGD.
- Label skew: Some clients may only have data from a subset of classes.
- Feature skew: The same label can look different across clients (e.g., different handwriting styles).
- Impact on FedAvg: Severe non-IIDness causes client-drift, where local models diverge from the global optimum, slowing convergence and degrading final model accuracy.
Client Selection & Scheduling
The strategy for choosing which subset of available devices will participate in a given training round. Random selection is standard, but advanced policies exist.
- Random sampling: A fraction
Cof clients is selected uniformly at random each round. - Strafied sampling: Ensures representation across different data distributions or device types.
- Resource-aware selection: Chooses clients based on battery level, network type (Wi-Fi vs. cellular), or idle state to minimize user disruption and drop-out rates.
Communication Efficiency
A primary bottleneck in FedAvg, as uploading model updates can be slow and costly on mobile networks. Techniques to compress these updates are critical for practical deployment.
- Gradient compression: Methods like sparsification (sending only the top-k largest gradient values) and quantization (reducing bit-width from 32-bit floats to 2-8 bits).
- Local computation trade-off: Increasing local epochs reduces communication rounds but can exacerbate client-drift on non-IID data.
- FedAvg's role: The algorithm's design inherently reduces communication by a factor equal to the number of local steps compared to naive distributed SGD.

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