/knowledge/federated-learning
Federated Learning
Normally you gather all the data in one place to train a model. But what if the data can't be moved — too sensitive, too regulated, too siloed? Federated learning flips it: send the model to the data, and never collect the data at all.
- Studied
- Federated LearningIn practice · learning without sharing
- When
- Privacy-preserving ML
- Applied in
- Cross-org models, no data sharing
- Read / Refreshed
- ~13 min read2026-06-26
The standard recipe for machine learning is simple: gather all the data in one place, then train a model on it. But a huge amount of valuable data can't be gathered — it's too sensitive, too regulated, or sits in separate organisations or jurisdictions that aren't allowed to pool it. The data is locked in silos, and the obvious approach is a non-starter. Federated learning (FL) is the clever inversion: instead of bringing the data to the model, bring the model to the data — train across all the silos while the raw data never leaves where it lives.
It's increasingly relevant wherever privacy and data-sharing rules bite, and it pairs naturally with the differential-privacy and MLOps pages. This page is the core idea, the federated averaging that makes it work, the genuine privacy benefit (and its limits), and the hard parts that make it more than just "distributed training."
01
When data can't be moved
The motivating problem is concrete: you want a model trained on data spread across many places — hospitals, agencies, phones, jurisdictions — but the data can't be centralised. Privacy law forbids it, the data is commercially or legally sensitive, or it simply can't leave the device or organisation that holds it. You're stuck: the model you could build from all the data would be far better than what any single silo can train alone, yet you can't combine the data to build it. Federated learning is the way out of that bind.
02
Bring the model to the data
The core idea is a loop that keeps the data put. A central server holds the current shared model. Each round: it sends a copy to every participating site; each site trains it briefly on its own local data; each site sends back only the resulting model update (the changed weights) — not the data; the server combines those updates into an improved shared model; and the cycle repeats.
The result is a model that has effectively learned from all the data, even though no raw data was ever shared or moved. The information flows as model updates, not records.
03
Federated averaging
The standard algorithm for combining the updates is federated averaging (FedAvg), and it's pleasingly simple: the server takes the model updates from all sites and computes a weighted average — each site's contribution weighted by how much data it has (a site with more data has more say). That averaged model becomes the new shared model. Despite its simplicity, FedAvg is remarkably effective and is the workhorse of practical federated learning.
04
The privacy angle — and its limit
The headline benefit is privacy: raw data never leaves its home, which sidesteps the biggest risk of centralisation and helps with regulatory compliance. But there's a crucial honest caveat:
05
Why it's harder than distributed training
FL isn't just "training on many machines." Its distinctive difficulties:
- Non-IID data — the big one. Each site's data is different and unrepresentative of the whole (one hospital's patients differ from another's). When the local datasets are very skewed, averaging their updates can pull in conflicting directions, slowing convergence and biasing the model. Standard ML assumes IID data; FL almost never has it.
- Communication cost — sending model updates back and forth every round is expensive, especially across many or bandwidth-limited clients; reducing the rounds matters.
- Stragglers & reliability — clients (especially devices) drop out, are slow, or vary wildly in capability; the system must tolerate that.
06
Devices vs silos
Two settings, with different characters:
- Cross-device — millions of small, unreliable clients (phones). The famous example is mobile keyboard next-word prediction, trained across phones without uploading what anyone typed.
- Cross-silo — a handful of large, reliable participants (hospitals, banks, agencies), each with substantial sensitive data. Fewer participants, higher stakes, and the setting most relevant to organisations that can't legally pool data.
07
Where it shows up in my work
08
Refresh in 60 seconds
The model-to-the-data idea, FedAvg, the update-leakage caveat (DP + secure aggregation), and the non-IID challenge reflect current federated-learning references alongside privacy-ML work.