Prostate cancer has a 99% survival rate when detected early, making accurate MRI-based screening extremely valuable. However, developing deep learning models that can reliably detect prostate cancer from MRI scans has proven remarkably difficult. Despite promising research results, most models perform no better than the standard PI-RADS scoring system used by radiologists when tested on realistic screening populations.
A critical but underappreciated obstacle is that AI models trained at one hospital routinely fail at other hospitals. Differences in MRI scanner hardware, imaging protocols, patient demographics, and how biopsies are performed and recorded mean that a model trained at one institution may be useless when deployed elsewhere. This is called poor cross-site generalization, and it is one of the primary reasons promising research AI tools never reach clinical deployment.
The conventional solution -- pooling data from multiple hospitals into a single large training dataset -- is largely impossible in medicine. Patient health records are legally protected protected health information (PHI), and most hospitals cannot share patient scans or biopsy results with outside institutions. This creates a fundamental tension: improving AI models requires more diverse data, but sharing that data is typically prohibited.
Federated learning (FL) offers a way to resolve this dilemma. In federated learning, AI models are trained at each hospital using local data, but only the learned model weights (not the raw patient data) are shared with a central server for aggregation. This allows models to learn from data at multiple institutions without any patient information ever leaving the hospital.
Existing federated learning platforms were built primarily for production-ready, fixed models, not for researchers still developing and experimenting with new architectures. They typically require that all participating institutions use identical model designs and data formats -- a constraint that is incompatible with the exploratory nature of medical imaging research, where the best model architecture for a given problem is still being discovered.
The authors introduce FLtools, an open-source federated learning toolkit designed specifically for research-stage algorithms. Its core design principle is that each institution retains complete autonomy over its model code, data pipeline, and training procedures. The only shared interface is a simple programming contract: each site provides a get_objects function that returns the model, training data loader, and validation data loader. Everything else stays private.
FLtools includes several modular components. FLComponents handle training, weight aggregation, and serialization. FLTrainer manages model training at each client site. FLAggregator validates and combines gradient updates from each institution. Crucially, these components are built on top of established backends -- NVFlare (from NVIDIA) and Flower -- but insulate researchers from needing to understand or modify those backend systems.
The toolkit also includes FLsim, a local simulation tool that allows a researcher to test the full federated training loop on their own computer before deploying across institutions. This makes debugging much easier, since researchers can inspect intermediate model states using standard Python debugging tools -- something not possible in conventional federated frameworks where the training loop is controlled by the framework rather than the researcher.
The specific deep learning model used to demonstrate FLtools is UCNet, a custom 3D UNet architecture designed to handle the highly variable histopathology data available at different research sites. A key challenge in prostate cancer MRI research is that different hospitals collect different types of biopsy data: some have pixel-level lesion segmentations, some have region-level sextant biopsies, and some have only whole-gland diagnoses. Most models require uniformity; UCNet was specifically designed to accept all of these simultaneously.
UCNet takes three MRI sequences as input: T2-weighted imaging (T2WI), diffusion-weighted imaging (DWI), and apparent diffusion coefficient (ADC) maps. These sequences are registered and normalized before being fed into the network. The model produces three types of output simultaneously: a 3D lesion segmentation map, a voxel-level cancer grade map, and per-region cancer severity classifications using ISUP grade groups (the standardized 1-5 scoring system derived from Gleason grading).
The training process uses a multi-task loss function that dynamically selects which learning objectives apply to each patient based on what type of biopsy data is available. If a case has lesion-level targeted biopsy data, it uses pixel-level supervision. If it has only systematic biopsy data, it uses a weaker histogram-based supervision signal. This dynamic objective is what allows the model to be trained simultaneously on data with radically different annotation styles across two institutions.
The experiment used over 1,400 MRI exams from UCSF and UCLA. Despite both being major research hospitals, the datasets differed substantially: UCSF used GE scanners with endorectal coils while UCLA used Siemens scanners with external coils; UCSF provided sextant systematic biopsies while UCLA provided only exam-level grade group labels. This heterogeneity made the federated training scenario particularly challenging and clinically realistic.
The results demonstrated a stark illustration of the cross-site generalization problem. When the UCSF model was applied to UCLA data, accuracy dropped by 23 percentage points. When the UCLA model was applied to UCSF data, accuracy dropped by 30 percentage points. Most dramatically, locally trained models failed completely on cross-site lesion segmentation, achieving an intersection-over-union (IoU) score of 0.000 -- meaning they identified essentially no lesions at all when used on data from the other hospital.
Federated training dramatically reversed these failures. Cross-site lesion segmentation IoU improved by 100% with federated models compared to local models applied to the opposing site's data. For cancer classification accuracy, federated training improved cross-site performance by 9.5% for the UCSF-selected checkpoint and by 14.8% for the UCLA-selected checkpoint, while causing only minor reductions in within-site performance.
Because each institution chose its own best checkpoint based on its own private validation data, two versions of the federated model were produced: UCSF-FL and UCLA-FL. Importantly, both showed strong generalization. In some cases, federated models actually improved on the local model's performance even on within-site test data, because learning from a second institution's data helped the model learn more general patterns of clinically significant prostate cancer.
The federated training used FedSGD (federated stochastic gradient descent), in which each client computes gradients locally and shares only those gradients with the central server hosted on an Amazon Web Services instance. The central server aggregates gradients using the AdamW optimizer and sends updated weights back to each site. No patient data, images, or biopsy records are ever transmitted.
The results directly address the most common failure mode of clinical AI deployment: a model that performs well in its development institution but fails elsewhere. For prostate cancer detection, where models must function across diverse MRI hardware, scanning protocols, and patient populations, federated learning provides a principled solution that does not require any hospital to compromise the privacy of its patients' data.
The study highlights an important practical point about health equity: both UCSF and UCLA datasets were significantly skewed toward White male patients, a well-documented disparity in research populations. The authors explicitly note that federated learning could help address this by making it easier for more geographically and demographically diverse institutions to participate in model training without the barriers of traditional data sharing agreements.
For physicians, the clinical value of federated prostate cancer detection models is improved confidence in AI tools: a model that has been validated across multiple independent institutions is far more trustworthy than one trained and tested only at its home institution. This multi-site generalization is increasingly required for regulatory approval and clinical adoption of AI diagnostic tools.
Beyond prostate cancer, the authors identify other cancer types that could benefit immediately from this approach, including brain tumors, kidney cancer, and pancreatic cancer -- all cases where individual institutions rarely have enough data to train reliable models, and where federated learning across multiple sites could overcome the data scarcity problem without privacy compromise.
One practical limitation acknowledged by the authors is that each institution selects its best model checkpoint independently, based on its own private validation set. Since neither institution can observe how the model is performing at the other site, they may select checkpoints that are optimal locally but not globally. The authors suggest that allowing a shared validation metric -- even without sharing the underlying data -- could lead to better overall federated model selection.
The study used only two institutions, which limits the statistical power and generalizability of the findings. While the results are encouraging, the absolute accuracy of prostate cancer classification on both sites remains far from clinical deployment standards. The authors are explicit that incorporating data from additional diverse institutions is necessary to improve absolute performance, not just cross-site generalization.
The FedSGD aggregation strategy requires all clients to complete training before the server can update the global model. While this approach has low memory requirements and scales theoretically to hundreds of institutions, it has high communication overhead because it must wait for every participant at every training step. FedAvg (federated averaging), where clients train for multiple local steps before synchronizing, may be more practical at scale and is identified as a priority for future development.
The dataset imbalances with respect to cancer grade distribution and the demographic underrepresentation of non-White patients in both training cohorts are important limitations. Results may not generalize equally well to populations not represented in either UCSF or UCLA data, and the models will need validation on more diverse patient cohorts before clinical deployment can be considered.
This study makes a contribution at two levels simultaneously. At the applied level, it demonstrates that federated learning can rescue cross-site prostate cancer detection models that completely fail when applied outside their training institution. At the infrastructure level, it provides an open-source toolkit that any research group can use to apply federated learning to their own medical imaging AI projects.
FLtools, available at federated.ucsf.edu, is designed to require minimal modification to existing research code. Any deep learning model implemented in PyTorch can be integrated with FLtools by implementing the get_objects interface, without modifying any model architecture or training logic. This low barrier to adoption is central to the authors' vision of expanding participation in federated medical AI research.
The authors emphasize that federated learning is not just a technical solution but a cultural one -- it creates a framework for inter-institutional collaboration where institutions can contribute to shared AI model development without surrendering control over their data, their code, or their patients' privacy. The separation of MLOps engineering from model development research is highlighted as a practical feature that makes collaboration more sustainable.
Looking ahead, the path to clinical impact requires more participating institutions, more racially and geographically diverse patient populations, and continued improvement of the underlying UCNet model. The federated infrastructure developed here is ready to support that expansion, and the open-source release ensures that other research groups can build directly on these foundations rather than rebuilding them from scratch.