Despite advances in therapy, in-hospital mortality of sepsis is still high, bring a big economic and health challenge. The prevalence of CKD had been rapidly increasing in recent decades. Patients with CKD are more prone to develop sepsis than those without CKD, while CKD is also an important prognostic risk factor in sepsis [23, 24]. Though the prognosis of sepsis was widely discussed in previous studies, risk factors and prediction models for CKD patients with sepsis were scarcely discussed before. In the present study, we focused on ICU patients with sepsis and CKD. We developed and compared seven ML algorithm (XGBoost, GBDT, SMV, NN, KNN, Decision Tree, Random Forest) against traditional logistic regression analysis and SOFA score. Our results showed the XGBoost excelled among these models. The accuracy was then validated in an external validation cohort.
Clinical outcomes in CKD patients and septic patients were discussed separately in several studies using MIMIC-IV database. Hu C et al. used the MIMIC database and reported an in-hospital mortality of 12.56% in septic patients [1]. In the same database, the in-hospital mortality rate for ICU patients with CKD was reported to be 16.5% [25]. But when these two clinical conditions were present in combination, the mortality was scarcely reported. Two previous studies explored mortality in septic patients with CKD patients (stage 3 or higher), finding a 90-day mortality rate of 25.8%-36.8% [26, 27]. Our study differs from these previous studies by including patients with all stages of CKD and focusing on in-hospital mortality as the primary outcome. We reported in-hospital mortality rates from two separate ICU databases, 18.65% in the MIMIC-IV database and 19.07% in the eICU database. To our knowledge, this is the first study to report in-hospital mortality for septic patients with a full range of CKD stages.
Our machine learning models identified several key predictors of in-hospital mortality among ICU patients with sepsis and CKD. According to the SHAP analysis, the top four features contributing to in-hospital mortality were SpO₂, SBP, age, and lactate level, all of which are well-recognized prognostic indicators. SHAP patterns and subsequent logistic regression analysis suggested that the minimal value of SBP may have a non-linear association with mortality risk. This observation aligns with previous studies that reported a non-linear or U-shaped relationship between blood pressure and sepsis outcomes, although most prior work focused on MAP rather than SBP [28,29,30].
Patients with CKD often complicated by the internal environment disorders, acid-base imbalances, and electrolyte disturbances. Dysnatremias, which reflects an imbalance between extracellular water and sodium, are common among hospitalized patients, occurring in 10% to 20% of cases [31]. The relationship between dysnatremias and clinical outcomes had been studied in a variety of clinical settings [32]. In CKD patients from a large, nationally cohort of US veterans, both hyper- and hypo-natremia were associated with worse clinical outcomes [33, 34]. In the present study, the SHAP results and logistic regression analysis indicated that both hypo- and hypernatremia were associated with higher mortality risk, which is consistent with prior studies reporting worse outcomes in sepsis and CKD patients with dysnatremias [31, 34]. Likewise, phosphate abnormalities were highlighted by SHAP as relevant predictors and were then proven in the logistic analysis. While earlier studies primarily emphasized hyperphosphatemia [35,36,37], our model suggested that both high and low phosphate levels may carry adverse prognostic implications in patients with CKD and sepsis. Nevertheless, these associations should be considered exploratory and hypothesis-generating. Recent expert opinion has even suggested that SHAP should not be considered a reliable tool for explainability in high-risk clinical domains [38]. Similarly, Bienefeld, N. et al. [39] reported that while developers viewed SHAP-based interpretability as useful, clinicians interacting with an AI decision-support prototype found that SHAP explanations did not provide meaningful guidance in practice. These findings underscore that SHAP should not be overstated as a source of clinical interpretability. In our study, we therefore present SHAP results as hypothesis-generating and supplementary to established clinical knowledge, rather than as conclusive explanations. The association between top indicators and primary outcome were then analyzed using logistic regression analysis.
Among the top predictors identified by the model, some factors such as SBP and SpO₂ are potentially modifiable physiological variables, and clinicians are inherently interested in their causal effect on patient outcomes. To address such causal questions, predictive models alone are insufficient due to confounding biases. The framework of Target Trial Emulation (TTE) provides a robust methodological paradigm for using observational data to estimate causal effects by explicitly emulating the design of a randomized controlled trial [32]. Future research could build upon our predictive study by designing such an emulated trial.
ML has emerged as a powerful tool for rapid prognosis assessment and demonstrated its superiority across numerous domains. Its ability to analyze vast amounts of data and make accurate predictions with a remarkable speed has revolutionized various industries. In healthcare, ML aids in early disease detection and personalized treatment plans, which improved patient outcomes [8, 9, 22]. This is particularly true in critical care medicine, where patients often present with complex multiorgan dysfunctions, rendering traditional methods insufficient for prognosis prediction. Numerous studies have applied ML to address this issue utilizing the public databases, especially in sepsis. Moor M et al. [21] utilized four databases to develop a deep learning model for predicting the onset of sepsis. This model was able to detect 80% of sepsis cases three hours before onset, providing a crucial window for intervention. Zhuang, J. et al. [4] developed a XGBoost model using MIMIC database and validated in three external cohorts to stratify in-hospital mortality risk in sepsis patients. Hou, N. et al. also used XGBoost to predict 30-day mortality for sepsis [40]. In the study by Kong G et al., RF, least absolute shrinkage and selection operator (LASSO), gradient boosting machine (GBM) was used to predict in-hospital mortality of sepsis, also using MIMIC database [41]. Given that sepsis could result in multiorgan dysfunction, several studies tried to identify or predict the organ failure complicated by sepsis. The kidney, one of the most commonly affected organs, has received significant attention. Yue S., et al. developed and compared seven ML algorithms to predict AKI after sepsis using MIMIC database, and the study showed that XGBoost performed best [8]. Similar result was shown in the study by Zhang L et al. [42]. Additionally, early recognition and mortality prediction models have been developed for sepsis complicated by acute respiratory distress syndrome (ARDS) [43], delirium [44], encephalopathy [45] and coagulopathy [46].
There are many types of algorithms in ML. Each algorithm had its own specialty. Among these fundamental algorithms, KNN, Decision Tree, RF, GBDT, SVM, NN and XGBoost were commonly used and showed high accuracy in disease detection or prognosis prediction. KNN was an easily understandable algorithm to solve classification issues and showed some accuracy in disease detection, but computation was expensive as the number of attributes increases [47]. Decision tree, a tree-like model, could classify data items into branches and used for classification and regression tasks. It helps in electrocardiographic signals (ECG) recognition and disease management [48]. But decision tree was easy to overfitting and the performance relied on the dataset features. While RF was an ensemble of multiple decision trees and offers greater stability with less overfitting, it came at the cost of complex and expensive computation [49]. SVM could efficiently perform a non-linear classification and good at high-dimensional spaces. NN was inspired by mimicking human bran neural network, more suitable for complicated, non-linear variables and showed good ability in Alzheimer’s disease diagnosis and other chronic disease early detection [50]. But for complex problems, the computation was expensive. GBDT and XBGoost were known for their high accuracy to handle complex, non-linear relationships, especially in big data with rapid speed. Several studies have demonstrated the reliability of prognostic prediction [22, 40, 51, 52]. But these two algorithms look to some extent like “black box”. Although it includes tools for feature importance and model interpretation (such as SHARP used in the present study), the results were still less interpretable. These models were proved to be effective and reliable tools in prognostic prediction and clinical decision-making in many medical scenarios [53]. In the present study, we chose these ML algorithms to determine which one performed best in CKD patients suffering from sepsis, a more complicated and life- threatening condition. Our study proved that XGBoost model performed the best among the traditional and new ML methods.
When CKD patients were admitted to the ICU due to sepsis, ML, especially XGBoost, can accurately help physicians predict whether patients will experience in-hospital mortality (with specificity of 96%, and sensitivity of 62%). In clinical practice, the model can be utilized during hospitalization when sepsis is diagnosed, aiding clinicians in assessing mortality risk and tailoring management strategies. This approach provides doctors with a more accurate tool to assess the risk of patients and make timely interventions to potentially improve patient outcomes. By harnessing the power of ML, healthcare professionals can benefit from advanced algorithms that analyze multiple variables and patterns to provide valuable insights and predictions. This innovative approach has the potential to enhance clinical decision-making and improve patient care in critical care settings.
Sepsis is a heterogeneous syndrome with diverse pathogens, immune responses, and organ dysfunction patterns, which complicates both treatment and predictive modeling. Although restricting our cohort to CKD patients adds some homogeneity, unrecognized subphenotypes (e.g., hyperinflammatory vs. immunoparalysis) likely remain, and model performance may differ across them. This study should therefore be seen as a foundational step. Future work will use approaches such as latent class analysis or clustering to identify subphenotypes in sepsis with CKD, validate the model within these groups, and potentially develop tailored models to advance precision medicine [54].
Although mortality prediction in sepsis has been extensively studied, our work provides several distinct contributions. First, unlike most prior studies that examined the general sepsis population, we specifically focused on critically ill patients with concomitant CKD, a subgroup with particularly poor outcomes but limited evidence for risk stratification. Second, we adopted a comprehensive feature selection strategy using the Boruta algorithm, which is more suitable for machine learning approaches than traditional logistic-based methods. Third, we systematically compared multiple machine learning models and incorporated SHAP analysis to improve interpretability, thus bridging the gap between predictive performance and clinical applicability.
Limitation
Our study had a few limitations. First, its retrospective and observational design may have introduced selection bias, although external validation partly mitigated this concern. Second, some variables with high missingness were excluded, despite the use of statistical imputation to retain as many predictors as possible. Third, class imbalance was present (∼19% mortality), but discrimination metrics that are robust to class imbalance, including the AUC and the PR curve, were reported and scale_pos_weight was tuned in tree-based models. Fourth, baseline SOFA scores were assumed to be zero due to lack of pre-ICU data, and CKD chronicity could not be fully confirmed, introducing possible misclassification. Although we used the earliest creatinine measurement to reduce the impact of acute changes related to sepsis, some degree of misclassification bias is possible, and our findings should be interpreted in this context. Fifth, our study was based on publicly available databases, which may limit the generalizability of the findings to other healthcare systems. To address this, our team has already initiated a prospective study focusing on patients with CKD complicated by cardiovascular disease and critical illness in our institution, which is currently undergoing ethical approval and registration. Future work will incorporate data from this study and other multicenter cohorts to further validate and refine the proposed models.
