TL;DR
Federated learning (FL) trains one model across many clients, such as phones or hospitals, while each client's raw data stays where it is. This 2019 survey, written by Peter Kairouz, H. Brendan McMahan and a large group of co-authors, does not propose one new method. It describes the setting, the practical limits real systems face, and a long list of open problems in efficiency, privacy, attacks, fairness and systems.
Builds on: Federated Learning, Differential Privacy, Secure Aggregation, Homomorphic Encryption · Leads to: robust aggregation against bad clients
Why it mattered
By 2019, federated learning was running in consumer products, not only in papers. The paper reports that Google uses it in the Gboard mobile keyboard, in features on Pixel phones and in Android Messages. It also reports that Apple uses cross-device FL in iOS 13 for the QuickType keyboard and for the vocal classifier behind "Hey Siri".
Cross-silo use, where a few organizations train together, is also growing. The paper lists finance risk prediction for reinsurance, pharmaceutical discovery, electronic health record mining, medical image segmentation and smart manufacturing as examples.
The survey mattered because the term was new. The authors note that the term was introduced in 2016 by McMahan et al., and that related work predates it in cryptography, databases and machine learning. This paper gave researchers one shared list of those challenges, with the constraints, threat models and open questions spelled out.
The problem
Ordinary machine learning assumes the training data can be collected in one place and shuffled. FL cannot assume this, for four reasons the paper stresses.
- The data is non-IID. IID means identically and independently distributed: every example looks like a random draw from the same source. On a phone, the data reflects one user's habits, so each client's data differs from the others'.
- The clients are unreliable. The paper expects 5% or more of the clients in a round to fail or drop out, for example when a phone stops being idle or unplugged.
- Clients are not always available. Only a fraction of devices are available at any time, often with daily cycles.
- Communication is slow. Phones often use Wi-Fi or slower links, so sending updates can be the main cost.
Table 1 of the paper compares three settings. A single datacenter has 1 to 1000 clients on a fast network. Cross-silo FL has 2 to 100 clients, such as organizations. Cross-device FL can reach up to 10^10 clients. Privacy is also harder. The paper argues that data privacy is not binary, so it describes a range of threat models rather than one yes-or-no guarantee.
How it works
The paper's training template (its Section 1.1.2) covers Federated Averaging and many variants. Here is one round, traced on a tiny instance. The model has one number, w, which starts at 0. Four phones are eligible. The server wants two of them per round.
- Client selection. The server samples two phones, A and B, from the eligible ones. Eligible phones have checked in only when plugged in, on unmetered Wi-Fi and idle. Check: two of the four phones are chosen.
- Broadcast. The server sends the current model, w = 0, and a training program to A and B. Check: both now hold w = 0.
- Client computation. Each phone runs a few steps of stochastic gradient descent on its own data. Phone A ends at 2 and phone B ends at 4. Check: neither phone sent its data, only its result.
- Aggregation. The server collects the two results. Both phones hold the same number of examples, so each counts equally. The average is (2 + 4) / 2 = 3. Check: the server now has one number to work with.
- Model update. The server sets w = 3 and the round ends. The next round may pick C and D, whose data looks different. Check: if C and D differ from A and B, the average drifts. That drift is the non-IID problem.
The paper also describes where the trained model goes next. A selected model goes through a standard launch process with manual quality assurance, live A/B testing and a staged rollout, the same process a model trained in a datacenter would use.
flowchart LR Sel[Select eligible clients] --> Bro[Broadcast model and program] Bro --> Loc[Clients train on local data] Loc --> Agg[Server aggregates updates] Agg --> Upd[Server updates the model] Upd --> Sel
The math
The paper's broad definition of FL is the starting point. In words: several clients collaborate on one machine learning problem under a central server; each client's raw data stays local; and the clients send only focused updates that are aggregated immediately.
Multiple clients collaborate to solve one machine learning problem under the coordination of a central server or service provider. Each client's raw data is stored locally and never transferred. Instead, focused updates, narrowly scoped to what the task needs, are aggregated as early as possible.
Step 4 in symbols: the weighted average
Let S_t be the set of clients selected in round t. Let n_k be the number of examples on client k, and let w_k be the model that client k returns. Let m_t be the total number of examples held by the selected clients:
The server sets the new model to the data-weighted average of the returned models:
The paper says this weighting comes from the original FedAvg proposal. For IID data, where each client's data looks the same, the weights reduce to a simple average. The paper also notes that it is unclear whether this weighting gives the fastest convergence on non-IID data.
Secure aggregation in symbols
Secure aggregation is a protocol for n clients and a server. Each client submits a value x_k, often a vector of model numbers. The server learns only the sum
and nothing about any single x_k. The paper lists several ways to build this, including additive masking, threshold homomorphic encryption and general secure multi-party computation. Multi-party computation is a way for several parties to compute a function of their inputs while each learns only the output.
Round sizes from the paper
The paper's Table 2 gives typical sizes for cross-device training. The population is 10^6 to 10^10 devices. Each round selects 50 to 5000 devices. A full training run involves 10^5 to 10^7 devices in total, takes 500 to 10000 rounds and lasts 1 to 10 days of wall-clock time. These are order-of-magnitude figures, not exact values for any one system.
Results
The paper is a survey, so it reports no experiment of its own. Its findings are the open problems it identifies in each area. The numbers below are the paper's, and each is a constraint or an estimate, not a benchmark result.
- Scale and reliability. The paper's figures on client counts, the 5% dropout rate and the 1 to 10 day training times (Tables 1 and 2) define the problem. Communication is often the primary bottleneck in cross-device FL, as Table 1 states.
- Privacy. The paper's executive summary for Section 4 says that distributed differential privacy combines the "what" (the function computed) and the "how" (who sees intermediate values) best, under an honest-but-curious server, a trusted third party or a trusted execution environment. It says that MPC has been deployed at scale for some federation-crucial functions, but that many others remain far more expensive than their insecure versions. It says a trusted execution environment platform that is reliably immune to exploits remains an open challenge. The paper treats protection against an adversarial server as a harder setting than an honest-but-curious one, and lists open problems for it.
- Attacks and robustness. The paper says FL may introduce new attack surfaces at training time, and lists model update poisoning alongside data poisoning. It notes a tension between privacy and robustness, since defenses that inspect individual updates can conflict with privacy protections.
- Fairness and systems. Section 6 covers bias in training data and fairness without access to sensitive attributes. Section 7 covers system-induced bias, where device availability itself skews which users the model learns from.
The limits are stated by the authors. The list of open problems is "certainly not comprehensive" and reflects their interests. The paper's own conclusion stresses that data privacy is not binary, so its threat models are a range, not one guarantee.
Reading guide
- Section 1, Introduction and the cross-device setting. Needs Federated Learning and Stochastic Gradient Descent. Table 1 is the comparison to keep open.
- Section 2, Other settings. Peer-to-peer learning, cross-silo FL and split learning. Needs Federated Learning only.
- Section 3, Efficiency and effectiveness. The optimization section. Read Communication-Efficient Learning of Deep Networks from Decentralized Data first, then Stochastic Gradient Descent. Section 3.3 on personalization builds on the idea of reusing a model, as in Transfer Learning.
- Section 4, Privacy and threat models. Needs Differential Privacy, Secure Aggregation and Homomorphic Encryption. This is the densest section for definitions.
- Section 5, Attacks and failures. Read it with Byzantine Fault Tolerance in mind, since robust aggregation against bad clients is the same problem family.
- Sections 6 and 7, Fairness and systems. Mostly qualitative; read them for the open questions, not for formulas.
Check yourself
QuestionAccording to the paper's definition, what stays on each client during federated training?Show answer
Each client's raw data. The client sends only focused updates, narrowly scoped to the task, and those updates are aggregated as early as possible.
QuestionTwo clients return models. Client 1 has n = 2 examples and returns w = 5. Client 2 has n = 6 examples and returns w = 1. What is the aggregated model?Show answer
Here m = 2 + 6 = 8. The weighted average is (2/8)(5) + (6/8)(1) = 1.25 + 0.75 = 2.0. The model becomes 2.0. The client with more data pulls the average toward its value.
QuestionWhy does the paper say communication is often the primary bottleneck in cross-device FL, but computation is more often the bottleneck in a datacenter?Show answer
In a datacenter, clients sit on a very fast network, so computation dominates. Cross-device clients are phones and IoT devices that usually use Wi-Fi or slower connections, so sending updates takes longer than the local training step.
QuestionA group of five hospitals wants to train one model without moving patient records. Which setting in Table 1 fits, and why?Show answer
Cross-silo FL. The clients are a small number of organizations, here five hospitals, each with its own fixed data, and they are generally reliable, unlike phones.
Sources
- Kairouz, P., McMahan, H. B., et al. (2019). Advances and Open Problems in Federated Learning. arXiv:1912.04977. https://arxiv.org/abs/1912.04977
- DOI: https://doi.org/10.48550/arXiv.1912.04977