ORIGINAL RESEARCH article

Front. Immunol., 05 June 2025

Sec. Systems Immunology

Volume 16 - 2025 | https://doi.org/10.3389/fimmu.2025.1610519

This article is part of the Research TopicExploring the Applications of Artificial Intelligence in Disease Screening, Diagnosis, Treatment, and NursingView all 6 articles

Identifying early blood glucose trajectories in sepsis linked to distinct long-term outcomes: a K-means clustering study with external validation

Huan Ma&#x;Huan Ma1†Xiayan Qian&#x;Xiayan Qian1†Xiaodong SongXiaodong Song1Rongjie JiangRongjie Jiang1Jialin LiJialin Li1Fang XiaoFang Xiao1Ruoxu DouRuoxu Dou1Xiangdong GuanXiangdong Guan1Ka Yin Lui*Ka Yin Lui1*Shuhe Li*Shuhe Li2*Changjie Cai*Changjie Cai1*
  • 1Department of Critical Care Medicine, The First Affiliated Hospital of Sun Yat-Sen University, Guangzhou, Guangdong, China
  • 2University of Exeter Medical School, University of Exeter, Exeter, United Kingdom

Background: Blood glucose (BG) dysregulation, including hyperglycemia, hypoglycemia and increased glycemic variability (GV), is common in septic patients and potentially associated with poor clinical outcomes. However, the prognostic value of early BG trajectories remains unclear. We intend to investigate the association between the early dynamic trajectory of BG and 1-year mortality among sepsis patients.

Methods: This retrospective study comprises a derivation cohort of sepsis patients admitted to the First Affiliated Hospital of Sun Yat-sen University (FAH-SYSU) from January 2018 to December 2023, and an external validation cohort of 10,874 sepsis patients from the Medical Information Mart for Intensive Care (MIMIC) IV database. Distinct clusters were demarcated using K-means clustering based on the BG trajectory within the first 48 hours after ICU admission, while the optimal number of clusters was determined by a consensus of quantitative metrics and the elbow plot. Kaplan-Meier survival curves and multivariable Cox proportional hazards regression models were used to assess the association between these identified clusters and 1-year mortality.

Results: Among 3,655 sepsis patients from the FAH-SYSU dataset, we identified 5 distinct clusters of BG trajectories, which were significantly associated with 1-year mortality risk. In the full Cox regression model, patients with “low-stable” and “moderate-stable” trajectories had the lowest 1-year mortality risk (P = 0.077). Conversely, patients with a “high-stable” trajectory (HR: 1.61, 95% CI: 1.35-1.92, P < 0.001) and those exhibiting unstable trends had significantly higher mortality risks (“high-decreasing”, HR: 1.38, 95% CI: 1.16-1.65, P < 0.001; “moderate-increasing”, HR: 1.37, 95% CI: 1.18-1.60, P < 0.001). External validation found consistent clusters with similar mortality trends. Restricted cubic spline analysis demonstrated a U-shaped association for mean glucose levels and a J-shaped relationship for GV linked to 1-year mortality risks, while an optimal glycemic range of 122 to 160 mg/dL and GV less than 0.18 indicated improved survival.

Conclusion: Early BG trajectory patterns are independently associated with long-term mortality in sepsis patients. Incorporating dynamic BG measurements into clinical practice may improve risk stratification and guide individualized glucose management strategies.

Background

Sepsis is a life-threatening organ dysfunction caused by a dysregulated host response to infection and remains one of the leading causes of mortality among intensive care units (ICU) patients (1). A key component of sepsis pathophysiology is a systemic inflammatory response, which involves the release of both pro- and anti-inflammatory cytokines, as well as counter-regulatory hormones (2). These metabolic alterations often result in hyperglycemia, a common complication in septic patients (3). Hyperglycemia triggers oxidative stress, mitochondrial dysfunction, cell death, tissue injury, and ultimately, organ failure (47).

Despite these findings, the optimal range of blood glucose (BG) in patients with sepsis remains controversial (6, 8, 9). While early studies suggested that strict glycemic control could improve outcomes, subsequent trials failed to demonstrate consistent benefits and even highlighted potential risks, including severe hypoglycemia (1015). As a result, the Surviving Sepsis Campaign now recommends a more lenient glycemic target (<180 mg/dL) instead of the previously advocated tight control (<110 mg/dL) (8). Yet, the optimal glucose management strategy in sepsis remains a topic of debate, as some patients appear to benefit from tighter glucose control while others do not.

Beyond persistent hyperglycemia, glycemic variability (GV) has emerged as a significant concern in critically ill patients. GV refers to fluctuations in blood glucose levels over time, encompassing both hypoglycemic episodes and postprandial spikes (16). Studies have shown that increased GV is independently associated with poor prognosis and increased mortality in septic patients (17, 18). Given the association between GV and adverse outcomes, various methods have been proposed to quantify glucose fluctuations, including mean glucose concentration, mean absolute glucose (MAG) change, standard deviation (SD), and incidences of hypo- and hyperglycemia. However, the long-term prognostic impact of GV in sepsis patients, as well as the optimal range for these fluctuations, remains to be defined.

Recent research suggests that dynamic changes in blood glucose levels over time—rather than static glucose measurements—may provide more valuable prognostic insights (1921). The concept of glucose level trajectories, which describes longitudinal changes in blood glucose concentrations, has been explored in some diseases like acute ischemic stroke. Li et al. showed that individuals with longitudinally elevated fasting glucose level trajectories had a higher risk of death even if they had normal glucose levels at baseline (19). Despite these findings, the prognostic relevance of early glucose trajectories specifically in sepsis has yet to be fully clarified.

Accordingly, our study aimed to develop and externally validate distinct clusters of BG trajectories based on two independent cohorts of sepsis patients using a machine learning technique (K-means clustering), and investigate the association between these diverse trajectories within the first 48 hours after ICU admission and 1-year mortality, thereby providing valuable insights into early glycemic patterns as prognostic indicators and informing personalized glycemic strategies in the ICU management.

Methods

Study design and population

We conducted a retrospective observational study utilizing data from two independent cohorts. The derivation cohort was collected from the First Affiliated Hospital of Sun Yat-sen University database (FAH-SYSU) (Guangzhou, China), comprising data from 10,029 ICU admissions between January 2018 and December 2023. Access to clinical data was approved by the Clinical Research Ethics Committee of the First Affiliated Hospital of Sun Yat-sen University (Institutional Review Board number: 2022-048). Additionally, the validation cohort was obtained from the Medical Information Mart for Intensive Care IV (MIMIC-IV) database, which contains a total of 299,712 ICU admissions at the Beth Israel Deaconess Medical Center (Boston, USA) between 2008 and 2019. One author (S. Li) is certified to get access to the database and was responsible for data extraction. As the data in the MIMIC-IV database were fully anonymized, the Institutional Review Board at the Beth Israel Deaconess Medical Center granted a waiver of informed consent (No.2001P001699).

Sepsis patients were diagnosed during ICU stay according to the third international consensus definition, that is, suspected infection accompanied by Sequential Organ Failure Assessment (SOFA) score 2 points higher than baseline (1). For patients with repetitive ICU admissions, only the first ICU admission was considered. Exclusion criteria included: age less than 18 years old, ICU length of stay less than 48 hours, less than 4 times of blood glucose measurements within the first 48 hours after ICU admission, and lack of follow-up information or unplanned discharge due to non-medical reasons. These criteria were applied to both cohorts.

Data extraction

The following variables were extracted: (1) demographic information, for instance, age, gender, surgical status, Charlson Comorbidity Index (CCI), disease severity scores (Acute Physiologic Assessment and Chronic Health Evaluation [APACHE] II score and SOFA score), (2) laboratory results and vital signs on ICU admission, including hemoglobin, white blood cell (WBC) count, platelet count, creatinine, total bilirubin (TBIL), prothrombin time (PT), and procalcitonin (PCT), (3) blood glucose levels within 48 hours of ICU admission, (4) 1-year mortality, 30-day mortality, ICU length of stay (ICU-LOS), the need of organ support (vasopressors, mechanical ventilation, continuous renal replacement therapy [CRRT]). All data were extracted using Structured Query Language (SQL) queries via the pgAdmin4 (version 6.15) interface for PostgreSQL.

Outcomes

The main outcome was all-cause 1-year mortality after ICU admission. Secondary outcomes included 30-day mortality, ICU mortality, ICU length of stay, vasopressor dosages, the administration of CRRT, ventilation duration, and doses of insulin.

Exposure and clustering

The primary exposure in this study was blood glucose level trajectories within 48 hours after ICU admission. Specifically, we used the maximum blood glucose values in every 8-hour block, which were then standardized by subtracting the mean and dividing by the standard deviation, to form clusters with similar dynamic trends. In cases with missing glucose values, we imputed using the mean of each patient’s available measurements. Alternative methods (LOCF, NOCB, and MICE) showed consistent clustering and survival results, confirming the soundness of this approach.

Next, we utilized K-means clustering to group patients into distinct clusters, employing the Scikit-learn package (version 1.5.2). This study was conducted according to the CAIR checklist (Appendix 1) (22).To determine the optimal number of clusters (K), multiple metrics were examined, including the sum of squared errors (SSE), Silhouette Score, Calinski-Harabasz index, and Davies-Bouldin index (2325). Besides, an elbow plot was generated to visualize the K and SSE, assisting in identifying a point where increasing K no longer significantly improved the fit. The final choice of K was based on a consensus among these measures and a qualitative inspection of the elbow plot. Each patient was then assigned to the resulting clusters, and subsequent analyses were conducted to compare clinical characteristics and outcomes across these groups.

Moreover, we performed an external validation using the MIMIC-IV database, ensuring the generalizability of the derived clusters. The same data preprocessing and clustering processes were replicated in this cohort.

To improve transparency and reproducibility, we incorporated a schematic workflow diagram (Figure 1) to visually summarize the study design and analytical pipeline. This diagram illustrates the key stages of the study: cohort selection and exclusion criteria, preprocessing of dynamic BG measurements, trajectory clustering using k-means, external validation in an independent cohort, and the subsequent outcome analyses including 1-year mortality comparisons across clusters. This visual representation helps clarify the sequence and rationale of the analytical steps.

Figure 1
www.frontiersin.org

Figure 1. Schematic workflow of the study design.

Statistical analyses

Continuous variables were reported as mean (standard deviation [SD]), while categorical variables were reported as counts with percentages. Continuous variables were compared with a one-way ANOVA test or the Kruskal-Wallis test based on the normality of candidate variables. Categorical variables were compared with either a chi-squared test or Fisher’s exact test when appropriate. Kaplan-Meier curves and log-rank tests were used to compare the 1-year survival outcomes across the groups. Additionally, we used both univariate and two multivariate Cox proportional hazards regression models (Model 1: adjusted for age and gender; Model 2: adjusted for age, gender, admission department, CCI, APACHE II, SOFA, creatinine, total bilirubin, hemoglobin, heart rate, mean arterial pressure, and urine output) to inspect the association between the formed clusters and 1-year survival risks.

To further validate the credibility of the identified clusters, subgroup analyses were performed stratifying by age (<=65 and > 65 years), gender, presence of septic shock, and surgical status, in order to evaluate the hazard ratios of 1-year morality within each subgroup. We also conducted a sensitivity analysis among patients with and without pre-existing diabetes to assess whether the clusters were associated with similar outcomes regardless of diabetes status. The significance of the interaction was assessed using the Wald test, and P values for interaction were reported. A P less than 0.05 was considered indicative of a statistically significant interaction. Lastly, restricted cubic spline (RCS) with four knots was adopted to visualize the potential non-linear relationships between two glycemic indexes (mean blood glucose levels, and the coefficients of variation [CV] within the 48 hours after ICU admission) and 1-year mortality. CV is an indicator for glucose variability in continuous glucose monitoring (26), calculated as the standard deviation of glucose values divided by the mean values in the same observation period.

Statistical significance was defined as a two-tailed P value of less than 0.05. All statistical analyses were conducted using R (version 4.2.2) or Python (version 3.12.2).

Results

Derivation cohort characteristics

A total of 4,608 patients diagnosed with sepsis were admitted to FAH-SYSU between January 2018 to December 2023. After screening, 953 patients were excluded, with 3,655 eligible patients included in our study. The process of participant enrollment is displayed in Supplementary Figure S1A. Among these patients, the mean age was 58.71 years (SD: 16.20), with 70.26% as male patients. The mean APACHE II score at admission was 20.39 (SD: 7.76), and 54.31% presented with septic shock (N=1,985), indicating high disease severity. The mean blood glucose level at admission was 164.82 mg/dL (SD: 75.01). There were 1,674 (45.80%) patients who died within 1 year after diagnosis with sepsis, as shown in Table 1.

Table 1
www.frontiersin.org

Table 1. Demographic and clinical characteristics of sepsis patients stratifying by blood glucose trajectory clusters in the derivation cohort (N=3,655).

Blood glucose trajectory clustering

To determine the optimal number of clusters (K), multiple metrics were employed, as shown in Supplementary Table S1 and Supplementary Figure S2. The elbow plot and SSE values suggested an “elbow” around K=5, where the incremental decrease of SSE became relatively small after this point (Supplementary Figure S2). Additionally, the Calinski-Harabasz index peaked at K=5, while the Silhouette Score remained satisfactory. Consequently, we selected K=5 as the optimal cluster number, as these distinct trends exhibited high internal similarity, with additional clusters offering limited gain in differentiation.

Figure 2A illustrates the longitudinal BG trajectories of the five identified clusters over the initial 48 hours following ICU admission. Cluster 0 (30.64%) displayed a relatively stable and low glucose trajectory over the entire course (“low-stable”), with a median value of 127.8 mg/dL (IQR: 108.0–149.0) at baseline and 120.6 mg/dL (IQR: 104.4–136.8) at 48 hours. Cluster 1 (9.99%) maintained high glucose levels throughout the period (“high-stable”), with a median decrease from 288.0 mg/dL (IQR: 241.2–347.4) to 255.6 mg/dL (IQR: 223.2–302.4), corresponding to an absolute reduction of about 32.4 mg/dL. Cluster 2 (31.66%) started at a moderate glucose level and remained stable (“moderate-stable”), showing only a slight decline from 158.4 mg/dL (IQR: 135.0–183.6) to 156.6 mg/dL (IQR: 138.6–178.2). In contrast, Cluster 3 (10.75%) presented with a high initial glucose level but showed a pronounced drop over the 48-hour period (“high-decreasing”), with values falling from 271.8 mg/dL (IQR: 239.4–320.4) to 167.4 mg/dL (IQR: 140.4–198.0), representing an absolute decrease of approximately 104.4 mg/dL and about 39% reduction from baseline. Lastly, cluster 4 (16.96%) was characterized by starting at a moderate level and then increasing (“moderate-increasing”), which showed an upward trend in BG, increasing from a median of 183.6 mg/dL (IQR: 153.0–214.2) to 205.2 mg/dL (IQR: 180.0–237.6), with an overall increase of 21.6 mg/dL.

Figure 2
www.frontiersin.org

Figure 2. Trajectories and survival analysis of derivation cohort. (A). Trajectories of blood glucose levels within 48 hours after ICU admission among patients diagnosed with sepsis in the derivation cohort (N=3,655). (B). Kaplan–Meier survival curve of 1-year mortality across different blood glucose trajectory groups. Cluster 0 (“low-stable”), cluster 1 (“high-stable”), cluster 2 (“moderate-stable”), cluster 3 (“high-decreasing”), cluster 4 (“moderate-increasing”).

Baseline characteristics and outcomes of different clusters

The baseline characteristics of these clusters are summarized in Table 1, revealing diverse demographics, vital signs, blood counts and biochemistry profiles. Notably, cluster 1 (“high-stable”) had the highest mean glucose levels over the period (268.06 mg/dL), whereas glycemic variability in cluster 3 (“high-decreasing”) was the greatest (CV: 0.28), further supporting the clinical relevance of our clustering approach. Additionally, cluster 1 exhibited the highest mean APACHE-II score (23.21) and 1-year mortality (55.89%), followed by cluster 4 (“moderate-increasing”) and cluster 3 (52.58%, 51.65%, respectively). Cluster 0 (“low-stable”) was related to the lowest 1-year mortality (39.11%). Kaplan-Meier curves of all clusters are illustrated in Figure 2B, indicating that cluster 1 showed the worst 1-year survival (log-rank P < 0.001).

Primary and secondary outcomes across these clusters are displayed in Table 2. There was no significant difference between these trajectories and ICU length of stay (P = 0.165). The trends of ICU and 30-day mortality across the subtypes were similar to 1-year results. Specifically, individuals in cluster 3 were associated with the largest amount of vasopressor usage (50 mg, IQR [10, 148]), along with the longest ventilation durations (106 hours, IQR [51, 212]), suggesting a greater need for organ support and hemodynamic stabilization for those with a “high-decreasing” glucose trajectory. Additionally, cluster 1 (“high-stable”) received the highest doses of insulin (320 IU, IQR [168, 580]).

Table 2
www.frontiersin.org

Table 2. Primary and secondary outcomes across different blood glucose trajectory clusters.

Multivariate Cox regression models

Univariate analysis revealed significant risk factors associated with 1-year mortality in sepsis patients, including age, gender, admission department, CCI, APACHE II, SOFA, creatinine, total bilirubin, hemoglobin, heart rate, mean arterial pressure, and urine output. The association between blood glucose trajectories and 1-year mortality risks in different Cox proportional hazards regression models is presented in Table 3. Both unadjusted and adjusted hazard ratios demonstrated that cluster 1 (“high-stable”) was related to a significantly higher risk of 1-year mortality compared to cluster 0 (“low-stable”) (HR = 1.68, 1.63, 1.61 in the univariate model, model 1, and model 2, respectively; all P < 0.001). Similarly, both cluster 3 (“high-decreasing”) and cluster 4 (“moderate-increasing”) were linked to increased 1-year mortality risks in the full multivariate model (HR: 1.38, 95% CI: 1.16-1,65, P < 0.001; HR: 1.37, 95% CI: 1.18-1.60, P < 0.001, respectively). No significant difference was found in the 1-year mortality risk of cluster 2 (“moderate-stable”) compared to the reference group (P = 0.077 in model 2).

Table 3
www.frontiersin.org

Table 3. Univariate and multivariate Cox regression models of 1-year mortality risk.

External validation

To externally validate our clustering approach, we applied the same process to 10,874 sepsis patients from the MIMIC-IV database, with the selection process outlined in Supplementary Figure S1B. Baseline characteristics are summarized in Supplementary Table S2. Consistent clustering subtypes were obtained in the validation cohort: cluster 0 (“low-stable”, 53.27%), cluster 1 (“high-stable”, 4.71%), cluster 2 (“moderate-stable”, 25.51%), cluster 3 (“high-decreasing”, 10.27%), cluster 4 (“moderate-increasing”, 6.24%). As displayed in Figure 3, cluster 0 exhibited the most favorable 1-year survival, whereas both cluster 1 and cluster 4 showed the worst 1-year survival outcomes (log-rank P<0.001).

Figure 3
www.frontiersin.org

Figure 3. External validation clustering results. (A). Trajectory validation of blood glucose levels within 48h after ICU admission in MIMIC IV database. (B). Kaplan–Meier survival curve of 1-year mortality across different trajectories. Cluster 0 (“low-stable”), cluster 1 (“high-stable”), cluster 2 (“moderate-stable”), cluster 3 (“high-decreasing”), cluster 4 (“moderate-increasing”).

Figure 4
www.frontiersin.org

Figure 4. Subgroup analysis of 1-year mortality risks across different trajectories, stratifying by age, gender, septic shock, and surgical status. APACHE, acute physiologic assessment and chronic health evaluation; HR, hazard ratio. Cluster 0 (“low-stable”), cluster 1 (“high-stable”), cluster 2 (“moderate-stable”), cluster 3 (“high-decreasing”), cluster 4 (“moderate-increasing”).

Subgroup and sensitivity analyses

To control baseline imbalances across the formed clusters, subgroup analyses were conducted in the derivation cohort, as illustrated in Figure 4. The association between blood glucose trajectories and 1-year mortality risk remained largely consistent regardless of gender and surgical status, where a “low-stable” or “moderate-stable” glucose trend was correlated with better outcomes. In aging patients (>65 years), only cluster 1 (“high-stable”) and cluster 3 (“high-decreasing”) showed significant long-term mortality risks (P=0.006, 0.002, respectively), suggesting that high glucose levels at admission may indicate poor outcomes for elderly individuals. Additionally, in septic shock patients, only cluster 1 exhibited a significantly worse prognosis (P=0.022), which could be related to increased oxidative stress, coagulation activation, and endothelial dysfunction as a result of persistent stress hyperglycemia.

To validate the impact of diabetes history on the BG clustering process, sensitivity analysis was performed in diabetes and non-diabetes patients, respectively. In patients without diabetes history (N=2,981), the survival outcomes across trajectories were similar to the main results (Supplementary Figures S3A, B). However, in diabetic patients, the blood glucose trajectories were similar to the primary analysis, whereas 5 clusters showed different 1-year mortality. Cluster 0 (“low-stable”) presented the worst 1-year prognosis, though there was no statistically significant difference in 1-year mortality rate among the five groups (log-rank P = 0.2) (Supplementary Figure S3C, D). This suggests that diabetic patients may have a distinct immune response and metabolism as a consequence of the host’s chronic tolerance to hyperglycemia.

Lastly, RCS was used to further explore the optimal mean blood glucose and CV ranges associated with lower 1-year mortality risks (Figure 5). Both blood glucose and CV exhibited a nonlinear relationship with 1-year mortality (P for nonlinear < 0.001, both). There was a U-shaped curve between the mean blood glucose values within 48 hours and 1-year mortality, with an optimal range between 122 mg/dL and 160 mg/dL. Contrarily, the relationship between CV and 1-year mortality exhibited a J-shaped curve, with a higher risk of death when CV was greater than 0.18.

Figure 5
www.frontiersin.org

Figure 5. RCS curves of glycemic indexes associated with 1-year mortality risk: (A). RCS curves of mean blood glucose within 48 hours after ICU admission. The reference glucose levels are between 122 mg/dL and 160 mg/dL. (B). RCS curves of glycemic CV within 48 hours after ICU admission. The reference value of CV: 0.18. RCS, restricted cubic spline; CV, Coefficient of Variation; HR, hazard ratio.

Discussion

We identified and externally validated five distinct early blood glucose trajectories in sepsis patients, namely, the “low-stable”, “high-stable”, “moderate-stable”, “high-decreasing”, and “moderate-increasing” trends. Additionally, these BG trajectories were significantly associated with diverse 1-year mortality risks, supporting the notion that early dynamic glucose patterns may play a crucial role in long-term sepsis prognosis. The five trajectories were also reproducible in the MIMIC-IV database.

Sepsis is a heterogeneous disease with high morbidity and mortality that rapidly progresses, thus identifying prognostic markers in the early stage could assist in risk stratification and individualized management. Given the complex interplay between sepsis progression and glucose metabolism, numerous investigations have focused on the relationship between blood glucose levels and sepsis outcomes (17, 2730). However, most previous studies were based on cross-sectional data, typically assessing the glycemic indexes at a specific time point. For instance, Lu et al. utilized the mean glucose values and glycemic CV during the ICU stay to examine their impacts on ICU mortality among 7,104 adult sepsis patients (30). The multivariate logistic regression results showed that both increased glucose levels and higher CV were correlated with increased mortality risks (OR: 1.14, 1.05, respectively), while the harm of hyperglycemia was not observed in diabetic patients. However, this approach neglects the dynamic nature of glucose metabolism and its potential effect on sepsis outcomes. Our study used time-series data of varying blood glucose trajectories and applied K-means clustering to deconstruct the heterogeneity, providing a more granular view of early glycemic patterns, in contrast to single snapshot measurements. We identified five distinct clusters of early BG trajectories, linking to different 1-year outcomes. The most favorable prognosis was observed in patients with “low-stable” and “moderate-stable” trajectories, whereas individuals with a “high-stable” trajectory and those exhibiting unstable trends (“high-decreasing” and “moderate-increasing”) showed significantly higher 1-year mortality risks. These findings were consistent with survival analysis and multivariate Cox proportional hazards regression results.

Several potential mechanisms may explain these findings. The “high-stable” trajectory may reflect persistent stress hyperglycemia and insulin resistance, which has been found to be associated with increased oxidative stress, coagulation activation, and endothelial dysfunction (31). Similarly, the dynamic increase of the triglyceride-glucose (TyG) index trajectory, an indicator of insulin resistance, is also reported to be associated with higher 28-day mortality risk (HR: 1.07, 95% CI: 1.02-1.12) (32). Moreover, greater glycemic variability, as observed in two clusters with unstable trends, has been linked to adverse outcomes in critically ill patients. Previous research has suggested that apoptosis in endothelial cells was even more severe with an acute fluctuating glucose exposure than with a stable high glucose concentration (33, 34). Besides, GV could also increase the occurrence of severe hypoglycemia, leading to mortality, prolonged hospital length of stay, and an increased risk of cardiovascular events for sepsis patients (35, 36). Importantly, our RCS analysis further supports these observations, which revealed a U-shaped association for mean glucose values, and a J-shaped relationship for GV linked to 1-year mortality, thus indicating a detrimental effect of extreme glycemic levels and excessive glucose fluctuations.

To ensure the consistency of our findings, we performed external validation in a demographically diverse cohort, demonstrating the reproducibility of our clustering technique. Despite the similarities in trajectory clustering, slight differences in 1-year mortalities were noticed between the FAH-SYSU and MIMIC cohorts. For instance, cluster 4 (“moderate-increasing”) exhibited even worse 1-year survival than cluster 1 (“high-stable”) in the MIMIC cohort. Variations in mortalities across clusters suggest that latent factors, such as patient demographics, insulin protocols, vasopressor usage, and the implementation of advanced organ support, may influence outcomes. Moreover, we conducted subgroup and sensitivity analyses, revealing that the relationship between BG trajectories and 1-year mortality remained largely consistent across different age groups, genders, and sepsis subtypes. Notably, survival analysis demonstrated that in diabetic patients, a “low-stable” trajectory might indicate the worst 1-year prognosis in contrast to non-diabetic patients. Lin et al. found that severe hyperglycemia did not increase the risk of 28-day mortality among 3,500 sepsis patients with diabetes (HR: 1.06, 95% CI: 0.86-1.31), while a lower admission blood glucose level was associated with increased risk of poor prognosis (29). Physiologically, patients with diabetes have chronically grown tolerance to hyperglycemia with impaired β-cell function, thus a “low-stable” trajectory may signal treatment-induced hypoglycemia. It is argued that various rapidly dividing cells, including immune cells, rely on aerobic glycolysis as a normal metabolic strategy (37). For patients with diabetes, elevated glucose levels may play a vital role in maintaining biosynthetic activities associated with the expansion of immune cells and the production of immune modulators during critical conditions (29). Moreover, insulin administration may adversely affect clinical outcomes by inhibiting autophagy, which could lead to the inability to remove damaged proteins or degrade noxious factors including bacteria and endotoxins (37). Our findings further highlight the importance of continuous blood glucose monitoring and individualized glycemic control strategies based on the patient’s comorbidities. Future studies should explore whether interventions targeting specific BG trajectories can improve survival in various sepsis patients.

Our study has several strengths. First, it is the largest investigation to our knowledge examining the relationship between hyperglycemia BG trajectories and long-term outcomes in sepsis patients, while previous investigations have largely focused on snapshot glycemic measurements and prognoses in the short-to-medium term. Second, the use of unsupervised machine learning (K-means clustering) and the consensus approach utilizing both quantitative metrics and qualitative inspection to determine the optimal K provide an objective classification of BG patterns without predefined assumptions, thereby ensuring that the formation of clusters can best explain the data. Third, the validation in a demographically diverse and independent cohort further strengthens the generalizability of our findings.

However, the limitations should also be acknowledged. First, this study is retrospective in nature; therefore, biases in data collection and patient selection may have occurred during the database construction and information extraction, potentially affecting the accuracy and reliability of our clusters. Nevertheless, we have utilized internal and external validation to ensure the credibility of the clustering approach, and conducted various statistical analyses to account for potential confounders. Second, due to the requirement of calculating dynamic trajectory, patients who stayed less than 48 hours were excluded, thus individuals with milder conditions or those who died before the endpoint were not considered in our clustering process. The exclusion of these patients may lead to neglect in identifying certain BG patterns. Additionally, we acknowledge the inherent limitations of the K-means clustering algorithm. K-means assumes spherical clusters of equal variance and is sensitive to initial centroid placement. It also requires pre-specifying the number of clusters (k), which may not perfectly capture the true underlying data structure. While we addressed this by using multiple metrics including SSE, Silhouette Score, Calinski-Harabasz index, and Davies-Bouldin index to determine an optimal k, more advanced trajectory modeling techniques such as group-based trajectory modeling or latent class mixed models may offer improved flexibility in future work. In our study, 13% of patients in the derivation cohort received steroid therapy within the first 48 hours after ICU admission, which may contribute to hyperglycemia or glycemic variabilityFuture prospective studies should incorporate detailed treatment data, including insulin protocols, corticosteroid dose, and nutritional interventions, to better understand how clinical interventions shape blood glucose trajectories and long-term outcomes.

Conclusion

Distinct trajectories of early blood glucose dynamic change were significantly associated with 1-year mortality in patients with sepsis, while individuals with persistent hyperglycemia and unstable glucose trends showed significantly higher 1-year mortality risks after adjusting for confounders. By focusing on the early post-admission period, our findings highlight the prognostic value of dynamic BG measurements, offering a novel approach to predict clinical outcomes in sepsis.

Data availability statement

The datasets used and/or analyzed during the current study are available from the corresponding authors on reasonable request.

Ethics statement

The studies involving humans were approved by Clinical Research Ethics Committee of the First Affiliated Hospital of Sun Yat-sen University. The studies were conducted in accordance with the local legislation and institutional requirements. The ethics committee/institutional review board waived the requirement of written informed consent for participation from the participants or the participants’ legal guardians/next of kin because this was a retrospective study based on de-identified clinical data. The study protocol was approved by the Clinical Research Ethics Committee of the First Affiliated Hospital of Sun Yat-sen University, which granted a waiver of informed consent due to the minimal risk nature of the study and the impracticality of obtaining consent from all patients. As the data in the MIMIC-IV database were fully anonymized, the Institutional Review Board at the Beth Israel Deaconess Medical Center granted a waiver of informed consent.

Author contributions

HM: Data curation, Formal Analysis, Investigation, Methodology, Writing – original draft. XQ: Conceptualization, Methodology, Validation, Writing – original draft. XS: Writing – original draft, Data curation, Validation, Visualization. RJ: Visualization, Writing – original draft, Methodology. JL: Methodology, Writing – original draft. FX: Data curation, Writing – original draft. RD: Visualization, Writing – original draft. XG: Funding acquisition, Resources, Writing – original draft. KL: Data curation, Formal Analysis, Validation, Writing – review & editing. SL: Data curation, Resources, Supervision, Writing – review & editing. CC: Project administration, Supervision, Writing – review & editing.

Funding

The author(s) declare that financial support was received for the research and/or publication of this article. This research was funded by Guangdong Acute and Critical Care Clinical Medical Research Center (Grant No. 2020B1111170005). The funding source did not participate in this study.

Acknowledgments

We express our gratitude to the Center for Information Technology & Statistics of the First Affiliated Hospital of Sun Yat-sen University for data extraction.

Conflict of interest

The authors declare that the research 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) declare that no Generative AI was used in the creation of this manuscript.

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/fimmu.2025.1610519/full#supplementary-material

Supplementary Figure 1 | Flow diagram of patient selection in the derivation cohort (A) and validation cohort (B).

Supplementary Figure 2 | The elbow plot of K-means clustering results.

Supplementary Figure 3 | Sensitivity analysis among patients with and without diabetes. (A). Trajectory of blood glucose levels within 48h after ICU admission in non-diabetic patients. (B). 1-year Kaplan–Meier survival curve of non-diabetic patients. (C). Trajectory of blood glucose levels within 48h after ICU admission in diabetic patients. (D). 1-year Kaplan–Meier survival curves of diabetic patients. Cluster 0 (“low-stable”), cluster 1 (“high-stable”), cluster 2 (“moderate-stable”), cluster 3 (“high-decreasing”), cluster 4 (“moderate-increasing”).

Supplementary Table 1 | Performance metrics of K-means clustering with different number of clusters (K).

Supplementary Table 2 | Demographic and clinical characteristics of external validation cohort from the MIMIC-IV database. Cluster 0 (“low-stable”), cluster 1 (“high-stable”), cluster 2 (“moderate-stable”), cluster 3 (“high-decreasing”), cluster 4 (“moderate-increasing”).

Appendix 1 | CAIR Checklist for Healthcare AI Research.

References

1. Singer M, Deutschman CS, Seymour CW, Shankar-Hari M, Annane D, Bauer M, et al. The third international consensus definitions for sepsis and septic shock (Sepsis-3). JAMA. (2016) 315:801–10. doi: 10.1001/jama.2016.0287

PubMed Abstract | Crossref Full Text | Google Scholar

2. van der Poll T, Shankar-Hari M, and Wiersinga WJ. The immunology of sepsis. Immunity. (2021) 54:2450–64. doi: 10.1016/j.immuni.2021.10.012

PubMed Abstract | Crossref Full Text | Google Scholar

3. Montori VM, Bistrian BR, and McMahon MM. Hyperglycemia in acutely ill patients. JAMA. (2002) 288:2167–9. doi: 10.1001/jama.288.17.2167

PubMed Abstract | Crossref Full Text | Google Scholar

4. Brownlee M. The pathobiology of diabetic complications: a unifying mechanism. Diabetes. (2005) 54:1615–25. doi: 10.2337/diabetes.54.6.1615

PubMed Abstract | Crossref Full Text | Google Scholar

5. Dungan KM, Braithwaite SS, and Preiser JC. Stress hyperglycaemia. Lancet. (2009) 373:1798–807. doi: 10.1016/S0140-6736(09)60553-5

PubMed Abstract | Crossref Full Text | Google Scholar

6. Van den Berghe G, Vanhorebeek I, Langouche L, and Gunst J. Our scientific journey through the ups and downs of blood glucose control in the ICU. Am J Respir Crit Care Med. (2024) 209:497–506. doi: 10.1164/rccm.202309-1696SO

PubMed Abstract | Crossref Full Text | Google Scholar

7. Khatri JJ, Johnson C, Magid R, Lessner SM, Laude KM, Dikalov SI, et al. Vascular oxidant stress enhances progression and angiogenesis of experimental atheroma. Circulation. (2004) 109:520–5. doi: 10.1161/01.CIR.0000109698.70638.2B

PubMed Abstract | Crossref Full Text | Google Scholar

8. Evans L, Rhodes A, Alhazzani W, Antonelli M, Coopersmith CM, French C, et al. Surviving sepsis campaign: international guidelines for management of sepsis and septic shock 2021. Intensive Care Med. (2021) 47:1181–247. doi: 10.1007/s00134-021-06506-y

PubMed Abstract | Crossref Full Text | Google Scholar

9. Yao RQ, Ren C, Wu GS, Zhu YB, Xia ZF, and Yao YM. Is intensive glucose control bad for critically ill patients? A systematic review and meta-analysis. Int J Biol Sci. (2020) 16:1658–75. doi: 10.7150/ijbs.43447

PubMed Abstract | Crossref Full Text | Google Scholar

10. van den Berghe G, Wouters P, Weekers F, Verwaest C, Bruyninckx F, Schetz M, et al. Intensive insulin therapy in critically ill patients. N Engl J Med. (2001) 345:1359–67. doi: 10.1056/NEJMoa011300

PubMed Abstract | Crossref Full Text | Google Scholar

11. Brunkhorst FM, Engel C, Bloos F, Meier-Hellmann A, Ragaller M, Weiler N, et al. Intensive insulin therapy and pentastarch resuscitation in severe sepsis. N Engl J Med. (2008) 358:125–39. doi: 10.1056/NEJMoa070716

PubMed Abstract | Crossref Full Text | Google Scholar

12. Kalfon P, Giraudeau B, Ichai C, Guerrini A, Brechot N, Cinotti R, et al. Tight computerized versus conventional glucose control in the ICU: a randomized controlled trial. Intensive Care Med. (2014) 40:171–81. doi: 10.1007/s00134-013-3189-0

PubMed Abstract | Crossref Full Text | Google Scholar

13. Arabi YM, Dabbagh OC, Tamim HM, Al-Shimemeri AA, Memish ZA, Haddad SH, et al. Intensive versus conventional insulin therapy: a randomized controlled trial in medical and surgical critically ill patients. Crit Care Med. (2008) 36:3190–7. doi: 10.1097/CCM.0b013e31818f21aa

PubMed Abstract | Crossref Full Text | Google Scholar

14. Investigators CS, Annane D, Cariou A, Maxime V, Azoulay E, D’Honneur G, et al. Corticosteroid treatment and intensive insulin therapy for septic shock in adults: a randomized controlled trial. JAMA. (2010) 303:341–8. doi: 10.1001/jama.2010.2

PubMed Abstract | Crossref Full Text | Google Scholar

15. Preiser JC, Devos P, Ruiz-Santana S, Melot C, Annane D, Groeneveld J, et al. A prospective randomised multi-centre controlled trial on tight glucose control by intensive insulin therapy in adult intensive care units: the Glucontrol study. Intensive Care Med. (2009) 35:1738–48. doi: 10.1007/s00134-009-1585-2

PubMed Abstract | Crossref Full Text | Google Scholar

16. Suh S and Kim JH. Glycemic variability: how do we measure it and why is it important? Diabetes Metab J. (2015) 39:273–82. doi: 10.4093/dmj.2015.39.4.273

PubMed Abstract | Crossref Full Text | Google Scholar

17. Ali NA, O’Brien JM Jr., Dungan K, Phillips G, Marsh CB, Lemeshow S, et al. Glucose variability and mortality in patients with sepsis. Crit Care Med. (2008) 36:2316–21. doi: 10.1097/CCM.0b013e3181810378

PubMed Abstract | Crossref Full Text | Google Scholar

18. Waeschle RM, Moerer O, Hilgers R, Herrmann P, Neumann P, and Quintel M. The impact of the severity of sepsis on the risk of hypoglycaemia and glycaemic variability. Crit Care. (2008) 12:R129. doi: 10.1186/cc7097

PubMed Abstract | Crossref Full Text | Google Scholar

19. Li W, Wen CP, Li W, Ying Z, Pan S, Li Y, et al. 6-Year trajectory of fasting plasma glucose (FPG) and mortality risk among individuals with normal FPG at baseline: a prospective cohort study. Diabetol Metab Syndr. (2023) 15:169. doi: 10.1186/s13098-023-01146-2

PubMed Abstract | Crossref Full Text | Google Scholar

20. Lee CL, Sheu WH, Lee IT, Lin SY, Liang WM, Wang JS, et al. Trajectories of fasting plasma glucose variability and mortality in type 2 diabetes. Diabetes Metab. (2018) 44:121–8. doi: 10.1016/j.diabet.2017.09.001

PubMed Abstract | Crossref Full Text | Google Scholar

21. Lin CC, Li CI, Liu CS, Lin CH, Lin WY, Wang MC, et al. Three-year trajectories of metabolic risk factors predict subsequent long-term mortality in patients with type 2 diabetes. Diabetes Res Clin Pract. (2021) 179:108995. doi: 10.1016/j.diabres.2021.108995

PubMed Abstract | Crossref Full Text | Google Scholar

22. Olczak J, Pavlopoulos J, Prijs J, Ijpma FFA, Doornberg JN, Lundstrom C, et al. Presenting artificial intelligence, deep learning, and machine learning studies to clinicians and healthcare stakeholders: an introductory reference with a guideline and a Clinical AI Research (CAIR) checklist proposal. Acta Orthop. (2021) 92:513–25. doi: 10.1080/17453674.2021.1918389

PubMed Abstract | Crossref Full Text | Google Scholar

23. Steinley D and Brusco MJ. Choosing the number of clusters in Kappa-means clustering. Psychol Methods. (2011) 16:285–97. doi: 10.1037/a0023346

PubMed Abstract | Crossref Full Text | Google Scholar

24. Rousseeuw PJ. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J Comput Appl Mathematics. (1987) 20:53–65. doi: 10.1016/0377-0427(87)90125-7

Crossref Full Text | Google Scholar

25. Jain AK. Data clustering: 50 years beyond K-means. Pattern Recognition Lett. (2010) 31:651–66. doi: 10.1016/j.patrec.2009.09.011

Crossref Full Text | Google Scholar

26. Urakami T, Terada H, Tanabe S, Mine Y, Aoki M, Aoki R, et al. Clinical significance of coefficient of variation in continuous glucose monitoring for glycemic management in children and adolescents with type 1 diabetes. J Diabetes Investig. (2024) 15:1669–74. doi: 10.1111/jdi.v15.11

PubMed Abstract | Crossref Full Text | Google Scholar

27. Chao WC, Tseng CH, Wu CL, Shih SJ, Yi CY, and Chan MC. Higher glycemic variability within the first day of ICU admission is associated with increased 30-day mortality in ICU patients with sepsis. Ann Intensive Care. (2020) 10:17. doi: 10.1186/s13613-020-0635-3

PubMed Abstract | Crossref Full Text | Google Scholar

28. Fabbri A, Marchesini G, Benazzi B, Morelli A, Montesi D, Bini C, et al. Stress hyperglycemia and mortality in subjects with diabetes and sepsis. Crit Care Explor. (2020) 2:e0152. doi: 10.1097/CCE.0000000000000152

PubMed Abstract | Crossref Full Text | Google Scholar

29. Lin S, Lai D, and He W. Association between hyperglycemia and adverse clinical outcomes of sepsis patients with diabetes. Front Endocrinol (Lausanne). (2022) 13:1046736. doi: 10.3389/fendo.2022.1046736

PubMed Abstract | Crossref Full Text | Google Scholar

30. Lu Z, Tao G, Sun X, Zhang Y, Jiang M, Liu Y, et al. Association of blood glucose level and glycemic variability with mortality in sepsis patients during ICU hospitalization. Front Public Health. (2022) 10:857368. doi: 10.3389/fpubh.2022.857368

PubMed Abstract | Crossref Full Text | Google Scholar

31. Lemkes BA, Hermanides J, Devries JH, Holleman F, Meijers JC, and Hoekstra JB. Hyperglycemia: a prothrombotic factor? J Thromb Haemost. (2010) 8:1663–9. doi: 10.1111/j.1538-7836.2010.03910.x

PubMed Abstract | Crossref Full Text | Google Scholar

32. Ning YL, Xu XH, Niu XL, Zhang Y, Zhou JH, and Sun C. The triglyceride-glucose index dynamic trajectory reveals the association between the clinical subphenotype of insulin resistance and mortality in patients with sepsis. BMC Infect Dis. (2024) 24:1083. doi: 10.1186/s12879-024-10005-y

PubMed Abstract | Crossref Full Text | Google Scholar

33. Risso A, Mercuri F, Quagliaro L, Damante G, and Ceriello A. Intermittent high glucose enhances apoptosis in human umbilical vein endothelial cells in culture. Am J Physiol Endocrinol Metab. (2001) 281:E924–30. doi: 10.1152/ajpendo.2001.281.5.E924

PubMed Abstract | Crossref Full Text | Google Scholar

34. Monnier L, Mas E, Ginet C, Michel F, Villon L, Cristol JP, et al. Activation of oxidative stress by acute glucose fluctuations compared with sustained chronic hyperglycemia in patients with type 2 diabetes. JAMA. (2006) 295:1681–7. doi: 10.1001/jama.295.14.1681

PubMed Abstract | Crossref Full Text | Google Scholar

35. Martinez M, Santamarina J, Pavesi A, Musso C, and Umpierrez GE. Glycemic variability and cardiovascular disease in patients with type 2 diabetes. BMJ Open Diabetes Res Care. (2021) 9(1):e002032. doi: 10.1136/bmjdrc-2020-002032

PubMed Abstract | Crossref Full Text | Google Scholar

36. Almagthali A, Alsohimi S, Alkhalaf A, Al Sulaiman K, and Aljuhani O. Assessing glycemic variability in critically ill patients: A prospective cohort study comparing insulin infusion therapy with insulin sliding scale. Sci Rep. (2024) 14:10128. doi: 10.1038/s41598-024-57403-5

PubMed Abstract | Crossref Full Text | Google Scholar

37. van Niekerk G, Davis T, and Engelbrecht AM. Hyperglycaemia in critically ill patients: the immune system’s sweet tooth. Crit Care. (2017) 21:202. doi: 10.1186/s13054-017-1775-1

PubMed Abstract | Crossref Full Text | Google Scholar

Keywords: sepsis, blood glucose, 1-year mortality, trajectory analysis, K-means clustering

Citation: Ma H, Qian X, Song X, Jiang R, Li J, Xiao F, Dou R, Guan X, Lui KY, Li S and Cai C (2025) Identifying early blood glucose trajectories in sepsis linked to distinct long-term outcomes: a K-means clustering study with external validation. Front. Immunol. 16:1610519. doi: 10.3389/fimmu.2025.1610519

Received: 12 April 2025; Accepted: 20 May 2025;
Published: 05 June 2025.

Edited by:

Jin Bin, Shandong University, China

Reviewed by:

Yanfeng Liu, Shandong University, China
Khin Phyu Pyar, Ministry of Health Myanmar, Myanmar

Copyright © 2025 Ma, Qian, Song, Jiang, Li, Xiao, Dou, Guan, Lui, Li and Cai. 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: Ka Yin Lui, bHZqeDlAbWFpbC5zeXN1LmVkdS5jbg==; Shuhe Li, Uy5MaTdAZXhldGVyLmFjLnVr; Changjie Cai, Y2FpY2hqaWVAbWFpbC5zeXN1LmVkdS5jbg==

These authors have contributed equally to this work and share first authorship

Disclaimer: 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.