Beyond NIHSS and neuroimaging: an interpretable gradient boosting model for predicting in-hospital mortality in ICU patients with acute ischemic stroke Authors: Limin Yang, Yue Song, Guangxin Gu, Ruiwen Wang, Peng Chen, Lianhui Fan Published: 2026 ABSTRACT AbstractThis study aimed to develop an interpretable machine learning model for predicting in-hospital mortality among acute ischemic stroke (AIS) patients admitted to the intensive care unit (ICU) using only routine clinical variables, without requiring National Institutes of Health Stroke Scale (NIHSS) scores or neuroimaging data. This retrospective study included 3385 ICU-admitted AIS patients from a large tertiary hospital in China. Sixteen predictors available within 48 h of admission were selected, explicitly excluding NIHSS and neuroimaging features. Six models were compared using discrimination, calibration, and decision curve analysis. SHapley Additive exPlanations (SHAP) provided interpretability. Test-set area under the receiver operating characteristic curves (AUCs) ranged from 0.845 to 0.855 with overlapping confidence intervals, suggesting comparable discrimination across models. Gradient Boosting achieved the best overall performance with an AUC of 0.855 (95% CI: 0.817–0.892), good calibration (Brier score = 0.083), and the broadest net benefit range on decision curve analysis (0.07–0.59); by contrast, the remaining models showed substantially poorer calibration (Brier scores 0.132–0.150) and narrower clinically useful threshold ranges. SHAP analysis identified mechanical ventilation (21.2%), intubation (19.8%), pulmonary infection (14.8%), and broad-spectrum antibiotics (14.2%) as top contributors, collectively accounting for approximately 70% of model output. A gradient boosting model using 16 routine clinical variables achieves strong in-hospital mortality prediction (AUC = 0.855) without requiring NIHSS or neuroimaging. SHAP-based individualized risk decomposition enables clinicians to identify dominant risk drivers at the patient level, supporting early triage, targeted monitoring, and goals-of-care discussions—particularly in settings where neurological scoring or imaging resources are unavailable or delayed.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-51727-0.Keywords: Ischemic stroke, Hospital mortality, Machine learning, Intensive care units, PrognosisSubject terms: Diseases, Health care, Medical research, Neurology, Neuroscience Introduction Acute ischemic stroke (AIS) accounts for approximately 87% of all strokes1. It is caused by disruption of cerebral blood circulation and frequently leads to significant neurological deficits, with up to 60% of critically ill patients experiencing disability or death within 90 days of onset2,3. For AIS patients admitted to the intensive care unit (ICU), early identification of individuals at high risk of mortality is essential for facilitating rational allocation of monitoring resources, optimizing treatment strategies, and engaging in thorough prognostic discussions with families4. Several prognostic tools are currently used for mortality risk prediction in ICU stroke patients, including the Oxford Acute Severity of Illness Score (OASIS)5, the Glasgow Coma Scale (GCS)6, and the National Institutes of Health Stroke Scale (NIHSS)7. However, these tools have demonstrated limited effectiveness in predicting in-hospital mortality8. For instance, the OASIS, GCS, and NIHSS-plus-age models have yielded area under the receiver operating characteristic curves (AUCs) of only 0.73, 0.78, and 0.83, respectively, for predicting stroke mortality in ICU populations9. Among them, NIHSS is the most widely adopted severity measure and has been incorporated into numerous prognostic models, yet its inter-rater reliability remains heterogeneous. A recent systematic review and meta-analysis of 21 studies encompassing 9,696 NIHSS examinations reported that non-motor items showed only moderate agreement, with ICC values as low as 0.58 for facial palsy10. Moreover, NIHSS administration depends on patient cooperation, which is often compromised in sedated, intubated, or hemodynamically unstable ICU patients; consistent with these limitations, a nationwide analysis of US Medicare AIS admissions reported that NIHSS was documented in only 44.4% of index hospitalizations11. Neuroimaging biomarkers similarly require advanced facilities and neuroradiology expertise that remain unevenly distributed—a multicenter survey of 228 hospitals in East China found that only 46.2% could perform CT angiography in the emergency room12. These constraints highlight the need for prognostic approaches that rely on variables routinely captured in the electronic medical record, independent of the patient’s consciousness, time of day, or specialist availability. Machine learning (ML) methods, including various neural network architectures and ensemble approaches, have been increasingly applied across diverse research domains13. In recent years, ML, particularly ensemble algorithms such as Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and Gradient Boosting (GB), has shown advantages over traditional statistical methods in capturing non-linear relationships and high-dimensional interactions, and has been applied to in-hospital mortality prediction in stroke patients with promising discrimination14,15. However, several gaps remain in the existing literature. First, many existing ML models have retained neurological assessment scores or neuroimaging features as key predictors. For instance, Cummins et al. identified GCS and the Richmond Agitation-Sedation Scale as top predictors in their 2025 ICU stroke mortality model9, while Ma et al. developed a prognostic model in which NIHSS at 24 h and NIHSS change served as dominant predictors of three-month outcomes16. Such approaches offer limited practical advantage in sedated, intubated, or resource-limited settings where these assessments are frequently unreliable or unavailable17. Second, most studies rely excessively on AUC as the sole evaluation metric, neglecting equally important dimensions such as calibration and clinical decision benefit, making it difficult to comprehensively assess the translational value of models. Third, most ML models are inherently “black-box” in nature, preventing clinicians from understanding the specific basis of predictions, and this opacity severely limits trust and adoption in actual clinical decision-making. To address these gaps, we developed and compared six ML models using routine clinical variables collected within the first 48 h of ICU admission at a large tertiary hospital, without NIHSS scores or neuroimaging biomarkers, to enhance applicability in resource-varied settings. Unlike most existing studies that rely solely on AUC for model evaluation, we employed a multidimensional framework integrating discrimination, calibration, and decision curve analysis to select the optimal model, and incorporated multi-level SHAP interpretability analysis—including global feature importance, pairwise interactions, and patient-level risk decomposition—to provide transparent and actionable decision-making support for early risk stratification in ICU patients with AIS. Methods Study design and population This retrospective observational study was designed and reported in accordance with the Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis + Artificial Intelligence (TRIPOD + AI) statement18, and was approved by the Medical Ethics Committee of the General Hospital of Northern Theater Command (Approval No. Y [2026]91, dated March 18, 2026). All methods were performed in accordance with the Declaration of Helsinki and complied with the local legislation and institutional requirements. The committee waived the requirement for written informed consent due to the retrospective nature of the study and the use of de-identified data. Clinical data were retrospectively collected from 3,385 AIS patients admitted to the ICU of a large tertiary academic hospital in China between January 1, 2018, and December 31, 2025. The patient selection process is detailed in Fig. 1. Flowchart of study population selection. AIS, acute ischemic stroke; ICU, intensive care unit. Inclusion criteria: (1) Diagnosis of AIS in accordance with the diagnostic criteria outlined in the Chinese Guidelines for the Diagnosis and Treatment of Acute Ischemic Stroke (2018), confirmed by cranial CT, CT angiography (CTA), CT perfusion (CTP), or magnetic resonance imaging (MRI); (2) Age ≥ 18 years; (3) Length of ICU stay ≥ 48 h; The 48-hour window was chosen because it is consistent with the timeframe for early AIS management recommended by current clinical practice guidelines15, ensures completeness of routine laboratory and clinical data, and excludes patients admitted briefly for protocol-driven monitoring rather than disease severity. (4) Complete vital signs, laboratory test results, and medical records available within the first 48 h of ICU admission. Exclusion criteria: (1) ICU admission due to non-AIS etiologies (e.g., hemorrhagic stroke, transient ischemic attack, or intracranial tumors); (2) Concomitant severe trauma, active malignancy, or terminal illness (life expectancy < 3 months) that could confound in-hospital mortality outcomes; (3) Cardiac arrest prior to ICU admission or withdrawal of treatment/discharge against medical advice within the first 24 h of ICU admission; (4) Missing data for key variables (primary outcome or ≥ 30% of predictor variables) that could not be reasonably imputed; (5) Unexplainable extreme outliers confirmed as data entry errors upon verification and not amenable to correction; (6) Incomplete outcome data due to inter-hospital transfer during the ICU stay; (7) For patients with multiple ICU admissions, only the first admission was retained; subsequent admissions were excluded. Variable definitions The primary study outcome was in-hospital mortality (survival vs. death). The candidate predictor variables included in this study covered the following domains: (1) demographics and general clinical characteristics, including age, sex, admission type, systolic blood pressure (SBP), and diastolic blood pressure (DBP); (2) comorbidities and complications, including hypertension, diabetes mellitus, cardiac disease, mild liver disease, hypoalbuminemia, pulmonary infection, and Charlson Comorbidity Index (CCI) score; (3) therapeutic interventions, including surgery, mechanical ventilation (MV), continuous renal replacement therapy (CRRT), intubation, and central venous catheter (CVC) placement; (4) complete blood count parameters, including white blood cell count (WBC), red blood cell count (RBC), hemoglobin (Hb), platelet count (PLT), neutrophil percentage (NEUT%) and absolute count (NEUT), lymphocyte absolute count (LYMPH), monocyte percentage (MONO%) and absolute count (MONO), basophil absolute count (BASO), and mean corpuscular hemoglobin concentration (MCHC); (5) coagulation parameters, including prothrombin time (PT), activated partial thromboplastin time (APTT), international normalized ratio (INR), and fibrinogen (FIB); (6) liver function parameters, including alanine aminotransferase (ALT), aspartate aminotransferase (AST), total bilirubin (TBIL), albumin (ALB), globulin (GLB), total protein (TP), alkaline phosphatase (ALP), and lactate dehydrogenase (LDH); (7) renal function and electrolyte parameters, including blood urea nitrogen (BUN), creatinine (Cr), uric acid (UA), potassium (K+), sodium (Na+), chloride (Cl−), and total carbon dioxide (TCO2); (8) lipid and metabolic parameters, including total cholesterol (TC), triglycerides (TG), high-density lipoprotein cholesterol (HDL-C), low-density lipoprotein cholesterol (LDL-C), creatine kinase (CK), creatine kinase-MB (CK-MB), and glycated hemoglobin (HbA1c); (9) urinalysis, including urine bilirubin (U-BIL) and urine glucose grade (U-GLU); (10) medication use, including macrolides, anticholinergics, cholinesterase inhibitors, benzodiazepines, non-benzodiazepines, antipsychotics, vasoactive agents, broad-spectrum antibiotics, and diuretics. Data processing and feature selection A three-tier data quality control framework was established: (1) variables with more than 30% missing values were excluded, a threshold widely adopted in prediction modeling to balance information retention against imputation reliability, as imputation uncertainty increases substantially beyond this level19; (2) outliers in continuous variables were detected using the 1.5 × interquartile range (IQR) rule and handled by Winsorization at the 1st and 99th percentiles—a commonly used and conservative range that attenuates extreme data-entry and biological outliers while preserving the bulk of the distribution and avoiding the excessive tail compression that wider trimming (e.g., 5th/95th) can introduce; (3) the dataset was randomly split into training and test sets at a 7:3 ratio. The missing data mechanism was considered to be Missing at Random (MAR), as the observed missingness was plausibly explained by other measured clinical variables (e.g., variations in laboratory ordering patterns, instrument availability, and clinician-driven differences in testing intensity across patient severity) rather than being purely random (MCAR) or dependent on unobserved values (MNAR). Given that MCAR is rarely tenable in real-world clinical datasets and that MAR is the standard working assumption for multivariable imputation in prediction modeling20, missing values were imputed using the multiple imputation by chained equations (MICE) method based on Random Forest (RF). The detailed missing rates of the variables are summarized in Table S1. The imputation model was fitted exclusively on the training set, and the test set was imputed using the pre-fitted model to strictly prevent data leakage. To further minimize the risk of data leakage, several additional safeguards were implemented throughout the modeling pipeline: (1) the dataset was split into training and test sets prior to any imputation or feature screening; (2) Min-Max normalization parameters were derived solely from the training set and subsequently applied to the test set; (3) all feature selection steps, including collinearity screening and Boruta evaluation, were conducted exclusively on the training set; and (4) hyperparameter tuning was performed using 10-fold stratified cross-validation within the training set only. To assess robustness, the Boruta procedure was repeated 20 times with different random seeds, and variables with a selection frequency ≥ 80% across runs were considered stably selected. Feature selection employed a two-step strategy combining collinearity screening and importance-based filtering, with all screening steps performed solely on the training set to prevent data leakage. This multi-step approach was adopted because single-method strategies (e.g., Boruta alone) may retain collinear variables that inflate variance and reduce model interpretability, while collinearity screening alone cannot distinguish informative features from irrelevant ones21. First, a Pearson correlation coefficient matrix was computed for all candidate features; for variable pairs with an absolute correlation coefficient exceeding 0.7, the variable with a higher mean correlation with the remaining variables was removed, followed by elimination of variables with a variance inflation factor (VIF) greater than 5. The second step involved key predictor identification using the Boruta algorithm for feature importance evaluation on the variables retained after collinearity screening. The Boruta algorithm, based on a RF classifier (500 trees, maximum depth of 7, class weights set to balanced), constructed shadow features and performed 500 iterations, determining whether each feature significantly outperformed random noise at a significance level of α = 0.0122. Only variables classified as “Confirmed” were retained as the final model input features23. ML model development and evaluation Six ML models were developed to predict in-hospital mortality among AIS patients: RF, XGBoost, LightGBM, GB, Support Vector Machine (SVM), and Logistic Regression (LR). The 16 variables identified through the aforementioned two-step feature selection process were used as predictors for all models. Class imbalance (mortality rate approximately 12.8%) was addressed through internal class weight adjustment strategies within each model. Synthetic oversampling (SMOTE) was evaluated in preliminary experiments but resulted in substantial overfitting for five of six models (training AUC 0.92–1.00, test AUC 0.76–0.84), and was therefore not adopted (Table S2). During data preprocessing, continuous variables were normalized using Min-Max Scaling, with the normalization model fitted on the training set and the same parameters applied to transform the test set. Binary variables were already encoded as 0/1 and fell within the same scale range as the normalized continuous variables, thus requiring no additional processing. Hyperparameters for each model were tuned using Bayesian Optimization with 10-fold stratified cross-validation, optimizing AUC as the objective function over 50 iterations per model. The search ranges, prior distributions, and final optimal values for all models are reported in Table S3. The optimal probability threshold was determined on the training set by plotting receiver operating characteristic (ROC) curves and applying the Youden index to balance sensitivity and specificity. Model performance metrics included AUC, sensitivity, specificity, precision, negative predictive value, F1 score, Matthews correlation coefficient, and balanced accuracy, with 95% confidence intervals (CI) calculated via 1000 bootstrap resamples24. Bootstrap optimism correction (200 iterations) was also performed for all six models to assess internal validity. Additionally, ROC curves, precision-recall (PR) curves, decision curve analysis (DCA), and calibration curves were plotted to comprehensively assess model discrimination, clinical utility, and calibration. Pairwise comparisons of AUCs between models were conducted using the DeLong test22. SHAP was employed to perform interpretability analysis on the optimal model. SHAP values for the test set samples were computed using the TreeExplainer algorithm, and global feature importance was quantified by mean |SHAP value|. Beeswarm plots were used to display feature importance rankings and the directional distribution of SHAP values, while dependence plots illustrated the non-linear relationships between feature values and SHAP values. SHAP interaction values were explored to examine pairwise feature interactions, and force plots and waterfall plots were used for local interpretation of representative individual cases. Sensitivity analysis To assess the impact of variables with zero SHAP contributions on model performance, a sensitivity analysis was conducted. After removing CRRT and CVC—the two variables with near-zero SHAP contributions—all six models were retrained using the remaining 14 features with identical modeling strategies. The AUCs of the 14-variable models were compared with those of the original 16-variable models on the test set using the DeLong test to evaluate whether removal of these two variables significantly affected model performance. In addition to discrimination, the impact of feature reduction on calibration was also evaluated by comparing the Brier score, expected calibration error (ECE), Hosmer–Lemeshow test, and calibration intercept and slope between the 16- and 14-variable models on the test set. Statistical analysis Normally distributed continuous variables were expressed as mean ± standard deviation (SD) and compared using Student’s t-test. Non-normally distributed variables were reported as median (IQR) and compared using the Wilcoxon rank-sum test. Categorical variables were expressed as proportions and compared using the chi-square test or Fisher’s exact test as appropriate. Data cleaning, feature selection, and ML model development and evaluation were performed in Python 3.9.12. Statistical analysis and visualization were conducted using a combination of Python 3.9.11 and R 4.4.1. Results Baseline characteristics of patients according to in-hospital mortality A total of 3,385 AIS patients were included, of whom 2950 (87.2%) survived and 435 (12.8%) died during hospitalization. Non-survivors were significantly older (67 [59–74] vs. 63 [55–70], P < 0.001), with no significant sex difference (P = 0.539). Emergency admissions comprised 97.5%, with a slightly higher proportion of outpatient admissions in non-survivors (P = 0.031). Regarding comorbidities, hypertension and diabetes mellitus were the most prevalent but did not differ significantly between groups. Non-survivors had markedly higher rates of hypoalbuminemia (33.1% vs. 13.6%) and pulmonary infection (75.6% vs. 35.2%) (both P < 0.001), along with more frequent mild liver disease (P = 0.014) and higher CCI scores (4[3–5] vs. 3[2–4], P < 0.001). Non-survivors also had significantly higher rates of surgery, MV, intubation, CRRT, and central venous catheter placement (all P < 0.001). Laboratory findings revealed a more pronounced inflammatory response (elevated WBC, neutrophil percentage and absolute count; decreased lymphocytes), coagulation abnormalities (elevated PT, INR, and FIB), and organ dysfunction (elevated AST, LDH, BUN, and Cr; decreased ALB and TCO2) in non-survivors (all P < 0.001). Additionally, CK, CK-MB, and HbA1c were significantly higher in non-survivors. Regarding medication use, non-survivors had significantly higher proportions of vasoactive agents (13.3% vs. 1.2%), broad-spectrum antibiotics (46.7% vs. 14.9%), diuretics (32.9% vs. 11.3%), non-benzodiazepines (18.2% vs. 3.2%), and anticholinergics (8.0% vs. 2.5%) (all P < 0.001). Detailed comparisons of all variables are presented in Table 1. Table 1Baseline characteristics by mortality status.VariableTotal (n = 3385)Survival (n = 2950)Death (n = 435)P valueDemographics Age, years64 (56–70)63 (55–70)67 (59–74)< 0.001Sex, n(%) Female912 (26.9)789 (26.7)123 (28.3)0.539 Male2473 (73.1)2161 (73.3)312 (71.7)Admission type, n(%) Emergency3300 (97.5)2883 (97.7)417 (95.9)0.031 Outpatient85 (2.5)67 (2.3)18 (4.1)Vital signs SBP, mmHg156 (139–173)157 (139–173)155 (138–173)0.398 DBP, mmHg88 (79–98)88 (79–98)86 (78–97)0.028Comorbidities Hypertension, n(%) Yes1974 (58.3)1718 (58.2)256 (58.9)0.849 No1411 (41.7)1232 (41.8)179 (41.1) Diabetes mellitus, n(%) Yes965 (28.5)835 (28.3)130 (29.9)0.532 No2420 (71.5)2115 (71.7)305 (70.1) Cardiac disease, n(%) Yes10 (0.3)9 (0.3)1 (0.2)1.000 No3375 (99.7)2941 (99.7)434 (99.8) Mild liver disease, n(%) Yes203 (6.0)165 (5.6)38 (8.7)0.014 No3182 (94.0)2785 (94.4)397 (91.3) Hypoalbuminemia, n(%) Yes545 (16.1)401 (13.6)144 (33.1)< 0.001 No2840 (83.9)2549 (86.4)291 (66.9) Pulmonary infection, n(%) Yes1368 (40.4)1039 (35.2)329 (75.6)< 0.001 No2017 (59.6)1911 (64.8)106 (24.4) CCI score3 (2–4)3 (2–4)4 (3–5)< 0.001Treatments and procedures Surgery, n(%) Yes1004 (29.7)829 (28.1)175 (40.2)< 0.001 No2381 (70.3)2121 (71.9)260 (59.8) Mechanical ventilation, n(%) Yes335 (9.9)132 (4.5)203 (46.7)< 0.001 No3050 (90.1)2818 (95.5)232 (53.3) CRRT, n(%) Yes13 (0.4)6 (0.2)7 (1.6)< 0.001 No3372 (99.6)2944 (99.8)428 (98.4) Intubation, n(%) Yes355 (10.5)161 (5.5)194 (44.6)< 0.001 No3030 (89.5)2789 (94.5)241 (55.4) Central venous catheter, n(%) Yes33 (1.0)12 (0.4)21 (4.8)< 0.001 No3352 (99.0)2938 (99.6)414 (95.2) Complete blood count WBC, ×109/L9.60 (7.60–12.00)9.40 (7.40–11.80)11.10 (9.00–13.90)< 0.001 RBC, ×1012/L4.51 (4.16–4.88)4.51 (4.17–4.87)4.51 (4.13–4.93)0.492 Hemoglobin, g/L140.00 (129.00–151.00)140.00 (129.00–151.00)141.00 (127.00–152.50)0.868 Platelet, ×109/L209.00 (175.00–246.00)209.00 (176.00–246.00)202.00 (167.00–248.00)0.057 Neutrophil percentage, %79.80 (72.80–85.40)78.90 (71.80–84.50)85.70 (80.20–89.30)< 0.001 Neutrophil absolute, ×109/L7.62 (5.60–10.00)7.40 (5.50–9.70)9.50 (7.21–12.12)< 0.001 Lymphocyte absolute, ×109/L1.28 (0.90–1.70)1.30 (0.96–1.77)1.00 (0.69–1.40)< 0.001 Monocyte percentage, %5.50 (4.40–6.80)5.60 (4.50–6.90)5.10 (3.80–6.60)< 0.001 Monocyte absolute, ×109/L0.51 (0.40–0.70)0.50 (0.40–0.70)0.57 (0.40–0.75)< 0.001 Basophil absolute, ×109/L0.20 (0.10–0.40)0.20 (0.10–0.40)0.10 (0.10–0.20)< 0.001 Coagulation PT, s13.20 (12.30–14.10)13.20 (12.20–14.10)13.60 (12.80–14.40)< 0.001 APTT, s33.60 (28.50–37.90)33.40 (28.30–37.80)34.20 (29.60–38.50)0.074 INR1.04 (0.98–1.11)1.03 (0.98–1.10)1.07 (1.00–1.15)< 0.001 Fibrinogen, g/L3.03 (2.44–3.76)2.98 (2.40–3.66)3.45 (2.76–4.42)< 0.001 Liver function ALT, U/L17.13 (12.55–24.85)17.07 (12.54–24.76)17.48 (12.61–25.70)0.391 AST, U/L19.88 (15.99–26.13)19.52 (15.74–25.28)22.70 (17.72–32.62)< 0.001 Total bilirubin, µmol/L12.70 (9.30–17.80)12.60 (9.20–17.40)13.70 (9.75–19.85)< 0.001 Albumin, g/L38.30 (35.10–41.40)38.40 (35.20–41.50)37.50 (34.10–40.45)< 0.001 Globulin, g/L26.40 (23.10–30.00)26.30 (23.00–29.90)27.10 (24.20–30.35)0.003 Total protein, g/L64.72 ± 8.3364.70 ± 8.2964.85 ± 8.600.734 ALP, U/L78.80 (65.53–94.14)78.48 (65.45–93.94)81.41 (66.30–97.97)0.055 LDH, U/L193.00 (164.00–233.00)189.00 (161.00–226.00)226.00 (184.50–274.50)< 0.001 Renal function BUN, mmol/L5.24 (4.15–6.67)5.14 (4.09–6.50)6.02 (4.80–7.96)< 0.001 Creatinine, µmol/L66.43 (56.07–79.49)65.90 (55.73–78.40)70.27 (57.90–87.17)< 0.001 Uric acid, µmol/L310.00 (252.00–386.00)309.00 (251.00–382.00)321.00 (258.50–409.00)0.003 Electrolytes Potassium, mmol/L3.73 (3.53–3.96)3.74 (3.54–3.96)3.71 (3.52–3.98)0.956 Sodium, mmol/L139.60 (137.60–141.50)139.70 (137.70–141.50)139.40 (137.15–141.60)0.130 Chloride, mmol/L105.00 (102.80–107.20)105.10 (103.00–107.20)104.50 (102.05–107.00)0.003 TCO2, mmol/L23.06 ± 3.1423.21 ± 3.0422.03 ± 3.58< 0.001 Lipid profile Total cholesterol, mmol/L4.60 (3.85–5.41)4.58 (3.86–5.41)4.66 (3.81–5.42)0.748 Triglycerides, mmol/L1.28 (0.93–1.94)1.29 (0.93–1.95)1.21 (0.89–1.77)0.031 HDL-C, mmol/L1.16 (0.97–1.40)1.16 (0.96–1.39)1.19 (1.00–1.45)0.024 LDL-C, mmol/L2.69 (2.12–3.32)2.68 (2.12–3.32)2.74 (2.04–3.33)0.891 Cardiac enzymes CK, U/L101.00 (64.00–189.00)98.00 (63.00–175.00)136.00 (77.00–301.00)< 0.001 CK-MB, U/L12.10 (9.80–16.10)12.00 (9.60–16.00)15.00 (11.00–19.40)< 0.001 Metabolism HbA1c, %5.99 (5.60–7.08)5.98 (5.58–7.03)6.14 (5.68–7.43)< 0.001 MCHC, g/L335.00 (329.00–341.00)335.00 (329.00–341.00)335.00 (329.00–341.00)0.537Urinalysis Urine bilirubin, n(%) Positive7 (0.2)4 (0.1)3 (0.7)0.050 Negative3378 (99.8)2946 (99.9)432 (99.3) Urine glucose grade0 (0–3)0 (0–2)1 (0–3)< 0.001Medications Macrolides, n(%) Yes2 (0.1)2 (0.1)0 (0.0)1.000 No3383 (99.9)2948 (99.9)435 (100.0) Anticholinergics, n(%) Yes108 (3.2)73 (2.5)35 (8.0)< 0.001 No3277 (96.8)2877 (97.5)400 (92.0) Cholinesterase inhibitors, n(%) Yes1 (0.0)0 (0.0)1 (0.2)0.129 No3384 (100.0)2950 (100.0)434 (99.8) Benzodiazepines, n(%) Yes49 (1.4)38 (1.3)11 (2.5)0.071 No3336 (98.6)2912 (98.7)424 (97.5) Non-benzodiazepines, n(%) Yes172 (5.1)93 (3.2)79 (18.2)< 0.001 No3213 (94.9)2857 (96.8)356 (81.8) Antipsychotics, n(%) Yes58 (1.7)49 (1.7)9 (2.1)0.679 No3327 (98.3)2901 (98.3)426 (97.9) Vasoactives, n(%) Yes93 (2.7)35 (1.2)58 (13.3)< 0.001 No3292 (97.3)2915 (98.8)377 (86.7) Broad-spectrum antibiotics, n(%) Yes642 (19.0)439 (14.9)203 (46.7)< 0.001 No2743 (81.0)2511 (85.1)232 (53.3) Diuretics, n(%) Yes477 (14.1)334 (11.3)143 (32.9)< 0.001 No2908 (85.9)2616 (88.7)292 (67.1) Baseline characteristics by mortality status. Feature selection A total of 65 candidate predictor variables were initially considered, spanning demographics and general clinical characteristics (age, sex, admission type, SBP, DBP), comorbidities and complications (hypertension, diabetes mellitus, cardiac disease, mild liver disease, hypoalbuminemia, pulmonary infection, CCI), therapeutic interventions (surgery, MV, CRRT, intubation, CVC), complete blood count parameters (WBC, RBC, Hb, PLT, NEUT%, NEUT, LYMPH, MONO%, MONO, BASO, MCHC), coagulation parameters (PT, APTT, INR, FIB), liver function parameters (ALT, AST, TBIL, ALB, GLB, TP, ALP, LDH), renal function and electrolytes (BUN, Cr, UA, K+, Na+, Cl−, TCO2), lipid and metabolic parameters (TC, TG, HDL-C, LDL-C, CK, CK-MB, HbA1c), urinalysis (U-BIL, U-GLU), and medication use (macrolides, anticholinergics, cholinesterase inhibitors, benzodiazepines, non-benzodiazepines, antipsychotics, vasoactive agents, broad-spectrum antibiotics, diuretics). In the first step of collinearity screening, Pearson correlation analysis identified five highly correlated variable pairs (|r| > 0.7): CCI and age (r = 0.82), RBC and Hb (r = 0.78), PT and INR (r = 0.89), NEUT and WBC (r = 0.85), and HbA1c and diabetes mellitus (r = 0.73). For each pair, the variable with higher mean correlation with the remaining variables (CCI, RBC, PT, NEUT, and HbA1c) was removed (Fig. 2A). In the subsequent VIF screening (Table S4), an additional 30 variables with VIF > 5 were excluded, including age, admission type, SBP, DBP, WBC, MONO%, MONO, INR, APTT, FIB, Hb, MCHC, PLT, NEUT%, AST, ALB, GLB, TP, ALP, LDH, BUN, Cr, UA, TCO2, K+, Na+, Cl−, TC, HDL-C, and LDL-C (VIF range: 5.35–2,416.58). After the two-step collinearity screening, 30 variables were retained for Boruta feature importance evaluation, which ultimately confirmed 16 variables for model development: MV, intubation, vasoactive agents, broad-spectrum antibiotics, pulmonary infection, non-benzodiazepines, diuretics, LYMPH, hypoalbuminemia, BASO, TBIL, CVC, mild liver disease, CK-MB, CK, and CRRT (Fig. 2B).The stability analysis over 20 repeated Boruta runs confirmed the robustness of this selection: all 16 originally retained variables showed a selection frequency ≥ 95% (15 variables at 100%, and CRRT at 95%), yielding complete concordance between the primary and stability-based selections (Table S5). Feature selection and correlation analysis of candidate clinical variables. (A) Pearson correlation matrix of clinical features. The color scale indicates the correlation coefficient, ranging from − 1 (blue) to 1 (red). (B) Selection of important features using the Boruta algorithm. Green boxes represent confirmed important features, red boxes represent rejected features, and blue boxes represent shadow (baseline) features. Model development and performance evaluation The performance of the six ML models on the training and test sets is summarized in Table S6 and Table 2, respectively. In the training set, LightGBM achieved the highest AUC (0.902, 95% CI: 0.885–0.919), followed by RF (0.893), XGBoost (0.884), GB (0.883), LR (0.867), and SVM (0.861). On the test set, the differences in AUC narrowed, with GB achieving the highest AUC (0.855, 95% CI: 0.817–0.892), while XGBoost (0.853), LightGBM (0.853), RF (0.852), and LR (0.851) performed comparably, and SVM was slightly lower (0.845, 95% CI: 0.804–0.881) (Fig. 3A). The 95% CIs of test set AUCs overlapped substantially across all models, suggesting no significant differences in overall discrimination. Table 2Performance metrics of machine learning models in the test set (with 95% Confidence Intervals).ModelAUCSensitivitySpecificityPrecisionNPVF1Youden’s IndexGradient Boosting0.855 (0.817–0.892)0.724 (0.650–0.799)0.830 (0.803–0.856)0.387 (0.326–0.445)0.953 (0.938–0.967)0.504 (0.442–0.563)0.553 (0.472–0.636)XGBoost0.853 (0.815–0.889)0.693 (0.620–0.772)0.870 (0.847–0.894)0.443 (0.375–0.512)0.950 (0.935–0.964)0.540 (0.476–0.602)0.563 (0.483–0.643)LightGBM0.853 (0.816–0.890)0.708 (0.633–0.785)0.852 (0.828–0.876)0.416 (0.350–0.479)0.952 (0.937–0.965)0.524 (0.460–0.586)0.561 (0.480–0.643)Random Forest0.852 (0.815–0.888)0.693 (0.620–0.770)0.856 (0.832–0.878)0.417 (0.353–0.480)0.949 (0.934–0.964)0.520 (0.456–0.582)0.549 (0.470–0.630)Logistic Regression0.851 (0.811–0.888)0.738 (0.667–0.810)0.819 (0.794–0.843)0.378 (0.320–0.435)0.955 (0.940–0.968)0.500 (0.436–0.558)0.558 (0.475–0.634)SVM0.845 (0.804–0.881)0.708 (0.634–0.785)0.814 (0.787–0.839)0.361 (0.303–0.422)0.949 (0.934–0.964)0.478 (0.416–0.539)0.522 (0.443–0.605) Performance metrics of machine learning models in the test set (with 95% Confidence Intervals). Performance evaluation and comparison of the machine learning models in the testing set. (A) Receiver Operating Characteristic (ROC) curves and area under the curve (AUC) values for different models. (B) precision-recall (PR) curves. (C) Calibration curves evaluating the agreement between predicted probabilities and observed outcomes. (D) Decision Curve Analysis (DCA) demonstrating the clinical net benefit of the models across various threshold probabilities. Regarding classification performance, LR achieved the highest sensitivity (0.738) on the test set, while XGBoost had the highest specificity (0.870). XGBoost also demonstrated the highest precision (0.443) and F1 score (0.540) (Table 2). The PR curves further confirmed these findings, with GB achieving the highest average precision (AP) = 0.551, followed by SVM (0.546) and LightGBM (0.538) (Fig. 3B). Calibration assessment revealed that SVM exhibited the best calibration performance (Brier score = 0.080, ECE = 0.022), with the Hosmer-Lemeshow test indicating no significant deviation P = 0.784. GB showed the second-best calibration (Brier score = 0.083, ECE = 0.047), although the HL test was significant (P < 0.001). The remaining four models demonstrated poorer calibration, with Brier scores ranging from 0.132 to 0.150 (Fig. 3C, Table S7). DCA showed that GB and SVM provided net benefit exceeding the “treat all” strategy across a wide range of threshold probabilities (0.07–0.59 and 0.03–0.59, respectively), with average net benefits of 0.050 and 0.053. The other models yielded positive net benefit only within narrow threshold ranges (Fig. 3D, Table S8). Bootstrap optimism correction (200 iterations) confirmed robust internal validity across all models. The difference between corrected and test-set AUC was uniformly small (+ 0.009 to + 0.017), with mean optimism ranging from 0.0057 (LR) to 0.0317 (LightGBM). The GB model demonstrated low optimism (0.0159) and a corrected AUC of 0.867, maintaining a favorable balance between performance and generalizability (Table S9). Among the six candidates, GB was selected as the final model based on a joint consideration of discrimination, calibration, and clinical utility. Although SVM showed superior calibration and a comparable DCA threshold range, its test-set AUC was the lowest among all models. Although pairwise DeLong tests showed no significant AUC differences among the six models (all P > 0.05), GB achieved the numerically highest test-set AUC (0.855) together with acceptable calibration (Brier score = 0.083, second to SVM) and the broadest clinically useful DCA threshold range (0.07–0.59), representing the best overall balance across the three dimensions. Given that the model’s primary purpose is to stratify patient risk, discrimination was prioritized when calibration and clinical utility were broadly comparable. Nonetheless, recalibration of GB may be considered in settings where precise probability estimation is essential. SHAP interpretability analysis SHAP analysis of the GB model revealed that MV (21.2%), intubation (19.8%), pulmonary infection (14.8%), and broad-spectrum antibiotics (14.2%) were the top four contributors, collectively accounting for ~ 70% of the model output (Fig. 4A). Diuretics, LYMPH, vasoactive agents, and CK-MB formed the second tier, while CRRT and CVC showed near-zero contributions. It should be noted that SHAP values represent the magnitude of each feature’s contribution to the model’s predictive output and reflect feature-prediction associations rather than causal effects between clinical variables and mortality outcomes. Interpretability of the optimal predictive model using SHAP (SHapley Additive exPlanations) analysis. (A) SHAP feature importance bar chart and relative percentage pie chart. (B) SHAP summary plot (beeswarm plot) showing the impact of individual feature values on the model output. (C) SHAP interaction strength heatmap for the top features. (D–F) SHAP waterfall plots explaining the prediction process for three individual patients, showing how specific feature values push the model output from the base value to the final prediction. The beeswarm plot indicated that the presence of MV, intubation, pulmonary infection, broad-spectrum antibiotics, diuretics, vasoactive agents, non-benzodiazepines, and hypoalbuminemia consistently increased predicted mortality risk. Lower LYMPH and higher CK-MB, TBIL, and CK values were associated with elevated risk, whereas higher BASO was protective (Fig. 4B). Dependence plots further confirmed non-linear dose-response patterns for LYMPH (negative gradient), CK-MB, and TBIL (positive gradients) (Figure S1). Interaction analysis identified the strongest pairwise effects between MV and intubation (0.0195) and between MV and pulmonary infection (0.0147) (Fig. 4C). Waterfall plots of three representative cases demonstrated distinct risk profiles: the low-risk case (f(x) = − 2.743) was driven by absence of key interventions; the medium-risk case (f(x) = − 2.413) was dominated by diuretics use + 0.30; and the high-risk case (f(x) = 0.539) was primarily attributable to MV + 0.97, intubation + 0.67, and vasoactive agents + 0.52 (Figs. 4D-E). Sensitivity analysis To assess the impact of CRRT and CVC (which showed near-zero SHAP contributions), all six models were retrained using the remaining 14 features. DeLong tests comparing the 16- and 14-variable models revealed no significant AUC differences for five of the six models (all P > 0.05), confirming that CRRT and CVC did not meaningfully contribute to prediction. The exception was RF, which showed a statistically significant but negligible AUC change (0.853 vs. 0.855, P = 0.010), with the 14-variable model performing marginally better. Calibration metrics were similarly stable after feature reduction: differences in Brier score were within ± 0.008 and differences in ECE within ± 0.022 across all six models. For the final GB model, the Brier score changed from 0.083 to 0.085 (Δ = +0.002) and ECE from 0.047 to 0.053 (Δ = +0.006), with comparable Hosmer–Lemeshow chi-square values and calibration intercept/slope between the 16- and 14-variable versions, indicating that removal of the two zero-contribution variables did not meaningfully affect calibration. These results support the robustness of the final model and are consistent with the SHAP findings (Tables S10-11). Discussion In this study, we developed and compared six ML models for predicting in-hospital mortality in patients with AIS. The GB model was identified as the optimal algorithm based on a comprehensive evaluation of discrimination (test-set AUC = 0.855), calibration (Brier score = 0.083), and clinical utility (net benefit range 0.07–0.59 on decision curve analysis). Our study has several notable strengths. The model relies exclusively on 16 routinely collected clinical variables within the first 48 h of admission, without requiring specialized neurological scores or neuroimaging biomarkers, making it readily deployable in resource-limited settings. Furthermore, we systematically compared six algorithms under identical feature inputs and preprocessing pipelines, enabling a fair head-to-head comparison often lacking in the existing literature. The integration of SHAP-based interpretability analysis further provides patient-level transparent risk decomposition, bridging the gap between predictive accuracy and clinical interpretability. In the present study, the overall in-hospital mortality rate among AIS patients was 12.8%, higher than rates reported in national surveillance programs (0.8% in China25; 5.4% in the US26, but within the 3%–18% range reported across different populations and clinical settings27. When compared with more critically ill populations, our rate appears relatively consistent: the eICU-CRD database reported 19% among hypertensive ischemic or hemorrhagic stroke patients28, and a US cross-sectional study reported 21.6%29. Our lower rate may reflect the restriction to ischemic stroke only, as well as differences in ICU admission thresholds and end-of-life care patterns between China and the United States. It is also worth noting that some Chinese registries combine in-hospital death with discharge against medical advice, potentially underestimating true mortality. Regarding model performance, the test-set AUC of 0.855 for the GB model in our study is broadly consistent with prior ICU stroke mortality prediction studies. Using the MIMIC-IV database, comparable discriminative performance has been reported for XGBoost (AUC = 0.86) and RF (AUC = 0.85) among 3,489 AIS patients9, as well as for a deep learning model incorporating temporal feature dynamics across 3,487 ischemic stroke patients, with AUROC improving from 0.865 on day one to 0.903 by day four30. Notably, when prediction targets were restricted to a more severely ill subpopulation with moderate to severe consciousness disorders (GCS ≤ 12, n = 648), AUCs declined to 0.698–0.730 for 3- to 90-day mortality31, suggesting that model performance is influenced by population heterogeneity and outcome definitions. A recent systematic review pooling 14 AIS outcome studies further confirmed limited discriminative differences across algorithms, with aggregate AUCs of approximately 0.8232. Consistent with these findings, our study observed only a 0.01 AUC spread across six models (0.845–0.855) with extensively overlapping confidence intervals, reinforcing that algorithm selection has a limited effect on discrimination when identical features are used. Sensitivity analysis demonstrated that removal of CRRT and CVC—two variables with near-zero SHAP contributions—did not significantly alter either discrimination (DeLong test P > 0.05 for five of six models) or calibration across all six models, further validating the reliability of SHAP analysis in identifying redundant variables and supporting the feasibility of simplifying the model from 16 to 14 variables to enhance parsimony and practical deployment efficiency. SHAP interpretability analysis revealed that mechanical ventilation (21.2%), intubation (19.8%), pulmonary infection (14.8%), and broad-spectrum antibiotics (14.2%) were the top four contributors, collectively accounting for approximately 70% of the model output. These findings are consistent with prior clinical observations: in-hospital mortality among AIS patients requiring mechanical ventilation ranges from 53% to 57%33,34, and pulmonary infection is among the most common post-stroke complications associated with prolonged hospitalization and higher mortality35. It is important to emphasize that SHAP values reflect the extent to which variables contribute to model predictions, rather than causal effects. The high SHAP contributions of mechanical ventilation and intubation more likely reflect underlying disease severity, and the contribution of broad-spectrum antibiotics should be interpreted as an indirect marker of infection burden rather than an independent risk exposure. More specifically, this pattern reflects confounding by indication: patients with greater illness severity are more likely to receive mechanical ventilation, intubation, and broad-spectrum antibiotics, so these variables function primarily as proxies for unmeasured severity rather than as independent risk exposures. This does not undermine the model’s utility for risk stratification, which is the intended use case, but it precludes any causal interpretation of treatment-related features. Future models incorporating explicit severity indices such as APACHE II or SOFA, when available, may help disentangle disease severity from intervention effects and further sharpen the distinction between predictive and etiological signals. Among the second-tier predictors, lower LYMPH values and higher CK-MB and TBIL levels accompanied elevated predicted mortality risk. Post-stroke lymphopenia is considered a characteristic feature of stroke-induced immunosuppression syndrome36, with prior literature linking lymphocyte depletion to adverse outcomes through stress-related cortisol elevation and sympathetic activation37,38. The dependence plot for LYMPH exhibited a non-linear negative gradient pattern consistent with the dose-response association described in prior observations. These associations represent feature-prediction relationships and should not be used to infer causal directionality. Translated into ICU practice, these patterns suggest concrete actions that can be triggered by the dominant SHAP contributor in an individual patient. When mechanical ventilation and intubation dominate the risk profile, the 48-hour reassessment should explicitly include family communication and elicitation of resuscitation preferences, given the high baseline mortality in this subgroup. When pulmonary infection is the leading contributor, sputum culture, de-escalation review of broad-spectrum antibiotics, and tightened infection-control auditing should be prioritized at the same time point. When isolated lymphopenia is the dominant signal, repeat lymphocyte subset testing and surveillance for secondary infection are reasonable next steps. These actions remain hypothesis-generating given the associative nature of SHAP analysis and require prospective evaluation before being adopted as standard practice. From a clinical translation perspective, the patient-level risk decomposition provided by SHAP offers transparency that traditional “black-box” models lack. At the decision level, the GB model’s 0.07–0.59 DCA net-benefit range maps onto three tiers of ICU decision-making : low-burden surveillance (e.g., intensified neurological monitoring, telemetry prioritization, on-call team alerting) at the lower end (≈ 0.07–0.15); moderate-cost interventions (e.g., neurocritical care consultation, monitoring escalation, pre-emptive family communication) in the middle band (≈ 0.15–0.40); and high-burden or high-stakes decisions (e.g., goals-of-care discussions, palliative care consultation, DNR/DNI reassessment) at the upper end (≈ 0.40–0.59). Positive net benefit across this entire range indicates that the model can support a continuum of ICU decisions rather than a single fixed cut-point. Furthermore, because the model relies exclusively on routinely collected variables without requiring NIHSS or neuroimaging, it has potential deployment value in primary healthcare settings lacking specialized neurological resources. However, the translation from a prediction model to a clinical decision-support tool requires prospective impact studies to evaluate whether it can genuinely improve patient outcomes. This study has several limitations. First, the single-center retrospective design from a tertiary hospital in northern China limits external generalizability, as patient demographics, treatment protocols, and ICU admission thresholds may differ across community hospitals and other geographic regions. Although internal validation measures were implemented, these cannot substitute for multicenter or temporal external validation. Second, all variables were static data collected within the first 48 h of admission and did not capture dynamic changes during hospitalization. Third, potentially important variables such as NIHSS scores and stroke location could not be incorporated due to data unavailability. Fourth, the feature-prediction associations revealed by SHAP analysis are observational in nature and should not be used to infer causality. In addition, although the GB model showed acceptable calibration (Brier score = 0.083), the Hosmer-Lemeshow test was significant, suggesting residual miscalibration that may warrant post-hoc correction when precise probability estimation is required. Platt scaling, which fits a logistic transformation to model outputs, is typically preferred when miscalibration follows a monotonic sigmoid pattern, whereas isotonic regression is more flexible for non-monotonic deviations but requires a larger calibration set to avoid overfitting. Both strategies will be evaluated in future multicenter validation, where distributional shifts could further affect calibration performance. Building on these findings, we are preparing multicenter external validation across hospitals of different tiers and regions, to be followed by prospective impact studies and integration into electronic health record systems for real-time deployment. Conclusion This study demonstrates that a gradient boosting model based on routine clinical variables collected within the first 48 h of ICU admission can effectively identify AIS patients at high risk of in-hospital mortality without requiring NIHSS scores or neuroimaging data. Through SHAP-based individualized risk decomposition, the model offers clinicians transparent decision-making evidence, facilitating early identification of high-risk patients and optimization of monitoring resource allocation, particularly in settings where neurological scoring or imaging resources are limited or delayed. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Abbreviations Acute ischemic stroke Albumin Alkaline phosphatase Alanine aminotransferase Average precision Activated partial thromboplastin time Aspartate aminotransferase Area under the receiver operating characteristic curve Basophil absolute count Charlson comorbidity index Confidence interval Creatine kinase Creatine kinase-MB Chloride Creatinine Continuous renal replacement therapy Computed tomography Computed tomography angiography Computed tomography perfusion Central venous catheter Diastolic blood pressure Decision curve analysis Fibrinogen Gradient boosting Glasgow coma scale Globulin Hemoglobin Intensive care unit International normalized ratio Potassium Lactate dehydrogenase Low-density lipoprotein cholesterol Light gradient boosting machine Logistic regression Lymphocyte absolute count Mean corpuscular hemoglobin concentration Machine learning Monocyte absolute count Monocyte percentage Magnetic resonance imaging Mechanical ventilation Sodium Neutrophil absolute count Neutrophil percentage National institutes of health stroke scale Oxford acute severity of illness score Platelet count Curve precision-recall curve Prothrombin time Red blood cell count Random forest Receiver operating characteristic Systolic blood pressure Standard deviation SHapley additive explanations Support vector machine Total bilirubin Total carbon dioxide Triglycerides Total protein Uric acid Urine bilirubin Urine glucose Variance inflation factor White blood cell count Extreme gradient boosting Author contributions L.Y. and Y.S. contributed equally to this study. L.Y. conceived and designed the study, collected clinical data, and drafted the manuscript. Y.S. performed the data analysis, developed the machine learning models, and drafted the manuscript. G.G. contributed to data preprocessing and statistical analysis. R.W. assisted with data collection and quality control. P.C. acquired funding, contributed to the interpretation of results, and critically revised the manuscript. L.F. supervised the study, provided clinical guidance, and critically revised the manuscript for important intellectual content. All authors reviewed and approved the final manuscript. Funding This study was funded by the General Program of Natural Science Foundation of Liaoning Province (Grant No. 2025-MSLH-709). Data availability The datasets analyzed during the current study, including the deidentified participant data, are available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Ethics This retrospective observational study was approved by the Medical Ethics Committee of the General Hospital of Northern Theater Command (Approval No. Y[2026]91, dated March 18, 2026). The requirement for informed consent was waived due to the retrospective nature of the study. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. These authors contributed equally: Limin Yang and Yue Song. References Associated Data Supplementary Materials Supplementary Material 1 Data Availability Statement The datasets analyzed during the current study, including the deidentified participant data, are available from the corresponding author on reasonable request.