Federated Averaging (FedAvg) is a decentralized optimization algorithm that constructs a global model by computing a weighted average of model parameters received from multiple clients after local training on their private data. The server initializes a global model, distributes it to a subset of participating nodes, and then aggregates their returned updates proportionally to the size of each client's local dataset.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
Federated Averaging is the canonical algorithm for combining locally trained model updates into a single, robust global model without centralizing raw data.
This iterative process repeats over multiple communication rounds until convergence. By decoupling model training from data centralization, FedAvg serves as the privacy-preserving backbone for collaborative machine learning. Its effectiveness, however, is challenged by non-IID data distributions and system heterogeneity across clinical institutions, motivating advanced variants like FedProx and SCAFFOLD that add proximal terms or control variates to stabilize convergence.
Key Characteristics of Federated Averaging
Federated Averaging (FedAvg) is the seminal algorithm that enables collaborative model training across decentralized data silos. It operates by independently training local models on client devices and periodically averaging their parameters on a central server to construct a robust global model without ever accessing raw data.
Weighted Parameter Averaging
The core mechanism of FedAvg is a coordinate-wise weighted average of model parameters. After local training, each client $k$ sends its updated weights $w_k$ to the server. The global model is computed as $w_{global} = \sum_{k=1}^{K} \frac{n_k}{n} w_k$, where $n_k$ is the number of local samples and $n$ is the total samples across all participating clients. This ensures that clients with larger clinical datasets exert proportionally greater influence on the global model, reflecting statistical confidence. The process is mathematically equivalent to Stochastic Gradient Descent (SGD) executed in a distributed fashion, but with the critical privacy-preserving property that raw data never leaves its origin.
Local SGD with Periodic Synchronization
FedAvg decouples local computation from global synchronization. Instead of communicating gradients after every batch, clients perform multiple local epochs of SGD on their private data before communicating. This reduces communication rounds by orders of magnitude compared to classic distributed SGD. The algorithm introduces a hyperparameter $E$, the number of local epochs, which creates a trade-off: higher $E$ reduces communication costs but increases the risk of client drift, where local models diverge toward local optima. In healthcare settings with non-IID data distributions across hospitals, this drift can slow convergence or degrade final model quality.
Client Selection and Fractional Participation
In realistic cross-device deployments, it is impractical to wait for thousands of edge devices to complete training simultaneously. FedAvg introduces a fractional participation parameter $C$, where only a random subset of available clients is selected for each training round. This straggler-resilient design ensures the system does not block on the slowest device. However, biased client selection can introduce statistical skew into the global model. In cross-silo healthcare settings with a small number of reliable institutional clients, $C$ is typically set to 1.0, enabling full participation and deterministic aggregation.
Convergence Guarantees Under Heterogeneity
The original FedAvg paper proved empirical convergence on IID data partitions, but real-world clinical data is notoriously non-IID. Subsequent theoretical analysis established that FedAvg converges to a global optimum at a rate of $O(1/\sqrt{nKE})$ for strongly convex functions, even under heterogeneous data distributions, provided the learning rate is sufficiently small. However, when data distributions diverge significantly—such as one hospital specializing in rare diseases while another handles routine care—the global model can exhibit objective inconsistency, converging to a solution far from any local optimum. This motivates advanced variants like FedProx and SCAFFOLD.
Privacy by Architecture, Not by Guarantee
FedAvg provides architectural privacy by design: raw patient data never leaves the local institution. Only model updates—gradients or weights—are transmitted. However, this does not constitute a formal privacy guarantee. Research has demonstrated that gradient leakage attacks can reconstruct training images from shared gradients, and membership inference attacks can determine if a specific patient's record was used in training. In regulated healthcare environments, FedAvg must be augmented with Differential Privacy (DP-FedAvg) or Secure Aggregation (SecAgg) protocols to provide cryptographically sound privacy assurances that satisfy HIPAA and GDPR requirements.
Communication Rounds as the Bottleneck
The primary operational constraint in FedAvg is not local compute but communication efficiency. Each global synchronization round requires transmitting full model weights—potentially millions of parameters—over hospital networks. For large models like ResNet-152 or transformer architectures, this can consume gigabytes per round. Practical deployments employ gradient compression techniques such as quantization (QSGD) and sparsification (Top-K) to reduce bandwidth by 100-1000x. The number of communication rounds required for convergence typically ranges from hundreds to thousands, making this the dominant factor in total training wall-clock time for federated healthcare systems.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the foundational Federated Averaging algorithm, its mechanisms, and its role in privacy-preserving collaborative machine learning.
Federated Averaging (FedAvg) is the foundational aggregation algorithm in federated learning that constructs a global model by computing a weighted average of locally trained model updates from participating clients, without ever centralizing raw data. The algorithm operates in iterative communication rounds. In each round, the central server distributes the current global model parameters to a selected subset of clients. Each client performs multiple steps of local stochastic gradient descent (SGD) on its private dataset, producing an updated local model. The server then collects these local updates and computes the new global model as a weighted sum, where each client's contribution is typically weighted proportionally to the size of its local dataset: w_global = Σ (n_k / n) * w_k. This simple yet powerful mechanism allows collaborative learning across decentralized data silos while preserving data locality and privacy.
FedAvg vs. Other Aggregation Algorithms
Comparative analysis of Federated Averaging against alternative aggregation strategies across key operational dimensions relevant to healthcare federated learning deployments.
| Feature | FedAvg | FedProx | SCAFFOLD | Krum |
|---|---|---|---|---|
Primary Mechanism | Weighted average of local model updates | Weighted average with proximal regularization term | Stochastic controlled averaging with variance reduction via control variates | Selects single update with minimal sum of squared distances to neighbors |
Client Drift Mitigation | ||||
Byzantine Fault Tolerance | ||||
Non-IID Data Robustness | Low—degrades significantly under statistical heterogeneity | Moderate—proximal term constrains local divergence | High—control variates correct for heterogeneous objectives | Moderate—filters outliers but may discard valid heterogeneous updates |
Communication Overhead | Standard—full model transmission per round | Standard—identical to FedAvg | Higher—requires transmitting control variates alongside model updates | Higher—requires computing all pairwise distances between client updates |
Convergence Speed | Moderate—sensitive to stragglers and data skew | Faster than FedAvg on heterogeneous data | Significantly faster—fewer communication rounds required | Slower—discards information from non-selected updates |
Computational Cost per Client | Low—standard local SGD | Low—adds negligible proximal term computation | Moderate—requires maintaining and updating control variate state | Low—standard local training; server bears selection cost |
Privacy Preservation Baseline | None inherent—requires additional protocols like SecAgg or DP | None inherent—requires additional protocols | None inherent—requires additional protocols | None inherent—requires additional protocols |
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) is the foundational algorithm, but a rich ecosystem of aggregation strategies has evolved to address its limitations in heterogeneous, adversarial, and communication-constrained healthcare environments.
FedProx: Proximal Term Stabilization
A direct evolution of FedAvg that adds a proximal term to local objective functions. This penalty restricts local updates from diverging too far from the global model, stabilizing convergence across heterogeneous clinical devices and non-IID data distributions.
- Solves systems heterogeneity where clients have varying compute budgets
- Allows partial work from straggler devices
- Critical for cross-device healthcare deployments with mixed hardware
SCAFFOLD: Control Variate Correction
Uses control variates to correct for client drift during local training. Unlike FedAvg, SCAFFOLD tracks the difference between global and local update directions, significantly reducing the number of communication rounds required for convergence.
- Addresses the fundamental client-drift problem in FedAvg
- Maintains a server-side control variate and client-side variants
- Particularly effective when clinical data is highly non-IID across hospitals
Byzantine Fault Tolerance (BFT) Aggregation
A class of robust aggregation rules ensuring global model convergence even when a subset of nodes submits arbitrary, malicious, or corrupted updates. Essential for healthcare networks where compromised devices or adversarial actors may exist.
- Krum: Selects the update with minimal sum of squared distances to neighbors
- Trimmed Mean: Discards extreme values per coordinate before averaging
- Median Aggregation: Uses coordinate-wise median instead of mean
Secure Aggregation (SecAgg)
A cryptographic protocol enabling the server to compute the sum of encrypted client updates without inspecting any individual contribution. Ensures that even the aggregator cannot access raw model updates, providing strong data privacy guarantees.
- Uses secret sharing and pairwise masking
- Server only sees the aggregated result, never individual gradients
- Foundational for HIPAA-compliant multi-institutional training
Differential Privacy Aggregation (DP-FedAvg)
Injects calibrated statistical noise into the model update process, providing formal mathematical guarantees that individual patient data cannot be inferred from the global model. Balances the privacy-utility tradeoff through the epsilon parameter.
- Gaussian or Laplacian noise addition to clipped gradients
- Provides (ε, δ)-differential privacy guarantees
- Essential for GDPR and HIPAA compliance in clinical federated learning
FedOpt: Generalized Server Optimization
Decouples local client updates from global server optimization, allowing adaptive optimizers like Adam, Yogi, or SGD with momentum on the server side. Treats client updates as pseudo-gradients in a broader optimization framework.
- FedAdam: Adam optimizer applied server-side
- FedYogi: Adaptive learning rates for non-stationary settings
- Improves convergence speed over vanilla FedAvg in sparse participation regimes

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