Development and validation of an interpretable machine learning model for predicting early acute kidney injury and altered consciousness in cardiac surgery patients admitted to the intensive care unit: a retrospective study
Abstract
Acute kidney injury (AKI) and altered consciousness are common and serious complications following cardiac surgery, both associated with increased morbidity and mortality in the intensive care unit (ICU). Early prediction of these complications is essential for timely intervention. We aimed to develop and validate an interpretable machine learning model for predicting early AKI and altered consciousness risk in this population. We retrospectively extracted data from the MIMIC-IV database. Adult patients who underwent cardiac surgery within 24 h before ICU admission were included. The primary outcome was early AKI defined by KDIGO criteria within 48 h after ICU admission. The secondary outcome was altered consciousness within 24 h after ICU admission, defined as a Glasgow Coma Scale (GCS) score ≤12. A comprehensive set of candidate variables was screened using four feature selection methods (LassoCV, mRMR, mutual information, and F -test) with a voting strategy. Eight machine learning models were developed and compared. SHapley Additive exPlanations (SHAP) values were used to interpret the best-performing model. External validation was performed using data from cardiac surgery patients at Wuxi No.2 People’s Hospital between 1 January 2020 and 31 December 2025. A total of 5,288 patients were included, with an AKI incidence of 76.2% (4,031/5,288) and an altered consciousness incidence of 22.8% (1,206/5,288). For the primary outcome of AKI, the XGBoost model achieved a training AUC of 0.787 (95% CI: 0.770–0.804) and an internal test AUC of 0.659 (95% CI: 0.629–0.688). For the secondary outcome of altered consciousness, the XGBoost model achieved an internal test AUC of 0.951 (95% CI: 0.936–0.963). Calibration curve and decision curve analysis confirmed good calibration and clinical utility for both models. SHAP analysis identified SpO 2 , age, APSIII score, creatinine, and white blood cell count as the top 5 most important predictors for AKI. External validation was performed in an independent cohort of 395 cardiac surgery ICU patients from Wuxi No.2 People’s Hospital, in whom the incidence of AKI and altered consciousness was 28.1% and 67.3%, respectively. The models retained acceptable discrimination in this external cohort (AKI: AUC 0.764, 95% CI: 0.711–0.818; altered consciousness: AUC 0.679, 95% CI: 0.615–0.737). We developed interpretable XGBoost-based prediction models for both early AKI and altered consciousness risk in cardiac surgery patients admitted to the ICU. The models exhibited excellent discrimination, calibration, and clinical utility, which may facilitate early identification of high-risk patients and guide personalized interventions.