Bit by Bit
← All courses
Trustworthy and Secure AI · Intermediate

Federated Learning

Train one shared model across many devices without collecting their data. Run a live round with three clients, change how their work is combined, and see what one dishonest client can do.

5 lessons26 minutesFree
Start this course →

Lessons

  1. 1Learn on each deviceFollow one training round from start to finish.6 min
  2. 2Sample weightingUnderstand federated averaging, the standard way to combine updates.5 min
  3. 3Equal weightingCompare federated averaging with treating every client alike.4 min
  4. 4Harmful updatesSee how one dishonest client can damage the shared model.6 min
  5. 5The median defenceUse robust aggregation to blunt an attack, and learn its limits.5 min

What you will learn

Terms explained in this course

federated learning
A way to train a shared model in which several clients each train on their own data and send only their changes to a coordinator. The raw data never leaves the clients.
client
A device or organisation that holds its own data and does its own training, such as a phone, a hospital or a sensor.
coordinator
The server that sends out the shared model and combines the changes the clients send back. Also called the server or aggregator.
local training
Training that a client carries out on its own data, on its own machine.
update
The change a client sends to the coordinator after local training.
round
One full cycle of federated learning: send the model out, train locally, send updates back, combine them.
aggregation
Combining the updates from all clients into one change to the shared model.
global model
The shared model that the coordinator maintains and every client receives.
sample
One record in a client's data. The sample count is how many records the client trained on.
score
In this lab, a number from 0 to 100 describing how unusual a network record looks.
threshold
A cut-off value. In this lab the model flags every record whose score is at or above the threshold.
mean
The ordinary average: add the values and divide by how many there are.
weighted mean
An average in which some values count more than others. Each value is multiplied by its share of influence before adding.
federated averaging
The standard aggregation method, in which each client's update is weighted by its sample count. Often shortened to FedAvg.
median
The middle value after sorting. Half the values are below it and half are above.
honest client
A client that sends the update it really learned.
malicious update
An update made deliberately harmful in order to damage the shared model. Sending such updates is called a poisoning attack.
false positive
A normal item that the model wrongly flags.
false negative
An item that should have been flagged and was missed.
precision
Of everything the model flagged, the share that deserved it.
recall
Of everything that deserved a flag, the share the model caught.
robust aggregation
Aggregation designed so that a small number of bad updates cannot drag the result far. The median is one example.