Development and external validation of an explainable machine learning model using routine perioperative clinical variables for postoperative pulmonary complication risk stratification after hepatectomy for primary liver cancer
Year: 2026
Type: article
Study design: Observational Study
Abstract: Background: Postoperative pulmonary complications (PPCs) are common after hepatectomy and are associated with delayed recovery, prolonged hospitalization, and increased healthcare burden in patients with primary liver cancer (PLC). Existing PPC risk assessment approaches are mainly derived from general surgical populations and may not adequately incorporate hepatectomy-specific perioperative factors, including surgical complexity and intraoperative characteristics. This study aimed to develop and externally validate an explainable machine-learning prediction model for postoperative PPC risk stratification after hepatectomy in patients with PLC. Methods: This retrospective prediction-model development and validation study included 906 consecutive adult patients with pathologically confirmed PLC who underwent elective hepatectomy at a tertiary hospital in China. Patients with preoperative pulmonary infection, emergency surgery, non-resection procedures, severe preoperative organ failure, concomitant malignancy, or incomplete key clinical data were excluded. The development cohort was randomly divided into training (n=635) and internal testing (n=271) cohorts. An independent external validation cohort included 388 patients from another hospital. Candidate predictors were obtained from routine perioperative electronic medical records (EMRs), including demographic characteristics, comorbidities, laboratory parameters, tumor-related characteristics, and intraoperative variables. Missing predictors were handled using multiple imputation by chained equations (MICE). PPCs were defined according to the European Perioperative Clinical Outcome (EPCO) criteria and assessed within 30 days after surgery. Feature selection was performed using least absolute shrinkage and selection operator (LASSO) regression and random forest recursive feature elimination (RF-RFE). Eight machine-learning algorithms were developed using training-cohort cross-validation and evaluated based on discrimination, precision-recall performance, calibration, classification performance, and decision-curve analysis (DCA). Model interpretability was assessed using Shapley Additive Explanations (SHAP). Results: Among 906 patients in the development cohort, 131 (14.5%) developed PPCs, while 66 of 388 patients (17.0%) developed PPCs in the external validation cohort. Among the evaluated algorithms, the Naïve Bayes (NB) model demonstrated the most balanced performance. In the internal testing cohort, NB achieved an area under the curve (AUC) of 0.851 [95% confidence interval (CI): 0.767-0.934], an area under the precision-recall curve (PR-AUC) of 0.668 (95% CI: 0.485-0.798), sensitivity of 71.1%, specificity of 90.6%, and Brier score of 0.075. In the external validation cohort, NB maintained consistent performance with an AUC of 0.861 (95% CI: 0.810-0.911), a PR-AUC of 0.650 (95% CI: 0.516-0.759), sensitivity of 63.6%, specificity of 86.0%, and Brier score of 0.094. SHAP analysis identified age, intraoperative blood transfusion, and portal triad clamping duration as major contributors to individualized PPC risk predictions. Conclusions: An explainable NB-based machine-learning model was developed and externally evaluated for postoperative PPC risk stratification after hepatectomy in patients with PLC. The model demonstrated consistent discrimination, precision-recall performance, calibration, and potential clinical utility and may assist in identifying patients who could benefit from enhanced postoperative respiratory surveillance. Further prospective multicenter validation and clinical impact studies are required before broader clinical translation.
Language: English
Subfield: Cardiology and Cardiovascular Medicine
Field: Medicine
Domain: Health Sciences
Open Access status: diamond
OpenAlex ID: W7224088710
