One model. Three hospitals.

Learn together.
Keep records local.

Federated learning brings the model to the data. Follow one training round to see what moves, what stays, and how local models become a shared one.

Inside a federated training round

ROUND 01 / 02

Shared model

0.400Starting weight / round 1
Model weights travel to hospitals
Patient records stay at each hospital.Illustrative weights, not accuracy scores.

Ready / step 1 of 8

The arithmetic / Round 1

More records, more weight.

In this FedAvg example, each hospital's contribution is proportional to its record count: 20%, 60%, and 20%.

One parameter shown for clarity. Local weights are illustrative; the weighted average is calculated. This is not a trained clinical model.

An important distinction

Local data is not a privacy guarantee.

Model updates can still leak information. Secure aggregation can hide individual updates from the coordinator; differential privacy can bound information leakage. These protections require additional design and are not implemented in this demo.

Read: Deep Leakage from Gradients
Beyond the animation

What is federated learning?

Federated learning is a way to train a model across separate datasets while leaving the training records with their owners. In this example, hospitals are the clients, and a central coordinator organizes their collaboration.

Centralized learning pools records for training in one place. Local-only learning trains a separate model at each hospital. Federated learning instead exchanges learned model information so sites can work toward a shared model.

Model weight
A learned numerical parameter used to make predictions. A weight is not an accuracy score.
Model update
A change to the starting weights after local training. This demo returns the resulting weights themselves.
Training round
One cycle of distribution, local training, return, and aggregation. An epoch is one pass through a site's local training set.
What happens inside a hospital during training?

The local model makes predictions on batches of training examples. A loss function measures prediction error against the training labels; an optimizer adjusts the weights to reduce that loss. Each hospital performs several local training steps before sending its result back.

Basic FedAvg uses compatible models with corresponding parameters. The coordinator averages each parameter using the participating sites' training-example counts. More local work can reduce communication frequency, but differing datasets can pull local models in different directions.

Algorithm reference: McMahan et al., Federated Averaging

Why repeat rounds, and how should I read these numbers?

Choose Combine in round 1: the displayed weights produce 0.880. Press Next to see that same value distributed at the start of round 2. The hospitals then train again from this shared starting point, rather than continuing independently from their previous local weights.

In this illustration, round 2 combines to 0.948. A larger weight does not mean a better model. Real training is assessed on held-out data; the two rounds and local values here are chosen to explain the mechanics, not demonstrate an accuracy improvement.

Where could this help in healthcare?

Illustrative use case: hospitals collaborate on an imaging model while keeping scans locally. This arrangement is often called cross-silo federated learning: a relatively small group of organizations, rather than a large population of personal devices.

The opportunity is learning from cases beyond one institution. The challenge is that hospitals differ in patient populations, scanners, labels, and clinical practice. These differences are often described as non-IID data: sites are not interchangeable samples from one common distribution. Collaboration does not automatically remove bias or improve every site's results.

Healthcare context: Rieke et al., The future of digital health with federated learning

What does a real collaboration need beyond averaging?

Partners need agreed outcome definitions and preprocessing, reliable local computing, and a plan for slow or unavailable participants. They also need rules for access, model ownership, and privacy protections.

Evaluation remains essential: check held-out performance at each hospital and across relevant patient groups. A good overall average can conceal poor results at a smaller site. Training across institutions is one part of developing a useful model, not evidence by itself that the model is ready for clinical use.

Further reading: technical and organizational considerations for healthcare FL

Check your understanding

01 / 03