- Department of Critical Care Medicine, The Affiliated Hospital, Southwest Medical University, Luzhou, China
Background: In the intensive care unit (ICU), septic patients frequently require endotracheal intubation followed by invasive mechanical ventilation. Nonetheless, the optimal sedation-analgesia regimen for these critically ill patients remains undetermined.
Methods: This retrospective observational study analyzed data from the Medical Information Mart for Intensive Care IV (MIMIC-IV version 3.0) database to examine septic patients who underwent endotracheal intubation and subsequent invasive mechanical ventilation in the intensive care unit. Initially, Kaplan–Meier survival analysis and Cox proportional hazards models were employed to evaluate the prognostic impact of different sedation-analgesia regimens. Subsequently, the least absolute shrinkage and selection operator (LASSO) regression was utilized to identify key prognostic factors. Multiple machine learning algorithms were then implemented to develop predictive models, and the SHapley Additive exPlanations (SHAP) method was used to interpret the model outputs and determine the most influential predictors.
Results: Following the initial screening process, seven distinct sedation-analgesia regimens with sample sizes greater than 100 were incorporated into the final analysis. Utilizing Kaplan–Meier estimates and Cox regression models, the combination of fentanyl and midazolam was identified as the most advantageous regimen. This association remained statistically significant after adjusting for confounding variables, demonstrating a reduction in the length of stay in the intensive care unit (length of stay in ICU, HR [95% CI]: 0.66 [0.52–0.85]) and a decrease in ICU mortality (OR [95% CI]: 0.62 [0.46–0.85]). Subsequently, LASSO regression analysis identified seven key prognostic factors associated with outcomes in this patient subgroup. Among the machine learning models developed for outcome prediction, the LightGBM model exhibited superior performance (AUC = 0.838). SHAP analysis indicated that the top three predictors of 28-day mortality were the Acute Physiology Score III (APS III), patient age, and the presence of acute renal failure.
Conclusion: The concurrent administration of fentanyl and midazolam was associated with lower ICU mortality and shorter length of ICU stay among septic patients necessitating endotracheal intubation and invasive mechanical ventilation, suggesting potential clinical benefit. Furthermore, the LightGBM algorithm exhibited superior predictive accuracy for ICU mortality within this cohort, suggesting its potential utility as a tool for supporting data-driven clinical decision-making.
Introduction
Sepsis continues to pose a significant global health challenge, with an estimated annual incidence of 50 million cases (Worldsepsisday, 2025) and a 90-day mortality rate of 35.5% (Xie et al., 2020). Among patients admitted to intensive care units, those requiring endotracheal intubation and mechanical ventilation are particularly vulnerable, facing poor prognoses due to the complex interplay of systemic inflammation, organ dysfunction, and iatrogenic complications (Hill et al., 2017; Kim et al., 2024). Current epidemiological data underscore the urgent need to enhance clinical management strategies for this at-risk population, especially concerning life-support interventions such as mechanical ventilation.
Sedative and analgesic regimens during mechanical ventilation have a profound impact on patient outcomes, influencing the incidence of delirium (Latronico et al., 2024) ventilator-associated complications (Weinberger et al., 2021), and long-term survival (Shehabi et al., 2018). However, the variability in sedation protocols—ranging from deep to light sedation or targeted analgesia—has resulted in inconsistent clinical outcomes (Aitken et al., 2021; Stephens et al., 2018). For septic patients, whose physiological reserves are already compromised by hypermetabolic states and immune dysregulation (Mira et al., 2017; Wasyluk and Zwolak, 2021), individualized sedation-analgesia strategies may help mitigate secondary organ injury and improve recovery trajectories (Shehabi et al., 2021). Nevertheless, the current body of evidence regarding optimal pharmacological strategies for sepsis-specific populations remains sparse, highlighting the urgent need to identify regimen-specific prognostic indicators.
Recent advancements in machine learning (ML) present significant potential for enhancing clinical prognostication, especially in critical care environments characterized by high-dimensional datasets (Pirracchio et al., 2019; Venturini et al., 2024; Wu et al., 2023). Techniques such as LASSO regression are particularly effective in feature selection, as they penalize non-informative variables and distill complex datasets into actionable predictors. When integrated with predictive modeling frameworks, these methods facilitate robust risk stratification and outcome prediction for critically ill patients (Wang et al., 2025; Fathy et al., 2025). This approach is particularly relevant to sepsis, where the multivariable interactions between treatment modalities and host responses complicate traditional statistical analyses.
Based on these principles, we propose that machine learning analysis of sedation-analgesia protocols can determine the best therapeutic profiles for septic patients on mechanical ventilation, while also allowing for prognostic predictions. Utilizing the MIMIC-IV database, this research employs LASSO regression to pinpoint crucial factors affecting ICU mortality and complications, followed by the development of predictive models using ensemble learning techniques. By integrating pharmacological, physiological, and outcome data, our goal is to create a framework for tailored sedation-analgesia strategies and improve prognostic precision in sepsis treatment. This combined method could eventually guide clinical practices and optimize resource distribution in ICU.
Methods
Study population and design
This retrospective cohort study utilized clinical records from the MIMIC-IV database (version 3.0), an open-access repository of critical care data that includes comprehensive profiles of ICU patients from Beth Israel Deaconess Medical Center, covering the period from 2008 to 2019. The dataset comprises demographic information, infection sites, comorbidities, perioperative records, therapeutic interventions (such as pharmacotherapy and fluid management), laboratory results, severity scoring metrics, and longitudinal survival data. A certified researcher QX Hu (Record ID: 69413356) conducted data curation in accordance with institutional review board protocols, which require complete de-identification through cryptographic encoding of patient information. Established through a collaborative effort between the Massachusetts Institute of Technology and the host medical center, this resource operates under waived ethical approval requirements due to its pseudonymization processes, which effectively obscure protected health information during secondary analysis. We enrolled adult sepsis patients meeting the Sepsis-3.0 criteria who underwent endotracheal intubation and received invasive mechanical ventilation for >24 h after ICU admission. Patients without endotracheal intubation, invasive mechanical ventilation, sedation, or analgesia therapy were excluded.
Data extraction
The extracted dataset included the admission number and comprehensive patient information encompassing basic demographics (age, sex, body mass index [BMI], and marital status), type of ICU admission, as well as hospitalization and mortality outcomes. These outcomes included length of stay (LOS) in the ICU and hospital, ICU mortality, in-hospital mortality, and 1-year mortality. Vital signs recorded at the time of ICU admission included systolic blood pressure (SBP), diastolic blood pressure (DBP), respiratory rate, oxygen saturation (SpO2), and body temperature. Additional clinical variables included duration of mechanical ventilation and the presence of shock, defined as SBP <90 mmHg. The dataset also captured the site of inflammatory involvement, multiple clinical severity scores (Systemic Inflammatory Response Syndrome [SIRS], Sequential Organ Failure Assessment [SOFA], Acute Physiology Score III [APS III], Simplified Acute Physiology Score II [SAPS II], Oxford Acute Severity of Illness Score [OASIS], and Glasgow Coma Scale [GCS]), and a wide range of comorbidities. These comorbidities included hypertension, type 1 and type 2 diabetes mellitus, heart failure, myocardial infarction, malignant neoplasms, chronic kidney disease, acute renal failure (ARF), cirrhosis, hepatitis, tuberculosis, pneumonia, stroke, hyperlipidemia, and chronic obstructive pulmonary disease (COPD). Laboratory parameters consisted of white blood cell count (WBC), red blood cell count (RBC), platelet count (PLT), hemoglobin (HGB), albumin, serum sodium, potassium, calcium, glucose, thrombin time (TT), prothrombin time (PT), activated partial thromboplastin time (APTT), international normalized ratio (INR), D-dimer, alanine aminotransferase (ALT), aspartate aminotransferase (AST), and N-terminal pro-brain natriuretic peptide (NT-proBNP). Pharmacological treatments administered during ICU stay included antihypertensive agents, glucocorticoids, nephrotoxic drugs, and immunosuppressants. The primary outcomes assessed were hospitalization and mortality metrics, specifically the LOS in the ICU and hospital, ICU mortality, and 1-year all-cause mortality.
Sedative regimens administered during mechanical ventilation in the ICU were categorized based on the specific agents used, either as monotherapy or in combination. The agents included propofol, etomidate, fentanyl, dexmedetomidine, midazolam, hydromorphone, and morphine, as well as commonly observed combinations such as propofol with fentanyl, hydromorphone, or morphine; etomidate with fentanyl, hydromorphone, or morphine; dexmedetomidine in combination with other sedatives or analgesics; fentanyl combined with midazolam; fentanyl, midazolam, and hydromorphone; fentanyl, midazolam, and morphine; and other regimens not falling into the aforementioned categories (Supplementary Table S1). To reduce the potential impact of small sample sizes on the reliability of statistical analyses, sedative regimen groups with fewer than 100 patients were excluded from further analysis.
LASSO regression analysis
We employed the least absolute shrinkage and selection operator (LASSO), a widely utilized regression technique that applies ℓ1 penalties to produce sparse solutions. The “glmnet” package in R was used to conduct the LASSO regression, enabling us to filter and identify the most significant predictors influencing the survival outcomes of sepsis patients. The included factors including age, sex, hypertension, type 2 diabetes, hyperlipidemia, stroke, type 1 diabetes, chronic obstructive pulmonary disease, heart failure, myocardial infarction, malignant tumor, chronic kidney disease, ARF, cirrhosis, hepatitis, tuberculosis, pneumonia, shock, ventilation duration (hours), binary body mass index, SOFA score, APS III score, SIRS score, SAPS II score, OASIS score, GCS level, anti-hypertensive drugs, glucocorticoid, nephrotoxic drug, immunosuppressant, white blood cell count, red blood cell count, platelet count, hemoglobin, albumin, serum sodium, serum potassium, total calcium, blood glucose, partial thromboplastin time, international normalized ratio, alanine aminotransferase, aspartate aminotransferase, and NT-proBNP.
Statistical analysis
Descriptive statistics were used to summarize the distribution of quantitative variables. Parametric data were expressed as mean ± standard deviation (SD), while non-parametric data were reported as median with interquartile range (IQR). Categorical variables were presented as frequencies and percentages. For longitudinal survival analysis, Kaplan–Meier estimates and the log-rank test were employed to compare time-to-death distributions among different sedative and analgesic regimens, specifically evaluating 28-day ICU mortality, 28-day in-hospital mortality, and 1-year all-cause mortality. To assess the independent associations between sedation-analgesia regimens and mortality outcomes at 28 and 365 days, multivariable Cox proportional hazards models were constructed. Hazard ratios (HRs) with corresponding confidence intervals were calculated, adjusting for potential confounding covariates. For ICU and hospital length of stay (LOS), discharge is subject to the competing risk of death; therefore, LOS was analyzed as time to discharge alive using the Fine–Gray subdistribution hazards model, treating death prior to discharge as the competing event. Subdistribution hazard ratios (sHRs) with 95% confidence intervals were reported, where sHR >1 indicates a higher cumulative incidence of discharge over time. Following the identification of key factors associated with 28-day mortality in ICU through LASSO regression, subgroup analyses were conducted based on these variables. All subgroup analyses were adjusted for potential confounding covariates to ensure robust and unbiased estimates of association.
To construct a predictive model for 28-day ICU mortality among sepsis patients who underwent mechanical ventilation, the dataset was initially partitioned into a training set and a validation set in an 8:2 ratio. Feature selection and redundancy reduction were subsequently conducted on the training set using Lasso regression. Five machine learning models—Extreme Gradient Boosting (XGBoost), Decision Tree (DT), Light Gradient Boosting Machine (LightGBM), Logistic Regression, and Random Forest (RF)—were developed to construct predictive models for patient outcomes. The model’s performance was assessed through the maximum area under the receiver operating characteristic (ROC) curve (AUC), alongside metrics such as sensitivity, specificity, recall, F1 score, and accuracy for the validation set. A higher AUC value indicates superior discriminative capability of the model. Sensitivity and specificity measure the model’s proficiency in accurately identifying positive and negative samples, respectively. Additionally, the SHAP (SHapley Additive exPlanations) method was employed to generate bar graphs illustrating the contribution of each feature to the predicted outcome. SHAP was further utilized to evaluate the impact of specific features on individual samples, thereby enhancing the understanding of the model’s decision-making process. All statistical analyses were performed using R software (version 4.3.1) with bilateral P-value <0.05 considered statistically significant.
Results
Baseline characteristics
This retrospective study leveraged the MIMIC-IV v3.0 database to examine the effects of various sedation and analgesia regimens on the outcomes of mechanically ventilated patients with sepsis. From a total of 546,028 hospitalization records, 31,911 sepsis patients were identified, of whom 3,113 underwent endotracheal intubation, thereby excluding 28,798 non-intubated cases. Among the intubated patients, 2,064 received mechanical ventilation for a duration of 24 h or more. Following the exclusion of 60 patients who did not receive sedation or analgesia, 2,004 patients were included in the study. To improve estimation stability and avoid sparse-data problems (e.g., separation and highly uncertain effect estimates) in multivariable models, regimens with fewer than 100 patients were excluded from the primary comparative analyses (Figure 1). Consequently, six groups, encompassing a total of 1,883 patients, were selected for further analysis: 490 patients (26.2%) were administered propofol combined with fentanyl, hydromorphone, or morphine; 158 patients (8.4%) received etomidate in conjunction with fentanyl, hydromorphone, or morphine; 269 patients (14.4%) were treated with dexmedetomidine alongside other drugs; 416 patients (22.2%) received a combination of fentanyl and midazolam; 123 patients (6.6%) were given fentanyl, midazolam, and hydromorphone; and 236 patients (12.6%) received fentanyl, midazolam, and morphine. An additional 191 patients (10.2%) were treated with other protocols. The results indicated significant differences (P < 0.05) among groups concerning demographics, hospitalization outcomes, sites of inflammatory involvement, clinical severity scores, laboratory parameters, and interventions, including antihypertensive medications and glucocorticoid use. These findings imply that sedation and analgesia protocols may impact outcomes through multifactorial pathways, highlighting the need for further validation of data accuracy and examination of potential confounding variables. The baseline characteristics of the two cohorts are detailed in Table 1 and Supplementary Table S1, contingent upon whether the number of included cohorts exceeded 100 (Table 1; Supplementary Table S1).
Relationship between fentanyl plus midazolam and survival outcomes
The results presented in Table 1 indicate that the combination of fentanyl and midazolam is associated with superior survival outcomes, characterized by the lowest LOS in both the ICU and the hospital, as well as reduced ICU and hospital mortality rates. Additionally, this combination was linked to improved 1-year mortality outcomes. To further investigate the impact of fentanyl combined with midazolam, we conducted Cox regression analyses and Kaplan-Meier survival curve assessments. Besides, the analyses demonstrated that the administration of midazolam plus fentanyl was significantly correlated with a shorter ICU and hospital LOS, as well as enhanced 1-year survival rates (Table 2). In the fully adjusted model (Model 3), patients treated with midazolam plus fentanyl showed a higher sHR of ICU discharge (sHR 1.37, 95% CI 1.19–1.57, P < 0.001) and hospital discharge (sHR 1.89, 95% CI 1.63–2.19, P < 0.001) compared with those receiving other sedation protocols, indicating a shorter ICU and hospital LOS in the presence of the competing risk of death. Moreover, this cohort demonstrated a significantly increased probability of 1-year survival (HR 0.62, 95% CI 0.52–0.74, P < 0.001). These associations persisted across both crude and progressively adjusted models, underscoring the robust relationship between the fentanyl plus midazolam regimen and enhanced patient outcomes. Subsequent Kaplan-Meier analysis revealed significant differences in 30-day ICU survival (P < 0.001, Figure 2A), 30-day hospital survival (P < 0.001, Figure 2B), and 1-year mortality among different sedation regimens (P < 0.001, Figure 2C). Patients administered fentanyl in combination with midazolam exhibited the highest survival probability. Furthermore, after performing multivariable logistic regression to evaluate the association between concomitant midazolam and fentanyl exposure and outcomes, we found that midazolam plus fentanyl use was independently associated with lower ICU mortality (OR 0.62, 95% CI 0.46-0.85, P < 0.001) and lower in-hospital mortality (OR 0.45, 95% CI 0.33–0.60, P < 0.001) after adjustment for a range of potential confounders (Table 3).
Table 2. Association of midazolam plus fentanyl with ICU and hospital length of stay and 1-year survival.
Figure 2. Prognostic Impact of Fentanyl Plus Midazolam in Mechanically Ventilated Septic ICU Patients Kaplan–Meier survival curves were utilized to illustrate the impact of the combined administration of fentanyl and midazolam on the prognosis of septic patients undergoing invasive mechanical ventilation in the ICU, with incidence-free survival maintained within the groups. (A) ICU 28-day mortality; (B) hospital 28-day mortality; (C) 1-year all-cause mortality.
Table 3. Logistic regression analysis of the association between midazolam plus fentanyl and ICU mortality and hospital mortality.
LASSO regression identifies key factors affecting patient survival outcomes
To further identify key factors influencing patient survival outcomes, we performed a LASSO regression analysis that included fentanyl plus midazolam and other 48 variables in the analysis, specifically age, sex, hypertension, type 2 diabetes, hyperlipidemia, stroke, type 1 diabetes, chronic obstructive pulmonary disease, heart failure, myocardial infarction, malignant tumor, chronic kidney disease, ARF, cirrhosis, hepatitis, tuberculosis, pneumonia, shock, ventilation duration (hours), binary body mass index, SOFA score, APS III score, SIRS score, SAPS II score, OASIS score, GCS level, anti-hypertensive drugs, glucocorticoid, nephrotoxic drug, immunosuppressant, white blood cell count, red blood cell count, platelet count, hemoglobin, albumin, serum sodium, serum potassium, total calcium, blood glucose, partial thromboplastin time, international normalized ratio, alanine aminotransferase, aspartate aminotransferase, and NT-proBNP. As shown in Figures 3A,B, the LASSO regression analysis identified a minimum lambda coefficient of 7. Based on the impact coefficients, the final inclusion criteria comprised fentanyl plus midazolam, age, APS III score, antihypertensive drug, ARF, COPD, and tuberculosis (Figure 3C).
Figure 3. Variable Selection and Risk Estimation Using LASSO Regression. The least absolute shrinkage and selection operator (LASSO) regression model was employed to identify variable selection and coefficient estimation influencing patient mortality in the ICU. (A) LASSO regression coefficients. (B) Cross-validation plot for the penalty term. (C) LASSO-selected variables and their corresponding coefficients.
Subgroup analysis
To further elucidate the impact of the combined administration of fentanyl and midazolam on the prognosis of sepsis patients undergoing mechanical ventilation in the ICU, we conducted subgroup analyses based on key factors identified through LASSO regression, as well as sex.
Cox regression analyses were employed to assess the influence of this sedation and analgesia regimen on patient survival over a 1-year period (Table 4). The subgroup analyses revealed that, after adjusting for other variables, the combination of midazolam and fentanyl was significantly associated with improved 1-year survival outcomes in women (HR 0.51, 95% CI 0.39–0.65), individuals aged 60 years and older (HR 0.58, 95% CI 0.48–0.71), and patients receiving antihypertensive medication (HR 0.56, 95% CI 0.46–0.68), and those with APS III scores ranging from 30 to 60 (HR 0.41, 95% CI 0.31–0.56). Notably, significant differences were observed between sexes, APS III scores (P < 0.001), and ARF status (P = 0.02). No significant interactions were detected concerning age, use of antihypertensive drugs, COPD, or tuberculosis status.
Table 4. Subgroup analysis of the association between fentanyl plus midazolam and 1-year survival based on key factors identified by LASSO.
In addition, a logistic regression analysis was conducted to investigate the impact of the sedation and analgesia regimen on ICU mortality (Table 5). Subgroup analyses revealed that, after adjusting for other variables, the combination of fentanyl and midazolam was associated with a decreased risk of ICU mortality among women (OR 0.89, 95% CI 0.83–0.95), individuals aged 60 years and older (OR 0.89, 95% CI 0.84–0.95), patients receiving antihypertensive medication (OR 0.91, 95% CI 0.87–0.95), and those with APS III scores ranging from 30 to 60 (OR 0.90, 95% CI 0.85–0.95). Significant differences were observed between subgroups based on sex, age, antihypertensive medication use, and APS III score. Conversely, no significant interactions were found for ARF, COPD, and tuberculosis.
Table 5. Subgroup analysis of the association between fentanyl plus midazolam and ICU mortality based on key factors identified by LASSO.
Predictive performance of ML models for ICU mortality and model’s explainability
To optimize the predictive model for survival metrics in septic patients undergoing mechanical ventilation, we developed ICU mortality prediction models utilizing the combined administration of fentanyl and midazolam, alongside key predictors identified through LASSO regression, as well as sex. A comparative analysis of five machine learning algorithms revealed that the LightGBM model exhibited the highest discriminative capability, with an AUC of 0.838, 95%CI (0.795∼0.881). This was followed by the XGBoost model (AUC = 0.726, 95%CI [0.668∼0.784]) and logistic regression (AUC = 0.708, 95%CI [0.647∼0.769]), while the RF (AUC = 0.669, 95%CI [0.601∼0.737]) and DT (AUC = 0.656, 95%CI [0.592∼0.720]) models demonstrated comparatively lower performance (Figure 4A). These results indicate that the LightGBM model may provide superior predictive accuracy for ICU mortality in this patient cohort. To enhance model interpretability and elucidate the contribution of individual variables to mortality risk estimation, we employed the SHAP (SHapley Additive exPlanations) framework. As depicted in Figures 4B,C, SHAP summary plots were generated to illustrate the relative importance of variables within the LightGBM model for septic patients who underwent invasive mechanical ventilation following tracheal intubation. In these plots, features are ranked on the vertical axis based on their overall impact across the population, while the horizontal axis represents the SHAP values, indicating the magnitude and direction of a variable’s effect on the prediction. Each dot corresponds to a specific patient, with its position reflecting the extent to which a particular feature contributed to that individual’s predicted outcome. The analysis identified the most influential predictors for 28-day mortality, ranked in order of decreasing importance, as follows: APS III score, patient age, presence of ARF, administration of antihypertensive medications, use of the fentanyl-midazolam combination, sex, history of tuberculosis, and COPD.
Figure 4. Machine Learning Models and SHAP Interpretation for ICU Mortality Prediction (A) The area under the receiver operating characteristic (ROC) curve (AUC) associated with the target diagnosis serves as a predictor of ICU mortality in septic patients receiving mechanical ventilation via tracheal intubation. (B) SHAP summary bar plot. (C) SHAP summary dot plot.
Discussion
In this study, data sourced from the MIMIC database were systematically analyzed to ascertain the optimal sedation-analgesia regimen for septic patients necessitating endotracheal intubation and invasive mechanical ventilation. Initially, fourteen prevalent sedative and analgesic regimens were assessed utilizing Kaplan–Meier survival analysis alongside Cox proportional hazards modeling. Preliminary findings indicated that the combination of fentanyl and midazolam emerged as the most advantageous regimen concerning both short- and long-term survival outcomes. To enhance the precision of the analysis, critical prognostic factors impacting outcomes within this patient subgroup were identified through LASSO regression. Subsequently, five machine learning algorithms—namely, XGBoost, DT, LightGBM, Logistic Regression, and RF—were employed to construct predictive models. Among these, the LightGBM model exhibited superior performance. SHAP analysis of the LightGBM model elucidated that the most significant predictors of 28-day mortality were the APS III score, patient age, and the presence of acute renal failure.
The selection of an appropriate sedation-analgesia regimen for critically ill patients remains a subject of ongoing debate, particularly for those requiring endotracheal intubation and invasive mechanical ventilation. The significant physiological stress induced by intubation and mechanical ventilation can markedly enhance the patient’s stress response. While deep sedation may potentially attenuate this response, it is also associated with adverse effects, including respiratory and cardiovascular suppression, prolonged mechanical ventilation duration, and an elevated risk of myocardial ischemia in patients with pre-existing cardiac conditions. The latest Society of Critical Care Medicine (SCCM) 2025 guidelines on sedation management in adult ICU patients (Lewis et al., 2025) highlight that most critically ill patients are at high risk for complications such as pain, agitation, and delirium, which have been demonstrated to significantly increase mortality. Numerous studies have indicated that dexmedetomidine may decrease 28-day mortality and the incidence of delirium in patients with sepsis (Aso et al., 2021), while also potentially enhancing sleep quality in critically ill individuals. Nonetheless, evidence remains inconsistent. Certain studies have found that dexmedetomidine does not offer a survival advantage in mechanically ventilated patients, nor does it significantly reduce the duration of ventilation or expedite weaning (Kawazoe et al., 2017). Moreover, recent randomized controlled trials have not demonstrated any significant superiority of dexmedetomidine over conventional sedatives such as propofol or midazolam in terms of reducing neuroinflammatory biomarkers (e.g., S100-β) or improving other markers of sepsis-associated encephalopathy (Iten et al., 2025). Additionally, dexmedetomidine has not been shown to significantly mitigate early stress responses in patients undergoing invasive mechanical ventilation in the ICU setting (Moore et al., 2022). Furthermore, the 2025 SCCM guidelines highlight age-related variability in the efficacy of dexmedetomidine, noting differing sedation responses in patients above and below the age of 65. Our findings indicate that dexmedetomidine, whether administered alone or in conjunction with other sedatives or analgesics, may not constitute the most effective sedation strategy for septic patients undergoing endotracheal intubation. The combination of fentanyl and midazolam yielded favorable outcomes in this patient cohort and there were differences between ages. Fentanyl, a potent opioid analgesic, effectively mitigates the pain response and reduces nociceptive stress, while midazolam, a benzodiazepine sedative, facilitates anxiolysis and decreases metabolic demand. The synergistic application of these agents may contribute to hemodynamic stabilization and attenuation of the stress response, which is particularly advantageous in the context of sepsis. In contrast, propofol—a widely used sedative—has been associated with significant hypotension, potentially exacerbating hemodynamic instability in septic patients.
The APS III is a standardized scoring system extensively utilized in ICUs to evaluate disease severity and predict mortality risk. As an integral component of the broader APACHE II system, it aids clinicians in identifying high-risk patients and optimizing clinical decision-making processes (LeGall et al., 1986). In a comparative study conducted by Fan et al., APS III exhibited superior predictive accuracy for in-hospital mortality among patients with sepsis-associated acute respiratory failure, surpassing other commonly employed scoring systems such as LODS, SAPS II, OASIS, and SOFA (Fan and Ma, 2024). Building upon the identification of the optimal sedation-analgesia regimen in our study, we utilized LASSO regression to ascertain the most critical prognostic factors associated with outcomes in septic patients requiring invasive mechanical ventilation following endotracheal intubation. APS III, age, acute renal failure, and COPD emerged as significant predictors. It is noteworthy that the APS III score inherently incorporates variables related to age and chronic health status. Incorporating age and COPD as distinct variables in our LASSO regression model likely offered a more nuanced depiction of patient risk profiles, thereby complementing the aggregated nature of the APS III score. This approach enhanced the subsequent machine learning models by facilitating more granular and precise predictions of patient outcomes.
Machine learning has fundamentally transformed medical research, particularly within ICU settings, by facilitating dynamic risk stratification and outcome prediction through the analysis of high-dimensional data (Thorsen-Meyer et al., 2020; Shen et al., 2024). In this study, a comparative analysis of five algorithms revealed that LightGBM exhibited superior discriminative capabilities, surpassing XGBoost, logistic regression, and simpler tree-based models. This aligns with its proven efficacy in managing heterogeneous clinical data (Yuan et al., 2025). To mitigate the “black-box” limitation, SHAP analysis identified the APS III score, age, and acute renal failure as the primary predictors of mortality, offering clinically interpretable insights into the contributions of various features. These findings highlight LightGBM’s potential for predicting ICU mortality while maintaining interpretability—a crucial balance for clinical implementation.
This study has several limitations. Firstly, the retrospective nature of the MIMIC database restricts access to consistently recorded real-time assessments of sedation depth, such as RASS scores, and detailed drug titration data. This limitation may introduce residual confounding and constrain the ability to draw causal inferences. Secondly, the reliance on single-center data may hinder the generalizability of the model due to specific patient population characteristics or treatment biases, necessitating further validation to confirm the robustness of the findings. Furthermore, the lack of data on dosage and duration may fail to account for the pharmacokinetic variability of sedatives and analgesics, such as the accumulation of fentanyl in patients with renal impairment. In addition, sedation-related adverse effects and drug withdrawal phenomena were not systematically captured in the database and therefore could not be evaluated across different sedation regimens. Future prospective studies should incorporate dynamic sedation monitoring, drug exposure–response data, and therapeutic drug monitoring to optimize dosing strategies. Additionally, validating the LightGBM model across diverse ICU populations, preferably with temporal or external validation, and integrating it with electronic health record systems could enhance its clinical applicability.
Conclusion
The results of our study indicate that the combination of fentanyl and midazolam constitutes an effective sedation-analgesia approach for septic patients undergoing endotracheal intubation and invasive mechanical ventilation in the ICU for more than 24 h, leading to enhanced clinical outcomes. Additionally, among the machine learning models devised for mortality prediction, the LightGBM algorithm exhibited the highest performance. Notably, the incorporation of APS III, patient age, and acute renal function yielded a comprehensive predictive model for assessing ICU mortality risk in this critically ill cohort.
Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.
Ethics statement
The data used in this study were obtained from the publicly available Medical Information Mart for Intensive Care IV (MIMIC-IV, version 3.0) database. The database has been de-identified in accordance with the Health Insurance Portability and Accountability Act (HIPAA) to protect patient privacy. The use of this database for research purposes does not require separate institutional review board (IRB) approval. Prior to data access, the authors completed the required training and obtained certification from the Collaborative Institutional Training Initiative (CITI Program) (Certification ID: 69413356). The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required from the participants or the participants’ legal guardians/next of kin in accordance with the national legislation and institutional requirements.
Author contributions
QH: Formal Analysis, Writing – original draft, Project administration, Funding acquisition, Data curation, Investigation, Conceptualization. TX: Visualization, Writing – original draft, Methodology, Software. XG: Writing – original draft, Investigation, Software. XL: Investigation, Writing – original draft, Methodology. LH: Writing – review and editing, Supervision, Validation.
Funding
The author(s) declared that financial support was received for this work and/or its publication. This work was supported by grants from the Scientific Research Foundation of Southwest Medical University (2024ZKY012).
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fphar.2026.1673704/full#supplementary-material
References
Aitken, L. M., Kydonaki, K., Blackwood, B., Trahair, L. G., Purssell, E., Sekhon, M., et al. (2021). Inconsistent relationship between depth of sedation and intensive care outcome: systematic review and meta-analysis. Thorax 76 (11), 1089–1098. doi:10.1136/thoraxjnl-2020-216098
Aso, S., Matsui, H., Fushimi, K., and Yasunaga, H. (2021). Dexmedetomidine and mortality from sepsis requiring mechanical ventilation: a Japanese nationwide retrospective cohort study. J. Intensive Care Medicine 36 (9), 1036–1043. doi:10.1177/0885066620942154
Fan, S., and Ma, J. (2024). The value of five scoring systems in predicting the prognosis of patients with sepsis-associated acute respiratory failure. Sci. Reports 14 (1), 4760. doi:10.1038/s41598-024-55257-5
Fathy, W., Emeriaud, G., and Cheriet, F. (2025). A comprehensive review of ICU readmission prediction models: from statistical methods to deep learning approaches. Artif. Intelligence Medicine 165, 103126. doi:10.1016/j.artmed.2025.103126
Hill, A. D., Fowler, R. A., Burns, K. E., Rose, L., Pinto, R. L., and Scales, D. C. (2017). Long-term outcomes and health care utilization after prolonged mechanical ventilation. Ann. Am. Thorac. Soc. 14 (3), 355–362. doi:10.1513/AnnalsATS.201610-792OC
Iten, M., Bachmann, K., Jakob, S. M., Grandgirard, D., Leib, S. L., and Cioccari, L. (2025). Adjunctive sedation with dexmedetomidine for the prevention of severe inflammation and septic encephalopathy: a pilot randomized controlled study. Crit. Care Medicine 53, e1377–e1388. doi:10.1097/CCM.0000000000006655
Kawazoe, Y., Miyamoto, K., Morimoto, T., Yamamoto, T., Fuke, A., Hashimoto, A., et al. (2017). Effect of dexmedetomidine on mortality and ventilator-free days in patients requiring mechanical ventilation with sepsis: a randomized clinical trial. Jama 317 (13), 1321–1328. doi:10.1001/jama.2017.2088
Kim, G., Oh, D. K., Lee, S. Y., Park, M. H., and Lim, C. M., and Korean Sepsis Alliance KSA investigators (2024). Impact of the timing of invasive mechanical ventilation in patients with sepsis: a multicenter cohort study. Crit. Care London, Engl. 28 (1), 297. doi:10.1186/s13054-024-05064-1
Latronico, N., Eikermann, M., Ely, E. W., and Needham, D. M. (2024). Improving management of ARDS: uniting acute management and long-term recovery. Crit. Care London, Engl. 28 (1), 58. doi:10.1186/s13054-024-04810-9
LeGall, J. R., Loirat, P., and Alpérovitch, A. (1986). APACHE II--a severity of disease classification system. Crit. Care Medicine 14 (8), 754–755. doi:10.1097/00003246-198608000-00027
Lewis, K., Balas, M. C., Stollings, J. L., McNett, M., Girard, T. D., Chanques, G., et al. (2025). A focused update to the clinical practice guidelines for the prevention and management of pain, anxiety, agitation/sedation, delirium, immobility, and sleep disruption in adult patients in the ICU. Crit. Care Medicine 53 (3), e711–e727. doi:10.1097/CCM.0000000000006574
Mira, J. C., Gentile, L. F., Mathias, B. J., Efron, P. A., Brakenridge, S. C., Mohr, A. M., et al. (2017). Sepsis pathophysiology, chronic critical illness, and persistent inflammation-immunosuppression and catabolism syndrome. Crit. Care Medicine 45 (2), 253–262. doi:10.1097/CCM.0000000000002074
Moore, J. P. R., Shehabi, Y., Reade, M. C., Bailey, M., Fraser, J. F., Murray, L., et al. (2022). Stress response during early sedation with dexmedetomidine compared with usual-care in ventilated critically ill patients. Crit. Care London, Engl. 26 (1), 359. doi:10.1186/s13054-022-04237-0
Pirracchio, R., Cohen, M. J., Malenica, I., Cohen, J., Chambaz, A., Cannesson, M., et al. (2019). Big data and targeted machine learning in action to assist medical decision in the ICU. Anaesth. Critical Care & Pain Medicine 38 (4), 377–384. doi:10.1016/j.accpm.2018.09.008
Shehabi, Y., Bellomo, R., Kadiman, S., Ti, L., Howe, B., Reade, M. C., et al. (2018). Sedation intensity in the first 48 hours of mechanical ventilation and 180-Day mortality: a multinational prospective longitudinal cohort study. Crit. Care Medicine 46 (6), 850–859. doi:10.1097/CCM.0000000000003071
Shehabi, Y., Al-Bassam, W., Pakavakis, A., Murfin, B., and Howe, B. (2021). Optimal sedation and pain management: a Patient- and symptom-oriented paradigm. Seminars Respiratory Critical Care Medicine 42 (1), 98–111. doi:10.1055/s-0040-1716736
Shen, L., Wu, J., Lan, J., Chen, C., Wang, Y., and Li, Z. (2024). Interpretable machine learning-based prediction of 28-day mortality in ICU patients with sepsis: a multicenter retrospective study. Front. Cellular Infection Microbiology 14, 1500326. doi:10.3389/fcimb.2024.1500326
Stephens, R. J., Dettmer, M. R., Roberts, B. W., Ablordeppey, E., Fowler, S. A., Kollef, M. H., et al. (2018). Practice patterns and outcomes associated with early sedation depth in mechanically ventilated patients: a systematic review and meta-analysis. Crit. Care Medicine 46 (3), 471–479. doi:10.1097/CCM.0000000000002885
Thorsen-Meyer, H. C., Nielsen, A. B., Nielsen, A. P., Kaas-Hansen, B. S., Toft, P., Schierbeck, J., et al. (2020). Dynamic and explainable machine learning prediction of mortality in patients in the intensive care unit: a retrospective study of high-frequency data in electronic patient records. Lancet Digital Health 2 (4), e179–e191. doi:10.1016/S2589-7500(20)30018-2
Venturini, M., Van Keilegom, I., De Corte, W., and Vens, C. (2024). Predicting time-to-intubation after critical care admission using machine learning and cured fraction information. Artif. Intelligence Medicine 150, 102817. doi:10.1016/j.artmed.2024.102817
Wang, S., Liu, X., Yuan, S., Bian, Y., Wu, H., and Ye, Q. (2025). Artificial intelligence based multispecialty mortality prediction models for septic shock in a multicenter retrospective study. NPJ Digital Medicine 8 (1), 228. doi:10.1038/s41746-025-01643-w
Wasyluk, W., and Zwolak, A. (2021). Metabolic alterations in sepsis. J. Clinical Medicine 10 (11), 2412. doi:10.3390/jcm10112412
Weinberger, J., Cocoros, N., and Klompas, M. (2021). Ventilator-associated events: epidemiology, risk factors, and prevention. Infect. Disease Clinics N. Am. 35 (4), 871–899. doi:10.1016/j.idc.2021.07.005
Worldsepsisday (2025). Sepsis fact sheet. Available online at: https://www.worldsepsisday.org/toolkits (Accessed May 7th, 2025).
Wu, T., Wei, Y., Wu, J., Yi, B., and Li, H. (2023). Logistic regression technique is comparable to complex machine learning algorithms in predicting cognitive impairment related to post intensive care syndrome. Sci. Reports 13 (1), 2485. doi:10.1038/s41598-023-28421-6
Xie, J., Wang, H., Kang, Y., Zhou, L., Liu, Z., Qin, B., et al. (2020). The epidemiology of sepsis in Chinese ICUs: a national cross-sectional survey. Crit. Care Medicine 48 (3), e209–e218. doi:10.1097/CCM.0000000000004155
Keywords: lightgbm, mechanical ventilation, mechine learning, sedation-analgesia optimization, sepsis, SHAP analysis
Citation: Hu Q, Xu T, Gao X, Lei X and Hu L (2026) Machine learning-driven sedation-analgesia optimization in mechanically ventilated sepsis patients: a retrospective MIMIC-IV analysis. Front. Pharmacol. 17:1673704. doi: 10.3389/fphar.2026.1673704
Received: 26 July 2025; Accepted: 02 January 2026;
Published: 21 January 2026.
Edited by:
John M. Seubert, University of Alberta, CanadaReviewed by:
Rujipat Samransamruajkit, Chulalongkorn University, ThailandYang Tian, University of Arkansas, United States
Copyright © 2026 Hu, Xu, Gao, Lei and Hu. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Lirong Hu, aHVsaXJvbmcwNzBAc3dtdS5lZHUuY24=
Tao Xu