Most language models are trained the same way: gather every document into one warehouse, run the numbers through it, ship the weights out. Federated learning inverts the direction of travel. The data stays where it is, and the model goes to it.
The term was coined by Google researchers in a 2016 paper that proposed training on data held on mobile phones instead of uploading it to a data center. The problem the paper set out to solve was concrete: phones accumulate typing history, photo habits and app usage that would make excellent training data, but "this rich data is often privacy sensitive, large in quantity, or both, which may preclude logging to the data center." The proposed fix was to leave the training data distributed on the devices and "learn a shared model by aggregating locally-computed updates."
That sentence is the whole idea. Everything else is engineering.

The loop
The canonical algorithm, Federated Averaging (FedAvg), runs in rounds. A server holds a global model and broadcasts a copy to a randomly selected subset of participating devices. Each device trains that copy on its own local data for a few steps, then sends the updated weights back. The server averages the returned updates into a new global model and the cycle repeats.
The 2016 paper's practical contribution was communication cost. Naive distributed training exchanges gradients after every batch, which is hopeless over phone networks. FedAvg lets each device take many local steps between exchanges, which the authors measured as a 10x to 100x reduction in required communication rounds versus synchronized stochastic gradient descent. Communication, not computation, was the binding constraint, and it still is in most deployments.
The one big launch you probably touched
The technique's flagship deployment was Google's Gboard keyboard. In a paper describing the production system, Google trained a recurrent language model for next-word prediction on-device using FedAvg, with training text never leaving the phone. The comparison was unflattering to the centralized alternative: because on-device caches contained the kind of personalized, recent text that logged data did not, the federated model "achieve[d] better prediction recall" than an identical model trained server-side on opted-in user logs.
That result is the honest case for federated learning. It is not only a privacy compromise. For data that is personal, recent, or never shared by design, the decentralized copy can simply be better data.
Why it is harder than averaging
Two properties of the real world break the textbook loop.
The first is statistical heterogeneity. Your typing is not a random sample of anyone else's, so each device's local training pushes the model in a different direction. Updates computed on such different data drift apart, a failure mode known as client drift, and a straight average of drifted weights can converge poorly or not at all.
The second is systems heterogeneity. Phones differ in battery, connectivity and silicon, so participants do only as much work as they can. The canonical fix is FedProx, which adds a term keeping each local update close to the current global model. In the paper's experiments on highly heterogeneous datasets, FedProx improved absolute test accuracy over FedAvg by 22% on average.
There is a third constraint with no algorithmic fix: engineering. Running training rounds across millions of consumer devices means handling dropouts, battery limits, model versioning and stragglers. That is why production systems like Gboard's were built as bespoke infrastructure rather than off-the-shelf training code.
The privacy part is the overstated part
Here is where the marketing usually outruns the research. Federated learning keeps raw data on the device, but the updates it sends are not automatically private. In 2019, researchers at MIT and NVIDIA published "Deep Leakage from Gradients," showing that a shared gradient can be inverted to recover the training example that produced it. Their attack was not a subtle side channel: the recovery was "pixel-wise accurate for images and token-wise matching for texts," and it worked even against a randomly initialized model.
The defenses are known but not free. Differential privacy, formalized for deep learning by Abadi and colleagues at Google, trains models with noise injected during optimization so no individual record's influence is provable; their implementation held the cost to what they called "a manageable cost in software complexity, training efficiency, and model quality." But the accurate summary is that federated learning changes what leaves the device and who has to attack it. It does not make the data invisible.
Why the idea is back in style
For LLMs, the interesting frontier is not keyboards, it is enterprise and institutional data. A useful chunk of the highest-quality text in the world sits inside hospitals, law firms, banks and government agencies that cannot ship it to a training warehouse under any plausible contract or regulation.
The academic case study is OpenFedLLM, a 2024 framework for federated fine-tuning of LLMs on decentralized private data. Its headline experiment: on a financial benchmark, Llama2-7B fine-tuned with federated algorithms outperformed GPT-4 by a significant margin, while the same model trained by any single participant individually could not. That is the Gboard result again at LLM scale, this time on domain data a centralized trainer never gets to see.
Whether that becomes a production pattern or stays a research direction is an open question. Cross-silo federated learning, where the participants are a handful of institutions with real data centers rather than millions of phones, is the variant most likely to matter first, because the systems-heterogeneity tax mostly disappears.
The short version
Federated learning trains a shared model by shipping weights to data instead of data to weights. It was invented in 2016 for privacy-sensitive mobile data, proven in production by Gboard, made robust by methods like FedProx for heterogeneous devices, and sobered by research showing raw gradients can leak the very data the scheme exists to protect. For LLMs it remains a niche with one durable argument: the best training data of the next decade may be data that legally cannot move.
Sources
- McMahan et al., "Communication-Efficient Learning of Deep Networks from Decentralized Data" (2016): https://arxiv.org/abs/1602.05629
- Hard et al., "Federated Learning for Mobile Keyboard Prediction" (2018): https://arxiv.org/abs/1811.03604
- Li et al., "Federated Optimization in Heterogeneous Networks" (FedProx, 2018): https://arxiv.org/abs/1812.06127
- Zhu et al., "Deep Leakage from Gradients" (2019): https://arxiv.org/abs/1906.08935
- Abadi et al., "Deep Learning with Differential Privacy" (2016): https://arxiv.org/abs/1607.00133
- Ye et al., "OpenFedLLM: Training Large Language Models on Decentralized Private Data via Federated Learning" (2024): https://arxiv.org/abs/2402.06954
- Google Cloud, "Federated learning: what it is and how it works": https://cloud.google.com/discover/what-is-federated-learning
