FedSim Studio – Federated Learning Simulator

FedSim Studio – Federated Learning Simulator

An interactive lab for learning federated learning: build a federation of clients, train it, attack it, and protect it with privacy and security defenses. Everything runs in your browser, on simulated clients.

Experiment setup

A preset fills in the starting settings for a lab. The dataset choice is kept.

Centralized = all data pooled on one machine: the accuracy FL is trying to reach, with no privacy.

Small α (e.g. 0.1) = each client sees only a few digits.

Lab 2: set Non-IID α = 0.1 and Local epochs = 5. Run FedAvg, then FedProx μ = 0.1, then FedProx μ = 1, then Centralized. Compare accuracy and client drift.

Privacy

The sweep runs the current settings at σ = 0.3, 0.5, 0.8, 1.2, 2 and 4, then plots accuracy against ε.

Clients mask their updates so the server only learns their sum. Robust defenses (Attack Lab) cannot work with it: they need to see each update.

Gradient inversion: needs the logistic regression or MLP model.

Lab 4: Logistic regression, 1000 clients, clients per round 0.1, 30 rounds, animation Off. DP needs many clients: the noise is shared out across everyone in a round.

Attack Lab

No attackers: every client is honest.

Defense

Auto = twice the median update size of the round, so typical honest updates pass and only unusually large ones are clipped.

Lab 3: run each attack with no defense, then with each defense. Keep the same seed.

Share and save

A share link opens this page with exactly your current settings: handy for handing out a lab.

Status

Ready. Choose settings and press Run.

How a round works

Press Run to start

Each round has six steps. Turn on “Step by step” to pause after each one.

Key: training  done  not selected. Click a client to inspect it.

What the server sees

What one client computed
What the server receives
What everyone sees: the released model change
Run an experiment with the logistic regression or MLP model. Each picture shows one slice of an update as a 28 × 28 image: red = weights pushed up, blue = pushed down. The first two use the same colour scale, so you can compare how much noise was added.

The server's reconstruction attack

Tick “Server tries to rebuild client images” in the Privacy panel and run. The server will try to rebuild one client's private training images from the update it receives.

Client's private images
(the server never gets these: shown only so you can compare)
What the server rebuilt
from the update it received

Privacy budget spent (ε)

No differential privacy in the current run.

Lower ε = stronger privacy. ε grows every round, because every release of the model leaks a little.

Privacy–utility trade-off

Each dot is one DP run that finished all its rounds: final accuracy against ε spent (log scale). The dashed line is the same setup with no privacy. Use “Sweep noise levels” to fill it in.

Global model accuracy per round

Attack success rate per round

Label flipping: share of test images of the source digit classified as the target digit. Backdoor: share of test images carrying the trigger classified as the target digit. Lower is better for the defender.

Map of client updates (this round)

Each mark is one client's update, squeezed from about 100,000 numbers into 2D (PCA). Close marks = similar updates. ● honest · ▲ attacker · ringed = rejected or clipped by the defense.

Client drift per round

Average distance honest clients' models move away from the global model during local training, ‖w_k − wᵗ‖. Higher = clients pulling in different directions.

Defense decisions

Choose Krum, Multi-Krum or Norm clipping to see which clients the server rejects or clips.
RoundAttackers selectedRejected / clippedAttackers caughtHonest clients wrongly flagged

Which digits (0–9) each client holds

Heterogeneity score: — (0 = IID, 1 = completely separate)

Client inspector

Run an experiment, then click a client in the round view.

Runs

RunSettingsFinal accuracyAttack successAttackers caughtImages rebuiltSeconds per roundBackend

Log