Inferensys

Glossary

Federated Learning

A decentralized machine learning paradigm where a shared model is trained across multiple edge devices or servers holding local data without exchanging the raw data, inherently protecting against model inversion attacks.
Engineer deploying small language model to edge device, IoT sensor visible on desk, technical hardware setup in bright workspace.
DECENTRALIZED MACHINE LEARNING

What is Federated Learning?

A privacy-preserving machine learning paradigm where a shared global model is trained collaboratively across multiple decentralized edge devices or servers holding local data, without the raw data ever leaving its source.

Federated learning is a machine learning technique that trains an algorithm across multiple decentralized edge devices or servers holding local data samples, without exchanging them. The central server distributes an initial model; each client trains it locally on its private data and sends only the encrypted model updates (gradients) back. This process, often orchestrated via the Federated Averaging (FedAvg) algorithm, ensures raw data remains on-device, directly addressing data privacy, security, and regulatory compliance requirements.

A critical security consideration is gradient leakage, where shared model updates can be inverted to reconstruct private training inputs. To counter this, federated learning is frequently combined with privacy-enhancing technologies like secure aggregation—which prevents the server from inspecting individual updates—and differential privacy, which adds calibrated noise to the updates. This architecture is foundational for privacy-sensitive applications in healthcare and finance, enabling collaborative model improvement without centralizing sensitive data.

DECENTRALIZED TRAINING PARADIGM

Core Characteristics of Federated Learning

Federated Learning is a machine learning paradigm where a shared global model is trained across multiple decentralized edge devices or servers holding local data, without exchanging the raw data itself. Only model updates are shared, preserving privacy and reducing communication costs.

01

Data Locality

The foundational principle of Federated Learning is that raw data never leaves the client device. Training data remains on the user's smartphone, hospital server, or IoT sensor. The model travels to the data, not the other way around. This directly addresses data residency regulations and minimizes the attack surface for data breaches. Only model updates—gradients or weight deltas—are transmitted to the central server.

02

Federated Averaging (FedAvg)

The canonical aggregation algorithm. The central server distributes a global model to a subset of clients. Each client trains locally on its own data for a few epochs. The server then collects the resulting model weights and computes a weighted average to create a new, improved global model. This process repeats for multiple communication rounds. Key parameters include:

  • C-fraction: The fraction of clients selected per round.
  • E: The number of local epochs.
  • B: The local batch size.
03

Non-IID Data Challenge

Unlike centralized training where data is shuffled, client data in Federated Learning is almost always non-Independently and Identically Distributed (non-IID). A user's photo library is not a uniform sample of all photos. This statistical heterogeneity can cause local models to diverge, slowing convergence or degrading the final global model's accuracy. Solutions include FedProx (adding a proximal term to the local objective) and SCAFFOLD (using control variates to correct client drift).

04

Communication Efficiency

Uploading full model weights from millions of devices is a bandwidth bottleneck. Federated Learning employs compression techniques to reduce the bits transmitted per round:

  • Gradient Quantization: Reducing the precision of gradients (e.g., from 32-bit floats to 2-bit integers).
  • Gradient Sparsification: Sending only the top-k largest gradient values and masking the rest.
  • Local Steps: Performing multiple local updates before communicating, trading compute for communication.
05

Secure Aggregation

A cryptographic protocol that ensures the central server can only see the sum of client updates, not any individual client's contribution. Clients mask their updates with pairwise secrets and self-masking noise. When summed, the masks cancel out, revealing only the aggregate. This prevents gradient leakage attacks where an honest-but-curious server could reconstruct private training images from individual gradients.

06

Differential Privacy Integration

Federated Learning alone does not provide formal privacy guarantees; model updates can still leak information. DP-FedAvg integrates differential privacy by clipping per-client updates to a fixed L2 norm and adding calibrated Gaussian noise to the aggregate before applying it to the global model. This bounds the influence of any single client and provides a measurable privacy budget (ε, δ) against membership inference and data reconstruction attacks.

FEDERATED LEARNING PRIMER

Frequently Asked Questions

Clear, technical answers to the most common questions about decentralized machine learning, data privacy, and secure aggregation protocols.

Federated learning is a decentralized machine learning paradigm where a shared global model is trained collaboratively across multiple edge devices or servers, each holding local data, without the raw data ever leaving its origin. The process works via a central coordination server that distributes an initial model to participating clients. Each client trains the model locally on its private dataset, computes a model update (gradients or weights), and sends only this update back to the server. The server then aggregates these updates—typically using the Federated Averaging (FedAvg) algorithm—to improve the global model. This iterative cycle repeats over multiple communication rounds until convergence. Crucially, the training data remains on-device, addressing both bandwidth constraints and fundamental data residency requirements. Variants include cross-device FL, where millions of mobile phones train a next-word prediction model, and cross-silo FL, where a handful of hospitals collaboratively train a diagnostic model without sharing patient records.

Prasad Kumkar

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.