FEDERATED LEARNING

Federated Learning: Train Without Sharing Data

The model travels to the data — the data never travels to the model. Train a shared global model across millions of devices without centralising any raw data.

1The Privacy Problem in ML

Classical machine learning requires centralising all training data on a server. For many real-world applications this is illegal (medical records, financial data), commercially unviable (competing hospitals won't share patient data), or technically impractical (hundreds of gigabytes scattered across millions of phones). Federated learning, introduced by Google in 2016, inverts the paradigm: instead of bringing data to the model, send the model to the data.

Each participating device (phone, hospital, bank) trains the model locally on its private data. Only the model updates (gradients or weight deltas) are sent to a central server. The server aggregates these updates — for example by weighted averaging — to produce an improved global model. No raw data ever leaves the device.

✓ What FL enables

  • ✓ Train on sensitive data without centralising it (medical, financial)
  • ✓ Leverage data on billions of edge devices (phones, IoT)
  • ✓ Comply with GDPR and data-residency laws by design
  • ✓ Personalise models to local data without global sharing

✗ What FL doesn't fully solve

  • ✗ Gradients can still leak private information (membership inference)
  • ✗ Non-IID data across devices hurts convergence
  • ✗ Communication cost: sending model updates is expensive at scale
  • ✗ Vulnerable to poisoning attacks from malicious participants

2The FL Round: How One Iteration Works

Federated learning proceeds in rounds. Each round has four steps: distribute the current global model to a subset of clients, local training on each client with its private data, upload updates (weight deltas or gradients) back to the server, and aggregate into a new global model. The process repeats until convergence.

Serverw_globalClient 1Client 2Client 3Client 4① distribute w_global③ send Δw① distribute w_global③ send Δw② local SGD on private data (hidden from server)

3Real Deployments

Google deploys FL for next-word prediction in Gboard on Android devices. Apple uses FL for Siri improvements and health data analytics. Hospitals in the EU use FL consortia to train cancer-detection models across 10+ institutions without sharing patient records. The financial sector uses FL for fraud detection across competing banks without exposing transaction histories.

Google Gboard
Next-word prediction trained on 500M+ Android devices. No text ever leaves the phone. FL improved model quality by 27%.
HealthChain (EU)
Cross-hospital cancer detection with FL across 10 sites. The model sees 4× more patient diversity than any single-hospital dataset.
FATE & PySyft
Open-source FL frameworks. PySyft (OpenMined) adds differential privacy and secure aggregation on top of PyTorch.

4FL Taxonomy: Cross-Device vs Cross-Silo

Federated learning splits into two distinct scenarios with very different engineering constraints. Cross-device FL involves millions of heterogeneous clients (phones, IoT) with unstable connectivity, limited compute, and high churn — most clients drop mid-round. Cross-silo FL involves a small number (~10–100) of trusted institutional clients (hospitals, banks) with high compute and stable connections but strict regulatory boundaries.

Cross-Device FL

  • Millions of clients (phones, tablets)
  • Untrusted clients, high dropout rate
  • Small local datasets, non-IID
  • Communication is the bottleneck
  • Examples: Gboard, Apple Siri

Cross-Silo FL

  • Small number of institutions (10–100)
  • Trusted connections, high bandwidth
  • Larger local datasets
  • Regulatory compliance is the constraint
  • Examples: hospital consortia, bank fraud detection
Partial participation
Each round, only a fraction of clients (C%) is sampled — required for scale. FedAvg uses C=0.1 (10% of clients per round).
Non-IID data
Data not identically distributed across clients. A phone in Tokyo has different text patterns from one in São Paulo. This heterogeneity is FL's hardest convergence challenge.
Secure aggregation
Cryptographic protocol (e.g. Shamir secret sharing) that lets the server compute the sum of updates without seeing any individual client's update.

Recall check

0 of …

Say the answer out loud before revealing — recalling is what makes it stick.

  1. What is the core idea of federated learning?

  2. What are the four steps of an FL round?

  3. What is the difference between cross-device and cross-silo FL?

  4. Does federated learning fully solve privacy?