Imagine several hospitals wanting to jointly train a single diagnostic model, yet never exchanging a single patient record. That is exactly the promise of federated learning: instead of bringing the data to the model, you bring the model to the data. The model travels; the data stays home.
How it works
The principle relies on a repeated cycle, orchestrated by a central server and dozens, thousands or millions of clients (phones, hospitals, banks):
- The server sends the current global model to each client.
- Each client trains it locally on its own data.
- Clients send back only the weight updates (gradients), never the raw data.
- The server aggregates these updates into a new global version.
The canonical algorithm, FedAvg, computes an average weighted by each client's number of examples $n_k$:
$$ w_{t+1} = \sum_{k=1}^{K} \frac{n_k}{n} \, w_t^k $$
Centralized or federated?
| Criterion | Centralized learning | Federated learning |
|---|---|---|
| Data location | Single server | Stays on the client |
| Privacy | Low | High |
| Network cost | Massive data transfer | Model transfer only |
| Difficulty | Simple | Non-IID data, heterogeneous clients |
Where you meet it
- Your phone's predictive keyboard, without uploading your messages.
- Healthcare, where patient data cannot leave the institution.
- Banking and insurance, under heavy regulatory constraints.
Federated learning moves the training, not the data — a pillar for reconciling collective intelligence with privacy.