Clinical validation · Research feature

Early prediction of in-hospital acute brain injury following cardiac arrest using machine learning: development and external validation

A machine learning model using early clinical data predicts brain injury in cardiac arrest patients with strong sensitivity and specificity.

Adapted from research by Niu Y, Xu T, Fan J and colleagues.

Journal publication · 2026-09-18 · Attribution & reuse
In this article
Editorial illustration of a sheet of visual frames.

Editor’s introduction

Key predictors identified through SHAP analysis included age, hemoglobin levels, blood pressure measures, temperature, and laboratory values such as white blood cell count and blood urea nitrogen. These variables were found to influence model predictions, though the results describe model behavior rather than establishing causal relationships. The model demonstrates strong performance in distinguishing patients at risk of brain injury, offering a transparent and interpretable tool for early risk stratification in ICU settings.

Introduction

Cardiac arrest (CA) remains a major global health burden, with substantial variation in incidence and survival across healthcare systems. Among patients who achieve return of spontaneous circulation, global cerebral ischemia followed by reperfusion can trigger a complex cascade involving excitotoxicity, oxidative stress, neuroinflammation, microvascular dysfunction, and neuronal death. Post-cardiac arrest brain injury is a major cause of prolonged coma, in-hospital mortality, and long-term disability among resuscitated patients. Early identification of patients at increased risk of brain injury is therefore important for neurological monitoring, diagnostic evaluation, and individualized post-resuscitation management.

Clinical assessment of post-cardiac arrest brain injury commonly integrates neurological examination, electroencephalography (EEG), neuroimaging, somatosensory evoked potentials, and circulating biomarkers. However, brain injury may evolve dynamically after resuscitation, and its early manifestations can be affected by sedation, temperature management, metabolic abnormalities, and hemodynamic instability. In addition, comprehensive multimodal assessment often requires specialized equipment, repeated examinations, and clinical expertise that may not be uniformly available across institutions. Routinely collected electronic health record data, including demographic characteristics, vital signs, laboratory measurements, treatment information, and severity-of-illness scores-may therefore provide a complementary and readily accessible source of information for early risk assessment in ICU patients after cardiac arrest.

Machine-learning methods have increasingly been investigated for post-cardiac arrest neurological assessment. Topjian et al. combined early EEG features with clinical variables in pediatric patients after cardiac arrest and reported areas under the receiver operating characteristic curve (AUROCs) of 0.90 for unfavorable neurobehavioral outcome and 0.83 for mortality. Kawai et al. subsequently developed an explainable transfer-learning model using head computed tomography images obtained within 3 h after resuscitation and reported a precision-recall area under the curve (PR-AUC) of 0.73 for predicting poor neurological outcome at 1 month. A systematic review further showed that EEG-based machine-learning models achieved AUROCs ranging from 0.70 to 0.97, although the included studies varied considerably in model design, EEG features, and outcome definitions. Machine-learning models based on routinely collected clinical data have also been developed to predict in-hospital mortality among ICU patients after cardiac arrest. More recently, Rawshani et al. developed an interpretable XGBoost model using information available at hospital admission from 55,615 patients with out-of-hospital cardiac arrest. Their model achieved an AUROC of 0.964 for predicting neurological outcome and demonstrated good calibration in an independent test set. Despite these advances, important gaps remain. First, models based on EEG or neuroimaging may have limited accessibility. Second, models using routine ICU data have primarily predicted mortality or functional neurological outcomes rather than in-hospital acute brain injury. Third, differences in predictor windows and outcome definitions, together with limited external validation and interpretability, may restrict model generalizability and clinical application. Therefore, an interpretable, externally validated model using routinely available ICU data is needed to predict subsequent in-hospital acute brain injury.

Accordingly, this study aimed to develop and externally validate a machine-learning model using routinely available clinical data from the first 24 h of ICU admission to predict subsequent in-hospital acute brain injury in patients with IHCA. Patients with acute brain injury documented within the 24-h predictor window were excluded, and outcomes were assessed thereafter until hospital discharge. Six machine-learning algorithms were compared, and the selected model was evaluated in an independent hospital cohort. SHapley Additive exPlanations (SHAP) were used to provide global and patient-level interpretations of model predictions without implying causality.

Data description

This retrospective cohort study primarily used data from the Medical Information Mart for Intensive Care IV database (MIMIC-IV, version 2.2). MIMIC-IV contains deidentified clinical data from patients admitted to the intensive care unit (ICU) or emergency department at Beth Israel Deaconess Medical Center (BIDMC), including demographic characteristics, laboratory results, and bedside monitoring parameters. One author (Xu; certification ID: 12556712) obtained authorized access to the database after completing the required training. As MIMIC-IV contains deidentified data, individual informed consent was not required for the present analysis. All data were accessed and analyzed in accordance with the applicable data-use requirements.

An independent external validation cohort was retrospectively collected from Tianjin Medical University General Hospital and comprised 179 critically ill patients admitted between January 2022 and March 2024. The study protocol was reviewed and approved by the Ethics Committee of Tianjin Medical University General Hospital (IRB2021-YX-240-01). Given the retrospective nature of the study, the requirement for informed consent was waived by the Ethics Committee.

Patients

Data were extracted from MIMIC-IV using Structured Query Language queries executed in PostgreSQL version 15.3 (PostgreSQL Global Development Group). Patients with in-hospital cardiac arrest were identified using the relevant International Classification of Diseases, Ninth and Tenth Revisions codes: 427.5, I46, I46.2, I46.8, and I46.9. For patients with multiple hospital or ICU admissions, only the earliest eligible admission was included.

The exclusion criteria were as follows: (1) age younger than 18 years; (2) a documented history of cardiac arrest before the index event; (3) pre-existing neurological disorders; (4) traumatic brain injury; (5) an ICU length of stay shorter than 24 h; (6) missing essential clinical information; and (7) acute brain injury documented before or during the first 24 h after ICU admission. The final prediction cohort therefore included only patients who remained free of documented acute brain injury throughout the 24-h predictor window.

Data extract

In addition to clinical outcome variables (patient mortality, discharge status, and duration of ICU stay), the following variables were also extracted: demographic information (age, gender, race, height, weight, marital status), comorbidities (Coronary Heart Disease, Heart Failure, Acute Renal Failure, Hypertension, Diabetes Mellitus, Chronic Kidney Disease), and critical vital signs recorded on the initial day following admission to the Intensive Care Unit (ICU) [weight, heart rate (HR), Non-Invasive Systolic Blood Pressure (NISBP), Arterial Systolic Pressure (ASP), Arterial Diastolic Pressure (ADP), Non-Invasive Diastolic Pressure (NIDP), Respiration Rate (RR), Oxygen Saturation (SpO2)]. Additionally, laboratory test results upon ICU admission were included, comprising White Blood Cell count (WBC), Hemoglobin, Platelet count (PLT), Creatinine (Cr), Glucose, Hematocrit, Sodium (Na+), Potassium (K+), Chloride (Cl-), pH, Partial Pressure of Carbon Dioxide (pCO2), Partial Pressure of Oxygen (pO2), Blood Gas Lactic Acid (BGLA), Total Carbon Dioxide Content (TCO2), Anion Gap (AG). The evaluation also incorporated scoring systems utilized on the first day post-ICU admission, including the Sequential Organ Failure Assessment (SOFA), Acute Physiology Score (APS) II, Systemic Inflammatory Response Syndrome (SIRS), Simplified Acute Physiology Score II (SAPS II), and Oxford Acute Severity of Illness Score (OASIS II), alongside the Glasgow Coma Scale (GCS) assessments [Eye Opening, Motor Response, Verbal Response, Total (GCS Total)]. Treatment modalities such as Renal Replacement Therapy, Mechanical Ventilation, administration of Vasoactive Drugs, Antibiotics, and β-Blockers were also documented.

All predictor variables, including vital signs, laboratory results, clinical scores, and treatment variables, were restricted to records obtained during the first 24 h after ICU admission. For variables with repeated measurements, only records with a time offset from 0 to less than 1,440 min relative to ICU admission were included. No clinical information documented after the first 24 h was used as a predictor.

Baseline characteristics

Patients with PCABI were younger than those without PCABI, with a median age of 61 years versus 70 years, respectively (p < 0.001). The proportion of male patients was also higher in the PCABI group than in the non-PCABI group (65.2% vs. 58.1%, p = 0.038). Regarding vital signs, patients with PCABI had higher median non-invasive systolic blood pressure (125.50 vs. 119.00 mmHg, p = 0.004), non-invasive diastolic blood pressure (75.00 vs. 67.00 mmHg, p < 0.001), and non-invasive mean arterial pressure (88.00 vs. 79.00 mmHg, p < 0.001). Respiratory rate was also slightly higher in the PCABI group than in the non-PCABI group (20 vs. 19 breaths/min, p = 0.006).

For laboratory variables, patients with PCABI had higher white blood cell counts (14.65 vs. 11.40 × 109/L, p < 0.001), red blood cell counts (4.13 ± 0.91 vs. 3.80 ± 0.84 × 1012/L, p < 0.001), and hemoglobin levels (12.44 ± 2.79 vs. 11.36 ± 2.45 g/dL, p < 0.001). Sodium, potassium, anion gap, and lactate also differed significantly between the two groups. In addition, patients with PCABI had higher SOFA, APACHE III, SAPS II, and OASIS scores than those without PCABI, indicating greater overall illness severity. Mechanical ventilation was more common in the PCABI group than in the non-PCABI group (98.0% vs. 86.7%, p < 0.001).

Model performance comparisons

In the internal test cohort, RF achieved the highest overall discriminative performance, with an AUC of 0.901, accuracy of 0.887, sensitivity of 0.800, specificity of 0.906, and F1 score of 0.714. LR also showed strong performance, with an AUC of 0.874 and accuracy of 0.873, indicating that the predictive signal was not limited to a single non-linear model. XGBoost, KNN, ANN, and SVM demonstrated moderate discrimination, with AUCs ranging from 0.752 to 0.832.

In the external validation cohort, RF again achieved the highest numerical AUC of 0.889, with accuracy of 0.888, sensitivity of 0.778, specificity of 0.908, and F1 score of 0.677. LR and XGBoost also maintained good external performance, with AUCs of 0.856 and 0.851, respectively. Compared with the internal test cohort, the external validation performance of RF was slightly lower but remained comparable, suggesting that the model retained reasonable generalizability across datasets.

Overall, RF showed the highest numerical performance in both internal and external validation cohorts. However, LR achieved comparable discrimination with greater interpretability. Therefore, RF was considered the best-performing model numerically, while LR served as an important interpretable benchmark for evaluating the robustness of the predictive associations.

Application of the model

SHAP analysis was applied to the retrained Random Forest model to quantify global and individual feature contributions. Before model development, clearly implausible physiological measurements were converted to missing values. Median imputation was fitted using the training data only. Because Random Forest does not require feature standardization, SHAP values were calculated using the same imputed, unstandardized clinical values used to train the model.

Higher OASIS values, elevated white blood cell counts, higher non-invasive diastolic pressure, and higher hemoglobin concentrations generally contributed toward higher model outputs. Temperature showed a nonlinear relationship with the model output. Older age and higher blood urea nitrogen values predominantly produced negative SHAP contributions in this cohort. Non-invasive systolic pressure had the smallest mean absolute contribution among the eight displayed features. These SHAP values describe the behavior of the fitted model and should not be interpreted as independent or causal effects.

Model performance evaluation

Previous studies have demonstrated the potential of machine-learning approaches for clinical outcome prediction. For instance, Park et al. developed a machine-learning model for predicting neurologically intact survival after out-of-hospital cardiac arrest, achieving an AUC of 0.926 with the best-performing voting classifier. Ambale-Venkatesh et al. demonstrated that random survival forests improved cardiovascular event prediction compared with established risk scores in the Multi-Ethnic Study of Atherosclerosis. Rajkomar et al. applied deep learning to large-scale electronic health record data and achieved AUROCs of 0.93–0.94 for in-hospital mortality prediction, outperforming traditional predictive models. Similarly, Cheng et al. compared logistic regression, support vector machine, and XGBoost for neurological outcome prediction after out-of-hospital cardiac arrest and found that XGBoost achieved the highest AUC of 0.956, with a sensitivity of 0.875 and specificity of 0.904.

In the present study, RF achieved the highest overall discrimination among the evaluated models in both the internal test and external validation cohorts. SHAP analysis was used to characterize global feature importance and patient-level contributions, thereby improving transparency regarding model behavior. However, discrimination and interpretability alone do not establish clinical usefulness. Although calibration and decision-curve analyses provide additional information on agreement between predicted and observed risks and potential net benefit, these findings require cautious interpretation because external validation was limited to a relatively small single-center cohort. Accordingly, the model should be regarded as an investigational risk-stratification approach rather than a tool ready for clinical decision-making. Prospective multicenter validation and evaluation of its effects on clinical decisions and patient outcomes are required before implementation.

Interpretation of influential features

SHAP analysis identified hemoglobin, non-invasive diastolic pressure, age, white blood cell count, OASIS, temperature, non-invasive systolic pressure, and blood urea nitrogen as influential features in the RF model. SHAP values quantify the contributions of individual features to model predictions rather than independent associations or causal effects. Their magnitude and direction may also reflect nonlinear relationships and interactions with other variables. The following interpretations therefore provide clinical context for model behavior but should not be regarded as evidence of biological mechanisms or therapeutic targets.

Non-invasive diastolic pressure also contributed to model predictions. Previous studies have reported associations between post-arrest diastolic pressure, systemic circulation, cerebral physiology, and neurological outcomes. However, blood-pressure contributions in the present model may have been influenced by cardiac function, vasopressor administration, baseline hypertension, measurement conditions, and cerebral autoregulation. The SHAP findings therefore do not demonstrate that either higher or lower diastolic pressure directly causes brain injury, nor do they identify an optimal treatment target.

Age contributed to the RF predictions, although its direction did not consistently follow the conventional association between older age and unfavorable post-cardiac-arrest outcomes. This pattern may reflect cohort selection, comorbidity profiles, competing risks, treatment differences, or interactions with other predictors. Previous studies also indicate that the mechanisms and prognostic characteristics of post-cardiac-arrest brain injury may differ between adult and pediatric populations. Therefore, the age-related SHAP pattern should not be interpreted as evidence that younger age independently increases the biological risk of brain injury.

White blood cell count was another influential feature. Leukocytosis following cardiac arrest may reflect systemic inflammation, infection, physiological stress, or overall illness severity. Elevated leukocyte counts have previously been associated with unfavorable outcomes after severe head injury. More directly, Dufner et al. examined leukocyte kinetics in patients resuscitated from cardiac arrest and found that leukocyte counts were affected by targeted temperature management. Among patients receiving targeted temperature management, lower leukocyte counts on day 3 were associated with better survival and neurological outcomes. Nevertheless, leukocyte measurements may be influenced by infection, temperature management, medication, and the timing of blood sampling. Therefore, the SHAP contribution of white blood cell count should be interpreted as a model-based signal of systemic physiological status rather than evidence of a direct inflammatory effect on the brain.

Conclusion and future directions

This study developed and externally validated machine-learning models using routinely collected data from the first 24 h of ICU admission to predict subsequent in-hospital acute brain injury after IHCA. The RF model achieved the best overall performance, while SHAP analysis improved model transparency by characterizing global and patient-level feature contributions. These findings support the potential of early ICU data for risk stratification but do not establish causal relationships or clinical utility.

The study was limited by its retrospective design, ICD code-based outcome definition, and external validation in a relatively small single-center cohort. Moreover, neurological examination findings, EEG, neuroimaging, and neurological biomarkers were not included. Further prospective multicenter validation is therefore required, together with comprehensive assessment of calibration and clinical utility. Future studies may also evaluate whether incorporating serial neurological examinations, EEG, neuroimaging, and biomarkers provides meaningful improvement over routinely available clinical variables.