2nd AAMS Conference on AI & Digital Health Technologies · 2025-11-15 · Internal Medicine

Developing a Deep Learning Model for Automated Detection of Early Sepsis from Longitudinal Electronic Health Record Data

Prof. David Klein, Dr. Nkechi Okoro, Dr. Amir Ali Jafari
University of Cambridge, UK; University of Ibadan, Nigeria; Tehran University of Medical Sciences, Iran

View on AAMS · All conferences

Abstract

Background: Sepsis is a leading cause of morbidity and mortality worldwide, yet its early detection remains challenging due to non-specific symptoms and complex clinical presentations. Timely diagnosis is critical for effective intervention and improved patient outcomes. This study aims to develop and validate a deep learning model to automatically detect early sepsis onset using routinely collected, longitudinal electronic health record (EHR) data. Methods: A retrospective cohort of 100,000 hospitalized adult patients (5,000 sepsis cases, 95,000 controls) was used. Data included vital signs, laboratory results, medications, and demographic information, collected every 30 minutes for up to 48 hours prior to sepsis onset (or equivalent for controls). A Gated Recurrent Unit (GRU) neural network was trained to predict sepsis onset 6 hours in advance, defined by Sepsis-3 criteria. Results: The GRU model achieved an AUC of 0.90 (95% CI: 0.89-0.91) for predicting sepsis onset 6 hours prior to clinical diagnosis, demonstrating a sensitivity of 85% and specificity of 82%. Key predictive features included subtle, dynamic changes in heart rate variability, mean arterial pressure, and lactate trends, which were often individually non-alarming but collectively indicative of impending sepsis. The model provided an average lead time of 7.2 hours. Conclusion: A deep learning model can accurately predict early sepsis onset from longitudinal EHR data, offering a powerful clinical decision support tool that enables proactive intervention and has the potential to significantly reduce sepsis-related mortality.

Keywords: deep learning diagnostics, sepsis, EHR, longitudinal data, predictive analytics

Sepsis represents a global health crisis, responsible for millions of deaths annually, yet its prompt recognition remains a significant challenge due to its highly variable presentation and time-sensitive treatment requirements. Current early warning scores often lack sensitivity or specificity, leading to both delayed diagnoses and alarm fatigue. Leveraging the rich, longitudinal data continuously accumulating in electronic health records (EHRs) with advanced deep learning models offers an unprecedented opportunity to detect subtle, cumulative physiological changes indicative of impending sepsis, enabling earlier, life-saving interventions. This research addresses a critical need in acute care medicine.

The aim of the study.

To develop and prospectively validate a deep learning model, specifically a Gated Recurrent Unit (GRU) neural network, for the early and accurate prediction of sepsis onset in hospitalized adult patients using routinely collected, time-series Electronic Health Record (EHR) data, with a target prediction window of 6 hours prior to clinical diagnosis.

Material and methods.

This retrospective cohort study included 100,000 hospitalized adult patients (comprising 5,000 patients who developed sepsis and 95,000 matched controls) from three large academic medical centers. Data points were extracted from EHRs at 30-minute intervals for up to 48 hours prior to sepsis onset (defined by Sepsis-3 criteria) or a matched time point for controls. The comprehensive dataset included vital signs (heart rate, blood pressure, respiratory rate, temperature, SpO2), laboratory results (lactate, white blood cell count, creatinine, bilirubin), medications (e.g., vasopressors, antibiotics), and demographic information. A Gated Recurrent Unit (GRU) deep learning architecture was chosen for its ability to model temporal dependencies in sequential data. The model was trained on 80% of the dataset and validated on the remaining 20%. The primary outcome was the Area Under the Receiver Operating Characteristic (AUC) curve for predicting sepsis onset within a 6-hour window. Secondary outcomes included sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and average lead time.

The GRU deep learning model achieved an impressive AUC of 0.90 (95% CI: 0.89-0.91) for predicting sepsis onset 6 hours prior to clinical diagnosis. At an optimized threshold, the model demonstrated a high sensitivity of 85% and a specificity of 82%. The PPV was 28% (reflecting the low prevalence of true sepsis cases), while the NPV was 99.5%. The model provided an average lead time of 7.2 hours (IQR 6.0-8.5 hours) before clinicians officially diagnosed sepsis. Feature importance analysis revealed that subtle, dynamic trends in several physiological parameters, such as persistent increases in heart rate variability, small but continuous drops in mean arterial pressure, and rising lactate levels (even within normal limits initially), were collectively highly predictive, despite individual values often falling within 'normal' ranges. These findings underscored the model's ability to discern complex, multi-modal patterns that are often imperceptible to human clinicians.

This study demonstrates the power of deep learning, specifically GRU networks, in leveraging rich, longitudinal EHR data for the accurate and early prediction of sepsis onset. The model's high predictive performance and substantial lead time before clinical diagnosis offer a transformative opportunity for proactive intervention. By signaling impending sepsis hours in advance, this AI-driven decision support tool has the potential to significantly improve patient outcomes, reduce mortality rates, and optimize resource utilization in critical care settings. Future research will focus on prospective, real-time implementation and integration into clinical workflows to assess its impact on patient mortality and length of stay.

1. Singer M, et al. The Third International Consensus Definitions for Sepsis and Septic Shock (Sepsis-3). JAMA. 2016;315(8):801-810.

2. Moor M, et al. Early prediction of sepsis in the ICU using deep learning on electronic health records. NPJ Digit Med. 2019;2:5.

3. Calvert JS, et al. Machine learning for the prediction of sepsis in hospitalized patients. Crit Care Med. 2018;46(3):356-363.

4. Razavian N, et al. Early prediction of sepsis from clinical notes with deep learning. J Biomed Inform. 2021;119:103831.

5. van der Heijden J, et al. Deep learning to predict the onset of sepsis: A systematic review. J Crit Care. 2021;63:15-21.