Machine learning prediction of postoperative recurrence in bladder cancer using clinical and laboratory indicators Authors: Lanyu Wang, Ju Zhang, Yuan Liu, Yifan Sun, Ye Hua, Xiang Zhang, Ninghan Feng, Jianfeng Shao, Chunyang Chen Published: 2026 ABSTRACT AbstractPostoperative recurrence is a major determinant of prognosis in bladder cancer. Early identification of patients at high risk is essential for optimizing individualized follow-up and therapeutic strategies. This study aimed to develop a comprehensive recurrence risk prediction model based on clinical characteristics, laboratory parameters, and postoperative follow-up data, and to identify the key risk factors associated with recurrence. A total of 488 patients with bladder cancer were retrospectively enrolled. Demographic, lifestyle, comorbidity, tumor-related, surgical, and laboratory data at 3 months postoperatively were collected. Univariate and multivariate analyses were conducted to identify recurrence-associated variables. Predictive models were constructed using four machine learning algorithms: eXtreme Gradient Boosting (XGBoost), Random Forest (RF), Support Vector Machine (SVM), and k-Nearest Neighbors (KNN). Model performance was evaluated using receiver operating characteristic (ROC) curves, calibration curves, decision curve analysis (DCA), and k-fold cross-validation. Feature importance and individual risk contributions were interpreted using SHAP (SHapley Additive exPlanations) analysis. Age, smoking history, tumor stage, tumor number, tumor size, pathological grade, neutrophil-to-lymphocyte ratio (NLR), urine cytology, hematuria, NMP22, and alkaline phosphatase (ALP) were identified as independent predictors of bladder cancer recurrence. Among all models, XGBoost demonstrated the best predictive performance, with an AUC of 0.960 in the training set, 0.925 in the validation set, and 0.850 in the external validation cohort. SHAP analysis revealed that smoking history, tumor stage, tumor number, tumor size, pathological grade, NLR, urine cytology, hematuria, and NMP22 were the most influential predictors of recurrence and contributed significantly to inter-individual risk differences. The multidimensional machine learning–based recurrence prediction model developed in this study accurately identifies high-risk bladder cancer patients and elucidates key risk factors, offering a robust evidence base for personalized postoperative surveillance and intervention. Furthermore, it provides novel insights into the biological mechanisms underlying recurrence. Future studies with larger, multicenter cohorts are warranted to validate the model’s robustness and clinical applicability.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-48493-4.Keywords: XGBoost, Bladder cancer, Recurrence, Machine learning, Inflammatory markersSubject terms: Cancer, Computational biology and bioinformatics, Oncology, Risk factors, Urology Introduction Bladder cancer is one of the most common malignant tumors of the urinary system, with more than 600,000 new cases reported worldwide in 2022, accounting for approximately 3% of all newly diagnosed cancers. It is particularly prevalent in men and shows a steadily increasing incidence trend. Clinically, bladder cancer is primarily classified into non-muscle-invasive bladder cancer (NMIBC) and muscle-invasive bladder cancer (MIBC)1–3. Although NMIBC generally has a more favorable prognosis compared to MIBC, the postoperative recurrence rate remains considerable, with 5-year recurrence rates reaching 30%–50%. Moreover, approximately 10%–20% of patients eventually progress to muscle-invasive disease or develop distant metastases, substantially increasing the treatment burden and severely impacting patients’ quality of life and long-term outcomes4–6. Currently, the standard treatment for NMIBC is transurethral resection of bladder tumor (TURBT), followed by intravesical instillation therapy to reduce the risk of local recurrence. These interventions have been shown in multiple randomized controlled trials and clinical guidelines to significantly decrease recurrence rates. However, despite standardized resection techniques and adjuvant intravesical therapies, postoperative recurrence remains frequent in NMIBC7–9. Furthermore, traditional clinicopathological parameters—such as tumor grade, stage, size, number, and the presence of concomitant carcinoma in situ (CIS)—have limited utility in accurately predicting individual recurrence risk. Existing clinical scoring systems and recurrence prediction tools, including the EORTC risk tables and the CUETO scoring system, often demonstrate suboptimal predictive performance and significant interindividual variability in external validation, thereby limiting their value in guiding individualized clinical management10,11. These models often show suboptimal discrimination and poor calibration when applied to contemporary or geographically distinct cohorts. Moreover, they are constructed solely from conventional clinicopathological variables and do not incorporate systemic inflammatory biomarkers, which have been increasingly recognized as critical contributors to tumor recurrence and progression. In addition, their reliance on traditional Cox regression restricts the ability to model complex nonlinear relationships and variable interactions. These shortcomings highlight the need for more flexible predictive approaches. In recent years, the rapid development of big data technologies and advances in computational power have facilitated the application of machine learning (ML) in medicine. ML approaches have demonstrated promising advantages over traditional statistical models in predicting tumor recurrence risk, individual prognosis, and assisting clinical decision-making. They can integrate heterogeneous, multi-source data—including clinical characteristics, pathological findings, imaging features, and potential omics markers—to enable a more refined assessment of recurrence risk12,13. Moreover, feature importance analyses, such as SHAP and LIME, allow these models to elucidate the relative contributions of different variables, thereby providing interpretable evidence to support clinical decision-making. In this study, we aim to develop ML-based predictive models for postoperative recurrence risk in NMIBC by integrating multicenter clinical data. By combining clinical, pathological, and follow-up information from multiple institutions, we seek to construct a large and heterogeneous dataset, thereby improving the model’s generalizability and predictive accuracy. Compared with traditional single-center studies or conventional predictive models based solely on pathological grade and tumor size, ML can handle complex, high-dimensional, and nonlinear relationships, uncover potential risk factors, and quantify their contributions to recurrence through explainable modeling. This approach not only facilitates individualized postoperative management and optimized follow-up strategies but also provides clinicians with quantitative and interpretable decision support, highlighting the methodological and clinical advantages of this study. Materials and methods Study Subjects In this study, clinical data were obtained from the databases of three institutions: Wuxi People’s Hospital, Wuxi Second People’s Hospital and Tengzhou Central People’s Hospital. Patients diagnosed and treated between January 2018 and January 2023 were screened for eligibility. Inclusion criteria: (1) Adults aged ≥ 18 years; (2) Histologically confirmed diagnosis of NMIBC, including Ta, T1, or CIS, based on cystoscopic examination and pathological assessment; (3) First-time treatment with TURBT with complete surgical records available; (4) All included patients underwent a primary TURBT. Following the surgery, adjuvant intravesical instillation was recommended based on risk stratification guidelines. For low-risk and intermediate-risk patients, single immediate perfusion or short-term induction of intravesical chemotherapy (such as mitomycin C or epirubicin, etc.) is mainly used. For high-risk patients (mainly characterized by T1 stage or high-grade tumors), intravesical chemotherapy remains the most common adjuvant treatment. Some patients received BCG (bacillus Calmette-Guérin) immunotherapy for high-risk patients. Exclusion criteria: (1) Coexistence of other primary malignancies or a prior history of other cancers that could affect prognosis; (2) Previous bladder surgery, systemic chemotherapy, radiotherapy, or immunotherapy; (3) Intraoperative complications during TURBT (e.g., bladder perforation, massive bleeding) or other conditions precluding intravesical instillation therapy; (4) Active urinary tract infection, tuberculosis, or other severe urological diseases affecting treatment safety or follow-up results; (5) Allergy or intolerance to intravesical agents (e.g., mitomycin C, epirubicin, gemcitabine, or BCG); (6) Severe comorbidities (e.g., significant cardiac, hepatic, renal insufficiency, or immunodeficiency) precluding treatment or affecting survival; (7) Incomplete clinical or follow-up data preventing recurrence risk assessment. This study was approved by the Ethics Committees of Wuxi People’s Hospital, Wuxi Second People’s Hospital, and Tengzhou Central People’s Hospital (Approval No. KY23026). The requirement for informed consent was waived by the respective Institutional Review Boards due to the retrospective nature of the study. The study was conducted following the ethical guidelines of the 2013 Declaration of Helsinki. All methods were performed in accordance with relevant guidelines and regulations. Definition of tumor recurrence In this study, tumor recurrence was defined as histologically confirmed urothelial carcinoma detected in the bladder during the 2-year follow-up period after surgery, excluding residual tumors identified within 3 months after initial resection and cases that progressed to the muscle-invasive stage14–20. Study design and data collection A total of 32 clinical variables were collected across multiple domains to enable a comprehensive assessment of postoperative recurrence risk in NMIBC patients. The variables included: Demographic and familial characteristics: sex, age, body mass index (BMI), American Society of Anesthesiologists (ASA) score, serum albumin (ALB), Nutritional Risk Screening 2002 (NRS2002) score, and family history. Lifestyle factors: history of alcohol consumption and smoking. Medical history and comorbidities: surgical history, anemia, hyperlipidemia, hypertension, diabetes, and coronary heart disease (CHD). Tumor characteristics and clinical features: tumor stage (T-stage), tumor number, tumor size, pathological grade, operative time, and intraoperative blood loss. Laboratory markers: procalcitonin (PCT), C-reactive protein (CRP), serum amyloid A (SAA), neutrophil-to-lymphocyte ratio (NLR), urine cytology, hematuria, nuclear matrix protein 22 (NMP22), and alkaline phosphatase (ALP). These laboratory parameters were measured during the 3-month postoperative follow-up to evaluate inflammatory status, immune function, and recurrence risk. Postoperative treatment: single immediate instillation and repeated induction/maintenance intravesical chemotherapy. The primary endpoint of this study was tumor recurrence after initial TURBT. Development and evaluation of predictive models for machine learning algorithms Statistical analyses and machine learning modeling were performed using IBM SPSS Statistics (version 31.0, https://www.ibm.com/products/spss-statistics) and R software (version 4.4.2, R Foundation for Statistical Computing, https://www.R-project.org). These versions represented the stable releases available at the time of the study1. Data preprocessing. Patients diagnosed and treated for bladder cancer between January 2018 and January 2023 at Wuxi People’s Hospital and Wuxi Second People’s Hospital were included as the internal validation cohort. Concurrently, patients treated during the same period at Tengzhou Central People’s Hospital were designated as the external validation cohort, which was used to evaluate the generalizability and robustness of the models across different centers and patient populations. This approach aimed to minimize overfitting caused by reliance on a single dataset and to provide stronger evidence for clinical applicability. Within the internal cohort, stratified random sampling was applied to divide the data into a training set and a testing set in a 7:3 ratio. This ensured that key clinical characteristics (e.g., age, sex, tumor stage) were evenly distributed between the two subsets, thereby reducing sampling bias and improving the reliability of downstream modeling. Data preprocessing and missing value handling Prior to model development, data preprocessing was conducted to ensure data quality and consistency across centers. Variables with a missing rate exceeding 20% were excluded from the analysis. For the remaining variables, missing values were imputed using KNN imputation, which has been shown to effectively preserve variable distribution and reduce potential bias. Continuous variables were standardized, and categorical variables were encoded as required for machine learning algorithms. To assess the potential impact of missing data handling on model performance, a sensitivity analysis was performed by comparing the predictive results derived from the imputed dataset with those from a complete-case dataset. The comparable performance between the two approaches indicated the robustness of the model to the imputation strategy2. Feature selection and identification of recurrence-related variables. A systematic statistical analysis was first conducted to identify clinical features significantly associated with bladder cancer recurrence. During the initial screening stage, categorical variables were analyzed using the chi-square test, while continuous variables were compared using the independent-samples t-test. Variables with a statistically significant association (P < 0.05) were considered potential risk factors. These significant variables were subsequently included in a multivariate logistic regression model to control for potential confounders. Adjusted regression coefficients and 95% confidence intervals were calculated to determine their independent predictive value. Beyond conventional statistical approaches, we further employed four classical ML algorithms—XGBoost, RF, SVM, and KNN—to comprehensively evaluate feature importance and compare variable contributions across models. By integrating results from both traditional statistics and multiple ML methods, we identified the top 10 consistently important features as key predictors of bladder cancer recurrence. This combined approach mitigates the limitations of any single method and enhances the robustness, consistency, and interpretability of feature selection. To ensure methodological rigor and comprehensive evaluation, four widely used machine learning algorithms—XGBoost, RF, SVM, and KNN—were selected based on their complementary modeling characteristics and proven effectiveness in clinical prediction tasks. XGBoost and Random Forest are ensemble tree-based methods with strong capability to capture nonlinear relationships and complex interactions among variables, making them particularly suitable for heterogeneous clinical data. These algorithms are also robust to multicollinearity and capable of handling mixed data types. Support Vector Machine is effective in high-dimensional spaces and performs well when the number of variables is large relative to sample size, which is common in biomedical datasets. Its kernel functions enable flexible decision boundaries for nonlinear classification. K-Nearest Neighbor, as a distance-based algorithm, was included as a representative instance-based learning method that makes minimal assumptions about data distribution, providing a useful contrast to model-based approaches. By incorporating algorithms with different underlying principles—ensemble learning, margin-based learning, and instance-based learning—we aimed to comprehensively evaluate model performance and identify the most suitable approach for predicting early recurrence in NMIBC3. Model construction and performance evaluation. The selected features were then incorporated into four classical ML models—SVM, RF, XGBoost, and KNN—to develop recurrence risk prediction models. Model performance was evaluated across three major dimensions: discrimination, calibration, and clinical utility. Discrimination: Model discrimination was assessed by plotting receiver operating characteristic (ROC) curves and calculating the area under the curve (AUC). Calibration: Calibration was evaluated using calibration curves, which compare the predicted recurrence probabilities with observed recurrence rates. An ideal calibration curve closely aligns with the 45° diagonal, indicating high agreement between predicted and actual outcomes and thus strong reliability across different risk levels. Clinical utility: Decision curve analysis (DCA) was employed to assess the clinical utility of the models by quantifying net benefit across a range of threshold probabilities. By comparing the model’s net benefit against “treat all” and “treat none” strategies, DCA provides insight into the potential clinical value of model-guided interventions, taking into account both predictive accuracy and patient benefit. To improve model generalizability and minimize bias introduced by sample partitioning, we applied a 10-fold cross-validation approach within the internal cohort. Specifically, the training dataset was randomly partitioned into 10 mutually exclusive subsets. In each iteration, one subset served as the validation set while the remaining nine subsets were used for model training. This process was repeated 10 times, and the mean performance metrics (e.g., AUC, accuracy, sensitivity, and specificity) across all folds were calculated to assess model stability and reliability. Ten-fold cross-validation maximizes data utilization, reduces random error due to sample division, and provides a more robust estimate of model performance on unseen data. Through this comprehensive evaluation, we systematically compared the predictive performance of the four ML algorithms and selected the optimal model for subsequent analyses4. External validation. The best-performing model and its optimized hyperparameters derived from the internal training phase were directly applied to the external validation dataset comprising patients from Tengzhou Central People’s Hospital. This step assessed the model’s generalization performance and clinical applicability in an independent patient cohort5. Model interpretation. To enhance interpretability and facilitate clinical translation, we employed SHapley Additive exPlanations (SHAP) for model interpretation. Based on cooperative game theory, SHAP calculates the marginal contribution (Shapley value) of each feature to the model’s output, thereby quantifying both the magnitude and direction of its influence. Two types of SHAP visualizations were generated: Summary plots aggregate feature contributions across all patients, ranking them by overall importance and illustrating how high or low feature values influence recurrence risk. Force plots provide individualized explanations by showing how each feature contributes positively or negatively to a single patient’s recurrence prediction. These visualizations not only identify key predictive factors but also reveal how specific features drive risk predictions at the individual level, thus enhancing clinical interpretability and supporting personalized risk assessment and decision-making. The code for data analysis in this study is publicly available at https://www.jianguoyun.com/p/DWh9chMQl-GKDBjEj-sFIAA. Results Patient Characteristics A total of 488 patients with NMIBC were included in this study (Table 1; Fig. 1). Of these, 61.1% were male and 38.9% were female, with 63.7% aged ≥ 65 years. A BMI ≥ 25 kg/m² was observed in 30.7% of patients, while 33.0% had an ASA score ≥ 3. Serum albumin < 35 g/L was present in 32.0%, an NRS2002 score ≥ 3 in 27.9%, and a positive family history in 22.5%. Regarding lifestyle factors, 62.7% were smokers and 28.7% reported a history of alcohol consumption. A previous surgical history was recorded in 20.5%. Among comorbidities, the prevalence of anemia, hyperlipidemia, hypertension, diabetes, and CHD was 19.9%, 22.3%, 25.2%, 33.0%, and 16.0%, respectively. In terms of tumor characteristics, 58.0% were classified as stage T1 and 42.0% as Ta. Single tumors were present in 56.4%, while 43.6% had multifocal disease. Tumor size ≥ 3 cm was observed in 34.8% of cases. High-grade tumors accounted for 65.8%, while 34.2% were low-grade. Prolonged operative time (≥ 60 min) and intraoperative blood loss ≥ 50 mL were each reported in 26.4% of patients. Postoperative laboratory assessments at 3 months revealed that 26.4% had PCT ≥ 0.05 ng/mL, 22.5% had CRP ≥ 10 mg/L, 23.6% had SAA ≥ 10 mg/L, and 44.9% had a NLR ≥ 3. Positive urine cytology and hematuria were observed in 64.1% and 63.9% of patients, respectively. NMP22 positivity was present in 61.1%, while ALP ≥ 120 U/L was found in 22.7%. Regarding postoperative treatment, 61.7% of patients underwent repeated intravesical chemotherapy, while the remaining patients received either a single immediate intravesical chemotherapy instillation or other therapeutic strategies. The primary study endpoint was tumor recurrence following TURBT. Table 1Clinical and Baseline Characteristics of Patients with Bladder Cancer Recurrence.VariablesRecurrence (n = 488)SexFemale190(38.934)Male298(61.066)Age<65177(36.270)≥ 65311(63.730)BMI<25 kg/m2338(69.262)≥ 25 kg/m2150(30.738)ASA<3327(67.008)≥ 3161(32.992)ALB≥ 35 g/l332(68.033)<35 g/l156(31.967)NRS2002 score<3352(72.131)≥ 3136(27.869)Family historyNo378(77.459)Yes110(22.541)Drinking historyNo348(71.311)Yes140(28.689)Smoking historyNo182(37.295)Yes306(62.705)Surgical historyNo388(79.508)Yes100(20.492)AnemiaNo391(80.123)Yes97(19.877)HyperlipidemiaNo379(77.664)Yes109(22.336)HypertensionNo365(74.795)Yes123(25.205)DiabetesNo327(67.008)Yes161(32.992)CHDNo410(84.016)Yes78(15.984)repeated intravesical chemotherapyNo187(38.320)Yes301(61.680)T-stageTa205(42.008)T1283(57.992)Tumor number<2275(56.352)≥ 2213(43.648)Tumor size<3 cm318(65.164)≥ 3 cm170(34.836)Pathological_gradingLG167(34.221)HG321(65.779)Surgery time<60 min359(73.566)≥ 60 min129(26.434)Bleeding volume<50 ml359(73.566)≥ 50 ml129(26.434)PCT level<0.05 ng/ml359(73.566)≥ 0.05 ng/ml129(26.434)CRP level<10 mg/l378(77.459)≥ 10 mg/l110(22.541)SAA level<10 mg/l373(76.434)≥ 10 mg/l115(23.566)NLR<3269(55.123)≥ 3219(44.877)Urine cytologyNo175(35.861)Yes313(64.139)HematuriaNo176(36.066)Yes312(63.934)NMP22No190(38.934)Yes298(61.066)ALP<120 U/L377(77.254)≥ 120 U/L111(22.746)BMI, body mass index; ASA, The American Society of Anesthesiologists; ALB, albumin; PCT, procalcitonin; CRP, C-reactive protein; NLR, neutrophil to lymphocyte ratio; SAA, serum amyloid A; NRS2002, nutrition risk screening 2002; CHD, Coronary heart disease; ALP, Alkaline Phosphatase; LG, Low Grade; HG, High Grade. Clinical and Baseline Characteristics of Patients with Bladder Cancer Recurrence. BMI, body mass index; ASA, The American Society of Anesthesiologists; ALB, albumin; PCT, procalcitonin; CRP, C-reactive protein; NLR, neutrophil to lymphocyte ratio; SAA, serum amyloid A; NRS2002, nutrition risk screening 2002; CHD, Coronary heart disease; ALP, Alkaline Phosphatase; LG, Low Grade; HG, High Grade. Illustrates the patient enrollment flowchart, clearly outlining the sample selection process. Identification of risk factors for bladder cancer recurrence Univariate and multivariate analyses identified age, smoking history, tumor stage, tumor number, tumor size, pathological grade, NLR, urine cytology, hematuria, NMP22, and ALP as independent risk factors for bladder cancer recurrence (P < 0.05) (Table 2). Further integration of machine learning analyses using XGBoost, RF, SVM, and KNN algorithms confirmed the major recurrence predictors: smoking history, tumor stage, tumor number, tumor size, pathological grade, NLR, urine cytology, hematuria, and NMP22 (Fig. 2A-D). Table 2Summarizes the results of univariate and multivariate analyses identifying variables significantly associated with postoperative bladder cancer recurrence.VariablesUnivariate analysisMultivariate analysisOR (95%CI)P-valueOR (95%CI)P-valueSexFemale773ReferenceReferenceMale10301.249 [1.011,1.544]0.041.088 [0.780,1.520]0.62Age<65934ReferenceReference≥ 658692.384 [1.923,2.954]2.342 [1.691,3.260]<0.001BMI<25 kg/m21255Reference≥ 25 kg/m25481.022 [0.816,1.281]0.847ASA<31264Reference≥ 35391.22 [0.976,1.526]0.08ALB≥ 35 g/l1269Reference<35 g/l5341.165 [0.930,1.458]0.183NRS2002 score<31275Reference≥ 35280.91 [0.722,1.146]0.421Family historyNo1409ReferenceYes3941.056 [0.823,1.356]0.667Drinking historyNo1384ReferenceReferenceYes4191.494 [1.179,1.892]0.0011.220 [0.834,1.777]0.303Smoking historyNo1190ReferenceReferenceYes6135.52 [4.414,6.903]<0.0013.779 [2.719,5.279]<0.001Surgical historyNo1443ReferenceYes3601.046 [0.808,1.354]0.734AnemiaNo1504ReferenceReferenceYes2991.367 [1.045,1.787]0.0223.779 [2.719,5.279]<0.001HyperlipidemiaNo1422ReferenceYes3811.103 [0.858,1.418]0.445HypertensionNo1392ReferenceYes4111.202 [0.943,1.532]0.138DiabetesNo1326ReferenceReferenceYes4771.557 [1.240,1.954]<0.0011.340 [0.940,1.910]0.105CHDNo1522ReferenceYes2811.042 [0.784,1.385]0.776Repeated intravesical chemotherapyNo783ReferenceReferenceYes10201.334 [1.079,1.650]0.0081.132 [0.813,1.579]0.462T-stageTa1205ReferenceReferenceT15984.383 [3.517,5.460]<0.0012.977 [2.142,4.148]<0.001Tumor number<21321ReferenceReference≥ 24823.012 [2.409,3.766]<0.0012.655 [1.878,3.764]<0.001Tumor size<3 cm1433ReferenceReference≥ 3 cm3702.98 [2.346,3.787]<0.0011.982 [1.356,2.898]<0.001Pathological_gradingLG1162ReferenceReferenceHG6415.977 [4.770,7.488]<0.0015.377 [3.865,7.545]<0.001Surgery time<60 min1390ReferenceReference≥ 60 min4131.304 [1.026,1.659]0.031.350 [0.922,1.971]0.121Bleeding volume<50 ml1287Reference≥ 50 ml5160.862 [0.682,1.088]0.211PCT level<0.05 ng/ml1433ReferenceReference≥ 0.05 ng/ml3701.601 [1.253,2.046]<0.0010.806 [0.546,1.183]0.275CRP level<10 mg/l1456ReferenceReference≥ 10 mg/l3471.324 [1.026,1.708]0.0310.991 [0.662,1.473]0.963SAA level<10 mg/l1434Reference≥ 10 mg/l3691.288 [1.003,1.653]0.047NLR<31345ReferenceReference≥ 34583.665 [2.921,4.599]<0.0011.815 [1.280,2.570]0.001Urine cytologyNo1293ReferenceReferenceYes51010.15 [7.992,12.892]<0.0015.811 [4.153,8.183]<0.001HematuriaNo1201ReferenceReferenceYes6026.266 [4.998,7.855]<0.0013.980 [2.868,5.548]<0.001NMP22No1251ReferenceReferenceYes5526.552 [5.217,8.227]<0.0014.480 [3.197,6.317]<0.001ALP<120 U/L1479ReferenceReference≥ 120 U/L3241.523 [1.177,1.971]0.0011.854 [1.228,2.796]0.003BMI, body mass index; ASA, The American Society of Anesthesiologists; ALB, albumin; PCT, procalcitonin; CRP, C-reactive protein; NLR, neutrophil to lymphocyte ratio; SAA, serum amyloid A; NRS2002, nutrition risk screening 2002; CHD, Coronary heart disease; ALP, Alkaline Phosphatase; LG, Low Grade; HG, High Grade. Summarizes the results of univariate and multivariate analyses identifying variables significantly associated with postoperative bladder cancer recurrence. BMI, body mass index; ASA, The American Society of Anesthesiologists; ALB, albumin; PCT, procalcitonin; CRP, C-reactive protein; NLR, neutrophil to lymphocyte ratio; SAA, serum amyloid A; NRS2002, nutrition risk screening 2002; CHD, Coronary heart disease; ALP, Alkaline Phosphatase; LG, Low Grade; HG, High Grade. displays the feature importance rankings for each predictive model: (A) Extreme Gradient Boosting (XGBoost), (B) Random Forest (RF), (C) Support Vector Machine (SVM), and (D) k-Nearest Neighbor (KNN). Model development and evaluation ROC curve analysis demonstrated that the XGBoost model exhibited the best predictive performance among all models, with an AUC of 0.960 in the training set and 0.925 in the validation set (Table 3). These high AUC values indicate excellent discriminative ability in distinguishing between high-risk and low-risk patients. Calibration curve analysis further showed that the predicted probabilities from all four models—XGBoost, RF, SVM, and KNN—were highly consistent with actual observations, demonstrating strong calibration performance. This suggests that the models not only effectively stratify recurrence risk but also produce reliable probability estimates. DCA revealed that all models provided greater net clinical benefit compared to the “treat-all” or “treat-none” strategies across a wide range of threshold probabilities (Fig. 3A-D). This highlights the clinical utility of ML-based recurrence risk models, particularly XGBoost, which showed the greatest potential for improving individualized clinical decision-making. To comprehensively assess model generalizability, a 10-fold cross-validation approach was applied within the internal validation cohort. A total of 232 patients (30.05%) were randomly selected as the testing set, while the remaining cases were used for training. This approach allowed for robust evaluation across different data partitions, minimizing bias from random splits and improving model stability. The cross-validation results demonstrated the following performance metrics: XGBoost: AUC = 0.9234 ± 0.0384 (validation), AUC = 0.8355 (test), accuracy = 0.8276; RF: AUC = 0.8887 ± 0.0744 (validation), AUC = 0.8150 (test), accuracy = 0.8017; SVM: AUC = 0.9150 ± 0.0393 (validation), AUC = 0.8060 (test), accuracy = 0.8233; KNN: AUC = 0.9170 ± 0.0419 (validation), AUC = 0.8171 (test), accuracy = 0.8319. Overall, XGBoost consistently outperformed the other models across all evaluation metrics, particularly in terms of AUC and accuracy, demonstrating superior discriminative power, generalizability, and predictive stability. In the external validation cohort, the XGBoost model achieved an AUC of 0.850 (Fig. 4A-D), confirming its robust predictive performance and strong generalizability when applied to unseen patient data. Table 3Presents the performance metrics of the four predictive models assessed in this study.AUC(95%CI)Accuracy(95%CI)Sensitivity(95%CI)Specificity(95%CI)F1 score(95%CI)KNNtraining set0.937 (0.916–0.958)0.869(0.860–0.879)0.875(0.863–0.888)0.865(0.846–0.885)0.838(0.829–0.846)validation set0.902 (0.862–0.943)0.843(0.835–0.850)0.849(0.820–0.879)0.84(0.821–0.860)0.803(0.795–0.810)XGBoosttraining set0.960 (0.944–0.976)0.894(0.889–0.899)0.868(0.855–0.881)0.91(0.900–0.921.900.921)0.863(0.857–0.869)validation set0.925 (0.891–0.959)0.85(0.836–0.864)0.825(0.804–0.847)0.865(0.840–0.890)0.807(0.793–0.820)RFtraining set0.810 (0.774–0.846)0.78(0.771–0.789)0.768(0.753–0.783)0.788(0.768–0.809)0.728(0.720–0.737)validation set0.839 (0.787–0.891)0.805(0.788–0.822)0.81(0.784–0.835)0.802(0.768–0.836)0.758(0.739–0.777)SVMtraining set0.893 (0.865–0.921)0.85(0.839–0.861)0.819(0.799–0.838)0.869(0.849–0.889)0.807(0.794–0.820)validation set0.884 (0.839–0.929)0.83(0.811–0.848)0.808(0.764–0.853)0.844(0.811–0.877)0.782(0.760–0.803)CI, confidence interval. Presents the performance metrics of the four predictive models assessed in this study. CI, confidence interval. Offers a comprehensive evaluation of the models’ predictive performance, including: (A) ROC curves for the training dataset; (B) ROC curves for the validation dataset; (C) calibration curves, where the 45° dashed line represents perfect alignment between predicted and observed outcomes—curves closer to this line indicate superior calibration; and (D) decision curve analysis (DCA), with the red curve illustrating the model’s net clinical benefit across varying risk thresholds. The intersections between the red curve and the “All” and “None” strategies define the ranges of risk thresholds where the model provides clinical utility. Presents the internal and external validation results for the XGBoost model: (A) ROC curve from the training set; (B) ROC curve from the validation set; (C) ROC curve from the testing set; and (D) ROC curve from the external validation cohort. Model explanation. The SHAP summary plot (Fig. 5) provided a clear visualization of the key risk factors influencing bladder cancer recurrence and their relative importance rankings. The most influential predictors included smoking history, higher tumor stage (T-stage), multifocal tumors, larger tumor size, higher pathological grade, NLR, abnormal urine cytology, hematuria, and elevated NMP22 levels. To further assess model interpretability and clinical applicability, three representative patients were analyzed using SHAP force plots (Fig. 6A-C), illustrating the individual-level contribution of each feature to recurrence risk: Depicts the SHAP summary plot, ranking risk factors according to their mean absolute Shapley values, with higher-ranked factors exerting greater influence on model predictions. Illustrates SHAP force plots that provide individualized explanations of prediction outcomes. Variables are arranged horizontally based on their absolute impact magnitude, with blue bars indicating features that reduce predicted risk (negative SHAP values) and red bars indicating features that increase predicted risk (positive SHAP values). Panels (A) through (C) correspond to three representative patients, respectively. Patient 1: Predicted recurrence probability of 0.04, mainly driven by hematuria, indicating a higher-risk profile despite the low absolute probability. Patient 2: Predicted recurrence probability of 0.63, with major contributing factors including hematuria, smoking history, abnormal urine cytology, and elevated NMP22, while lower NLR exerted a protective effect. Patient 3: Predicted recurrence probability of 0.03, predominantly influenced by tumor size and pathological grade, with NLR and T-stage lowering the risk. Although Patients 1 and 3 were classified as low-risk, their risk profiles still warrant close clinical monitoring given the influence of certain predictive factors. Discussion In this multicenter retrospective study, we systematically evaluated the impact of a broad range of clinicopathological and postoperative follow-up factors on tumor recurrence in patients with NMIBC, and developed a machine learning–based predictive model for recurrence risk. To fully explore the complex and nonlinear interactions between multidimensional clinical features and recurrence outcomes, we employed four mainstream machine learning algorithms—XGBoost, RF, SVM, and KNN—in the model development process. Compared with traditional statistical approaches, machine learning algorithms can more effectively capture high-dimensional feature interactions, nonlinear effects, and potential multicollinearity, thereby enhancing predictive performance and improving model generalizability21,22. Among the models tested, XGBoost demonstrated the best performance in terms of discriminative ability, calibration, and clinical utility, and was therefore selected as the final modeling approach. As a gradient-boosted decision tree algorithm, XGBoost offers strong feature selection capabilities, robust handling of missing data, and relatively high interpretability—making it particularly suitable for large, heterogeneous clinical datasets such as those used in this study. Consistent with previous studies23,24, our findings confirmed that tumor number, tumor size, T stage, and pathological grade are among the most significant predictors of NMIBC recurrence. These clinicopathological features reflect the underlying tumor burden and biological aggressiveness, which are crucial determinants of residual disease, recurrence, and disease progression. Tumor number is closely linked to recurrence risk, as multifocal tumors are often associated with the “field cancerization” phenomenon, whereby widespread genetic or epigenetic alterations throughout the urothelium predispose patients to new tumor formation even after complete resection of the primary lesion25–27. Moreover, multifocality may indicate enhanced tumor cell dissemination capacity or a disrupted local immune microenvironment, both of which increase the likelihood of postoperative recurrence. Indeed, multifocality is a core variable in classical recurrence risk scoring systems such as EORTC and CUETO, and is positively correlated with recurrence risk28–31. Tumor size is another critical marker of tumor burden. Larger tumors typically exhibit higher proliferative activity, increased angiogenesis, and a more complex tumor microenvironment—all of which facilitate deeper invasion and dissemination of tumor cells into the bladder mucosa, thereby increasing recurrence risk. Furthermore, larger tumors are associated with greater surgical complexity, particularly when tumor boundaries are indistinct or lesions are confluent. This increases the risk of incomplete resection or intraoperative tumor seeding, both of which can lead to residual microscopic disease that serves as a nidus for recurrence32. For patients with tumors ≥ 3 cm in diameter, careful pathological evaluation of surgical margins is essential, and repeat TURBT (re-TURBT) should be considered to minimize residual disease and reduce recurrence risk33,34. T stage reflects tumor invasion depth and is closely associated with both recurrence and progression risk35,36. Although NMIBC does not invade the muscularis propria, T1 tumors that penetrate the lamina propria demonstrate higher invasive potential and biological aggressiveness. Recurrence and progression rates are significantly higher in T1 disease compared with Ta, particularly in the presence of other high-risk features such as high grade or multifocality. T stage not only reflects pathological progression but may also indicate enhanced tumor-stroma interactions and microenvironmental remodeling, which further contribute to recurrence risk. Pathological grade is another independent predictor of recurrence. High-grade tumors are characterized by marked cellular atypia and high mitotic activity, indicating increased proliferative and invasive potential. These biological features contribute to a higher likelihood of residual disease and dissemination postoperatively. Prior studies37–40 have consistently reported higher recurrence and progression rates in high-grade NMIBC, and our findings support this conclusion. Furthermore, a synergistic effect between tumor grade and stage was observed, with high-grade T1 tumors demonstrating the greatest recurrence risk. Interestingly, we found that recurrent hematuria, positive urine cytology, and elevated NMP22 during follow-up were significantly associated with recurrence risk. Although these factors differ from classical pathological predictors, they provide valuable dynamic information on tumor biology and recurrence risk during postoperative surveillance. Recurrent hematuria is one of the most frequent and easily recognizable signs of bladder cancer recurrence41–43. It often indicates mucosal disruption caused by tumor regrowth or neovascular fragility within microlesions. In the absence of alternative explanations such as infection or urolithiasis, recurrent hematuria should raise strong suspicion of tumor recurrence. Similarly, urine cytology positivity and elevated NMP22, both noninvasive urinary biomarkers, can signal abnormal tumor cell shedding or metabolic activity before lesions become detectable by cystoscopy or imaging. Urine cytology reflects the shedding and differentiation status of tumor cells, while NMP22—a nuclear matrix protein—is associated with nuclear remodeling and active tumor proliferation. Both markers represent heightened tumor cell activity and are thus strongly correlated with recurrence risk44–46. Our findings support their role as independent risk factors, aligning with previous studies. Combining these dynamic markers with static pathological variables enables a more comprehensive risk assessment: the former informs preoperative and early postoperative risk stratification, while the latter enhances surveillance and early intervention strategies. A novel finding of this study is the strong association between postoperative NLR and recurrence risk. NLR is a simple, readily available marker derived from peripheral blood counts and reflects the dynamic balance between systemic inflammation and immune response. While previous research47,48 has focused primarily on the prognostic significance of preoperative NLR, our results suggest that postoperative changes in NLR are also closely linked to recurrence dynamics. Elevated postoperative NLR reflects two pathophysiological processes: increased neutrophil levels, which promote tumor cell proliferation, angiogenesis, and metastasis through secretion of pro-tumorigenic factors (e.g., VEGF, MMP-9); and reduced lymphocyte counts, indicating compromised antitumor immunity and impaired immune surveillance49,50. Together, these processes create a pro-tumor inflammatory microenvironment conducive to recurrence and progression. Additionally, NLR elevation may reflect surgical trauma–induced stress responses, inflammation associated with microscopic residual disease, and perioperative immune remodeling. These findings suggest that postoperative NLR could serve as a surrogate biomarker linking host immune–inflammatory status with recurrence risk, and its integration into predictive models could further refine individualized surveillance and management strategies. By systematically incorporating clinical variables, laboratory data, and postoperative follow-up indicators into the recurrence prediction model, this study overcomes the limitations of previous research that focused on isolated clinical or imaging features. The inclusion of hematological and urinary biomarkers not only enhances the model’s biological interpretability but also provides new insights into the mechanisms underlying bladder cancer recurrence. Through a rigorous modeling and evaluation process—including calibration curves, decision curve analysis, and external validation—we demonstrated that our machine learning–based model is stable, reliable, and clinically applicable across multiple datasets. On the other hand, although ALP is conventionally associated with bone metastasis in advanced tumors, its role in predicting NMIBC recurrence may involve both local and systemic mechanisms. Elevated postoperative ALP levels could reflect instability in the bladder microenvironment, including epithelial stress, mild inflammation, or metabolic alterations, which may facilitate the survival and recurrence of residual tumor cells. Additionally, ALP may serve as a surrogate marker of systemic low-grade inflammation or metabolic dysregulation. Although the precise biological mechanisms remain unclear, postoperative ALP was included in our study and subsequently filtered out during feature selection in the machine learning model. As an easily obtainable, non-invasive biomarker, ALP could be integrated with other clinical and pathological features to identify patients at higher risk of NMIBC recurrence, and its role will be further explored in future studies. Nevertheless, several limitations should be acknowledged. First, despite the multicenter design, differences in patient populations and management practices across centers may limit the generalizability of the model. Second, certain laboratory variables (e.g., PCT, CRP, SAA, NLR, NMP22) may be influenced by factors such as infection, medication use, and timing of measurement. Future studies should incorporate longitudinal monitoring to improve predictive accuracy. Third, despite the use of SHAP to improve model interpretability, the inherent “black-box” nature of complex machine learning algorithms like XGBoost may still limit their clinical acceptance in certain settings51,52. Importantly, the present study did not incorporate several established determinants of recurrence risk and treatment stratification, including the EAU risk group classification, histological subtypes previously referred to as variants, grading system discrepancies across different classification eras (1973, 2004, and hybrid systems), and detailed documentation of guideline-based treatments received after diagnosis. In addition, constitutional risk factors for disease progression, such as smoking status, were not available for analysis. The absence of these clinically relevant variables may limit the comprehensiveness of the recurrence risk assessment. In future work, we plan to perform supplementary analyses focusing on time to progression (to MIBC and/or RC), which we also recognize as a limitation of the present study. Future research should therefore aim to integrate standardized risk stratification systems, pathological subtyping, treatment information, and lifestyle-related factors, and validate the model in larger, prospective multicenter cohorts to enhance both interpretability and clinical applicability. Another limitation of this study is the absence of a direct head-to-head comparison between our machine learning model and established clinical prediction tools such as the EORTC and CUETO scoring systems14–20. Owing to differences in required variables and underlying methodological frameworks, a fully equitable comparison within our dataset was not feasible. Future studies incorporating the complete variable sets necessary for these traditional models are warranted to enable formal comparative validation. We noted that although the model performance was primarily assessed using AUC along with calibration and decision curve analysis, the absence of additional metrics such as F1-score and Recall may limit the comprehensiveness of performance evaluation, particularly in the context of class imbalance. Conclusion This study systematically integrated clinical characteristics, laboratory biomarkers, and postoperative follow-up data to construct a machine learning–based predictive model for bladder cancer recurrence. We identified age, smoking history, tumor stage, tumor number, tumor size, pathological grade, NLR, urine cytology, hematuria, NMP22, and ALP as independent predictors of recurrence, providing an evidence-based foundation for postoperative surveillance and individualized intervention strategies. Our findings also offer new insights into the biological mechanisms of recurrence. Further large-scale, multicenter validation studies are warranted to confirm the robustness and clinical utility of the proposed model. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Acknowledgements We would like to express our sincere gratitude to all the doctors involved in this study for their time, dedication, and invaluable efforts. We also extend our heartfelt thanks to the patients for providing essential clinical data and for their cooperation during follow-up. Their contributions were crucial to the success of this research. Author contributions L.W. and J.Z. were responsible for the design and conceptualization of the study, as well as drafting and revising the manuscript. Y.L. and J.Z contributed to data collecting, statistical analysis, and result interpretation. Y.L.and Y.S contributed to validation. Y.H.and X.Z contributed to methodology. J.S. and N.F. supervised the project and revised the manuscript. C.C. were responsible for project administration, conceptualization, methodology, review and editing. All authors read and approved the final manuscript. Funding This study was supported by “Taihu Light” Science and Technology Innovation Project (Basic Research) of Wuxi (No. K20221021), Wuxi Municipal Health Commission Youth Science Fund (No. Q202138), General projects of Wuxi Medical Center, Nanjing Medical University (No. WMCG202357) and Nanjing Medical University Science and Technology Development Fund-General Project (No. NMUB20220173), Major Scientific Research Projects of Wuxi City (NO. Z202325). Data availability Data is provided within the manuscript or supplementary information files. If original research data is needed, please contact the corresponding author via email. Declarations Competing interests The authors declare no competing interests. Ethical approval The studies involving human participants were reviewed and approved by the Ethics Committees of Wuxi People’s Hospital, Wuxi Second People’s Hospital, and Tengzhou Central People’s Hospital (Approval No. KY23026). As this is a retrospective study, and in accordance with local regulations, written informed consent from patients or their guardians was waived. All methods were performed in accordance with relevant guidelines and regulations. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Lanyu Wang, Ju Zhang and Yuan Liu contributed equally to this work. Contributor Information Ninghan Feng, Email: n.feng@jiangnan.edu.cn. Jianfeng Shao, Email: shaojianfenguro@163.com. Chunyang Chen, Email: cyc1991@njmu.edu.cn. References Associated Data Supplementary Materials Supplementary Material 1 Data Availability Statement Data is provided within the manuscript or supplementary information files. If original research data is needed, please contact the corresponding author via email.