Machine Learning-Based Prediction of Sepsis in Intensive Care Units Using Electronic Health Records

Document Type : Original Article

Author

Department of Epidemiology and Biostatistics, School of Public Health, Tehran University of Medical Sciences, Tehran, Iran

Abstract
Sepsis remains a leading cause of mortality in intensive care units (ICUs) worldwide, and early identification is critical for improving patient outcomes. Machine learning (ML) models trained on electronic health records (EHR) have emerged as promising tools for sepsis prediction, yet their clinical translation remains limited by heterogeneity in study design, validation maturity, and dataset overlap. This study aimed to develop and evaluate ML models for predicting sepsis onset in ICU patients using the Medical Information Mart for Intensive Care (MIMIC-IV) database. We extracted data from 12,845 ICU admissions and constructed prediction models using logistic regression, random forest, XGBoost, and long short-term memory networks. The primary outcome was sepsis onset within 24 hours of ICU admission, defined according to Sepsis-3 criteria. Model performance assessed using area under the receiver operating characteristic curve (AUROC), sensitivity, specificity, and calibration metrics. XGBoost demonstrated the best discriminative performance (AUROC 0.892, 95% CI 0.874–0.910), followed by random forest (AUROC 0.871, 95% CI 0.851–0.891). SHapley Additive exPlanations (SHAP) analysis identified lactate, SOFA score components, and vital sign variability as the most influential predictors. Calibration analysis revealed modest overconfidence in the highest risk decile. Subgroup analyses stratified by sepsis source and comorbidity burden showed consistent performance. Our findings confirm that gradient-boosted tree models can achieve robust discrimination for ICU sepsis prediction using routinely collected EHR data, while also highlighting persistent challenges in calibration and temporal validation that addressed before clinical deployment. The study contributes to the growing evidence base supporting ML-assisted sepsis risk stratification while cautioning against premature implementation without prospective evaluation.

Keywords

Subjects


Articles in Press, Accepted Manuscript
Available Online from 26 November 2026