Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that constructs a global model by computing a weighted average of locally trained model parameters from multiple clients, where each client's contribution is weighted proportionally to the size of its local dataset. The algorithm proceeds in communication rounds: a central server distributes the current global model to a subset of clients, each client trains the model on its private data for several local epochs, and the server aggregates the resulting parameter updates by averaging them.
Glossary
Federated Averaging

What is Federated Averaging?
The core algorithm that enables decentralized model training by mathematically combining locally computed updates without exposing raw data.
FedAvg directly addresses the core privacy constraint of federated learning by ensuring that raw data never leaves its source institution, only encrypted or obfuscated model weight updates are transmitted. The algorithm's convergence properties are well-studied, though it faces challenges with non-IID data distributions, where heterogeneous local datasets can cause the averaged model to diverge from the optimal centralized solution. Extensions like FedProx and SCAFFOLD introduce proximal terms and control variates to stabilize training in these heterogeneous settings.
Key Characteristics of FedAvg
Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning. It enables collaborative model training across decentralized data silos by combining locally computed model updates through a weighted averaging scheme, eliminating the need to centralize sensitive raw data.
Weighted Averaging Mechanism
The core operation of FedAvg is a weighted arithmetic mean of local model parameters. Each client's contribution is scaled proportionally to the size of its local dataset (n_k / n_total). This ensures that clients with more representative data exert a proportionally greater influence on the global model, while smaller datasets still contribute valuable signal without being drowned out. The update rule is: w_global = Σ (n_k / n) * w_k, where w_k represents the model weights trained locally on client k.
Local SGD with Periodic Aggregation
FedAvg generalizes Stochastic Gradient Descent (SGD) to a distributed setting. Instead of transmitting gradients after every batch, each client performs multiple local epochs of SGD on its private data. Only the final model weights—not raw gradients or data—are sent to the server. This reduces communication rounds by orders of magnitude compared to naive distributed SGD. The hyperparameter E (local epochs) controls the compute-to-communication trade-off:
- E=1: Single local epoch, closer to standard distributed SGD
- E=∞: Full local convergence, extreme communication savings but risk of client drift
Client Drift Challenge
When local datasets are non-IID (not independently and identically distributed), each client's local SGD trajectory diverges toward a different local optimum. This phenomenon, called client drift, causes the averaged global model to converge to a suboptimal point far from the true centralized optimum. FedAvg's convergence guarantees degrade significantly under heterogeneous data distributions—a critical concern in genomic consortia where each hospital may have distinct patient demographics and sequencing protocols.
Communication Efficiency
FedAvg is designed to minimize uplink bandwidth—the bottleneck in federated systems. By transmitting only model weights after multiple local epochs, it achieves a compression ratio proportional to the number of local steps. Additional optimizations include:
- Partial participation: Only a random fraction C of clients train in each round
- Gradient sparsification: Transmitting only the top-k magnitude weight updates
- Quantization: Reducing weight precision from 32-bit floats to 8-bit integers These techniques make FedAvg viable for cross-silo genomic federations with limited inter-institutional bandwidth.
Convergence Properties
FedAvg provably converges to the global optimum under convex loss functions with IID data. For non-convex objectives like deep neural networks, convergence is empirically robust but theoretically more fragile. Key factors affecting convergence:
- Learning rate decay: Critical for stabilizing late-stage training
- Local epoch count: Too many local epochs on non-IID data causes divergence
- Client sampling strategy: Uniform random sampling can bias the model toward over-represented clients
- Server momentum: Applying momentum to the global weight update (FedAvgM) significantly accelerates convergence in practice
Privacy Amplification by Aggregation
FedAvg provides a baseline layer of data locality privacy—raw genomic sequences never leave their institution of origin. However, model weight updates can still leak information through gradient inversion attacks. To strengthen guarantees, FedAvg is commonly combined with:
- Differential Privacy: Adding calibrated Gaussian noise to weight updates before transmission
- Secure Aggregation: Using multi-party computation to ensure the server only sees the aggregated sum, never individual updates This layered defense is essential for HIPAA-compliant and GDPR-compliant genomic federations.
FedAvg vs. Related Aggregation Methods
A comparison of the foundational Federated Averaging algorithm against alternative aggregation strategies used in privacy-preserving, decentralized genomic model training.
| Feature | Federated Averaging (FedAvg) | Secure Aggregation | FedProx |
|---|---|---|---|
Core Mechanism | Weighted average of local model updates | Encrypted sum of masked model updates | Proximal term regularized local updates |
Privacy Guarantee | Data stays local; updates are plaintext | Server sees only aggregate; cryptographic privacy | Data stays local; updates are plaintext |
Non-IID Robustness | Moderate; diverges under severe skew | Inherits from base aggregation method | High; proximal term stabilizes heterogeneous clients |
Communication Overhead | Low; single vector per round | High; requires multiple rounds of secret sharing | Low; comparable to FedAvg |
Client Dropout Tolerance | |||
Computational Cost (Client) | Low; standard local SGD | Moderate; cryptographic masking operations | Moderate; additional proximal term computation |
Primary Use Case | Cross-silo genomic consortia with trusted server | Untrusted cloud aggregator; strict regulatory compliance | Cross-device or heterogeneous hospital networks |
Convergence Speed | Fast on IID data; slow on non-IID | Equivalent to base algorithm | Faster convergence on non-IID data than FedAvg |
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, technical answers to the most common questions about the foundational optimization algorithm that powers collaborative genomic model training without centralizing sensitive sequence data.
Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that constructs a global model by taking a weighted average of locally trained model parameters from multiple clients. The process works in iterative communication rounds: a central server initializes a global model and distributes it to a selected subset of clients. Each client trains the model on its local genomic dataset for a fixed number of epochs using stochastic gradient descent, producing an updated local model. The server then collects these local updates and computes a new global model by averaging the parameters, weighted proportionally by the size of each client's local dataset (w_global = Σ (n_k / n_total) * w_k). This weighted scheme ensures that clients with larger, more statistically significant datasets contribute more to the global consensus. The updated global model is then redistributed, and the cycle repeats until convergence. FedAvg dramatically reduces communication overhead compared to naive federated SGD by allowing multiple local training steps between synchronization rounds.
Related Terms
Understanding Federated Averaging requires familiarity with the core privacy, security, and topological concepts that define the federated learning ecosystem.
Federated Learning
The overarching decentralized machine learning paradigm where a shared global model is trained across multiple clients holding local data samples, without exchanging the raw data itself. Federated Averaging is the most common optimization algorithm used to coordinate this process.
- Goal: Train a model without centralizing sensitive data.
- Process: A server sends a model to clients, they train locally, and only model updates are returned.
- Contrast: The opposite of traditional data-center training.
Secure Aggregation
A privacy-preserving cryptographic protocol that allows a central server to compute the sum of model updates from multiple clients without inspecting any individual client's contribution. This is a critical companion to Federated Averaging.
- Mechanism: Uses secret sharing to mask individual updates.
- Benefit: The server only sees the final averaged result, not any single hospital's gradient.
- Threat Model: Protects against an honest-but-curious server.
Differential Privacy
A mathematical framework providing a provable guarantee of privacy by injecting calibrated statistical noise into query results or model updates. In Federated Averaging, noise is often added to the aggregated update before applying it to the global model.
- Key Parameter: Epsilon (ε) quantifies the privacy loss budget.
- Technique: Gaussian noise is added to the averaged gradient.
- Trade-off: Higher noise increases privacy but degrades model accuracy.
Cross-Silo Federated Learning
A federated topology involving a small, reliable number of institutional participants, such as hospitals or genomic research centers. This is the primary setting for Federated Averaging in healthcare.
- Participants: Typically 2–100 organizations.
- Characteristics: Reliable connectivity, substantial local compute, and large, curated datasets.
- Contrast: Unlike cross-device FL, clients are stateful and identified.
Non-IID Data
A data distribution characteristic where local datasets on different clients are not independently and identically distributed. This is a fundamental challenge for Federated Averaging in genomics, where patient demographics and sequencing protocols vary wildly between hospitals.
- Impact: Can cause the global model to diverge or converge slowly.
- Genomic Example: One hospital may sequence rare diseases, another focuses on oncology.
- Mitigation: Proximal terms and personalized FL variants are used to combat this drift.
Communication Efficiency
A critical optimization objective focused on minimizing the size and frequency of data transmitted between clients and the server. Genomic models like DNABERT have millions of parameters, making naive transmission of full weights a bandwidth bottleneck.
- Techniques: Gradient compression, sparsification, and quantization.
- Federated Averaging Role: The algorithm reduces communication by performing multiple local epochs before sending an update.
- Trade-off: More local computation reduces communication rounds but risks local overfitting.

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