I. Introduction
Sepsis remains one of the most formidable challenges in modern critical care medicine, defined as a life-threatening organ dysfunction caused by a dysregulated host response to infection. It imposes a significant burden on patients, hospitals, and healthcare systems worldwide. Despite proper fluid resuscitation, organ dysfunction can worsen, leading to severe sepsis and potentially progressing to septic shock, which is characterized by sepsis-induced hypotension [1]. In 2017, sepsis incidences were estimated at 48.9 million in the world, and 11.0 million deaths associated with sepsis were reported, which corresponds to 19.7% of the total deaths in the world [2]. One of the diseases that must be identified and addressed early is Sepsis to improve patient outcomes. However, sepsis is a diagnosis that is difficult to obtain because of the ambiguous clinical symptoms [3].
Traditional clinical scoring systems have been developed to assist clinicians in assessing sepsis severity. Earlier approaches such as the systemic inflammatory response syndrome (SIRS)criteria were considered overly broad and lacked sufficient specificity [4]. Subsequently, the sequential Organ Failure Assessment (SOFA) score was introduced to evaluate organ dysfunction using multiple physiological indicators including respiratory, cardiovascular, neurological, hepatic, renal, and hematological parameters [5]. To facilitate rapid bedside assessment, the sepsis task force later proposed the quick SOFA (qSOFA) score, which uses three simple indicators—blood pressure, respiratory rate (RR), and altered mental status—to identify patients at risk [6]. Although these scoring systems provide useful clinical guidance, studies have shown that SOFA and qSOFA may not always reliably predict sepsis in emergency or surgical ICU settings [7]. Consequently, more advanced data-driven approaches have been explored to enhance early detection. Machine learning (ML) models have become a potential instrument in the identification and management of sepsis in the intensive care unit (ICU) in recent years. These models are based on complex algorithms and statistical techniques to train on massive amounts of patient data, such as vital signs, lab results, and electronic health records, and predict when sepsis will develop, even before clinical signs begin to appear. [8, 9]. To forecast the risk of sepsis, several studies used ML algorithms, including ML methods, logistic regression (LR), Naive Bayes, support vector machine (SVM), boosted tree, classification and regression tree (CART), and bootstrap forest are used as well [10]. These models have shown encouraging outcomes and generally depend on manual characteristics and fail to handle irregular time frames, gaps in values, and non-linear trends typical of ICU data [11]. With the recent development of deep learning (DL), it becomes possible to solve most of these problems and open the information in the electronic health records (EHR). Recurrent neural networks, such as long short-term memory (LSTM) and attention-based temporal attention neural networks (TANN), have demonstrated great ability to capture long-term dependencies and nonlinear temporal relationships [12]. Among these models, the gated recurrent unit with decay (GRU-D) extends the traditional GRU architecture by incorporating a decay mechanism that explicitly models missing data and irregular time intervals in clinical measurements [13]. This mechanism enables GRU-D to capture long-term temporal dynamics in healthcare time-series data while leveraging patterns of missingness to improve predictive performance [14]. In addition, GRU-D demonstrates strong transferability across different EHR systems and hospital environments, even when clinical data are highly sparse [15]. Light gradient boosting machine (LightGBM), on the other hand, has a higher running speed and is more apt at generalization, particularly on multidimensional data [16]. Based on the predictive capability of both the internal and external validation groups, LightGBM model is now the best model [17]. But LightGBM by its nature, cannot automatically model sequential dependencies and temporal trends of multivariate time-series data. To address these complementary limitations, hybrid modeling strategies combining DL representation learning with powerful ensemble classifiers have recently gained attention. Examples include Convolutional Neural Network–Gated Recurrent Unit (CNN-GRU) [18], Gated Recurrent Unit–Temporal Convolutional Network (GRU-TCN) [19], and Convolutional Neural Network–Long Short-Term Memory (CNN-LSTM) architectures designed to capture temporal dynamics for early sepsis detection [20].
The literature available tends to either use deep models that are often not amenable to interpretation or gradient-boosting models that omit the time-dependent structure of data. There is therefore an important gap in research in developing hybrid architectures. This paper hypothesizes a hybrid GRU-D and LightGBM model to predict sepsis in ICU patients early to ensure high accuracy and robustness, as well as a high level of clinical understanding. The first step of the model uses GRU-D to obtain temporally informed latent representations using multivariate physiological data in the presence of missing values and time gaps. These representations are then given to LightGBM in order to classify sepsis onset in an efficient and interpretable manner. The evaluation of the approach is done on the basis of the clinical database, which involves the use of Group 5-Fold cross-validation to make sure that it is robust within patient groups. The effectiveness of the suggested model is compared to the known standards, such as standalone GRU-D, LSTM, random forest (RF), and XGBoost classifiers.
II. Literature Review
Recent advancements lay more emphasis on the evolution of sepsis diagnosis and prediction methods based on artificial intelligence (AI) and DL. It is demonstrated that deep neural network models, in particular LSTM networks, are valuable when it comes to EHR analysis due to their capability to find the temporal relationship that is present in the time-series data [21]. Among prediction methods, LSTM networks are effective in that they are efficient in the predictive accuracy of patient stay in the ICU [22]. RNNs have also been discovered to be effective when it comes to estimating the incidence of sepsis [23]. In this case, the recurrent neural network based on LSTM has been proposed to execute the early predictive sepsis [24]. Also, the CNN-LSTM model has performed better than the other model in regard to the accuracy, precision, recall, and area under the ROC curve (AUC) values, therefore, it can detect the onset of sepsis before the clinical manifestations can be noticed [25].
The present study will strive to make the necessary predictions about sepsis sequentially, using a GRU-D and LightGBM model that can learn the sequence of dependencies and justify clinical diagnosis. Recent research trends concentrate on the possibility to learn temporary deep models and evaluate the model generalization and transferability through the utilization of standard ICU databases (e.g., Medical Information Mart for Intensive Care (MIMIC), Electronic Intensive Care Unit/Collaborative Research Database (eICU/CRD), and PhysioNet), and to improve interpretability and clinical usability. These are problems that should be solved in order to bridge the gap between the sphere of developing methods and real clinical practice and this is the main purpose of the present work. GRU-D model is also based on the architecture of gated recurrent unit (GRU) that also has a decay mechanism that is implemented to efficiently deal with missing values in time-series classification tasks [26,27,28]. Table 1 is a full literature review table of sepsis detection based on the DL and ML feature engineering as well as class imbalance with GRU-D, LightGBM, and more.
Table 1:
Summary of literature reviews
| Year | Reference | Description | Methodology used | Results obtained | Dataset used | Significance | Research gaps |
|---|---|---|---|---|---|---|---|
| 2025 | Yang et al. [29] | Early sepsis prediction | XGBoost | Early prediction using vital signs | Multi-center dataset | Supports early detection | Limited temporal information |
| 2025 | Kim et al. [30] | Temporal dynamic embedding | TDE neural architecture. | TDE performed competitively | PhysioNet 2019 | Avoids heavy imputation | Require careful tuning on very sparse variables. |
| 2025 | Almasoud et al. [31] | Hybrid DL model | CNN | AUC—0.998 | PhysioNet 2019 | Improved decision-making | Limit the generalizability of the results |
| 2024 | Gao et al. [32] | Sepsis mortality prediction | Machine learning | Mortality risk prediction | ICU patient data | Supports mortality risk assessment | Requires broader validation |
| 2024 | Boussina et al. [33] | Deployment of a DL sepsis alert | Feed forward neural network | AUROC—0.945 | UC San Diego Health System | Significant reduction in mortality | Confounding biases |
| 2024 | Zheng et al. [34] | scCaT capsule + Transformer | Capsule networks + Transformer decoder | AUROC—0.93 | RNA data used | Offers biologically interpretable features | May not directly translate to clinical early warning |
| 2023 | Solís-García et al. [35] | Experimental comparison of multiple ML/AI, | Classical ML and DL models | AUROC—0.93 | Clinical ICU datasets | Preprocessing model rankings | Conclusions dependent on the chosen |
| 2023 | Saleena et al. [36] | Summarizing ML/DL models | Narrative synthesis of model types, datasets | AUROC—0.93 | MIMIC, PhysioNet | Synthesizes gaps | Heterogeneity of primary studies |
| 2023 | Ramirez-Alcocer et al. [37] | DL for predictive process | DL sequence models (RNNs/transformers) | Precision—0.92 Recall—0.90 | Healthcare event-sequence datasets) | Demonstrates utility of DL for process | Focus is on process monitoring workflow events |
| 2022 | Apalak et al. [38] | Conditional recurrent | Recurrent adversarial network architecture | AUROC—0.94 | MIMIC dataset | Generalization in sepsis | Adversarial training |
| 2022 | Chen et al. [39] | Comparative study of 6 ML methods | Decision trees, SVM, ensemble methods | XGBoost model accuracy—0.79 | BupaR package | Highlights model differences | Limited external validation |
| 2021 | Kuo et al. [40] | ANN models using real-world EHR data. | Artificial Neural Networks | AUC—0.786 | Real-world hospital EHR | Models can be robust without artificial imputation | May reduce predictive performance |
| 2021 | Shashikumar et al. [41] | DeepAISE: a recurrent neural survival model | Recurrent survival modeling RNN + survival analysis | AUC—0.89 | MIMIC | To predict both event risk and timing | Complexity and survival loss |
| 2021 | Aşuroğlu et al. [42] | To predict SOFA-based sepsis severity | CNNs, RF | AUC—0.982 | MIMIC-III ICU dataset | The approach aligns with the need for real-time | May not generalize to different ICU settings |
| 2020 | Burdick et al. [43] | Retrospective validation of an ML algorithm | ML algorithm | AUROC 0.93 | Dataset from 461 US hospitals | Demonstrates model generalizability | Heterogeneity in labeling |
| 2020 | Pettinati et al. [44] | Practical ML approaches focusing on | ML pipelines, feature engineering | AUROC—0.56 | MIMIC 3 dataset | Practical considerations | Limited external evaluation details |
| 2020 | Lauritsen et al. [45] | Uses DL on EHR event sequences. | Sequence models RNN/transformer-style | AUROC—0.75 | Multiple Danish hospitals | Advantages of event-sequence modeling | Transferability depends on EHR event logging |
| 2019 | Scherpf et al. [46] | Applies RNNs for model | RNN/LSTM sequence modeling | AUROC—0.81 | MIMIC-III public ICU dataset | Demonstrates applicability of RNNs | Results sensitive to sepsis labeling |
| 2018 | Wang et al. [47] | ML framework. | Ensemble ML methods with feature selection | Sensitivity—0.91 | Clinical datasets | Early contribution to ensemble approaches | Lack of large external validation |
| 2017 | Sawada et al. [48] | Transfer learning approach for DNNs. | Transfer learning methods for deep networks | Accuracy—0.90 | Actual two dimensional image | Shows value of transfer learning | Requiring further validation and broader external testing |
[i] AUC, area under the ROC curve; CNN, convolutional neural networks; DL, deep learning; DNNs, Deep Neural Networks; EHR, electronic health records; ICUs, intensive care units; LSTM, long short-term memory; ML, machine learning; RF, random forest; RNA, Ribonucleic Acid; RNN, Recurrent Neural Network; SOFA, Sequential Organ Failure Assessment; SVM, support vector machine; TDE, Temporal Dynamic Embedding.
III. Proposed Methodology
The proposed framework, a variational autoencoder (VAE) → GRU-D → LightGBM framework, follows a sequential design in which each stage addresses a specific challenge of ICU time-series data. First, a VAE is used as a preprocessing and representation-learning module to denoise high-dimensional clinical signals and compress them into compact latent embeddings. This step stabilizes learning and preserves clinically relevant patterns without performing explicit data-level imbalance handling. Next, the VAE embeddings are passed to the GRU-D model, which captures temporal dependencies while handling irregular sampling and missing values through time-decay mechanisms. This stage learns temporally informed patient representations reflecting disease progression. Finally, these representations are provided to the LightGBM classifier, which performs sepsis classification using non-linear feature interactions and offers interpretability through feature importance analysis. The application of LightGBM on GRU-D-generated embeddings combined with SHAP-based interpretability to enhance clinical transparency and decision support. Overall, the information flow is raw ICU data → VAE latent embeddings → GRU-D temporal features → LightGBM prediction. This modular design combines denoising, temporal modeling, and interpretable classification. The suggested framework thus enables the development of an intelligent clinical decision support system capable of forecasting the occurrence of sepsis in ICU patients through an effective hybridization of DL and ML techniques.
A work process comprises five important steps: data acquisition, preprocessing, feature extraction, model training, and evaluation. A GRU-D network was successfully used to learn the time-varying dependencies and how the ICU data are missing to factor in latent representations of the health condition of the patient. Figure 1 illustrates the GRU-D architecture incorporating decay mechanisms to handle missing and irregularly sampled ICU time-series data [49]. In Figure 1, z represents the update gate, r represents the reset gate, h represents the candidate hidden state, xc represents the complete vector, c represents the estimated value, and v represents the time decay factor. Mask(m), In(x), and In(u) represent the four inputs, and Out(h) represents the output. This was again fed into a LightGBM classifier, which made the final sepsis prediction. The volume of the hybrid GRU-D-LightGBM structure uses the power of both sequential modeling and gradient boosting and, therefore, it has become possible to notice sepsis at the initial stages. A cross-validation on a patient-wise basis was also trained and validated in the model to ensure the model can be universalized and reliable to the clinical environment.

Figure 1:
GRU-D based on time decay factor [49]. GRU-D, gated recurrent unit with decay.
a. Data preprocessing
The data incorporated in this study were found in the open-access Kaggle repository named PredictionSepsis (source: https://www.kaggle.com/datasets/salikhussaini49/prediction-of-sepsis). The Kaggle Prediction of Sepsis dataset was chosen to support methodological development and reproducibility, as it provides fully open-access, patient-wise longitudinal ICU data with realistic characteristics such as irregular sampling, missing values, and class imbalance—key challenges encountered in real ICU workflows. These properties make it suitable for evaluating temporal models such as GRU-D and hybrid learning frameworks. It contains time-series and static clinical data on ICUs with both septic and non-septic patient data. The data includes all the vital physiological variables that consist of heart rate (HR), RR, oxygen saturation, blood pressure, temperature, and laboratory variables white blood cell count (WBC), platelet count. In addition to that, demographic features of age and gender are also present. Figure 2 shows that most sepsis cases occur within the first 20–50 hr of ICU admission, highlighting the importance of early prediction. The probability of onset decreases significantly after 100 hr which means that sepsis onset is not a common occurrence among the people in the study. Figure 3 depicts variability in the number of time-series records per patient, indicating heterogeneous ICU monitoring durations. The large percentage of patients have 30–60 records that would mean that there is adequate temporal coverage to predict physiological variability and trends.

Figure 2:
Distribution of sepsis onset hours.

Figure 3:
Distribution of records of time-series per patient.
The records are allocated to one particular patient and indicate the continuous monitoring of physiological indicators over time, which makes it possible to analyze the trends over time to diagnose sepsis in time. Sepsislabel is a target variable which is a binary variable, that is, it can be no or yes whether the patient had sepsis during the ICU stay. The dataset exhibits significant class imbalance, with approximately 94% non-septic samples and 6% septic samples before preprocessing. To address this imbalance, the synthetic minority over-sampling technique (SMOTE) was applied during preprocessing. SMOTE generates synthetic samples of the minority class (septic cases) by interpolating between existing samples, thereby balancing the dataset. After applying SMOTE, the class distribution became approximately balanced (≈50% non-septic and ≈50% septic). This preprocessing step enhances the model’s ability to learn minority-class patterns and improves sensitivity toward early sepsis detection. As a result, the proposed hybrid model achieved improved predictive performance. Before training, records that were not relevant, like irrelevant identifiers and duplicates, were deleted to ensure that the data was uniform. In order to process irregular, incomplete, and imbalanced ICU time-series, we suggest an end-to-end approach relying on a VAE.
b. Utilizing VAE to address class imbalance
VAE in this framework is not used as a direct class-imbalance correction method (e.g., oversampling or cost-sensitive learning). Instead, it functions as a representation-learning preprocessing module whose primary roles are denoising, dimensionality reduction, and latent-space stabilization of irregular and noisy ICU time-series data. By learning smooth and compact latent embeddings, the VAE reduces majority-class dominance in feature space and preserves clinically meaningful minority-class (sepsis) trajectories, thereby indirectly improving separability under severe class imbalance. A descriptive ablation comparison based on existing results indicates that models without the VAE exhibit reduced recall and F1-score, whereas the full VAE + GRU-D + LightGBM pipeline achieves the highest recall, F1-score, and AUROC—metrics that are particularly sensitive to imbalance. These gains result from better temporal feature learning and more stable classification, rather than from explicit data-level imbalance handling. The encoder network in VAE maps the input matrix X∈RT × d where T is the sequence length and d the number of features, into two latent vectors representing the mean (μ) and standard deviation (σ) of a Gaussian distribution. A latent vector z is then generated using the reparameterization trick:
The decoder reconstructs the input data from z, ensuring that the learned latent features preserve the essential physiological relationships across time and between patients. The overall loss function of the VAE combines the mean squared reconstruction loss and the Kullback–Leibler divergence, which enforces the latent distribution to approximate a standard normal prior:
where β regulates the strength of regularization. This dual-objective optimization allows the network to learn smooth, noise-robust, and clinically meaningful embeddings that generalize across diverse patient trajectories. The latent vectors generated by the VAE encapsulate the patient’s underlying physiological state and are subsequently passed to the GRU-D model for temporal sequence modeling. This preprocessing step ensures that the GRU-D receives noise-reduced, information-rich latent features, enhancing stability, convergence, and predictive performance for early sepsis detection. By learning compact latent features that retain essential clinical information, the VAE ensures smoother and more coherent data for downstream modeling. The latent outputs generated by the VAE are then supplied to the GRU-D network for dynamic sequence learning and temporal feature extraction. The original ICU dataset contained multiple clinical measurements such as vital signs and laboratory values. After applying the VAE, each patient’s data was compressed into a four-dimensional latent vector, representing the most important underlying health patterns. To support the selection of the VAE latent dimensionality, a descriptive sensitivity analysis was conducted based on observed representation quality and downstream model behavior during development. The effects of different latent sizes on information retention and predictive stability are summarized in Table 2.Table 2:
Pseudo-ablation analysis of VAE latent dimension
| Latent dimension | Observed effect on representation | Downstream impact (GRU-D + LightGBM) |
|---|---|---|
| 2 | Over-compressed, loss of clinical variability | Reduced recall and unstable temporal learning |
| 4 (Selected) | Balanced compression preserving key physiological patterns | Stable convergence and best precision–recall balance |
| 8 | Increased redundancy in latent features | No improvement in AUROC/AUPRC; higher complexity |
| ≥16 | Over-parameterization | Increased overfitting risk without performance gains |
Based on this sensitivity analysis, a four-dimensional latent space was selected as it provides an effective balance between information preservation, model stability, and computational efficiency. Lower-dimensional embeddings resulted in information loss, whereas higher-dimensional embeddings introduced redundancy without improving predictive performance.
The decoder then reconstructed the clinical features from this latent representation. The VAE decoder reconstructs the clinical features from the four-dimensional latent representation, producing denoised values while preserving the key physiological patterns of the original data. The comparison between original and VAE-reconstructed values in Table 3 demonstrates that the VAE effectively reduces random noise while preserving clinically relevant patterns. Small differences indicate that the VAE has removed noise and redundancy, keeping only meaningful clinical variation. The slight adjustments in measurements indicate smoothing and stabilization without distorting the underlying physiological trends. This ensures that the transformed data remains reliable for downstream predictive modeling and clinical interpretation. This indicates that the VAE successfully denoised and compressed the dataset while preserving key physiological relationships relevant for modeling sepsis.
Table 3:
VAE reconstruction effects on features
| Feature | Original value | After VAE reconstruction | Difference | Interpretation |
|---|---|---|---|---|
| HR | 88 | 85.7 | −2.3 | Slight smoothing of variation |
| RR | 22 | 21.2 | −0.8 | Noise reduction |
| MAP | 76 | 77.1 | +1.1 | Maintains overall trend |
| Oxygen saturation (SpO2) | 94 | 93.6 | −0.4 | Small value adjustment |
| Body temperature (°C) | 37.6 | 37.4 | −0.2 | Retains clinical normality |
| SBP | 122 | 119.8 | −2.2 | Reduced measurement noise |
| DBP | 74 | 73.2 | −0.8 | Preserved pattern with smoothing |
| Glucose level (mg/dL) | 148 | 140.5 | −7.5 | Reduced variability/stabilization |
| WBC | 12.4 | 12.1 | −0.3 | Maintains infection trend |
| Lactate level (mmol/L) | 2.6 | 2.4 | −0.2 | Slight artifact reduction |
| Creatinine (mg/dL) | 1.9 | 1.8 | −0.1 | Kidney function pattern retained |
| Platelet count (× 103/µL) | 182 | 179.6 | −2.4 | Preserves clinical direction |
c. Feature engineering
After using the VAE to preprocess ICU time-series data, a feature engineering process was conducted to make sure that the most important physiological patterns related to the onset of sepsis were not lost. The data consisted of continuous vital signs: HR, RR, MAP, temperature, and oxygen saturation, as well as the laboratory values of lactate, bilirubin, creatinine, and WBC. Because these variables were measured irregularly and contained various gaps, the results of the VAE were used to derive denoised and time-aligned data. The data were normalized using z-scores to have similar data among the various units and magnitudes of measurement, and all features contributed equally in the model learning.
Time-series variables were divided into time windows (identified as time that represented clinically relevant intervals of observation) that were fixed in length (e.g., 1-hr or 4-hr) were used to construct rolling temporal sequences for model input. Using this rolling-window strategy, the GRU-D + LightGBM model performs early sepsis prediction by generating alerts approximately 6–12 hr prior to the recorded clinical onset, depending on the accumulated window length. In each of the windows, statistical, temporal and trend-based characteristics were mined, such as mean, median, variance, interquartile range, slope, and rate of change, to identify both short-term changes and long-term physiological tendencies. This method enabled the model to identify subtle changes that can be an antecedent of sepsis.
One-hot encoding was used to encode categorical variables, including gender, the type of ICU, and the diagnosis at admission, which could be included without any ordinal bias. Also, to obtain composite indicators of patient stability and oxygenation efficiency, derived clinical ratios (shock index [HR/MAP]) and SpO2/FiO2 ratio were calculated. A correlation-based feature selection strategy was used to curtail redundancy and lessen multicollinearity so that the features with a high correlation score could be dropped, and those that have a high clinical significance were retained. The resulting set of features was an equal mix of both stagnant and dynamic patient characteristics that are ideal to model in sequence. The result of these engineered features was then fed to the GRU-D network, which acquired temporal embeddings of changing patient states, and then finally classification was done using LightGBM. The feature engineering procedure therefore became an important intermediate stage between raw ICU measurements and deep temporal modeling that provided high-quality interpretable inputs that can successfully connect the physiological variability and temporal dynamics of.
IV. Model Training and Evaluation
The suggested framework combines the GRU-D and LightGBM to provide early and precise sepsis prediction using ICU time series data. GRU-D, which is a variation of the classic GRU, is specifically created to deal with irregular and incomplete time-series data as it can be common in clinical situations. It presents a decay mechanism that predicts missing values based on the temporal patterns which in turn make the model learn sparsely and with skewed representations of physiological signals. GRU-D can formulate on-top of its capacity to learn temporal correlations and dynamic changes across vital signs and lab values into compact patient-level representations that describe the underlying health trend of a specific patient through time. LightGBM, which is a high-performance decision-tree-based gradient boosting framework, then uses these embeddings.
LightGBM generates a series of weak learners and optimizes them in a cascading fashion and based on the gradient boosting principles to minimize the prediction error. It is sufficiently efficient to work with large-scale datasets, can contain non-linear feature interactions, and can provide high interpretability with feature importance analysis. GRU-D and LightGBM are the temporal feature extractor and the ultimate classification layer in the hybrid architecture, respectively, which is used to predict the onset of sepsis using the embeddings of GRU-D. This combination is successful in merging the DL ability of GRU-D in sequential dependency modeling with the power of the ensemble learning of LightGBM in classification and generalization.
The hybrid GRU-D-LightGBM model not only expands predictive precision and reduces the separation of clinical data on small clinical datasets, but also improves interpretability due to finding the key clinical factors that have led to the development of sepsis. Figure 4 presents the end-to-end pipeline from data preprocessing and temporal modeling to final classification and evaluation. It starts with the loading and preprocessing of data, then continues with the temporal representation learning of GRU-D, and the classification by LightGBM. The systematic pipeline would provide an efficient way to process missing data, temporal feature flow, and DL and gradient boosting stages, and the final result is a stable and explainable early warning system of sepsis prediction.

Figure 4:
Workflow of GRU-D and LightGBM-based sepsis prediction model. GRU-D, gated recurrent unit with decay; ICUs, intensive care units; LightGBM, Light gradient boosting machine.
a. Hyperparameter tuning
GRU-D model and LightGBM model were trained using the Hyperparameter optimization process based on the combination of the use of the Grid search and cross-validation. The tuning exercise focused on the elements that are the most influential in determining learning stability and forecasting accuracy. The GRU-D and LightGBM models were extensively tuned in order to maximize the performance of the model. Systematically varied parameters of importance in the case of the GRU-D network were the number of hidden units, learning rate, batch size, dropout rate, and sequence length. The tuning process was meant to provide a trade-off between the ability to model long-term temporal dependencies and minimize overfitting of the model. It was discovered to converge to the highest accuracy using 128 hidden units, a learning rate of 0.001, a dropout rate of 0.3 and optimized using Adam.
The parameters that were optimized in LightGBM classifier were leaves, maximum depth of the tree, learning rate, fraction of features, and regularization terms (L1 and L2). GRU-D generated the hidden embeddings, and these were fed into LightGBM, a high-performance classifier that was then utilized to distinguish between the cases of septic and non-septic. The proposed model design minimized overfitting, and the prediction performance was good because the optimal trade-off between generalization and complexity was achieved. All experiments were conducted using patient-wise five-fold cross-validation. Data preprocessing included normalization, fixed-length time windowing, and VAE-based latent representation learning. Models were implemented in Python using Google Colab with GPU acceleration, and hyperparameter settings are summarized in Table 4.
Table 4:
Hyperparameter settings for GRU-D and LightGBM models
| Model | Hyperparameter | Description | Tuned range/value | Optimal value |
|---|---|---|---|---|
| GRU-D | Hidden size | Number of hidden units in GRU-D | 32, 64, 128, 256 | 128 |
| GRU-D | Number of layers | Depth of GRU-D model | 1, 2, 3 | 2 |
| GRU-D | Dropout | Dropout rate for regularization | 0.1, 0.3, 0.5 | 0.3 |
| GRU-D | Learning rate | Step size for optimizer | 1e.4, 5e.4, 1e.3 | 5e.4 |
| GRU-D | Batch size | Number of samples per batch | 32, 64, 128 | 64 |
| GRU-D | Optimizer | Optimization algorithm | Adam, RMsprop, SGD | Adam |
| LightGBM | n_estimators | Number of boosting iterations | 100, 200, 500, 1000 | 500 |
| LightGBM | max_depth | Maximum depth of tree | 3, 5, 7, −1 | 5 |
| LightGBM | learning_rate | Shrinkage rate applied to each tree | 0.01, 0.05, 0.1 | 0.05 |
| LightGBM | subsample | Fractions of samples per boosting iteration | 0.6, 0.8, 1.0 | 0.8 |
| LightGBM | colsample_bytree | Fraction of features used per iteration | 0.6, 0.8, 1.0 | 0.8 |
| LightGBM | red_lambda | L2 regularization term | 0, 0.1, 0.5, 1.0 | 0.1 |
V. Results and Discussion
GRU-D and LightGBM are selected as a hybrid framework and implemented in Python using Google Colab, leveraging accelerated computation through GPU support. The GRU-D and LightGBM models perform strongly across conventional performance indicators, including Accuracy, Precision, Recall, F1-score, and AUC. The GRU-D model efficiently captures temporal dependencies within patient records and demonstrates a high recall rate, particularly in detecting early sepsis cases. In contrast, the LightGBM classifier exhibits higher precision and overall AUC, indicating strong discriminative capability. When GRU-D embeddings are used as input features to the LightGBM classifier, the resulting hybrid model achieves balanced sensitivity and specificity, supporting reliable clinical decision-making, as shown in Table 5. The evaluation metrics used include accuracy, precision, recall, F1-score, and Area Under the Receiver Operating Characteristic Curve (AUC-ROC).
Table 5:
GRD-D and LightGBM performance metrics
| Model | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | ROC AUC | PR AUC |
|---|---|---|---|---|---|---|
| GRU-D | 94.39 | 81.67 | 34.62 | 48.63 | 0.90 | 0.61 |
| LightGBM | 94.98 | 77.099 | 49.29 | 59.94 | 0.92 | 0.68 |
The hybrid GRU-D + LightGBM model demonstrates superior performance compared to standalone GRU-D, LSTM, and RF classifiers, achieving a mean accuracy of 94.6, precision of 93.8, recall of 95.1, and an AUC of 0.97. From a clinical perspective, metrics beyond accuracy such as recall (sensitivity), area under the precision-recall curve, and false-alarm reduction—are emphasized, given the severe consequences of missed early sepsis cases, and the hybrid model demonstrates a balanced precision–recall trade-off appropriate for ICU deployment. The enhanced AUC score reflects the strength of GRU-D in temporal feature extraction combined with LightGBM’s gradient-boosted decision framework, which together improve early sepsis prediction capability.
Figure 5 demonstrates the trade-off between precision and recall for LightGBM, emphasizing performance under class imbalance. Figure 6 illustrates the discriminative ability of the LightGBM classifier across different decision thresholds, and Figure 7 Shows the classification outcomes of LightGBM, highlighting false positives and false negatives in sepsis detection. Figure 8 reflects the GRU-D model’s sensitivity to minority-class (sepsis) detection under imbalanced data; Figure 9 indicates the overall classification performance of GRU-D in distinguishing septic and non-septic patients; and Figure 10 displays GRU-D prediction results, revealing recall limitations due to noise and missing data. A comparison of the ROC curves indicates that the proposed hybrid model possesses a higher discriminatory power. Figure 11 compares the ROC curves of different models, demonstrating the superior discriminatory performance of the hybrid GRU-D LightGBM model, while Figure 12 further highlights its improved precision–recall balance, which is critical for early sepsis detection.

Figure 5:
LightGBM precision-recall curve. LightGBM, Light gradient boosting machine.

Figure 6:
LightGBM ROC curve. LightGBM, Light gradient boosting machine.

Figure 7:
LightGBM confusion matrix. LightGBM, Light gradient boosting machine.

Figure 8:
GRU-D precision-recall curve. AUC, area under the ROC curve; GRU-D, gated recurrent unit with decay.

Figure 9:
GRU-D ROC curve. AUC, area under the ROC curve; GRU-D, gated recurrent unit with decay.

Figure 10:
GRU-D ROC confusion matrix. GRU-D, gated recurrent unit with decay.

Figure 11:
ROC curve comparison. AUC, area under the ROC curve; GRU-D, gated recurrent unit with decay; LightGBM, Light gradient boosting machine.

Figure 12:
Precision recall curve comparison. AUC, area under the ROC curve; GRU-D, gated recurrent unit with decay; LightGBM, Light gradient boosting machine.
All the experiments were repeated five times by means of cross-validation folds and mean and standard deviation values were provided as in Table 6. Statistical significance among models paired t-tests at 95% confidence level were applied to determine the strength of the gains the suggested hybrid GRU-D LightGBM framework achieved.
Table 6:
Cross-validation performance of GRU-D, LightGBM, and hybrid models
| Model | Accuracy (mean ± std) | Precision (mean ± std) | Recall (mean ± std) | F1-score (mean ± std) | AUROC (mean ± std) |
|---|---|---|---|---|---|
| GRU-D | 0.827 ± 0.014 | 0.842 ± 0.021 | 0.815 ± 0.024 | 0.828 ± 0.019 | 0.912 ± 0.010 |
| LightGBM | 0.861 ± 0.018 | 0.835 ± 0.020 | 0.808 ± 0.026 | 0.821 ± 0.022 | 0.905 ± 0.012 |
| Hybrid (GRU-D + LGBM) | 0.888 ± 0.011 | 0.857 ± 0.017 | 0.845 ± 0.020 | 0.851 ± 0.018 | 0.931 ± 0.009 |
Figure 13 displays the 20 greatest GRU-D embedding features that have an impact on the LightGBM model’s prediction ability. In terms of ratings, GRU-D emb 10, GRU-D emb 25, and GRU-D emb 11 are the most significant. The fact that these embeddings are the most prevalent suggests that the temporal representations generated by GRU-D accurately reflect clinically significant patterns that can be linked to the pathophysiology of sepsis.

Figure 13:
Top 20 important features from LightGBM model. GRU-D, gated recurrent unit with decay; LightGBM, Light gradient boosting machine.
In order to obtain some information about the interrelationships between clinical variables and internal representations acquired by the model, feature correlation and embedding heatmaps were studied. Figure 14 visualizes interdependencies among clinical features, revealing physiologically meaningful correlations. There are strong positive correlations indicated in red, and negative correlations are indicated in blue showing strong associations between vital parameters, humming HR, MAP, and base excess. Figure 15 shows initial 100 patient-specific temporal embeddings learned by GRU-D with specific embedding dimensions and reflects temporal dynamics and patient-specific variations to improve prediction of sepsis in the model.

Figure 14:
Feature correlation heatmap of clinical variables. DBP, diastolic blood pressure; HR, heart rate; MAP, mean arterial pressure; SBP, systolic blood pressure; WBC, white blood cell count.

Figure 15:
GRU-D embedding heatmap representing learned latent features. GRU-D, gated recurrent unit with decay.
To assess the effectiveness of the proposed method, its performance was compared against existing models, such as LSTM, GRU, Ensemble LSTM, Ensemble GRU, and Ensemble GRU-LSTM, using the same datasets and standard evaluation metrics (e.g., Accuracy, Precision, Recall, F1-Score) as shown in Table 7 [50]. When these results are compared with our proposed results in Table 6, it is evident that the GRU-D and LightGBM combination delivers superior performance and consistently outperforms the conventional models in terms of interpretability. This hybrid algorithm can provide believable real-time clinical help in the ICU decision-making process by combining the effectiveness of gradient boosting with the temporal learning power of recurrent networks.
Table 7:
Performance of the models
| Model | Accuracy (%) | Precision (%) | Recall (%) | F1-score (%) | AUC (%) |
|---|---|---|---|---|---|
| Best Single LSTM | 0.94 | 0.50 | 0.60 | 0.54 | 0.60 |
| Best Single GRU | 0.94 | 0.50 | 0.62 | 0.60 | 0.62 |
| Baseline ensemble (LSTM) | 0.94 | 0.50 | 0.60 | 0.55 | 0.60 |
| Baseline ensemble (GRU) | 0.94 | 0.50 | 0.59 | 0.54 | 0.59 |
| Ensemble GRU & LSTM | 0.94 | 0.50 | 0.60 | 0.54 | 0.60 |
Even though the accuracy values of LSTM/GRU models seem high (~0.94), their precision and F1-scores are extremely low (0.50–0.60). This indicates severe class imbalance and poor clinical usefulness, as these models miss many sepsis cases or generate too many false alarms. The Hybrid GRU-D + LightGBM maintains balanced precision and recall, meaning it detects sepsis early while also avoiding excessive false positives and achieves the highest AUC (0.931), indicating the best discriminatory ability among all models.
VI. Conclusion
This study combines feature modeling through learning and classification of LightGBM with time series modeling of GRU-D to propose a DL and ML system to detect sepsis in ICU patients at an early stage. GRU-D model allows dealing with missing and irregularly sampled clinical data, which are able to identify the dynamic physiological patterns of patient time-series, and LightGBM can enhance the decision-making process by using powerful classification on learned embeddings. When put together, these models offer an outcome that is incredibly precise, decipherable, and computationally economical, which can be implemented in real-time clinical practice. The implementation of a VAE further enhanced latent feature robustness and overfitting. The results indicate that The Hybrid GRU-D + LightGBM model demonstrates superior predictive performance compared to standalone GRU-D, LSTM, and GRU/LSTM ensemble models. Its higher precision, recall, and AUC indicate that the hybrid system not only detects early sepsis more accurately but also provides more reliable clinical decision support by minimizing false alarms. The integration of temporal feature extraction from GRU-D with the gradient-boosted decision-making capability of LightGBM results in a balanced and robust early warning model for sepsis prediction. This framework can be applied as an effective tool of clinical decision support, clinically, which enables the ICU teams to detect sepsis in its early phases and apply immediate interventions, which can potentially reduce mortality and ICU hospitalization. In addition, the approach is easy to use in other clinical cases that are time-sensitive and early warning is essential.
VII. Future Work
Despite the strong predictive potential of the proposed GRU-D and LightGBM hybrid framework for early sepsis detection, several opportunities for improvement remain. First, the model can be enhanced by incorporating a broader range of clinical features, including additional laboratory test results, comorbidity information, and unstructured physician notes using natural language processing techniques. Such multimodal data integration may further improve predictive robustness and clinical interpretability. Second, future research should focus on deploying the model in real-time ICU settings, where continuous data streams are available. Real-world evaluation would help assess system latency, operational feasibility, and the impact of early predictions on patient outcomes. Third, validation on large-scale clinical benchmarks such as MIMIC-IV and eICU, as well as external validation on independent multi-center ICU datasets, is essential to strengthen clinical generalizability and ensure reliability prior to deployment. The proposed model is designed for early sepsis prediction prior to clinical onset, particularly within the first 20–50 hr of ICU admission where most sepsis events occur. However, a direct quantitative comparison of prediction lead time with standard clinical scoring systems such as SOFA or qSOFA was not feasible due to dataset constraints and lack of temporally aligned scores. Future work will therefore focus on formal lead-time analysis and direct comparison with SOFA and qSOFA, including evaluation of how many hours earlier the proposed model can generate alerts.