← AI Terminology

Federated Learning

Federated learning is a distributed machine learning approach where a model is trained across many decentralised devices (phones, hospitals, banks) without raw data ever leaving the device — only model updates (gradients or weights) are shared with a central server.

It enables ML on sensitive data that cannot be centralised due to privacy, legal, or bandwidth constraints.
Why It Matters in AI
Training on centralised datasets requires moving sensitive data (medical records, financial transactions, personal messages) to a central server — raising privacy, compliance, and sovereignty concerns. Federated learning inverts this: the model travels to the data, not the other way around. Google deploys it for keyboard prediction on Android; hospitals use it to train diagnostic models without sharing patient records.
Key Points
Aspect Description
FedAvg Central algorithm: each client trains locally, sends weight updates, server averages them
Non-IID data Each client has different data distribution — major challenge; biases the global model
Communication Multiple local epochs before sending updates — reduces costly client-server communication
Key use cases Mobile keyboard (Google), healthcare (NHS, hospitals), financial fraud (banks), IoT sensors
Secure aggregation Cryptographic protocol — server sees only the aggregate, not individual client updates
Differential privacy Add noise to gradients before sharing — provides formal privacy guarantee
Simple Analogy
Instead of all hospital patients shipping their medical records to a central lab for analysis, each hospital runs the analysis locally and sends only a summary (gradient update) to the central coordinator. The coordinator combines all summaries to improve the shared model — patient data never leaves any hospital.
Common Usage Examples
  • Google Gboard: federated learning trains next-word prediction on Android devices without uploading text
  • flower.flwr (Flower): fl.server.start_server(); fl.client.start_client() — federated learning framework
  • TensorFlow Federated: tff.learning.build_federated_averaging_process(model_fn, ...)
  • NHS federated learning: cancer detection model trained across 20 hospitals without sharing scans
  • PySyft: privacy-preserving ML with homomorphic encryption + federated learning
Summary
In short: Federated learning trains ML models where the data lives — on devices or in institutions — without raw data ever being centralised, enabling privacy-preserving AI on sensitive datasets.