Predicting Sepsis: The Race Against Time

Sepsis is a life-threatening medical emergency triggered by an extreme, dysregulated immune response to infection. In the high-stakes environment of the Intensive Care Unit (ICU), sepsis is a primary driver of mortality because of its deceptive and rapid progression; for every hour that targeted treatment is delayed, the risk of death increases by approximately 7.6%.

Developing a predictive model is essential because it transforms the ICU from a reactive environment to a proactive one. By leveraging real-time physiological data to identify high-risk patterns 1–4 hours before clinical onset, our model provides a critical window for physicians to initiate life-saving interventions, improving patient survival rates.

Project Abstract

MIMIC-IV Based Research

"Sepsis is a leading cause of mortality in intensive care units (ICUs), where timely recognition is critical for improving patient outcomes. In this study, we develop an ICU-hour–level early warning model using the MIMIC-IV database... Leveraging structured EHR data, we construct a temporally aligned prediction framework that estimates sepsis onset within a forward 1–4 hour window using only routinely collected vital signs."

Random Forest Model Performance Metrics

94.0%

Sensitivity

44.0%

Specificity

80.0%

Precision

10x

Precision Lift

Framework Specifications

Component Specification
Data Source MIMIC-IV (26,105 ICU Stays)
Observation Unit 940,734 ICU-hour observations
Classifier Random Forest (Stay-level split)

MIMIC-IV Data Architecture

Utilizing high-resolution clinical events for hourly sepsis prediction.

ICU Module Utilization

Our study is powered by the Medical Information Mart for Intensive Care IV (MIMIC-IV) database, a massive, de-identified repository of real-world clinical data from patients admitted to the Beth Israel Deaconess Medical Center. This dataset offers a standardized platform for developing early warning systems under realistic critical care conditions.

While MIMIC-IV covers broad hospital data, our research exclusively utilizes the ICU Module. This allows us to access high-resolution, timestamped clinical events and hourly physiologic measurements essential for tracking rapid sepsis deterioration.

Note: Sepsis onset is defined using structured timestamp fields, prioritizing SOFA-based criteria to ensure clinical relevance.
The chartevents Table Structure

Primary source for vital signs and physiologic measurements in the ICU.

Column Name Data Type
subject_idINTEGER
hadm_idINTEGER
stay_idINTEGER
caregiver_idINTEGER
charttimeTIMESTAMP(0)
storetimeTIMESTAMP(0)
itemidINTEGER
valueVARCHAR(200)
valuenumDOUBLE PRECISION
valueuomVARCHAR(20)
warningSMALLINT
Clinical Features Summary
Vital Signs
  • • Heart Rate
  • • Systolic Blood Pressure (sbp)
  • • Diastolic Blood Pressure (dbp)
  • • Mean Blood Pressure (mbp)
  • • Respiratory Rate
  • • Oxygen Saturation (SpO2)
  • • Body Temperature
  • • Glucose
Lab Values

Organ Function

  • • Creatinine (Renal)
  • • Bilirubin (Hepatic)
  • • Sodium, Potassium, Calcium

Coagulation

  • • INR, PT, PTT
  • • D-Dimer, Fibrinogen

Hourly Engineering: Raw measurements aggregated into Mean, Median, Min, Max, Std Dev, and Count statistics.

Preprocessing & Model Pipeline

From raw clinical data to actionable predictive insights.

Data Cleaning & Handling

Clinical data is inherently messy and sparse. To prepare the 940,734 ICU-hour observations for our Random Forest classifier, we implemented a rigorous cleaning pipeline:

  • Standardization: Sepsis indicators were standardized into a binary (0/1) format for consistent labeling.
  • Median Imputation: Predictor variables were imputed using training-set medians to handle missing values while preserving feature distributions.
  • All-NaN Removal: Feature columns entirely missing in the training split were removed to ensure numerical stability.
  • Class Imbalance: We utilized balanced_subsample class weights to address the low (4.5%) event prevalence.
Random Forest Pipeline Details
Algorithm Specifications
500 Trees | 5 Min Leaf Size | 10 Max Depth
Temporal Integrity Measures

To ensure the model is truly predictive and not retrospective, we applied two critical constraints:

  1. Post-Onset Censoring: All observations occurring at or after the sepsis onset timestamp were removed to prevent label leakage.
  2. Stay-Level Splitting: Data was split by stay_id rather than individual rows, ensuring no patient data appeared in both training and test sets.

Multimorbidity Phenotypes

Addressing patient heterogeneity through Latent Class Analysis (LCA).

LCA Cluster Visualizations

Distribution of chronic conditions across identified latent classes.

Beyond Raw Vital Signs

Most septic patients possess multiple chronic diseases which cause their bodies to respond differently when an infection begins. Our framework uses Latent Class Analysis (LCA) to identify shared chronic disease patterns.

Layered Modeling: By combining phenotype context with pre-onset trajectory analysis, the model captures longer-term baseline vulnerability alongside short-term acute physiologic changes.

Subgroup 1
Cardiopulmonary

Pulmonary circulation, chronic pulmonary issues, and hypertension.

Subgroup 2
Young

Fewer comorbidities; identifiers include alcohol abuse and depression.

Subgroup 3
Hepatic/Addiction

Liver disease, alcohol abuse, and fluid electrolyte instability.

Subgroup 4
Complicated Diabetes

Renal failure, congestive heart failure, and hypertension.

Subgroup 5
Uncomplicated Diabetes

Uncomplicated diabetes often paired with fluid electrolyte issues.

Subgroup 6
Cardiac

Congestive heart failure, cardiac arrhythmias, and hypertension.

Predictive Reliability & Cost Analysis

Clinical Cost Matrix

In sepsis care, False Negatives (missing a septic patient) are the most dangerous outcome. Our model is specifically tuned to prioritize sensitivity to ensure these high-risk cases are not overlooked.

Pred: No Sepsis
Pred: Sepsis
Actual No Sepsis
53,224
TN
68,471
FP
Actual Sepsis
17,860
FN (Danger)
278,381
TP

*Metrics derived from hold-out stay-level test set.

Model Benchmarks
Model ROC-AUC PR-AUC F1
Random Forest 0.842 0.925 0.862
DNN 0.976 0.643 0.620
RNN 0.920 0.380 0.428
Logistic Regression 0.736 0.140 0.0

While the DNN achieved a higher ROC-AUC (0.976), the Random Forest was selected as the optimal clinical tool due to its significantly higher PR-AUC (0.925) and F1 Score (0.862).

Project Conclusion

From high-fidelity research to proactive clinical intervention.

Key Research Outcomes

Our investigation into the MIMIC-IV ICU Module demonstrates that an hour-level prediction framework can successfully forecast sepsis onset 1–4 hours in advance.

  • High Detection Fidelity: Achieving 94% sensitivity and 44% specificity.
  • Clinically Actionable Alerts: Achieving alert enrichment more than 10× over baseline prevalence to combat alert fatigue.
  • Phenotype Awareness: Proving that integrating multimorbidity context captures essential patient heterogeneity for better ICU risk prediction.
The Path to Deployment

Our next primary objective is to transition this framework from a research environment to a live clinical tool.

Collaboration: AWS API & Dashboard

We are currently collaborating with a partner team to deploy our Random Forest model on AWS via an API inference service.

We are developing a Clinical Decision Support Dashboard. By integrating our phenotype-aware risk scores into this dashboard, we aim to provide ICU doctors with proactive alerts, enabling life-saving interventions before clinical sepsis onset occurs.

Research Contributions

Samuel Mahjouri • Utkarsh Lohia • Juntong Ye • Kate Zhou • Kyle Shannon (Mentor)

University of California, San Diego | Halıcıoğlu Data Science Institute