FedMRI — Federated Learning for Breast-Cancer MRI
Privacy-preserving federated learning that classifies breast DCE-MRI into molecular subtypes across 3 simulated hospitals — raw patient data never leaves its source.
Overview
Master's thesis (USTHB Bioinformatics 2024–2026, graded 17/20). FedMRI classifies breast Dynamic Contrast-Enhanced MRI (DCE-MRI) into four molecular subtypes — Luminal A, Luminal B, HER2 and Triple Negative — under severe class imbalance, then studies how that classifier can be trained across multiple hospitals without sharing raw patient data. The model is a 2.5D Multiple-Instance-Learning network: each volume is decomposed into axial slices, a ConvNeXt-Nano backbone encodes every slice, and a Gated-Attention MIL head pools them into one volume-level prediction. A three-stage pipeline — head warm-up → joint fine-tune (LDAM, ASAM, SWA, EMA, MixUp) → classifier retraining (cRT) — is engineered specifically to recover minority-class recall on the long-tailed label distribution. The federated layer simulates a 3-hospital network and benchmarks four aggregation strategies (FedAvg, Momentum-FedAvg, SCAFFOLD and the novel FedSCRT) under non-IID splits; the defining guarantee is that only model weights — never raw imaging — ever cross a hospital boundary. FedSCRT, the thesis's main contribution, shares one centrally-trained feature extractor while each hospital retrains only a small balanced classification head that is then federated-averaged, decoupling expensive representation learning from privacy- and imbalance-sensitive calibration. The work ships with a full-stack web app: Next.js doctor & patient portals, a NestJS API with a hospital-silo guard, and FastAPI inference + FL-coordinator services.
Outcomes
- FedSCRT reached Macro-F1 0.63 vs 0.43 for FedAvg — the only federated strategy to beat the majority-class baseline
- Zero raw imaging ever crosses a hospital boundary — only model weights are shared
- Benchmarked 4 aggregation strategies on 737 DCE-MRI volumes under non-IID splits
Key Features
- 2.5D Multiple-Instance-Learning classifier: ConvNeXt-Nano backbone + Gated-Attention pooling
- Three-stage training (warm-up → joint fine-tune → classifier retraining) with LDAM, ASAM, SWA, EMA & MixUp
- Novel FedSCRT strategy: Macro-F1 0.63 / AUC 0.69 — the only federated method to beat the majority-class baseline (FedAvg 0.43)
- Benchmarked 4 federated strategies under non-IID hospital splits (Dirichlet α)
- Centralized 5-fold ensemble reference: Macro-F1 0.65 / AUC 0.67
- Privacy guarantee: rawDataTransmitted = 0 — only model weights cross hospital boundaries
- Dataset: 737 DCE-MRI volumes across 4 molecular subtypes (Duke cohort, Zenodo)
- FastAPI inference microservice (/predict) with attention-map explainability
- Full-stack app: Next.js doctor & patient portals + NestJS API + Prisma/PostgreSQL
Role
ML Engineer & Full-Stack Developer (Master's thesis author)
Challenge
Train an accurate cancer-subtype classifier across hospitals that legally cannot share patient data, under severe class imbalance.
Solution
Designed FedSCRT — a shared central feature extractor with locally-retrained, balanced classification heads that are federated-averaged — decoupling representation learning from privacy- and imbalance-sensitive calibration. It was the only FL strategy to beat the majority-class baseline (Macro-F1 0.63).