SEPRES includes a data integration system equipped with a sepsis early warning module. The data integration system collects, stores, processes, and displays medical data. The sepsis early warning module included a sepsis prediction model and an interpretative tool. The sepsis prediction model is an ensemble of multiple machine learning models. The interpretative tool provides information on how the model works by assigning importance to the input features. Our study complies with the relevant reporting guidelines, namely the Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis (TRIPOD) statement [24].
Data acquisition
Data sources
Our study used the Medical Information Mart for Intensive Care (MIMIC-III) database (version 1.4) [25] and the private Historical Database of Ruijin Hospital (HDRJH). MIMIC-III encompasses 61,532 patients admitted to the ICU at Beth Israel Deaconess Medical Center in Boston from 2001 to 2012, and HDRJH encompasses approximately 1777 patients from 2011 to 2019. In addition to retrospective data, we also collected predictions of consecutive 67 patients from the SEPRES system running in the ICU at Ruijin (RJ) Hospital between February 2021 and June 2021 as a validation of the model in the real world.
Sepsis definitions
We defined sepsis according to the definition of the Third International Consensus for sepsis (Sepsis-3) [2], combining suspected infection and Sequential Organ Failure Assessment (SOFA) score. Details can be found in Additional file 1: Appendix 1.
Feature extraction
We extracted 78 and 63 patient variables from the MIMIC-III and HDRJH, respectively. After data cleaning, we extracted these variables as features, i.e., maximum, average, median, and minimum, at hourly intervals, and the missing data were padded by the nearest value before or a preset default value. We filtered out 1057 positive and 5834 negative patients in the MIMIC-III dataset, and 144 positive and 309 negative patients in the HDRJH dataset, respectively. We used a 5-h time window from the patients to predict sepsis. See Additional file 1: Appendix 1 for details.
Machine learning models
In the following two sections, we describe the methodology for developing a sepsis prediction model that outputs the risk of sepsis onset within 5-h preceding at most. To improve the prediction performance in the specific hospital and to avoid the poor performance of direct training due to its insufficient data, the models were first trained in MIMIC-III and then finetuned in HDRJH using transfer learning techniques. The ultimate sepsis prediction model was obtained by integrating multiple models using ensemble learning techniques.
Multiple models were trained on the MIMIC-III dataset, including support vector machine (SVM), multilayer perceptron (MLP), gradient boosting machine (GBM), and long short-term memory (LSTM). For GBM, we used XGBoost [26] and LightGBM [27] as implementations.
We utilized the standard training methods to train these models with necessary normalization which can be summarized by the following formula:
$$\widetilde{{x_{j}^{i} }} = \frac{{x_{j}^{i} - \mathop {\min }\limits_{{i^{\prime}}} x_{j}^{{i^{\prime}}} }}{{\mathop {\max }\limits_{{i^{\prime}}} x_{j}^{{i^{\prime}}} - \mathop {\min }\limits_{{i^{\prime}}} x_{j}^{{i^{\prime}}} }}$$
where \({x}_{j}^{i}\) is the value of the j-th feature of the i-th sample, and \(\widetilde{{x}_{j}^{i}}\) is the value after scalarization. The hyperparameters and structures of each model were tuned based on the validation set.
See Additional file 1: Appendixs 4 and 5 for details.
Transfer learning
Based on the integrated considerations of the performance including accuracy, the area under the receiver operating characteristic curve (AUC), sensitivity, and inference speed on the MIMIC-III dataset, we selected the LightGBM and MLP for sepsis prediction on the RJ Hospital data.
The process of transfer learning can be divided into two steps. First, we normalized the data in the MIMIC-III dataset and the HDRJH dataset respectively so that the features were all scaled between 0 and 1. Second, we performed the transfer of the model parameters. Specifically, for LightGBM, the previous four hours of features in MIMIC-III were masked during training to assist transfer learning. After that, inputs from the HDRJH dataset were fed to finetune with the initial parameter values taken from the trained model from MIMIC-III. For MLP, we first froze the parameters of the first three of the six layers of the MIMIC-III models and initialize the parameters of the last three layers. After training on HDRJH, the models were unfrozen and fine-tuning is performed. We also used an ensemble learning method to integrate the LightGBM and MLP models by taking the inference average. The ensemble model is employed for practical sepsis prediction in RJ Hospital.
Interpretive analysis
We interpreted our prediction models using Shapley additive explanation (SHAP) [28], a game theory-based approach that assigns an importance value to each feature of each prediction.
Real-time prediction system
We detail the implementation of our real-time prediction system in [29]. When a model inference command is executed, the sepsis early warning module obtains real-time features of the patient from the data integration system via SQL query statements, which are then preprocessed, inferred, and interpreted by the module. The data integration system includes a physical server with the PostgreSQL database for storage of sepsis warning-related data and a webserver deploying the portal for user access. The medical device integration hub was placed at the bedside, receiving and transmitting data to the data integration system with a time delay of less than 10 s. Using the network or RS-232 interface, the data integration system can integrate data from IntelliVue Information Center, ventilators, Philips ICCA system, Laboratory Information System (LIS), and Hospital Information System (HIS).