In this proof-of-concept study, we demonstrated that machine learning models can predict a range of critical postoperative outcomes in radical prostatectomy using routinely collected preoperative data. This work shows that AI can leverage standard clinical parameters for enhanced preoperative planning. While many of the identified predictive patterns serve as a quantitative validation of established clinical knowledge, the use of SHAP for model explanation allowed us to deconstruct the “black box” of these models and to disentangle the predictive influence of surgical-procedural factors from patient- and tumor-specific characteristics. Given the mixed cohort structure, including known differences between the RARP and ORP groups (see Supplementary Data 1), some dominant predictors, particularly surgical approach, likely reflect established between-group differences captured by the models rather than entirely novel relationships. Accordingly, the present findings should be interpreted primarily as confirmatory and hypothesis-generating within this proof-of-concept framework. Furthermore, the observed baseline differences between the RARP and ORP groups, including patient age and preoperative ISUP grade distribution, mean that surgical approach also serves as a proxy for patient characteristics in the pooled analysis, further complicating the direct causal interpretation of SHAP-derived feature importances. The stratified subgroup analyses presented in the Supplementary Material partially address this limitation by allowing feature importance patterns to be assessed within more homogeneous subpopulations.
Discussion of clinical findings and implications
A key strength of the SHAP analysis is its ability to reveal the underlying structure of the predictive tasks. Our results clearly stratified the target outcomes into two distinct categories: those driven by standardized clinical protocols and those determined by intrinsic patient or tumor biology. First, we identified outcomes that are primarily determined by procedural protocols rather than intrinsic patient risk. The prediction of Catheter Dwell Time was overwhelmingly dominated by the surgical approach (RARP vs. open), which accounted for over 78% of the predictive importance. We acknowledge that this finding is largely structural: surgical approach is itself an input feature, and these outcomes are governed by approach-specific protocols. This pattern therefore reflects known protocol-driven differences between RARP and ORP rather than novel patient-specific predictors. To separate structural from patient-specific signals, we conducted stratified SHAP analyses within the RARP and ORP subgroups separately; the results are presented in the Supplementary Material and reveal more nuanced within-arm predictive patterns, particularly within the larger RARP subgroup. Despite the combined predictive importance of over 87% for nerve-sparing decisions and the RARP approach in predicting the length of hospital stay, this strong association should be interpreted as a statistical correlation reflecting standardized clinical protocols within our dataset, rather than a direct causal link. This insight opens an avenue for data-driven optimization and standardization of these clinical pathways. The prediction of Intraoperative Blood Loss was also primarily driven by the RARP approach, a finding consistent with existing literature, which our analysis now quantifies in relation to other factors. Second, our results highlight a clear opportunity for preoperative patient optimization through the identification of modifiable risk factors. The models for predicting postoperative hematological changes (postop. Hb, Hct, and Hb Drop) consistently identified the preoperative Hb value as a highly influential factor. SHAP analysis identified preoperative hemoglobin as a stronger predictive feature for postoperative Hb Drop than non-modifiable factors such as age within this dataset. This association is consistent with the clinical plausibility of preoperative anemia as a risk factor, and future prospective studies should evaluate whether targeted preoperative optimization of hemoglobin levels translates into improved postoperative hematological outcomes. The observed association between preoperative hemoglobin and postoperative hematological outcomes suggests that ML-based risk stratification could potentially complement Patient Blood Management programs; however, prospective validation in independent cohorts will be required before clinical integration can be considered. Third, our approach both validated established clinical knowledge and uncovered novel associations. The prediction of postoperative ISUP Grade was dominated by preoperative ISUP grade and biopsy Gleason score. We explicitly acknowledge that this finding largely reflects the well-established and expected correlation between pre- and postoperative pathological grading, preoperative and postoperative ISUP are by definition highly correlated variables, rather than a novel clinical insight. This result should therefore be interpreted primarily as a methodological validation of the model’s internal consistency, confirming that the framework correctly identifies known relationships, rather than as an independently informative predictive finding. While preoperative ISUP grade was confirmed as the single most important predictor (18.5% importance), our model’s strong overall performance (R2 = 0.37) demonstrates that this prediction is substantially ‘boosted’ by the inclusion of other parameters. Notably, the planned surgical approach regarding NS was identified as a predictor of almost equal importance (17.3%) to the preoperative ISUP grade itself. Crucially, the high importance of the nerve-sparing decision must be interpreted strictly as a correlational finding. It does not imply that the surgical act of nerve sparing influences the tumor biology. Instead, the model leverages the surgeon’s implicit risk stratification embedded in the surgical plan, using this decision as a powerful proxy variable for a favorable underlying disease status. The preoperative decision to perform nerve sparing is itself based on a complex assessment of oncological risk, integrating factors like tumor stage, biopsy results, and MRI findings. By learning this association, the model leverages the surgeon’s implicit risk stratification embedded in the surgical plan. This highlights the power of a multiparametric AI model to integrate not only direct tumor characteristics but also the expert clinical decisions derived from them for an improved prediction. The prediction of Prostate Weight was most dependent on the preoperative prostate volume. Furthermore, our analysis consistently showed a low SHAP value for a suspicious digital rectal examination (DRE) across multiple outcomes, providing quantitative support for its de-emphasis in recent clinical guidelines36,37. The prediction of the Harvested Lymph Node Count perfectly illustrated how our models learned to mirror clinical reality, identifying it as a function of both the surgical approach (RARP) and the established oncological risk (D’Amico Score, PSA). Finally, the SHAP analysis provided distinct insights into the prediction of two related intraoperative events: the decision to perform frozen section (FS Decision) and the combined utilization/pathological result category (FS Result). For the FS decision, the model’s prediction was driven by a multifactorial assessment, primarily influenced by the surgical plan (NS, RARP) and the patient’s baseline status (preop. Hb), rather than a single oncological risk factor. This remarkable insight suggests that the complex clinical judgment leading to the request for a frozen section is largely captured by these preoperative parameters. For the composite FS Result endpoint, the predictive pattern was similar, with nerve-sparing decisions and the RARP approach being the most influential features. This highlights that the same factors that drive the decision to perform a frozen section are also the strongest predictors of this composite utilization/result category. This could have profound implications for clinical practice. The observed predictive associations for the composite FS Result endpoint suggest that preoperative features may carry informative signal regarding frozen-section utilization and, where performed, the pathological result. Future prospective studies should evaluate whether such preoperative risk stratification could inform surgical planning, pending external validation and formal decision-analytic evaluation. The potential harms of misclassification, including patients being denied nerve sparing or being directed toward alternative therapies on the basis of an incorrect prediction, must be carefully considered in any future clinical translation.
Discussion of the method
This study demonstrates that even with a relatively small dataset for machine learning standards (n = 326), robust and clinically plausible predictive models can be developed. Our heatmap analysis (Fig. 2) showed that the implemented machine learning models provided a significant performance uplift compared to heuristic baseline predictions, indicating that the models captured informative signal within the dataset. However, these baseline comparisons represent only a minimal reference point and should not be interpreted as proof of superiority over conventional statistical approaches. In a cohort with pronounced group-level structure, part of this performance gain may reflect the capture of obvious between-group differences rather than the discovery of novel clinically meaningful predictors. To further contextualise the added value of the ML approach, we additionally compared model performance against a clinically obvious single-predictor baseline (preoperative haemoglobin predicting postoperative haemoglobin) and a multivariable Ridge regression model using all available preoperative features. The single-predictor baseline achieved R2 values of approximately 26% for postoperative haemoglobin, substantially below the ML models (R2 up to 57.5%), confirming that the multivariate ML framework provides meaningful incremental gain beyond the single most clinically plausible predictor. The multivariable Ridge regression baseline performed comparably to the ML models for several outcomes, highlighting that much of the predictive signal in this dataset is also accessible to simpler linear models. This finding is consistent with the proof-of-concept nature of the present study and does not diminish the value of the explainability framework, which provides interpretable feature importance rankings irrespective of the marginal performance gain over linear baselines. A noteworthy finding from our comparative analysis was the performance pattern on the classification task (Fig. 2B). All four models demonstrated robust and consistent performance for FS Decision prediction, with AUC values ranging from 84.4% to 89.2% and low variability across outer folds, indicating a stable and learnable signal in the preoperative feature set. The close agreement between model architectures suggests that the predictive signal for this outcome is strong and clearly structured, rather than dependent on complex non-linear relationships accessible only to more flexible models. Beyond predictive performance, the core methodological strength of this work lies in the application of SHAP. This technique answers a critical clinical question: what is the quantitative influence of a single input parameter on the prediction, while systematically accounting for all other parameters? By ranking features based on their SHAP values, we moved beyond mere prediction to an interpretable, explainable AI (XAI) framework. This approach unlocks several innovative avenues for future research. First, our observation that for many outcomes, the predictive feature space is sparse, suggests the potential for SHAP-based compression of the preoperative parameter space38. In the present study, SHAP was applied exclusively as a post hoc interpretability framework, with all models trained on the full preoperative feature set without prior SHAP-based filtering. Future work could explore whether parsimonious models trained on SHAP-selected feature subsets retain comparable predictive performance, which would further support the clinical utility of the explainability framework. Second, the additive nature of Shapley values could be leveraged to create a novel, SHAP-based score for intervention risk. By summing the individual SHAP values of a patient’s risk factors, a highly personalized and transparent risk estimate could be generated, a concept that warrants prospective evaluation.
Discussion of related work
Our study is situated at the intersection of urological surgery and computational medicine, contributing to the rapidly evolving field of artificial intelligence in prostate cancer management. The application of AI in this domain has seen exponential growth, as evidenced by recent bibliometric analyses and systematic reviews17,18,19. To date, research has predominantly focused on two major areas: the automated diagnosis and grading of prostate cancer from histopathological whole-slide images, exemplified by landmark studies like the PANDA challenge13, and the detection of tumors on medical imaging, particularly MRI39,40. These studies have powerfully demonstrated the potential of AI in diagnostic tasks. Beyond diagnostic tasks, AI and radiomics-based approaches have also been applied to predict oncological outcomes and treatment response in prostate cancer41,42, providing important context for the present study’s focus on preoperative prediction of surgical outcomes. However, the prediction of a broad spectrum of postoperative clinical and procedural outcomes based on routine preoperative data remains less explored. A key contribution of our work is the application of an explainable AI (XAI) framework to move beyond simple prediction. While some studies have successfully developed predictive models for individual outcomes like length of stay43 or urethrovesical anastomotic leakage44, these models are often treated as “black boxes,” limiting their clinical translatability. To our knowledge, our study is the first to apply a systematic, explainable framework like SHAP27 across a comprehensive suite of twelve distinct postoperative endpoints in radical prostatectomy. By doing so, we not only predict an outcome but also provide a quantitative ranking of the factors driving that prediction, a critical step towards building trust and facilitating clinical adoption. Our findings regarding the impact of the surgical approach are well-aligned with, and add a new dimension to, the extensive body of literature comparing RARP and ORP. Our SHAP analysis identified RARP as a dominant predictor for reduced intraoperative blood loss, shorter catheter dwell times, and shorter hospital stays. This is consistent with large-scale meta-analyses and randomized controlled trials that have reported favorable perioperative outcomes for RARP5,45,46. Within this cohort, our analysis provides a quantification of the relative predictive importance of surgical approach compared to other preoperative features. For example, surgical method accounted for nearly half of the predictive importance for blood loss and over 78% for catheter dwell time within our dataset, outweighing all patient-specific factors combined in these models. These associations are consistent with the existing literature but should not be interpreted as causal effect estimates or as generalizable beyond the present cohort. Furthermore, our results on hematological parameters contribute to the important discussion on perioperative blood management47. The SHAP analysis identified preoperative hemoglobin as a key modifiable risk factor for postoperative Hb drop. This highlights the clinical importance of preoperative patient optimization, a field that has been shown to improve outcomes such as urinary continence48. While studies like Han et al. have investigated the oncological safety of perioperative blood transfusions, finding no influence on 5-year biochemical recurrence49, our work focuses on the preceding step: By using explainable AI to preoperatively identify patients at high risk for a significant hemoglobin drop—a risk influenced by both surgical approach and patient baseline status (see Supplementary Data 1 for descriptive analysis)—our approach provides a tool for targeted optimization strategies within a modern patient blood management framework, aiming to improve postoperative recovery and minimize hematological morbidity altogether.
Limitations
Our study has several limitations. First, as a single-center study, our models are inherently trained on our institution’s specific patient population and clinical protocols. Furthermore, no calibration analysis or decision curve analysis was performed for the classification outcomes. Calibration plots and Brier scores would be required before any classification model could be considered for clinical decision support; these analyses are deferred to future prospective validation studies with larger, independently collected cohorts. The generalizability of these models requires external validation in multi-center cohorts. Second, the retrospective design carries a potential risk of unmeasured confounding variables. Third, while our sample size was sufficient for this proof-of-concept study, larger datasets could yield even more robust and nuanced models. A key methodological consideration is our treatment of nerve-sparing decisions as a preoperative input feature. At our institution, this decision is made preoperatively based on tumor characteristics, erectile function, and patient preference; intraoperative deviation from the planned approach represents the clinical exception. Although the final decision to perform nerve sparing is made intraoperatively, it is largely based on a preoperative plan. However, this approach does not account for intraoperative changes to that plan. Consequently, the proportion of cases in which the preoperatively planned nerve-sparing approach was modified intraoperatively cannot be reported; any such cases would introduce a degree of label leakage from the intraoperative to the preoperative domain, which should be considered when interpreting the nerve-sparing-related SHAP findings. Future studies could address this by modeling the nerve-sparing decision itself as a primary outcome, which would allow for the identification of its key preoperative drivers. Finally, it must be emphasized that the explainability framework used in this study reflects associations learned by the predictive models and their contribution to model performance within the studied dataset, rather than direct decompositions of individual clinical predictions or independent biological determinants of outcome. These associations represent correlations and should not be interpreted as causal clinical effects. In addition, our SHAP analysis relied on an approximation framework in which excluded features within sampled coalitions were assigned a fixed placeholder value. While computationally practical, this approach may generate feature combinations outside the empirical training distribution; therefore, the resulting attribution values should be interpreted as approximate explanations of model behavior rather than physiologically realistic simulations or causal clinical effect estimates. We also frankly report that some outcomes, particularly surgical complications and long-term functional follow-up, were not well-predicted, likely due to the low frequency of events (class imbalance) in our cohort. Similarly, the prediction of ordinal outcomes, such as the full 5-point Clavien-Dindo score, proved challenging. Although both regression (with subsequent rounding) and classification approaches were explored, the models did not achieve performance significantly better than baseline predictors, likely due to the sparse population of instances in the higher-grade categories. Therefore, these outcomes were not included in the main analysis. Given the conceptual challenge of using a physician’s decision as an input feature, a sensitivity analysis excluding all nerve-sparing-related input features was conducted; the results are presented in the Supplementary Material. A further limitation concerns the substantial baseline heterogeneity between the RARP and ORP groups, including differences in sample size (224 vs. 102), patient age, preoperative ISUP grade distribution, and surgical margin rates. These likely reflect systematic patient selection patterns, and the SHAP-derived feature importances in the pooled analysis may therefore partly capture selection differences rather than independent procedure-driven signals. Propensity score matching was considered but deemed not feasible given the limited total sample size. Formal statistical model comparison tests (e.g., DeLong test for AUC; paired Wilcoxon test across folds for R2) were not performed, and no formal multiplicity correction was applied across the 48 model-outcome combinations evaluated; model performance is therefore compared descriptively using mean ± SD across outer folds. Future studies with larger sample sizes should consider formal model comparison frameworks. The stratified subgroup analyses presented in the Supplementary Material represent a pragmatic alternative; future studies in larger, prospectively collected cohorts will be required to fully disentangle procedural effects from selection bias.

