Skip to main content
NPJ Precision Oncology logoLink to NPJ Precision Oncology
. 2026 Jun 11;10:360. doi: 10.1038/s41698-026-01554-3

Computational pathology model to predict recurrence-free survival in NMPUC patients on BCG-therapy

Yu-Chieh Lin 1,2, Julius Drachneris 1, Allan Rasmusson 1, Mantas Fabijonavicius 3, Wei-Ming Li 4,5,6, Hsiang-Ying Lee 4,6,7, Chao-Chun Chuang 8, Feliksas Jankevicius 9, Wen-Jeng Wu 4,6,7, Peir-In Liang 10,✉, Arvydas Laurinavicius 1,✉
PMCID: PMC13612830  PMID: 42277145

Abstract

Urothelial carcinoma, predominantly appearing as non-muscle-invasive papillary urothelial carcinoma (NMIPUC), exhibits wide clinical variability. Accurate pathological staging and grading are essential for effective risk stratification and treatment decisions. Advancements in artificial intelligence (AI) open new opportunities to improve predictive models; however, their generalizability across diverse datasets remains to be addressed. This study developed a federated learning (FL)-based AI framework to enhance model robustness across institutions and predictive accuracy for non-muscle-invasive bladder cancer staging, grading, and a novel histological risk factor derived by clustering histological features for relapse prediction. Retrospective data, including 1437 NMIPUC cases from two institutions in Lithuania and Taiwan, were used for development and analysis. The FL models demonstrated improved robustness across participating institutions and higher accuracy compared to single-site models, achieving 86.2% accuracy for tumor stage and 79.2% for tumor grade, with minor performance variability across the datasets. Moreover, the novel histological risk factor outperformed conventional indicators of relapse-free survival (RFS) in NMIPUC patients treated with BCG immunotherapy, achieving hazard ratios of 2.7 (p = 0.0018) and 2.8 (p = 0.0208) in the Lithuania and Taiwan datasets, respectively. These findings highlight the potential of FL and histological feature-based AI models in providing robust, generalizable solutions for NMIPUC risk stratification and offer insights for personalized clinical interventions.

Subject terms: Urological cancer, Prognostic markers, Computational biology and bioinformatics

Introduction

Urothelial carcinoma (UC) is a malignant neoplasm originating from the specific type of epithelium lining the urinary tract, including the renal pelvis, ureters, urinary bladder, and urethra. UC is the most common type of bladder cancer (BC), representing ~90% of cases1,2. Based on the invasion of the muscular layer (detrusor muscle) BC can be separated into two groups—muscle-invasive BC (MIBC) and non-muscle invasive BC (NMIBC). BC is usually treated with transurethral resection of the bladder (TURB). The most common type of UC is non-muscle-invasive papillary urothelial carcinoma (NMIPUC), which exhibits a wide spectrum of clinical behaviors—from indolent tumors with a low risk of relapse after TURB to aggressive variants leading to early relapse and progression to MIBC3. To mitigate the risk of metastasis and reduce cancer-related mortality, NMIBC patients are stratified into risk groups based on the clinical and pathological findings. Patients at higher risk of relapse can be treated with intravesical Bacille Calmette–Guérin (BCG) immunotherapy to lower the likelihood of recurrence. However, despite immunotherapy, >30% of the patients experience relapse of the disease or even disease progression4. The lack of an effective risk stratification method underscores the need for a more precise system to predict patient outcomes, aiding personalized treatment plans. Currently, the pathologic risk stratification of NMIBC largely relies on two key histological parameters: tumor stage and tumor grade5–9. NMIBC is staged as pTa and pT1, differentiated by the presence or absence of lamina propria invasion. In a combined analysis of 2596 NMIBC patients from seven studies of European Organization for Research and Treatment of Cancer trials, Sylvester et al. found that patients with pT1 had a 1.37-fold increased risk of recurrence and a 2.8-fold increased risk of progression compared to those with pTa tumors5. There are two main grading systems: the WHO 1973 three-tier scale (Grade 1–3) and the WHO 2004/2016 two-tier system (low-grade, high-grade, or papillary urothelial neoplasm of low malignant potential, PUNLMP). A large multicenter study by the European Association of Urology (EAU) indicated that the WHO 1973 system offered slightly better prognostic value for disease progression. However, because the WHO 2004/2016 system proved more reproducible despite being less predictive in certain contexts, a four-tiered hybrid system has been adopted8. Nevertheless, both staging and grading of UC can be challenging. Interobserver variability among pathologists in distinguishing the pTa and pT1 stages has been reported as high as 35%10,11. This variability is even more pronounced for tumor grading, adding further complexity to diagnosis and treatment decisions. Immunohistochemical biomarkers have been extensively studied to improve the risk stratification12–14; however, their additional cost and limited applicability in the complex assessment of tumor stage and grade have restricted their use in clinical practice.

In recent years, advancements in computational pathology and artificial intelligence (AI) opened new opportunities to improve diagnostic accuracy and risk prediction15. Pioneering studies have demonstrated the potential of machine learning to refine the staging and grading of UC through the analysis of both histological and cytological imagery16–19. However, the clinical adoption of these algorithms remains limited by inter-institutional variability in histologic image properties, a lack of algorithm generalizability, and technical limitations for broad clinical implementation. Most UC-related AI studies have focused on assisting pathologists by analyzing histological features already defined in conventional pathology. While valuable, this approach primarily automates established diagnostic criteria and fails to address critical unmet needs, such as stratifying recurrence risk in BCG-treated patients using features beyond the scope of traditional histology. To address these limitations, Lucas et al. investigated the prediction of 1-year and 5-year NMIBC recurrence using features extracted from a pre-trained VGG16 neural network, achieving accuracies of 0.61 and 0.67, respectively20. Drachneris et al. further advanced the field by implementing an attention-guided deep multiple-instance learning (MIL) framework to predict relapse-free survival (RFS) in NMIBC patients, achieving improved relapse predictions within tumor grade (WHO 1973 system) and stage subsets for patients undergoing BCG therapy21. Yair Lotan et al. demonstrated the use of an AI-powered pathology assay to predict response to BCG therapy in patients with high-risk NMIBC. Leveraging a large, multi-institutional cohort from 12 international centers, their model showed strong performance in stratifying relapse risk, providing clinically meaningful guidance across diverse patient populations22. These studies highlight the potential of utilizing AI to predict NMIBC patient outcomes directly from hematoxylin and eosin (H&E)-stained slides, paving the way for novel computational biomarkers.

In this study, we present an AI model developed across two different institutional datasets for staging, grading, and relapse prediction in NMIBC. By utilizing a federated learning (FL) architecture, we establish a cross-regional AI training framework that aggregates data from diverse populations (Lithuania and Taiwan), equipment, and imaging systems (Fig. 1). This approach increases data diversity, enabling the development of a model with enhanced accuracy and cross-institutional robustness. Recognizing the critical prognostic relationship between tumor stage, grade, and BCG immunotherapy outcomes, our model introduces a novel risk factor derived from unsupervised clustering of comprehensive histological features learned from these two indicators—a level of complexity that exceeds human cognitive capabilities. This framework is designed to improve diagnostic consistency, minimize subjectivity, and provide clinicians with more precise tools for evaluation, ultimately leading to better patient outcomes.

Fig. 1. Overview of the deep learning model framework.

Fig. 1

The framework consists of three main components. a Feature extraction: a foundation model based on DINOv2 ViT-L extracts local features from tissue regions. A transformer encoder aggregates local features into a feature vector from WSI. b Classification and clustering: two classification models, focusing separately on tumor stage and tumor grade, are trained using the federated learning (FL) method. These models utilize attention mechanisms to assess specimen status. The global features from both models are concatenated and clustered to classify specimens into low-risk and high-risk groups. c Prediction and interpretation: the model outputs predictions for stage, grade, and fusion risk factor. These predictions are presented as diagnostic statements accompanied by interpretable heatmaps highlighting grade-specific attention.

Results

Model consistency enhancement through FL technology

The averaged 10-fold cross-validation accuracy for the stage and grade models is summarized in Table 1, with a comparison bar chart and the accuracy range for each fold illustrated in Fig. 2. Local models performed notably better on their respective institutional datasets. The VUHSK models performed well and balanced in both datasets, with an overall 84% accuracy in the stage model and 76% in the grade model. However, the performance of the KMUH models was relatively imbalanced, with a notably better accuracy while applying on KMUH’s dataset (Stage: 88%; Grade: 84%), in contrast to the VUHSK data (Stage: 77%; Grade: 66%). This may be attributed to the difference in the dataset sizes, where VUHSK used a larger number of WSI to train the model. This supports the notion that a larger dataset can generate a more robust model that can be used in different institutions23,24.

Table 1.

Performance comparison of the FL model

VUHSK model KMUH model FL model
Accuracy of tumor stage classification models
 VUHSK dataset 83.7% 77.0% 84.5%
 KMUH dataset 85.0% 87.8% 91.6%
 Overall 84.0% 79.5% 86.2%
Accuracy of tumor grade classification models
 VUHSK dataset 77.6% 65.5% 77.7%
 KMUH dataset 70.5% 83.5% 84.1%
 Overall 76.0% 69.8% 79.2%

Fig. 2. Accuracy evaluation of local models and the FL model.

Fig. 2

Accuracy of the models is compared by the Wilcoxon signed-rank test, where the p values are annotated by (1) ns: 0.05 < p ≤ 1, (2) *: 0.01 < p ≤ 0.05, and (3) **: 0.001 < p ≤ 0.01.

In contrast, the FL model achieved the highest overall accuracy across both the stage and grade models, with significantly reduced variation of performance between the sites. For tumor stage classification, the FL model improved overall accuracy by 2.2%—6.7% compared to single-site models, also achieving the smallest cross-site performance disparity, highlighting improved consistency of performance across sites. For tumor grade classification, the FL model achieved ~80% accuracy (79.2%), outperforming both local models. These differences in overall accuracy were found significant by Wilcoxon tests (detailed in Suppl. 1). The AUROC curve analysis in each fold followed a similar trend, further confirming the superior performance of the FL model (detailed in Suppl. 2). Furthermore, the FL model exhibited superior robustness across datasets of the two sites. Local models had demonstrated worse performance when being evaluated cross-site, whereas the FL model achieved improved accuracy by 6.6%—13.6% (differences were significant by Wilcoxon tests, detailed in Suppl. 1). This improvement may be attributed to the effective integration of site-specific features during the FL process, enhancing its overall predictive power.

These results demonstrate the potential of the FL model for cross-institutional applications, enabling improved cross-site performance consistency while maintaining high predictive accuracy without the need for direct data sharing, which often involves complex regulatory and procedural requirements. However, implementing an FL framework between institutions requires additional efforts. First, model adaptation is necessary to ensure compliance with the FL framework. Additionally, IT support is needed to configure whitelist IP settings for secure inter-institutional connections. Despite these challenges, FL provides a viable alternative to traditional centralized training, though its performance is still not entirely equivalent to models trained on a unified multi-institutional dataset.

Attention-based visualization and model interpretability

The model’s attention branch generates attention heatmaps during inference, which visualize the model’s decision-making basis. Figures 3 and 4 present visual examples for stage and grade models, respectively. In Fig. 3, the FL model’s heatmap integrates features from both local models. For instance, in a critical region (highlighted by a cyan box) of the VUHSK dataset, the KMUH model overlooks this area and does not attend to the specific infiltrating region, leading to misclassification. In contrast, the FL model demonstrates heightened attention to this area, even surpassing the VUHSK local model. This indicates that the FL model effectively learns VUHSK-specific features while retaining KMUH features.

Fig. 3. Visualization of tumor stage inference.

Fig. 3

The first column displays the original whole-slide images, while the second, third, and fourth columns show attention heatmaps generated by different AI models, highlighting regions contributing to the models’ tumor stage predictions. In the VUHSK data, the blue and cyan boxed regions, as well as the red and orange boxed regions in the KMUH data, were identified by pathologists as key infiltrating areas indicative of tumor stage pT1.

Fig. 4. Visualization of tumor grade inference.

Fig. 4

The first column shows the original whole-slide images, while the second, third, and fourth columns present attention heatmaps generated by different AI models, highlighting regions used in tumor grade predictions. In the VUHSK data, the blue and cyan boxed regions, and in the KMUH data, the red and orange boxed regions, were identified by pathologists as key areas with high-grade cellular features indicative of high tumor grade.

Similarly, Fig. 4 shows that the KMUH model produces dispersed attention in VUHSK’s dataset, failing to focus on critical regions identified by pathologists (highlighted by cyan boxes), and vice versa. This aligns with the poor cross-dataset performance of the local models. However, the FL model consolidates features from both datasets, concentrating attention on the correct regions. This demonstrates that FL can enhance model robustness by incorporating diverse institutional features, leading to improved diagnostic accuracy and interpretability.

Relapse analysis

To predict the RFS, a Cox regression analysis was performed to evaluate hazard ratios, as summarized in Tables 2 and 3, while Kaplan-Meier survival curves were used to compare the patient groups stratified by the fusion model, stage model, and grade model (Fig. 5).

Table 2.

Hazard ratio in univariate Cox regression

Site Feature Hazard Ratio p-Value 95% CI C-index
VUHSK Tumor Stage 1.9368 0.0253 [1.0851, 3.4570] 0.58
Tumor Grade (WHO 2004) 2.5895 0.1895 [0.6251, 10.7301] 0.52
EAU NMIBC Risk 1.4024 0.2231 [0.8135, 2.4164] 0.54
Fusion Risk Factor 2.7335 0.0018 [1.4537, 5.1400] 0.63
KMUH Tumor Stage 2.1903 0.1085 [0.8407, 5.7063] 0.63
Tumor Grade (WHO 2004) NA NA NA NA
EAU NMIBC Risk 2.9341 0.0859 [0.8589, 10.0231] 0.62
Fusion Risk Factor 2.8358 0.0208 [1.1716, 6.8639] 0.66

Table 3.

Hazard ratio in multivariate Cox regression

Site Feature Hazard ratio p value 95% CI
VUHSK Tumor Stage + Fusion Risk Factor (AIC = 409.02; C-index = 0.64)
Tumor Stage 1.293 0.436 [0.6775, 2.4658]
Fusion Risk Factor 2.422 0.014 [1.1977, 4.8975]
EAU NMIBC Risk + Fusion Risk Factor (AIC = 406.14; C-index = 0.63)
EAU NMIBC Risk 0.9499 0.8665 [0.5220, 1.7286]
Fusion Risk Factor 2.8035 0.0033 [1.4085, 5.5799]
KMUH Tumor Stage + Fusion Risk Factor (AIC = 140.18; C-index = 0.68)
Tumor Stage 1.544 0.415 [0.5427, 4.3949]
Fusion Risk Factor 2.387 0.077 [0.9093, 6.2671]
EAU NMIBC Risk + Fusion Risk Factor (AIC = 138.65; C-index = 0.70)
EAU NMIBC Risk 2.3825 0.1734 [0.6827, 8.3145]
Fusion Risk Factor 2.4403 0.0520 [0.9925, 6.0001]

Fig. 5.

Fig. 5

Kaplan–Meier analysis in various groups.

In the univariate Cox regression analysis, the proposed fusion risk factor model outperformed current clinical criteria: stage and grade, in both predictive capability and statistical significance. For the VUHSK dataset, the fusion model achieved a hazard ratio of 2.7, compared to 1.9 for that of tumor stage. When compared with grade—a widely accepted prognostic criterion—the fusion model demonstrated superior robustness, with a p value of 0.0018 versus 0.1895. Additionally, when compared to other AI-based predictors, such as the MISL AI model from a prior study21, which achieved a hazard ratio of 2.2 and a p value of 0.0237 in the same VUHSK cohort, the fusion risk factor still showed superior performance. Similarly, for the KMUH dataset, the hazard ratio/p-value for the fusion model was 2.8/0.0208, outperforming the tumor stage at 2.2/0.1085. Previously, Drachneris et al.21 demonstrated that the 1973 WHO grading system offers better risk stratification for BCG-treated patients, as it yields a more balanced distribution of aggressive NMIBC cases. Nevertheless, because this grading system is not routinely applied at KMUH, it was excluded from this study.

In the multivariate Cox regression including tumor stage and the fusion risk factor, the latter emerged as the dominant indicator, likely because tumor stage is a contributing component of the fusion risk factor. However, the concordance index (C-index) showed only marginal improvement compared to the univariate Cox regression using the fusion risk factor alone, supporting the robustness of the fusion model as a standalone predictor of tumor recurrence.

Further multivariate analyses using alternative clinical models, including EAU NMIBC risk in place of tumor stage, consistently demonstrated that the fusion risk factor remained independently associated with relapse-free survival in both cohorts (Table 3). Notably, models integrating clinical risk stratification (EAU NMIBC risk) with histopathological features achieved slightly improved prognostic performance, as reflected by higher C-index values and lower AIC compared to models using individual predictors alone. These findings indicate that the fusion risk factor provides complementary prognostic information beyond established clinical risk stratification.

The Kaplan-Meier survival curves revealed clear distinctions among the risk groups identified by the fusion model. In the VUHSK dataset, the low-risk group retained a ~80% relapse-free survival rate at 5 years, whereas the high-risk group showed only around 40%, a larger disparity than that stratified by the stage or grade. Compared to the tumor stage, the fusion model more accurately identified high-risk patients, while it identified six times as many low-risk patients compared to low tumor grade. Additionally, the Kaplan–Meier analysis demonstrated significant p values (<0.05), with the fusion model outperforming both tumor stage, tumor grade, and EAU NMIBC risk (0.0012 vs. 0.0228 vs. 0.1733 vs. 0.3782). Despite the small sample size and the lack of low-grade patients in the KMUH dataset, the fusion model still exhibited a superior stratification of RFS compared to tumor stage (p = 0.0140). These findings underscore the ability of the fusion model to effectively stratify patients into different risk groups, thereby improving the identification of high-risk patients and optimizing resource allocation. Moreover, an ablation study of the fusion risk assessment method further strengthens the robustness of the proposed approach (detailed in Suppl. 3).

Discussion

Unlike previous studies that relied on clinical factors from medical records, such as sex, age, stage, and grade25, our model integrates detailed image features derived from primary stage and grade assessments, rather than depending solely on the final diagnoses. These complex morphological features, which are challenging to quantify manually, are combined through an AI algorithm to refine risk estimation. Notably, even without incorporating molecular or genetic data, effective prognostic stratification was achieved through integration of multi-level morphological analysis alone.

Importantly, rather than relying solely on categorical stage or grade labels, the proposed framework captures morphological representations associated with these classifications. These high-dimensional features may reflect intra-class heterogeneity that is not explicitly captured by conventional grading or staging systems, thereby enabling more refined risk stratification. This may partly explain the improved prognostic performance of the fusion risk factor compared to models based solely on stage or grade.

In addition, the integration of clinical risk stratification with the fusion risk factor in multivariate analysis further improved prognostic performance, supporting the complementary value of combining clinical and histopathological information.

In the exploratory validation using TCGA-BLCA dataset, the fusion risk factor model demonstrated measurable transferability under a heterogeneous setting (detailed in Suppl. 4). The fusion risk factor was the only indicator to reach statistical significance (p < 0.05) in both Kaplan–Meier survival analysis and Cox proportional hazards regression. Furthermore, it achieved the highest C-index among all tested indicators. Although the C-index value (0.5288) was lower compared to the results obtained from the VUHSK and KMUH datasets, likely due to the differences in case distribution and treatment variability, the fusion risk factor still identified different patient survival probabilities among the cases that were hardly distinguishable based on conventional stage and grade indicators.

While our findings are promising, they require validation across diverse centers and pathology laboratories. A significant limitation is the restriction of the cohorts exclusively to papillary tumors, which constrains the clinical applicability, as it deviates from the current standard approach in patient stratification. Furthermore, while the focus on only BCG-treated patients ensured a more homogenous population, it limits the generalizability of our findings to the broader NMIBC spectrum.

In this study, we present an AI-assisted model for diagnosing stage and grade in NMIBC. By utilizing features learned in datasets from two remote institutions through an FL framework, the resulting FL models demonstrated improved overall accuracy and enhanced robustness across participating institutions, paving the way for potential applications across diverse clinical sites. Furthermore, our model with the novel fusion risk factor outperformed conventional histological indicators in predicting the disease recurrence in the context of BCG therapy, even without incorporating molecular or genetic data. This underscores the potential of histology-based AI approaches to complement existing clinical risk models and improve patient risk stratification for optimal therapy decisions. However, to be clinically applicable, these findings require further studies focusing on validation and expanding to the full spectrum of NMIBC. This includes incorporating CIS and non-papillary tumors, as well as expanding cohorts beyond those receiving exclusive BCG immunotherapy.

Methods

Patient cohorts

A total of 1437 retrospective cases were collected from two institutions: 1092 from Lithuania (Vilnius University Hospital Santaros Klinikos, VUHSK) and 345 from Taiwan (Kaohsiung Medical University Hospital, KMUH). All procedures were conducted in accordance with the Declaration of Helsinki and approved by the respective institutional review boards: Vilnius Regional Biomedical Research Ethics Committee (No. 2021/11-1394-867), and KMUH (No. KMUHIRB-F(I)-20240146). Patient consent was waived according to the International Ethical Guidelines for Health-related Research Involving Humans26. In these cohorts, 1226 cases with pathological reports were used for model development; 211 cases with pathological reports and therapy follow-up data were prepared for relapse analysis (Table 4). We have restricted our cohorts only to NMIPUC, excluding urothelial carcinoma in situ (CIS) and non-papillary tumors, to have a more homogeneous cohort with a dichotomous tumor stage (pTa vs pT1) classification and tumor grading.

Table 4.

Description of the overall patient cohorts

VUHSK KMUH
All cases (n = 1437) 1092 345
Cases for model development (n = 1226) 936 290
Cases for relapse analysis (n = 211) 156 55
Class distribution of relapse analysis cases
VUHSK KMUH
Tumor stage pT1 60 30
pTa 96 25
Tumor grade High grade 144 55
Low grade 12 0

A total of 936 NMIBC cases from VUHSK and 290 cases from KMUH were selected for tumor stage (stage) and tumor grade (grade) classification model training. These cases were staged according to the 8th edition AJCC Cancer Staging Manual27. Tumor grade was assessed using the 2004 WHO grading system, as it was reported in both institutions. The distributions of tumor stage and tumor grade were similar in both VUHSK and KMUH. In the VUHSK dataset, 24.6% of cases were. pT1 NMIBC and 65.5% were high grade. For KMUH, 31.6% were pT1 and 61.4% were high grade.

For the relapse prediction, 156 patients from VUHSK and 55 from KMUH met the inclusion criteria: histologically confirmed NMIPUC, completion of a full 6-week BCG induction therapy, availability of tumor resection samples collected within one year prior to BCG induction, and complete clinical, pathological, and follow-up data (including time to tumor relapse or last follow-up if no relapse occurred). As BCG immunotherapy is reserved for higher-risk cases, these cohorts included patients stratified as at least intermediate-risk under EAU guidelines. Follow-up data were censored at 5 years for VUHSK and 2 years for KMUH to exclude late tumor recurrences, which more likely represent de novo primary tumors rather than true recurrences28.

Image dataset

Each case in this study included an H&E-stained whole slide image (WSI) (a total of 1046). The scanners and magnification objectives for WSI preparation were different: VUHSK used a Leica AT2 scanner at ×20 magnification (Leica Biosystems, Nussloch, Germany); KMUH used a Hamamatsu NanoZoomer scanner at ×40 magnification (Hamamatsu Photonics, Shizuoka, Japan).

Deep learning model framework for tumor stage, tumor grade, and survival prediction

The model framework was adapted from the Clustering-constrained Attention Multiple Instance Learning (CLAM) method29, a deep-learning based, weakly supervised approach utilizing attention-based learning (Fig. 1). The framework comprises three main components. First, a histopathology-pretrained foundation mode30 based on the DINOv2 ViT-L architecture31 was applied to extract local features of the tissue regions. To achieve the WSI features of a standardized resolution, the patch size was scaled according to the slides’ magnification at different sites. These extracted features were then processed separately by two classification models of the CLAM architecture, each with an attention branch to aggregate the local features into the global features at the WSI level, one to classify the tumor stage and one for the tumor grade. Each classification model was trained through FL between KMUH and VUHSK. For RFS prediction from each WSI, a risk factor was deduced by leveraging the global features learned within the tumor stage and grade classification models. The global features of the two models were concatenated, processed with feature agglomeration, and clustered into predicted low-risk and high-risk groups using the Bayesian Gaussian mixture approach. In the final stage, the model generates predictions for tumor stage, tumor grade, and predicted fusion risk factor, accompanied by interpretable heatmaps. These heatmaps enable clinicians to visualize the relative importance of each tissue region in the model’s predictions.

Training process incorporating FL

The model training and risk assessment process is shown in Fig. 6. The process and data usage would be split into two parts. In the upper model training part, the classification models of stage and grade were trained and evaluated with 10-fold cross-validation using the NVIDIA FLARE FL framework32. During cross-validation, the cohorts were split by patients and stratified by their tumor stage and tumor grade. For either classification task and in each fold, a federated model (FL model) was trained via iterative aggregation of the model weights learned locally at each site of KMUH and VUHSK, with no patient data being transferred to the other site directly.

Fig. 6. Model training and risk factor assessment pipeline.

Fig. 6

The workflow consists of two stages: federated model training (upper) and risk factor assessment (lower). Tumor stage and grade classification models were trained on the whole model development cohort (n = 1226) in a federated learning setting (KMUH and VUHSK), with no sharing of patient-level data. Slide-level embeddings from the trained models were used to fit a clustering model on the model development cohort. This clustering model was then applied to the relapse analysis cohort (n = 211) without re-fitting to assign low-risk and high-risk groups. The clustering is unsupervised, and risk labeling is based on tumor stage distribution without using survival outcomes, ensuring separation between model derivation and evaluation. The trained models were used in a frozen state for prediction and downstream survival analysis.

The model underwent training for 100 epochs with a constant learning rate of 0.002, where the model weights were aggregated across sites for every epoch with the FedAvg strategy33. The checkpoint with the least validation loss was then selected and evaluated for each fold. Performance of the federated models was compared with two single-site baselines (KMUH and VUHSK models), which followed the same model architecture but were trained independently on site-specific data with 10-fold cross-validation as well.

We emphasize that the FL in this study was configured under a practical production environment where no data was shared between sites, in contrast to a virtual simulation where data could have been put into the same machine. The KMUH site utilized a virtual machine on the Taiwan national computing cloud (TWCC), with 8 cores of Intel Xeon Gold (Skylake, IBRS) CPUs and a NVIDIA Tesla V100 SXM2 32GB GPU; the VUHSK site used a server with 50 cores of AMD EPYC-Milan CPUs and a NVIDIA RTX A4000 GPU with 16GB of memory.

Risk factor assessment

To stratify patients into risk groups, we developed an unsupervised clustering approach based on slide-level embeddings derived from the model development cohort. These embeddings were obtained from the FL CLAM models trained for tumor stage and tumor grade classification. For each slide, we extracted the intermediate hidden states from the perceptron layers before the softmax prediction. These outputs from both models were concatenated to form a 2048-dimensional embedding.

A two-stage hierarchical feature agglomeration was applied to reduce the dimensionality (Fig. 7a). In the first stage, we used complete-linkage clustering with Euclidean distance and k-nearest-neighbor connectivity (k equals 20) to reduce the embedding to 512 dimensions, followed by normalization. The second stage further reduced the feature dimension to 128 using average-linkage clustering with Manhattan distance and full connectivity.

Fig. 7. Methods for risk factor assessment.

Fig. 7

a Procedure of unsupervised clustering of slides using embedding learned with CLAM models of tumor stage and tumor grade classification. b Projection of embedding of slides, colored by their tumor stage/grade and the risk cluster.

The reduced embeddings were then clustered into two groups using a Bayesian Gaussian mixture model trained with variational inference (Fig. 7b). The clustering model was fitted exclusively on the model development cohort and subsequently applied to the relapse analysis cohort without re-fitting, ensuring a clear separation between model derivation and evaluation.

As the clustering was unsupervised, the two resulting groups were labeled as low risk and high risk based on the tumor stage distribution of the model development cohort. The group with a higher proportion of pT1 patients was identified as the high-risk group. This labeling strategy does not involve survival outcome information and was applied consistently to the relapse analysis cohort.

Relapse analysis

Analysis was performed on the patient cohorts for their RFS. Patient cohorts were grouped either by the tumor stage, grade (as indicated in the pathological report), or risk group predicted by the relapse prediction model. Kaplan–Meier analysis was performed to estimate the probability of RFS for these three factors in the patient cohorts. For each stratification, a one-sided log-rank test was used to assess the dispersion between groups. Further, the hazard ratios of these different features were estimated through multiple Cox regression models. Due to the difference in the follow-up periods, a 5-year RFS analysis was conducted on VUHSK data, while a 2-year RFS analysis was performed on KMUH data.

Exploratory validation

To explore the behavior of the proposed model under a heterogeneous setting, exploratory validation was conducted using the TCGA-BLCA dataset, which comprises 412 cases of UC collected from 33 institutions. It is important to note that the TCGA-BLCA dataset mainly consists of advanced-stage cases with varying treatment strategies, in contrast to the case distribution in the VUHSK and KMUH cohorts, which predominantly include early-stage tumors treated with immunotherapy. Given these differences, the results from TCGA-BLCA should be interpreted with caution and are intended as an exploratory evaluation under domain shift rather than a formal external validation. To align with the local cohort, survival time was truncated at 5 years in the analysis.

Supplementary information

Acknowledgements

This project receives funding from the Research Council of Lithuania (LMTLT) under the Program "University Excellence Initiatives" supported by the Ministry of Education, Science and Sports of Lithuania (Measure No. 12-001-01-01-01)) Agreement No. S-A-UEI-23-11. The authors extend their gratitude to Chia-Hung Yang, an AI scientist at ST Medical Technology, for his invaluable advice on the FL AI models and related calculations.

Author contributions

Conceptualization: Yu-Chieh Lin, Allan Rasmusson, Peir-In Liang, Arvydas Laurinavicius. Methodology: Yu-Chieh Lin, Chao-Chun Chuang, Peir-In Liang. Validation: Julius Drachneris, Peir-In Liang, Data curation: Mantas Fabijonavicius, Wei-Ming Li, Hsiang-Ying Lee, Julius Drachneris, Peir-In Liang. Writing—original draft preparation: Yu-Chieh Lin. Writing—review and editing: Julius Drachneris, Allan Rasmusson, Feliksas Jankevicius, Wen-Jen Wu, Peir-In Liang, Arvydas Laurinavicius. Supervision: Feliksas Jankevicius, Wen-Jen Wu, Peir-In Liang, Arvydas Laurinavicius. All authors have read and agreed to the published version of the manuscript.

Data availability

Data presented in this study can be obtained from the author upon request. These data are not available to the public due to permit restrictions.

Code availability

The AI models and inference script code in this study can be obtained from GitHub (https://github.com/asankin37/FL-UC-BCG-Recur.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Peir-In Liang, Email: 1020537@kmuh.org.tw.

Arvydas Laurinavicius, Email: Arvydas.Laurinavicius@santa.lt.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s41698-026-01554-3.

References

  • 1.Saginala, K. et al. Epidemiology of bladder cancer. Med. Sci.8, 15 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Dyrskjøt, L., Schwarze, S. R., Nielsen, M. M. & Lothe, R. A. Bladder cancer. Nat. Rev. Dis. Prim.9, 58 (2023). [Google Scholar]
  • 3.Babjuk, M. et al. European Association of Urology guidelines on non–muscle-invasive bladder cancer (Ta, T1, and carcinoma in situ). Eur. Urol.81, 75–94 (2022). [DOI] [PubMed] [Google Scholar]
  • 4.Cambier, S. et al. EORTC nomograms and risk groups for predicting recurrence, progression, and disease-specific and overall survival in non–muscle-invasive stage Ta–T1 urothelial bladder cancer patients treated with 1–3 years of maintenance bacillus Calmette-Guérin. Eur. Urol.69, 60–69 (2016). [DOI] [PubMed] [Google Scholar]
  • 5.Sylvester, R. J. et al. Predicting recurrence and progression in individual patients with stage Ta T1 bladder cancer using EORTC risk tables: a combined analysis of 2596 patients from seven EORTC trials. Eur. Urol.49, 466–477 (2006). [DOI] [PubMed] [Google Scholar]
  • 6.Hitchings, A. W., Larque, A. B. & Page, C. Prediction of progression in pTa and pT1 bladder carcinomas with p53, p16, and pRb. Br. J. Cancer91, 552–557 (2004). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Abel, P. D., Hall, R. R. & Williams, G. Should pT1 transitional cell cancers of the bladder still be classified as superficial? Br. J. Urol.62, 235–239 (1988). [DOI] [PubMed] [Google Scholar]
  • 8.Soukup, V. et al. Prognostic performance and reproducibility of the 1973 and 2004/2016 World Health Organization grading classification systems in non–muscle-invasive bladder cancer: a European Association of Urology Non-muscle-invasive Bladder Cancer Guidelines Panel systematic review. Eur. Urol.72, 801–813 (2017). [DOI] [PubMed] [Google Scholar]
  • 9.Lammers, R. J. M. et al. Prediction model for recurrence probabilities after intravesical chemotherapy in patients with intermediate-risk non-muscle-invasive bladder cancer, including external validation. World J. Urol.34, 173–180 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Tosoni, I., Simeone, C., Tontodonati, M. & Bonelli, G. Clinical significance of interobserver differences in the staging and grading of superficial bladder cancer. BJU Int.85, 48–53 (2000). [DOI] [PubMed] [Google Scholar]
  • 11.Bol, M. G. W., Meijer, H. J., Boon, M. E. & Kruger, A. Reproducibility and prognostic variability of grade and lamina propria invasion in stages Ta, T1 urothelial carcinoma of the bladder. J. Urol.169, 1291–1294 (2003). [DOI] [PubMed] [Google Scholar]
  • 12.Mhawech, P., Iselin, C. & Pelte, M. F. Value of immunohistochemistry in staging T1 urothelial bladder carcinoma. Eur. Urol.42, 459–463 (2002). [DOI] [PubMed] [Google Scholar]
  • 13.Hashmi, A. A., Faridi, N., Khan, A. & Edhi, M. M. Cytokeratin 5/6 expression in bladder cancer: association with clinicopathologic parameters and prognosis. BMC Res. Notes11, 1–5 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Goebell, P. J., Grobholz, R., Schrader, A. J. & Hofmann, R. p53 immunohistochemistry in bladder cancer—a new approach to an old question. Urol. Oncol.28, 483–490 (2010). [DOI] [PubMed] [Google Scholar]
  • 15.Cui, M. & Zhang, D. Y. Artificial intelligence and computational pathology. Lab. Investig.101, 412–422 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Jansen, I., Lucas, M. & Smits, J. Automated detection and grading of non–muscle-invasive urothelial cell carcinoma of the bladder. Am. J. Pathol.190, 1483–1490 (2020). [DOI] [PubMed] [Google Scholar]
  • 17.Mundhada, A., Bhagat, S. & Vishwakarma, R. Differentiation of urothelial carcinoma in histopathology images using deep learning and visualization. J. Pathol. Inform.14, 100155 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Ferro, M. et al. Artificial intelligence in the advanced diagnosis of bladder cancer—comprehensive literature review and future advancement. Diagnostics13, 2308 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Tsuji, K. et al. A fully automated artificial intelligence system to assist pathologists’ diagnosis to predict histologically high-grade urothelial carcinoma from digitized urine cytology slides using deep learning. Eur. Urol. Oncol.7, 258–265 (2024). [DOI] [PubMed] [Google Scholar]
  • 20.Lucas, M. et al. Deep learning–based recurrence prediction in patients with non–muscle-invasive bladder cancer. Eur. Urol. Focus8, 165–172 (2022). [DOI] [PubMed] [Google Scholar]
  • 21.Drachneris, J. et al. Prediction of non-muscle invasive papillary urothelial carcinoma relapse from hematoxylin–eosin images using deep multiple instance learning in patients treated with Bacille Calmette–Guérin immunotherapy. Biomedicines12, 360 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Lotan, Y. et al. Predicting response to intravesical Bacillus Calmette-Guérin in high-risk nonmuscle-invasive bladder cancer using an artificial intelligence–powered pathology assay: Development and validation in an international 12-center cohort. J. Urol.213, 192–204 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Riley, R. D. & Collins, G. S. Stability of clinical prediction models developed using statistical or machine learning methods. Biom. J.65, 2200302 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Sharma D. K., Jindal R., Choudhary A. Applications of two separate methods to deal with a small dataset and a high risk of generalization. In 2021 2nd International Conference on Smart Electronics and Communication (ICOSEC) 1238–1243 (IEEE, 2021).
  • 25.Kwong, J. C. C., Lee, H. C., Yeung, R. L. C., Fung, H. T. & Wong, C. K. H. Predicting non-muscle invasive bladder cancer outcomes using artificial intelligence: a systematic review using APPRAISE-AI. NPJ Digit. Med.7, 98 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.van Delden, J. J. M. & van der Graaf, R. Revised CIOMS international ethical guidelines for health-related research involving humans. JAMA317, 135–136 (2017). [DOI] [PubMed] [Google Scholar]
  • 27.Bryan, R. T. et al. Mechanisms of recurrence of Ta/T1 bladder cancer. Ann. R. Coll. Surg. Engl.92, 519–524 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Edge S. et al. (eds.) AJCC Cancer Staging Manual 8th edn (Springer, 2017).
  • 29.Lu, M. Y. et al. Data-efficient and weakly supervised computational pathology on whole-slide images. Nat. Biomed. Eng.5, 555–570 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Guo Z. et al. HistGen: histopathology report generation via local-global feature encoding and cross-modal context interaction. In Medical Image Computing and Computer Assisted Intervention – MICCAI 2024 189–199 (Springer Nature Switzerland, 2024).
  • 31.Oquab M. et al. DINOv2: learning robust visual features without supervision. Transactions on Machine Learning Research (2024).
  • 32.Roth H. R. et al. NVIDIA FLARE: federated learning from simulation to real-world. IEEE Data Engineering Bulletin (2023).
  • 33.McMahan, B., Moore, E., Ramage, D., Hampson, S. & Aguera y Arcas, B. Communication-efficient learning of deep networks from decentralized data. Proc. Mach. Learn. Res.54, 1273–1282 (2017). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

Data presented in this study can be obtained from the author upon request. These data are not available to the public due to permit restrictions.

The AI models and inference script code in this study can be obtained from GitHub (https://github.com/asankin37/FL-UC-BCG-Recur.


Articles from NPJ Precision Oncology are provided here courtesy of Nature Publishing Group

RESOURCES