An XGBoost machine learning model accurately predicted postoperative heart failure in elderly patients, achieving an AUC of 0.92 in the external validation cohort and outperforming traditional logistic regression.
Cohort (n=1,562)
Yes
Can machine learning models accurately predict postoperative heart failure in elderly surgical patients?
An XGBoost machine learning model incorporating inflammatory markers, metabolic comorbidities, and perioperative tachycardia accurately predicts postoperative heart failure in elderly surgical patients.
Absolute Event Rate: 0.92% vs 0.862%
BackgroundPostoperative heart failure (HF) represents a prevalent and serious complication among elderly surgical patients, markedly increasing perioperative morbidity, prolonging hospitalization, and elevating mortality risk. Early identification of high-risk individuals is therefore of substantial clinical importance for optimizing perioperative management. Conventional statistical models are inherently limited in capturing complex, nonlinear interactions among variables, whereas machine learning (ML) approaches offer distinct advantages in predictive performance and individualized risk stratification.MethodsIn this retrospective multicenter study, 1,562 elderly patients were consecutively enrolled from six hospitals, comprising 757 individuals in the internal cohort and 805 in the external validation cohort. Independent risk factors for postoperative HF were identified through univariate and multivariate logistic regression analyses. Five machine learning algorithms—extreme gradient boosting (XGBoost), random forest (RF), support vector machine (SVM), k-nearest neighbours (KNN), and multilayer perceptron (MLP)—were applied to rank feature importance. Variables consistently identified by both statistical and machine learning approaches were subsequently integrated into model development. The generalizability of the internal model was assessed using tenfold cross-validation. Model performance was comprehensively evaluated using receiver operating characteristic (ROC) curves, area under the curve (AUC), calibration plots, decision curve analysis (DCA), learning curves, Kolmogorov–Smirnov (KS) statistics, and confusion matrices. Model interpretability was further interrogated using SHapley Additive exPlanations (SHAP).ResultsPostoperative HF occurred in 66 patients (8.72%) within the internal cohort. Multivariate analysis and ML-based feature selection consistently identified sex, body mass index (BMI), diabetes mellitus, hypertension, hyperlipidaemia, history of malignancy, intraoperative tachycardia, and postoperative inflammatory markers (neutrophil-to-lymphocyte ratio (NLR) and C-reactive protein (CRP)) as key predictors. Among the models, XGBoost demonstrated superior performance, achieving an AUC of 0.979 in the training set, 0.937 in the internal validation set, and 0.92 in the external validation cohort. Tenfold cross-validation further confirmed robust generalizability (AUC = 0.933; accuracy = 0.908). SHAP analysis indicated that postoperative NLR and CRP made substantial contributions to model predictions, while individual-level SHAP visualizations further delineated the specific contributions of each variable to patient-level risk estimation.ConclusionWe developed and externally validated a machine learning–based predictive model for postoperative HF in elderly patients. The XGBoost model exhibited excellent discrimination, robust calibration, and promising clinical utility. SHAP-based interpretability analyses highlighted the pivotal contributions of inflammatory markers, metabolic comorbidities, and perioperative tachycardia, providing a reliable tool for individualized perioperative risk assessment in the elderly population.
Du et al. (2026) conducted a cohort in Postoperative heart failure (n=1,562). XGBoost machine learning model vs. Logistic regression model was evaluated on Area under the curve (AUC) for predicting postoperative heart failure in the external validation cohort. An XGBoost machine learning model accurately predicted postoperative heart failure in elderly patients, achieving an AUC of 0.92 in the external validation cohort and outperforming traditional logistic regression.