AI 101 — What is federated learning?

Share
AI 101 — What is federated learning?

Federated learning is a way to train one shared AI model across thousands of devices or organisations without ever collecting their data in one place — each participant trains a copy on data it already holds, and only a summary of what that training learned travels back.

The name comes from the word "federation": a group of independent members cooperating under one agreed protocol while each keeps its own affairs. The data stays where it lives. The learning moves.

Why it matters right now

Two things put this back in the news this month. A NATO-backed Swedish company, Scaleout Systems, described a training loop where drones and forward posts keep their raw sensor footage local and send only selective model updates up the chain to be recombined — which is how a drone can learn from a battlefield without shipping classified imagery anywhere, as we covered in the NATO-backed startup that put the targeting decision inside the drone. And Apple published a recipe this month for training speech models on users' own devices, where almost none of the audio is labelled.

The reason it keeps coming up is simple. Most of the data you would want to train on cannot legally or practically be moved: hospital records, bank transactions, photos on your phone. Federated learning is the standard answer to "how do we get a model out of data we are not allowed to collect?"

The mental model: one round trip

Think of it as a repeating round with four steps.

The server sends the current model down to a participant. The participant trains that copy for a while using the data on its own device — this is fine-tuning on a very small, very private dataset. The participant then packages up the change it made to the model — not the data, just the difference in the numbers — and sends that single small update back. The server averages the updates arriving from thousands of participants into one improved model record, and the round starts again.

The averaging step is the clever part, and it is why the field exists at all. The obvious approach — every device sends its raw mathematical feedback and the server simply adds it all up — costs far too much bandwidth over phone connections that are intermittent and slow. The 2016 paper that started the field, by Brendan McMahan and colleagues at Google, showed a way to have each device do more thinking locally and send back fewer, higher-quality updates: 10 to 100 times less communication than the naive version, which is the difference between a research idea and something you can run on a hundred million phones.

The punchline worth remembering: nothing about the raw data ever crosses the network. What crosses is what the model learned from it.

A kitchen scene of baking with ingredients and an open recipe book.

The analogy: ten thousand cooks, one recipe

Imagine a publisher that wants to perfect a cake recipe and has ten thousand volunteer test kitchens. It cannot visit all of them, and has promised never to enter any of their kitchens.

So it sends out the same recipe card to everyone. Each cook bakes that cake in their own kitchen, with their own oven, their own flour, their own altitude, and writes down a single line of feedback: "a bit more salt," "bake it four minutes longer." Nobody photographs their kitchen or lists their pantry. The ten thousand one-line notes come back and get averaged into an updated recipe, which goes out again, and the cake gets a little better each round.

Two things fall straight out of this. First, the kitchens could not be more different, and that is fine — the update is robust to wildly uneven conditions, because a bakery in a dry climate saying "more water" mostly cancels against a humid one saying "less". Second, if you only sent the recipe to one cook, you would just overfit to that kitchen. Federated learning needs crowds, not individuals.

What people get wrong

"The data never leaves the device, so it must be private." This is the big one. Sharing a model update is not the same as sharing nothing. A 2019 MIT paper, "Deep Leakage from Gradients," showed that a shared update can be reverse-engineered back into recognisable training images — pixel-accurate ones — and recognisable text. The update is a compressed fingerprint of the data, and fingerprints can be matched. That is why production federated learning pairs the training with two extra machines: secure aggregation, which uses cryptography so the server can only unlock the average of hundreds or thousands of participants and never a single person's update, and differential privacy, which adds a measured amount of noise before anything is sent, with the noise averaging out across a large crowd. You can also see what your own device reports on an iPhone: the records show up under Settings, Privacy and Security, Analytics, entries beginning with "DifferentialPrivacy."

"Federated learning lets you train bigger models." Usually the opposite. It fits models small enough to train on a phone or a field laptop, and it is slower and fussier than ordinary training: participants drop out mid-round, connections are slow, and the whole system exists because the data is large or sensitive enough that moving it is off the table.

"It is a new research idea." It is nearly a decade old in production. Google's keyboard on Android used it from 2017 to improve word suggestions, and it has been the industry's standard example ever since.

"It replaces cloud training." It does not. Most models are still trained the ordinary way, by gathering data in a data centre, and Google itself says as much about spam filters and image models. Federated learning is what you use when you cannot gather — not because it is better in general, but because it is the only legal option.

Where to learn more

The original 2016 paper on federated averaging is readable and short, and it is where nearly every term in the field was defined. Google's announcement post is the plainest description of the actual round trip, including the scheduling detail that your phone only trains when it is idle, plugged in, and on wi-fi. Apple's "Learning with Privacy at Scale" explains the differential privacy half at an engineering level. And "Advances and Open Problems in Federated Learning," a 2019 survey by dozens of authors, is the honest map of everything still unsolved — unreliable participants, uneven data, and how to measure whether the privacy guarantee is real.

Related reading: Local LLMs vs cloud APIs: what's the difference? covers what runs on your device versus someone's server · What is fine-tuning? is the training step each participant performs locally · and the NATO-backed startup that put the targeting decision inside the drone shows the same loop running in a conflict zone.

If your phone could make an AI smarter by training on your data alone, would you opt in — and what would you want to know first? Tell us in the comments.

Sources: McMahan et al. — Communication-Efficient Learning of Deep Networks from Decentralized Data (arXiv) · Google Research — Federated Learning: Collaborative Machine Learning without Centralized Training Data · Zhu, Liu & Han — Deep Leakage from Gradients (arXiv) · Apple Machine Learning Research — Learning with Privacy at Scale · Kairouz et al. — Advances and Open Problems in Federated Learning (arXiv) · Apple Machine Learning Research — A Practical Recipe for Semi-Supervised Federated ASR (arXiv)