Federated Learning: Training Without Centralizing Anyone’s Data

A hospital, a bank, and a phone all have data that legally or practically cannot be pooled in one place. Federated learning trains a shared model anyway.

The basic loop

Federated learning trains a shared global model across many clients — phones, hospitals, banks — without any client's raw data ever leaving its device. Each round, the server sends the current global model to participating clients; each client trains it further on its own local data; clients send back only their updated weights, never their data; the server averages those weights — the FedAvg algorithm — into a new global model, and the cycle repeats.

Why non-IID data is the hard part

Real federated clients rarely have similar data. A hospital's patient population, a phone's usage patterns, a bank's customer base all genuinely differ from one client to the next — data that is non-IID (not independent and identically distributed) across clients. Higher heterogeneity means each client's local update pulls the shared model in a different direction, and averaging those divergent updates can partially cancel out the progress each client individually made, slowing convergence of the global model.

Why not just centralize the data?

For much of the data federated learning targets, centralizing raw data is legally restricted, practically infeasible, or actively unwanted by the people it belongs to. Federated learning trades some of the statistical convenience of centralized training — i.i.d. data, unlimited access to raw examples — for the ability to train at all in settings where centralizing data isn't an option, at the cost of slower, noisier convergence and open problems around communication efficiency and fairness across clients with very different amounts of data.

Where it's actually used

Predictive keyboard suggestions on phones, some hospital consortium models that legally cannot pool patient records, and other settings where the data literally cannot or should not leave its source device are the clearest production use cases. Real deployments often add extra protections like differential privacy or secure aggregation on top of the basic FedAvg protocol, since weight updates alone can still leak some information about the underlying data.

🧪 Try it yourself: the Federated Learning Lab simulation lets you experiment with everything described above directly in your browser.