MLOps & Deployment - Intermediate - 15 min

Learn REST API with FastAPI

A free visual AI and machine learning lesson with an interactive 3D visualization, plain-English theory, and quiz.

Last updated: 2026-05-13.

Federated learning trains a model across many devices or organizations without moving raw data to one central place. Each participant trains locally, sends model updates, and a central server aggregates those updates into a shared model.

Why it matters

Federated learning is useful when data is sensitive, distributed, regulated, or expensive to centralize. It appears in keyboard prediction, mobile personalization, healthcare collaborations, banking, and industrial IoT.

How it works

  • A server initializes a global model.
  • Selected clients download the current model.
  • Each client trains locally on private data.
  • Clients send model updates, gradients, or weight differences to the server.
  • The server aggregates updates, often using Federated Averaging.
  • The process repeats for many communication rounds.

Key terms

  • Client: a device, hospital, bank, or organization that owns local data.
  • Aggregator: server that combines updates into a global model.
  • FedAvg: common method that averages client updates, often weighted by data size.
  • Non-IID data: client data distributions differ, making training harder.
  • Secure aggregation: cryptographic method that hides individual client updates from the server.
  • Differential privacy: technique that adds noise to reduce the chance of revealing individual data.
  • Communication round: one cycle of sending model, local training, and aggregating updates.

Privacy reality check

Federated learning reduces raw data movement, but it is not automatic privacy. Model updates can still leak information if the system lacks secure aggregation, differential privacy, access controls, and careful monitoring.

Visual explanation suggestion

Show several devices or hospitals around a central model. Animate the model moving outward, local training pulses, encrypted updates returning, and the global model improving after aggregation.

Common mistakes

  • Claiming data is fully private just because it never leaves the device.
  • Ignoring non-IID data, where each client has a different local distribution.
  • Underestimating communication cost and unreliable client availability.
  • Aggregating updates without checking for malicious or low-quality participants.
  • Skipping evaluation across client groups, not just global average performance.

Interview-style questions

  • Explain federated learning in a privacy-sensitive healthcare scenario.
  • What is Federated Averaging?
  • Why is non-IID data difficult in federated learning?
  • Does federated learning guarantee privacy by itself? Why or why not?

Related lessons

  • Gradient Descent
  • Experiment Tracking and MLOps
  • AI Ethics & Bias
  • Model Monitoring & Drift
  • Edge Deployment & Optimization

Related project/template CTA

Use the MLOps Starter Kit concepts to think through versioning, monitoring, and rollback for federated or privacy-preserving training workflows.

Practice questions

  1. What is the core idea of federated learning?
  2. What does FedAvg do?
  3. What does non-IID mean?
  4. Why is federated learning not automatic privacy?

Related AI learning resources

Premium lesson notes and simulations | AI project templates | More MLOps & Deployment lessons