Federated learning
Federated learning trains a shared AI model across many devices or organisations that each keep their own data, sending only model updates, not the raw data, to a coordinating server.
Normally a model is trained by collecting all the data in one place. Federated learning turns that round. The model travels to the data instead. A central server sends the current model to a group of devices, such as phones, or to separate organisations, such as hospitals. Each one trains the model a little on its own data and sends back only the resulting changes. The server combines those changes into an improved shared model and repeats the cycle.
The term was introduced in a February 2016 paper by H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson and Blaise Agüera y Arcas, Communication-Efficient Learning of Deep Networks from Decentralized Data. Its method, now known as federated averaging or FedAvg, averages the models trained on each device. Because sending updates over phone networks is the main cost, the authors reported that their approach needed 10 to 100 times fewer communication rounds than conventional synchronised training.
In April 2017 Google described testing the approach in Gboard, its Android keyboard. When the keyboard suggested a search, the phone kept a local record of the context and whether the suggestion was used, and federated learning used that on-device history to improve the next version of the suggestion model. Google also described a cryptographic protocol, secure aggregation, that lets the server decrypt only the combined average once hundreds or thousands of devices have taken part, not any single phone's update.
Federated learning is a privacy-enhancing technique, not a privacy guarantee. Model updates are derived from the data, and a 2019 paper by Ligeng Zhu, Zhijian Liu and Song Han, Deep Leakage from Gradients, showed that training images and text could be reconstructed from shared gradients in some settings. That is why serious deployments add protections such as secure aggregation. There are practical problems too: each participant's data looks different, devices drop out, and bandwidth is limited.
In practice federated learning is used where data cannot or should not be pooled: text prediction on phones, and medical research across hospitals that cannot share patient records. When a company says a feature uses federated learning, the useful questions are what leaves the device, how updates are protected, and whether anyone has checked.
A server sends the current model to many devices or organisations. Each trains it on its own local data and sends back only the changes. The server averages those changes into a better shared model and sends it out again, repeating the cycle many times. It is more private than collecting raw data centrally, because the data stays where it is. It is not automatically private, though: research has shown that shared updates can sometimes be used to reconstruct training examples, so deployments add protections such as secure aggregation. Google has tested it in its Gboard keyboard to improve suggestions using data that stays on phones. It is also used in healthcare research, where hospitals train a shared model without moving patient records between institutions. Distributed training spreads one training job across many machines that the developer controls, usually with the data gathered in one place. Federated learning trains across devices or organisations that each keep their own data, which may differ widely between participants and may be unavailable at times.Common questions
How does federated learning work?
Is federated learning private?
Where is federated learning used?
What is the difference between federated learning and distributed training?
Search for "federated learning", "federated averaging" or "secure aggregation" to learn more. The original paper on arXiv and Google's research blog explain the method; privacy researchers' papers on gradient leakage and differential privacy explain its limits. Treat product claims that federated learning makes a feature fully private with caution unless the provider explains what protections are in place.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.