Federated Learning Lab

Train models on distributed data without moving it: try FedAvg, FedProx and SCAFFOLD in a simulator that really computes in your browser, with privacy, medical applications, projects and quizzes.

14interactive experiments

Federated Learning Lab

Architecture and Workflow

An interactive diagram of the server, clients, system components and the steps of a round.

  • 15Items

This lab is educational: the simulations are small (simple models and synthetic data or 8×8 digit images) and run in your browser with real computation. Their results do not generalise automatically to production systems, and federated learning alone does not guarantee privacy.

System components

Server

The central coordinator that holds the global model, selects clients each round and aggregates updates.

Details

Client

A party (hospital, device, institution) that owns a local dataset and trains the model on it.

Details

Local dataset

The client's private data D_k, whose size and distribution differ across clients.

Details

Local model

The client's copy of the model after receiving w_t and during local training.

Details

Workflow steps

1. Initialization

The global model w_0 is initialized (randomly or pretrained) and the server fixes hyperparameters.

Details

4. Local training

Each client trains E epochs on D_k with mini-batch gradients per the algorithm (a regularizer may be added as in FedProx).

Details

5. Upload

Each client sends w_{t+1}^k (or the delta) and its sample count n_k.

Details

6. Aggregation

The server aggregates the updates with the aggregation rule (usually a weighted mean).

Details

8. Evaluate and repeat

The server evaluates the model (or collects client metrics) and starts a new round until a stopping criterion is met.

Details