Federated Averaging (FedAvg) is a distributed optimization algorithm that trains a shared global model by averaging locally computed stochastic gradient descent (SGD) updates from multiple clients, without ever centralizing their raw data. A central server initializes a model, distributes it to participating clients, and each client trains on its local dataset for several epochs before sending only the model weight updates back to the server.
Glossary
Federated Averaging (FedAvg)

What is Federated Averaging (FedAvg)?
The foundational optimization algorithm for federated learning that enables collaborative model training across decentralized data sources without exposing raw information.
The server then computes a weighted average of these updates—typically weighted by the number of local training samples—to produce a new global model. This iterative process repeats over multiple communication rounds, balancing the trade-off between local computation and communication efficiency. FedAvg is the algorithmic backbone of privacy-preserving fraud detection systems, enabling banks to collaboratively train anomaly detectors on sensitive transaction records without moving data across institutional boundaries.
Core Characteristics of FedAvg
The Federated Averaging algorithm is defined by a specific set of architectural choices that balance communication efficiency, privacy preservation, and model convergence in decentralized environments.
Local Stochastic Gradient Descent (SGD)
The core computational work is pushed to the clients (e.g., mobile devices, hospital servers). Each client initializes with the global model and performs multiple steps of stochastic gradient descent on its local, private dataset. This contrasts with traditional distributed training, which relies on a central dataset. The number of local epochs is a critical hyperparameter; more local computation reduces communication rounds but can lead to client drift if local datasets are highly non-IID.
Weighted Model Averaging
The server's primary role is aggregation, not training. It collects the updated model weights from a subset of participating clients and computes a new global model by performing a weighted average. The standard weighting scheme is proportional to the size of each client's local dataset (n_k / n), ensuring that clients with more data have a proportionally greater influence on the global model. This simple averaging step is what gives the algorithm its name.
Communication Round Structure
FedAvg operates in discrete communication rounds. In each round:
- The server selects a fraction (C) of available clients.
- The server sends the current global model weights to these selected clients.
- Clients train locally and send back only their model updates (gradients or delta weights).
- The server aggregates these updates to form a new global model. This structure decouples training computation from data centralization, with raw data never leaving the client device.
Non-IID Data Robustness
A defining challenge for FedAvg is statistical heterogeneity, where local datasets are not independent and identically distributed (non-IID). A client's local data may represent a skewed distribution of labels or features. While FedAvg is empirically robust to moderate non-IIDness, severe skew can cause client drift, where local models diverge from each other and the global optimum, slowing convergence. This has spurred research into proximal terms (FedProx) and variance reduction techniques.
Privacy by Architecture
FedAvg provides a foundational layer of data minimization by ensuring raw data never leaves the client. However, the transmitted model updates are not inherently private; gradient leakage attacks can reconstruct training data from them. Therefore, FedAvg is typically combined with explicit privacy mechanisms like secure aggregation (to hide individual updates from the server) and differential privacy (to add calibrated noise to updates, bounding information leakage).
Client Selection and Fraction (C)
The hyperparameter C controls the fraction of clients selected per round. With C=1.0, all clients participate, which is ideal but often impractical due to device availability. Lower values introduce stochasticity that can act as implicit regularization. Client selection strategies range from random uniform sampling to more sophisticated methods that prioritize clients with fresher data, better connectivity, or higher loss, directly impacting convergence speed and final model accuracy.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the Federated Averaging algorithm, its mechanics, and its role in privacy-preserving machine learning.
Federated Averaging (FedAvg) is the foundational optimization algorithm for federated learning that combines local stochastic gradient descent (SGD) on multiple clients with a central server that performs a weighted average of the resulting model updates. The process works in communication rounds: the server initializes a global model and sends it to a selected subset of clients. Each client trains the model on its local, private data for several epochs, producing an updated model. The server then collects these local updates and computes a new global model by taking a weighted average, where weights are typically proportional to the size of each client's local dataset. This global model is then redistributed, and the cycle repeats until convergence. The key insight is that averaging model parameters is mathematically equivalent to aggregating gradients, but requires significantly fewer communication rounds than traditional distributed SGD, making it practical for cross-device settings with millions of clients and high-latency, intermittent connections.
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) does not operate in isolation. These related concepts form the cryptographic, architectural, and algorithmic foundation required to deploy privacy-preserving fraud analytics at scale.
Federated Learning
The overarching decentralized training paradigm that FedAvg implements. Instead of centralizing raw transaction logs, a global fraud model is distributed to participating banks. Each institution trains locally on its sensitive data, and only encrypted model updates—never the data itself—are transmitted back. This architecture is fundamental for consortium-based anti-money laundering initiatives where data sharing is legally prohibited.
Secure Aggregation
A cryptographic protocol that ensures the central server in a FedAvg round can only compute the weighted sum of model updates without ever inspecting an individual bank's gradient vector. This prevents gradient leakage attacks where an adversary could reconstruct transaction details from raw updates. Secure aggregation is the privacy bedrock that transforms FedAvg from a distributed averaging trick into a provably private protocol.
Differential Privacy
A mathematical guarantee that complements FedAvg by adding calibrated noise to model updates before aggregation. This ensures that the final fraud detection model does not inadvertently memorize a single high-value transaction. Key parameters include:
- Epsilon (ε): The privacy budget controlling the noise scale
- Delta (δ): The probability of catastrophic privacy failure
- Clipping: Bounding individual update norms to limit sensitivity
Byzantine-Robust Aggregation
Standard FedAvg uses a weighted arithmetic mean, which is vulnerable to a single malicious participant sending a corrupted update to poison the global fraud model. Byzantine-robust aggregators replace the mean with statistically resilient alternatives:
- Krum: Selects the update closest to a majority cluster
- Trimmed Mean: Discards extreme coordinate values before averaging
- Median: Uses coordinate-wise median instead of mean This is critical when onboarding untrusted parties into a fraud consortium.
Gradient Leakage
The primary threat vector that FedAvg's companion protocols must mitigate. In a naive implementation, raw gradients shared by a client can be inverted via optimization to reconstruct private training inputs. For financial fraud detection, this could expose account balances, merchant identities, or transaction timestamps. Defenses include gradient compression, secure aggregation, and differential privacy noise injection applied before transmission.
Homomorphic Encryption
A cryptographic scheme that allows the aggregation server to perform the weighted averaging operation directly on ciphertexts. The server computes Enc(w1*Δ1 + w2*Δ2) without ever decrypting the individual model updates Δi. When combined with FedAvg, this provides a defense-in-depth approach where even a compromised server cannot access plaintext gradients, ensuring end-to-end confidentiality for participating financial institutions.

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