Course contentsShow
← Machine Learning and Deep Learning
Lesson 3351 of 3,53873. Privacy in Machine LearningFree lesson

What is Federated Learning?

Understanding distributed training where data remains on client devices instead of being centralized.

What is Federated Learning?

You'll learn: How federated learning enables training machine learning models across multiple decentralized devices while keeping data local and private.

The Core Idea

Imagine training a smartphone keyboard prediction model. Traditional machine learning would collect all users' typing data into a central server, train a model there, and distribute it back. But this exposes sensitive information—your texts, passwords, search queries.

Federated learning flips this paradigm: instead of bringing data to the model, you bring the model to the data.

Here's how it works:

  1. A central server initializes a model and sends it to many client devices (phones, hospitals, organizations)
  2. Each client trains the model locally on their private data
  3. Clients send only model updates (gradients or weights) back to the server—never raw data
  4. The server aggregates these updates into an improved global model
  5. The cycle repeats until convergence

Why This Matters for Privacy

Federated learning addresses privacy risks you've already studied—membership inference, data extraction, and model inversion attacks. By keeping raw data on-device:

  • Sensitive medical records stay at hospitals
  • Personal photos never leave your phone
  • Financial transactions remain at banks

Combined with differential privacy (which you've already learned), federated learning can add noise to the gradient updates themselves, providing formal privacy guarantees even if an adversary intercepts the model updates.

The Real-World Picture

Google's Gboard keyboard uses federated learning to improve autocorrect without seeing what you type. Healthcare consortiums can train diagnostic models without sharing patient data across institutions.

Key Takeaway: Federated learning is distributed training where data remains decentralized on client devices, with only model updates transmitted to a central server—enabling collaborative learning while preserving data privacy.