Federated Averaging (FedAvg) is an iterative optimization algorithm where a central server distributes a global model to selected clients, each performing local stochastic gradient descent on its private dataset. The server then aggregates these independent weight updates by computing a weighted average, typically proportional to local dataset sizes, to produce a new global model. This process repeats over multiple communication rounds until convergence.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
Federated Averaging (FedAvg) is the foundational algorithm for decentralized machine learning that constructs a global model by averaging locally computed model weight updates from multiple client nodes, without ever centralizing the raw training data.
The primary challenge addressed by FedAvg is statistical heterogeneity and Non-IID data distributions across clients, which can cause client drift and slow convergence. Advanced variants like FedProx add a proximal term to the local objective function to stabilize training. FedAvg is the algorithmic core of cross-silo federated learning consortia, enabling privacy-preserving collaborative training across hospitals without violating data residency requirements.
Key Characteristics of FedAvg
Federated Averaging (FedAvg) is the canonical algorithm for collaborative learning. It balances local computation with global consensus, enabling robust model training across decentralized, privacy-sensitive data silos.
Weighted Parameter Averaging
The core mechanism of FedAvg is a weighted linear combination of model parameters. The global model update is computed as:
- Formula:
w_global = Σ (n_k / n) * w_k - Mechanism: Each client's contribution is scaled by the size of its local dataset (
n_k) relative to the total data (n). - Impact: Prevents a small client with anomalous data from dominating the global model, ensuring statistical stability.
Local Stochastic Gradient Descent (SGD)
FedAvg decouples model training from the central server by performing multiple local optimization steps.
- Process: Instead of sending raw gradients, clients compute full weight updates by running several epochs of SGD on their private data.
- Hyperparameter: The number of local epochs (
E) is a critical tuning parameter. - Trade-off: Increasing
Ereduces communication overhead but risks client drift if local data is highly Non-IID.
Communication Efficiency
FedAvg is designed to minimize the bottleneck of network transfer.
- Reduced Rounds: By computing significant local updates, FedAvg requires fewer communication rounds to reach convergence compared to naive Federated SGD.
- Payload: Only model weights (or weight deltas) are transmitted, not raw training data.
- Optimization: Techniques like gradient compression and quantization can be layered on top of FedAvg to further reduce bandwidth requirements.
Client Fraction Selection
The algorithm introduces a stochastic client selection parameter (C) to manage scale.
- Mechanism: In each round, the server randomly samples a fraction
Cof the total available clients to participate. - Scalability: This allows the system to scale to millions of devices without requiring all nodes to be online simultaneously.
- Statistical Impact: Random selection introduces noise but provides an unbiased estimate of the full population gradient.
Non-IID Robustness Limitations
A fundamental challenge for standard FedAvg is statistical heterogeneity.
- Problem: When client data is Non-IID (e.g., different hospitals have different disease prevalences), local objectives diverge from the global optimum.
- Symptom: This causes client drift, where the averaged global model performs worse than a centrally trained model.
- Mitigation: Extensions like FedProx add a proximal term to the local loss to anchor updates to the global model.
Privacy-Enhancing Integration
FedAvg provides a foundation for privacy, but does not guarantee it alone.
- Gradient Leakage: Raw weight updates can still be analyzed via model inversion attacks to reconstruct private data.
- Defense Stacking: FedAvg is typically combined with Secure Aggregation (to hide individual updates from the server) and Differential Privacy (to add calibrated noise to updates).
- Compliance: This layered approach is essential for meeting HIPAA and GDPR requirements in medical imaging.
Frequently Asked Questions
Clear, technical answers to the most common questions about the foundational Federated Averaging (FedAvg) algorithm, its privacy properties, and its application in multi-institutional medical imaging.
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 decentralized client nodes. The process operates in synchronized communication rounds. In each round, a central server distributes the current global model to a selected cohort of clients. Each client trains the model on its private local dataset for a fixed number of epochs, producing an updated set of model weights. These local weight updates—not the raw training data—are transmitted 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 mathematical operation is:
codew_{t+1} = Σ (n_k / n) * w^k_{t+1}
where w_{t+1} is the new global weight, n_k is the number of samples on client k, n is the total samples across all participating clients, and w^k_{t+1} is the updated weight from client k. This simple averaging mechanism is surprisingly effective at distilling distributed knowledge without centralizing sensitive data.
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. Related Aggregation Approaches
A technical comparison of the foundational Federated Averaging algorithm against its primary variants designed to address statistical heterogeneity and security threats in cross-silo medical imaging deployments.
| Feature | FedAvg | FedProx | Robust Aggregation (Krum) |
|---|---|---|---|
Core Aggregation Mechanism | Weighted coordinate-wise averaging of local model updates | Averaging with a proximal term penalizing deviation from the global model | Selects a single local model that minimizes sum of distances to its n-closest neighbors |
Primary Objective | Minimize global empirical loss across all client data distributions | Stabilize convergence under statistical and systems heterogeneity | Defend against Byzantine failures and malicious data poisoning |
Handling of Non-IID Data | Suffers from client drift and accuracy degradation | Mitigates client drift via constrained local updates | Discards outlier updates entirely; may ignore informative but heterogeneous clients |
Byzantine Fault Tolerance | |||
Communication Overhead | O(N) model weights per round | O(N) model weights per round | O(N²) pairwise distance computations; high server-side compute |
Convergence Speed on IID Data | Fastest | Slightly slower due to proximal regularization | Slower; discards potentially useful gradient information |
Suitability for Cross-Silo Medical Imaging | Baseline; requires homogeneous, trusted hospital nodes | Strong; tolerates variable local compute and heterogeneous patient demographics | Critical when nodes span untrusted or compromised institutional networks |
Related Terms
Core concepts and mechanisms that interact with the FedAvg algorithm to enable privacy-preserving, decentralized training of diagnostic models across multiple institutions.
Non-IID Data
The primary challenge FedAvg must overcome in medical imaging. Local datasets at different hospitals are not independently and identically distributed—one hospital may have predominantly geriatric chest X-rays while another specializes in pediatric trauma.
- Causes client drift where local models diverge from the global optimum
- Reflects real-world demographic and equipment variations
- FedAvg's simple averaging can struggle with extreme statistical heterogeneity
- Mitigated by variants like FedProx that add proximal regularization terms
Secure Aggregation (SecAgg)
A cryptographic protocol that pairs with FedAvg to ensure the central server can only compute the sum of encrypted model updates without inspecting any individual hospital's weight contributions in plaintext.
- Uses secret sharing to mask individual updates
- Server learns only the aggregated average, never individual gradients
- Critical for HIPAA compliance in multi-hospital diagnostic model training
- Prevents gradient leakage attacks that could reconstruct patient scan features
Communication Round
A single complete cycle in federated training consisting of three phases:
- Distribution: Server broadcasts the current global model to selected client hospitals
- Local Training: Each hospital trains on its private DICOM data for a configurable number of epochs
- Aggregation: Server applies FedAvg to weight updates and produces a new global model
The number of communication rounds is a critical hyperparameter balancing convergence quality against network bandwidth costs in clinical environments.
Client Drift
The divergence of locally trained models from the optimal global objective caused by heterogeneous, Non-IID data distributions across participating hospitals.
- Manifests when local SGD steps pull weights toward local optima
- FedAvg's periodic synchronization partially corrects drift
- Excessive drift degrades global model diagnostic accuracy
- Addressed by FedProx and SCAFFOLD algorithms that introduce correction terms
- Particularly problematic in rare disease detection where only a few sites have positive cases
Cross-Silo Federated Learning
The deployment topology where FedAvg is most commonly applied in healthcare. Designed for a small, reliable number of institutional participants (typically 2-50 hospitals) rather than millions of mobile devices.
- Each silo holds a large, curated dataset with substantial compute resources
- Clients are stateful and participate in most or all training rounds
- Assumes honest-but-curious participants rather than malicious actors
- Enables collaborative training of diagnostic models across hospital networks without centralizing protected health information
Differential Privacy (DP)
A mathematical framework often layered on top of FedAvg to provide provable privacy guarantees. Injects calibrated noise into model updates before aggregation.
- Controlled by the privacy budget (epsilon)—lower values enforce stronger guarantees
- Protects against membership inference and model inversion attacks
- Introduces a utility-privacy tradeoff: excessive noise degrades diagnostic accuracy
- Can be applied at the client level (local DP) or server level (central DP)
- Essential for satisfying regulatory requirements under GDPR and HIPAA

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