We trained a heart disease predictor across four hospitals with federated learning (FedAvg and FedProx). Each hospital kept its patients’ records and sent only model weights, and the shared model matched one trained on all the data pooled together.
Goal: learn from all four hospitals without moving a single record, match the accuracy of pooled training, and stay stable on non-IID data.
Every round, the server sends the current model out, each hospital trains it on its own patients, and only the updated weights come back to be averaged.
After local training, each hospital’s weights sit some distance from the global model: that is client drift. FedProx adds a penalty that keeps them on a shorter leash.
UCI Heart Disease dataset (Janosi, Steinbrunn, Pfisterer and Detrano, 1988). 13 clinical features per patient; label = heart disease present or not. Each hospital is one federated client.
Means over 10 random 80/20 splits per hospital. Every target set at the project review was met.
| Method | Accuracy (%) | Precision (%) | Recall (%) | F1-score (%) | ROC-AUC (%) |
|---|
Local-only scores highest overall only because Switzerland’s own model predicts “disease” for almost everyone (93.5% of its patients have it): its recall there is 99% but its ROC-AUC just 0.72. Per hospital, federation helps VA Long Beach and Switzerland, and Cleveland, the largest and most complete dataset, does slightly better alone.
This is the actual global model from our experiment (logistic regression, main split). It runs in your browser; nothing you enter leaves this page.
A student project for DSA0410, not a medical device. It was trained on 735 patients whose records were collected in the 1980s and gives a statistical estimate, not a diagnosis. Anyone worried about their heart should see a doctor.