Federated Averaging (FedAvg) is a distributed machine learning algorithm where a central server initializes a global model and distributes it to selected clients. Each client trains the model on its local, private dataset for a few epochs, producing an updated set of model weights. The server then collects these local updates and computes a new global model by taking a weighted average of the parameters, typically weighted by the number of local training samples. This iterative process repeats over multiple communication rounds until convergence, ensuring raw data never leaves the client device.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
Federated Averaging (FedAvg) is the canonical optimization algorithm for federated learning that constructs a global model by computing a weighted average of locally trained model parameters from distributed clients, eliminating the need to centralize raw data.
The algorithm's core innovation lies in reducing communication overhead by performing multiple local stochastic gradient descent (SGD) steps before aggregation, unlike earlier federated approaches that required gradient transmission after every batch. This makes FedAvg practical for cross-device settings with limited bandwidth. However, its performance degrades under non-IID data distributions and heterogeneous client capabilities, motivating extensions like FedProx and SCAFFOLD that add regularization or control variates to stabilize training across statistically diverse factory fleets.
Key Characteristics of FedAvg
Federated Averaging (FedAvg) is defined by a set of core architectural and mathematical properties that distinguish it from traditional distributed training. These characteristics dictate its suitability for cross-silo industrial deployments.
Local Stochastic Gradient Descent (SGD)
The core mechanism of FedAvg involves each client performing multiple steps of Stochastic Gradient Descent on its local data partition before communicating. Instead of sending raw gradients, the client transmits an updated local model state. This contrasts with FedSGD, where clients compute a single gradient step and send it immediately. By performing multiple local epochs, FedAvg drastically reduces the number of communication rounds required for convergence, making it practical for bandwidth-constrained factory networks.
Parameter Averaging on a Central Server
The 'averaging' step occurs on a central orchestration server. The server collects the model weights from all participating clients in a given round and computes a weighted average to produce the new global model. The standard weighting scheme is proportional to the size of each client's local dataset:
- Weighted Update:
w_global = Σ (n_k / n) * w_k - Equal Contribution: A simple arithmetic mean when dataset sizes are unknown or intentionally ignored. This step is the only point of model fusion and does not require the server to inspect raw production data.
Communication Efficiency
FedAvg is explicitly designed to be communication-bound, not computation-bound. By increasing the number of local training epochs (E) and adjusting the local batch size (B), the algorithm trades local compute cycles for a significant reduction in network I/O. This is critical for factory fleets where uplink bandwidth may be limited or intermittent. Key tuning parameters include:
- Local Epochs (E): More epochs mean fewer communication rounds.
- Client Fraction (C): Only a random subset of clients participates in each round, preventing server bottlenecks.
Tolerance to Non-IID Data
A defining challenge for FedAvg is statistical heterogeneity, where local factory datasets are non-identically distributed (Non-IID). Unlike data-center training with shuffled data, one factory's sensor logs may represent normal operations while another's contain rare failure modes. While standard FedAvg can diverge under extreme Non-IID conditions, its foundational structure allows for proximal modifications. The algorithm's robustness is directly tied to the data shift across the fleet, making it a baseline against which more advanced algorithms like FedProx are measured.
Privacy-Preserving Foundation
FedAvg provides a baseline layer of data locality by design. Raw production telemetry, proprietary process parameters, and defect imagery never leave the factory floor. Only model deltas—the mathematical differences between the trained local model and the received global model—are transmitted. However, these weight updates are not inherently cryptographically secure. In production, FedAvg is almost always paired with a Secure Aggregation protocol to prevent the server from inspecting individual client updates, which could otherwise be vulnerable to model inversion attacks.
Convergence Guarantees
The theoretical convergence of FedAvg relies on specific assumptions. Under conditions of convex loss functions and IID data distributions, the algorithm provably converges to the global optimum. In the non-convex, Non-IID reality of deep neural networks, convergence is empirical and sensitive to hyperparameter tuning. Key factors affecting stability include:
- Learning Rate Decay: A decaying schedule prevents oscillation.
- Client Drift: Occurs when local models diverge too far from the global model during local training.
- Number of Local Steps: Too many local steps on divergent data can prevent global convergence.
Frequently Asked Questions
Clear, technically precise 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 federated learning algorithm that constructs a shared global model by averaging the locally computed model weight updates from multiple distributed clients, without ever centralizing their raw data. The process works in iterative communication rounds: a central server initializes a global model and sends it to a selected cohort of clients. Each client trains this model on its local, private dataset for a few epochs, producing an updated set of model weights. These local model updates—not the training data—are sent back to the server. The server then computes a weighted average of these updates, typically proportional to the size of each client's local dataset, to produce a new, improved global model. This cycle repeats until the model converges. The core insight is that the averaging of stochastic gradient descent (SGD) updates from diverse local data distributions approximates the gradient of the total loss function, enabling collaborative learning under strict data locality constraints.
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.
FedAvg vs. Other Federated Optimization Algorithms
A technical comparison of Federated Averaging against alternative federated optimization frameworks across key dimensions of convergence behavior, communication efficiency, and tolerance to real-world deployment constraints.
| Feature | FedAvg | FedProx | SCAFFOLD |
|---|---|---|---|
Core Mechanism | Weighted averaging of local model updates after multiple local SGD epochs | Adds proximal term to local objective to restrict divergence from global model | Corrects client-drift using control variates that track gradient direction differences |
Convergence on Non-IID Data | Diverges or slows significantly under high statistical heterogeneity | Stable convergence with theoretical guarantees under mild heterogeneity | Robust convergence even under extreme label and feature distribution skew |
Communication Rounds to Target Accuracy | Baseline; may require 2-5x more rounds on heterogeneous data | Comparable to FedAvg on homogeneous data; 30-50% fewer rounds on skewed data | Typically 40-60% fewer rounds than FedAvg across all heterogeneity levels |
Client-Side Computation Overhead | Minimal; standard local SGD with no additional terms | Moderate; proximal term adds negligible cost but requires tuning of μ hyperparameter | Higher; maintains and updates control variate state alongside model parameters |
Tolerance to Stragglers | Low; waits for all selected clients or drops slow participants | Moderate; proximal term partially mitigates stale updates from slow clients | Moderate; control variates reduce penalty of partial participation |
Server-Side Complexity | Minimal; simple weighted averaging of received updates | Minimal; identical aggregation logic to FedAvg | Higher; must maintain and update global control variates across rounds |
Hyperparameter Sensitivity | Sensitive to local epoch count and batch size selection | Sensitive to proximal term coefficient μ; requires per-task tuning | Less sensitive; control variate step size is more robust across tasks |
Stateful Client Requirement |
Related Terms
Federated Averaging (FedAvg) does not operate in isolation. It relies on a constellation of privacy-preserving techniques, optimization frameworks, and security protocols to function effectively in real-world, non-IID industrial environments.
Non-IID Data
The primary statistical challenge that FedAvg must overcome. In factory fleets, Non-IID data means that the sensor distributions at Plant A (producing high-speed widgets) differ drastically from Plant B (producing heavy machinery). This violates the standard machine learning assumption of identical distribution.
- Label skew: Plant A sees mostly 'normal' parts, Plant B sees 'defective' parts.
- Feature skew: Vibration sensors differ by machine vintage.
- Impact: Naive FedAvg can diverge or fail to converge on Non-IID data, requiring robust variants like FedProx.
Secure Aggregation
A cryptographic protocol that ensures the central server can only compute the sum of model updates without ever inspecting an individual factory's gradient. This prevents gradient leakage attacks where raw data could be reconstructed from model updates.
- Secret sharing: Each client masks its update with random noise that cancels out only when all updates are summed.
- Threshold security: The server learns nothing unless a minimum number of clients participate.
- Integration: Often paired with FedAvg to satisfy strict industrial data governance requirements.
Differential Privacy
A mathematical guarantee that the inclusion or exclusion of a single factory's data point does not significantly change the model's output. Applied to FedAvg, differential privacy clips and noises gradients before aggregation.
- Epsilon parameter: Quantifies the privacy loss budget; lower epsilon means stronger privacy.
- Central vs. Local DP: Central DP adds noise at the server; local DP adds noise at each client before transmission.
- Trade-off: Stronger privacy guarantees degrade model utility, requiring careful calibration for quality inspection tasks.
Gradient Compression
A communication efficiency technique that reduces the bandwidth cost of transmitting model updates from edge devices to the aggregation server. Essential for factory floors with constrained or intermittent connectivity.
- Sparsification: Transmit only the top-k largest gradient values, zeroing out the rest.
- Quantization: Reduce gradient precision from 32-bit floats to 8-bit integers or even 1-bit signs.
- Error feedback: Accumulates compression errors locally to prevent model divergence over multiple rounds.
Byzantine Fault Tolerance
The resilience property required when some factory nodes in the federation behave arbitrarily or maliciously. A single compromised edge device uploading poisoned updates can corrupt the global model in standard FedAvg.
- Attack vectors: Data poisoning, model replacement, and free-riding attacks.
- Defense mechanisms: Robust aggregation rules like Krum or median-based aggregation that filter out outlier updates.
- Relevance: Critical for multi-tenant industrial platforms where competitors may share a federation.

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