Quick answer: Federated learning is a way of training a machine learning model across many devices without ever moving their data off the device. Each phone or computer trains the shared model locally on its own data, then sends back only the resulting update, not the data itself, and a server averages those updates from many devices to improve one shared model. Google introduced the technique in 2017 to improve Gboard’s suggestions without collecting anyone’s typing history on a central server.
So what does that buy over just collecting the data centrally the normal way? It keeps sensitive, personal data, what someone types, which photos they take, on their own device the whole time, while still letting a model learn from the patterns across millions of devices. This entry covers how the training loop actually works, how Google uses it in Gboard, how it pairs with differential privacy, and where it runs into limits.
What Is Federated Learning?
Ordinary model training centralizes data first: a server collects examples from many sources, then trains on the pooled set. Federated learning flips that order. The model travels out to where the data already lives, trains a little in each of many places, and only the resulting updates travel back.
Google’s 2017 description of the idea was phones collaboratively learning a shared prediction model while all of the training data stays on the device. The word “federated” points at that structure: a lot of separate, local training runs coordinated through a central server, rather than one training run over one big dataset.
The motivation was as much practical as it was about privacy. Phones generate huge amounts of useful data, what someone types, which suggestions they accept or ignore, but moving all of it to a server is expensive, slow, and, for anything personal, a liability a company would rather not carry in the first place. Training where the data already sits sidesteps that transfer entirely.
How Does Federated Learning Work?
A typical round starts when an eligible device, one that is idle, charging, and on free WiFi so training does not cost the user battery or mobile data, downloads the current version of the shared model. It trains that model for a few steps using only its own local data, then produces a small, focused summary of what changed rather than uploading any of the raw data itself.
The server collects these updates from many devices and averages them using an algorithm Google calls Federated Averaging. Because each device does a real chunk of training locally before sending anything, this approach needs far fewer communication rounds, Google’s original research reported a reduction of 10 to 100 times compared with naively sending raw gradients every step.
A protocol called Secure Aggregation adds a further layer: it is built so the server can only ever see the combined average of updates from a large group, typically hundreds or thousands of devices, never any single device’s individual contribution. Compression techniques such as random rotations and quantization shrink each upload further, which matters when the participants are phones on metered connections.
None of this requires every eligible device to participate in every round. A round simply draws from whichever devices happen to be idle, charged, and connected at that moment, trains and aggregates their updates, and moves on; the next round draws a different set. Over enough rounds, the shared model has effectively learned from a very large and constantly rotating slice of the whole device population.
How Does Google Use Federated Learning in Gboard?
Gboard, Android’s keyboard app, was the first place Google deployed this at scale, using it to improve next-word and query suggestions based on what people actually type. The ranking model gets better from real usage patterns across many phones, without Google ever storing that raw typing history on its own servers.
Because training only runs when a phone is idle and charging on WiFi, a single round can pull in updates from thousands of devices without any one user noticing a performance or battery cost.
How Does Federated Learning Combine With Differential Privacy?
Keeping raw data on the device is a strong property, but the aggregated updates a server receives can still leak information about the people who produced them if an attacker analyzes enough rounds. Differential privacy closes that gap by adding carefully calibrated noise, so no single user’s contribution can be picked back out of the result.
Google built this into production Gboard training in 2022 with an algorithm called DP-FTRL, first as a next-word prediction model for Spanish, with roughly 6,500 devices taking part in each training round. Instead of adding random noise to each individual update, DP-FTRL adds noise that is negatively correlated across rounds through a technique called tree aggregation, so the noise partly cancels out over time while still protecting any one person’s data.
The point of that work was to put a formal, quantified privacy guarantee behind a model shipping to real users, rather than relying on the softer promise that raw data never leaves the phone. Federated learning and differential privacy are complementary: one decides where training happens, the other bounds what the result can reveal.
What Are the Limits of Federated Learning?
Data on different devices is not shuffled and identically distributed the way a centralized training set usually is; one person’s typing habits or photo library looks nothing like another’s. That unevenness across devices is a well-documented challenge for federated systems and can make training slower to converge than training on one pooled, shuffled dataset.
Each round also depends on enough eligible devices being idle, charged, and connected to WiFi at the same time, which means a single round of training can take substantially longer in wall-clock time than an equivalent step on centralized server hardware. Phones also have far less compute than a training cluster, so federated learning tends to suit smaller models more than the largest ones.
There is also a coordination cost that a centralized setup never has to think about. Rounds have to tolerate devices that drop out mid-training because a person picked their phone up or walked out of WiFi range, and the server has to keep track of which round each update belongs to so a late or stale update does not get averaged into the wrong version of the model.
Federated learning by itself is an architecture choice, not a privacy guarantee. Keeping raw data on the device helps, but without an added layer like differential privacy, the aggregated updates a server sees can still carry more information about individual users than the raw-data-stays-local framing suggests.
It is also not a substitute for on-device AI inference tools like ML Kit. Federated learning is about how a model gets trained across many devices; a kit like that runs an already-trained model locally, which is a different piece of the edge AI picture.