Association of hemoglobin glycation index with all-cause mortality in critically ill patients with atrial fibrillation: a retrospective analysis from MIMIC-IV Authors: Chao Wu, Xuejun Hu, Long Tang, Zufei Wu, Zheng Huang, Cunming Fang Published: 2025 ABSTRACT BackgroundAtrial fibrillation (AF) is recognized as the most prevalent sustained cardiac arrhythmia encountered in clinical practice, particularly among critically ill patients, and is correlated with heightened mortality rates. The hemoglobin glycation index (HGI), which captures interindividual variability in hemoglobin glycation, has emerged as a promising metabolic marker with potential prognostic significance. Nonetheless, the relationship between HGI and mortality in critically ill patients with AF remains to be elucidated.MethodsThis retrospective cohort study utilized the MIMIC-IV database (version 3.1) and included 3,157 critically ill patients with AF. Patients were stratified into tertiles based on HGI levels: T1 (≤-0.505), T2 (-0.505 to 0.035), and T3 (> 0.035). Kaplan-Meier survival curves were constructed to compare mortality rates between groups. Cox proportional hazards regression models were employed to assess the relationship between HGI and all-cause mortality at 30, 90, 180, and 365 days. Threshold analysis was performed to identify optimal HGI cut-off values for mortality prediction. Restricted cubic spline regression was used to evaluate non-linear associations, complemented by subgroup and mediation analyses.ResultsIn a cohort of 3,157 critically ill patients with atrial fibrillation (mean age 68.5 ± 8.9 years; 66.8% male), Kaplan-Meier analysis demonstrated a significantly elevated all-cause mortality at all time points for patients with lower hemoglobin glycation index (HGI) levels (log-rank P < 0.01). Multivariate Cox regression analysis indicated that the lowest HGI tertile was independently associated with an increased risk of mortality: 30-day (HR = 1.50, 95%CI: 1.08–2.08), 90-day (HR = 1.52, 95%CI: 1.15–2.02), 180-day (HR = 1.53, 95%CI: 1.18–1.98), and 365-day (HR = 1.44, 95%CI: 1.14–1.82). Restricted cubic spline analysis revealed an L-shaped relationship with inflection points at -0.255 (30-day), -0.435 (90-day), -0.435 (180-day), and − 0.475 (365-day). patients with HGI values exceeding these thresholds were associated with approximately 30% lower mortality risk at the corresponding time points. Subgroup analyses identified a significant interaction by gender, with females exhibiting a higher mortality risk than males when HGI was low, and the nonlinear association was more pronounced in females. Mediation analysis suggested that the estimated glomerular filtration rate (eGFR) partially mediated the relationship between HGI and mortality.ConclusionIn patients with atrial fibrillation admitted to the intensive care unit, a low HGI was independently correlated with elevated risks of mortality at 30, 90, 180, and 365 days, exhibiting a pronounced L-shaped pattern and a significant interaction with gender. This association is partially mediated by renal function. HGI shows potential for improved risk stratification in this patient population.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12872-025-05089-6. Introduction AF is recognized as the most prevalent sustained cardiac arrhythmia in clinical practice [1], impacting over 33 million individuals worldwide and imposing significant healthcare burdens. In critically ill populations, the incidence of AF escalates to between 15% and 25%, driven by complex pathophysiological interactions such as systemic inflammation, electrolyte disturbances, and surges in catecholamines [2] This heightened incidence correlates with a 2.3-fold increase in the risk of in-hospital mortality when compared to patients without AF, and the one-year mortality rates in these patients can exceed 40%, despite advancements in management strategies [3]. The persistent disparity in prognosis highlights the urgent need for innovative risk stratification tools that focus on modifiable metabolic parameters. Recent studies have identified glycemic variability as a crucial factor influencing clinical outcomes, extending beyond traditional metrics such as hyperglycemia or HbA1c levels [4]. The HGI serves as a valuable measure in this context, calculated as the residual difference between measured HbA1c and predicted HbA1c, which is derived from fasting plasma glucose regression models. This index effectively captures interindividual variations in hemoglobin glycation kinetics [5]. Factors contributing to this biological heterogeneity include erythrocyte lifespan, which can account for 15–30% of variance, glycation rates influenced by intracellular glucose flux, and genetic polymorphisms affecting hemoglobin structure, such as HbS variants [6]. Mechanistically, an elevated HGI indicates accelerated non-enzymatic glycation, which predisposes individuals to endothelial dysfunction, while a depressed HGI may reflect impaired glucose monitoring capacity or abnormalities in erythrocyte turnover [7].Interestingly, the relationship between the HGI and mortality exhibits inconsistencies across different subgroups of patients. Clinical validations of the HGI have revealed J-shaped mortality associations across diverse populations. For instance, in the ACCORD trial, extreme quintiles of HGI were associated with increased cardiovascular mortality, although specific percentages were not detailed in the literature [8]. Furthermore, a meta-analysis encompassing 12 cohort studies demonstrated that each standard deviation increase in HGI correlated with a 17% increase in excess mortality risk among diabetic patients [9]. These associations remain significant even after adjusting for conventional risk factors, indicating that HGI encapsulates unique pathobiological information.However, a recent study found that in patients with coronary artery disease (CAD), the HGI had a U-shaped correlation with all-cause mortality, indicating that both low and high HGI values were associated with increased mortality risk, while intermediate values appeared to confer a survival advantage [10].Notably, though HGI research started with diabetic cohorts, it reflects universal inter-individual hemoglobin glycation variability. In critical illness, HGI fluctuations signal metabolic stress and glycemic changes, linking to clinical outcomes. Studying HGI’s role in mortality clarifies its pathophysiological significance in ICU patients with AF.However, the role of HGI in critically ill patients with AF has not been explored, leaving a significant gap in our understanding of its potential prognostic value in this high-risk population. Building on this context, the current study seeks to examine the relationship between Hemoglobin Glycation Index (HGI) and all-cause mortality among critically ill patients with AF. By employing data from the MIMIC-IV database, a comprehensive and widely acknowledged clinical resource, we propose that both low and high HGI levels will be associated with an elevated risk of mortality in this particular patient cohort. The expected outcomes of this research are anticipated to offer significant insights into the clinical management of critically ill AF patients and may assist in identifying potential therapeutic targets to enhance their prognosis. Method Source of data This study utilized data from the Medical Information Mart for Intensive Care IV (MIMIC-IV, version 3.1) database, a widely-used, open-access critical care database containing de-identified health data from patients admitted to Beth Israel Deaconess Medical Center (BIDMC) in Boston, Massachusetts, between 2008 and 2019. The database encompasses comprehensive clinical information from over 190,000 unique patients and 450,000 hospital admissions, including detailed patient demographics, laboratory results, medication administration records, vital sign measurements, diagnostic information, and patient outcomes.Access to the MIMIC-IV database was granted to Chao Wu (ID: 13147611) following completion of the National Institutes of Health (NIH) training course on human research participant protection and successful passage of the Collaborative Institutional Training Initiative (CITI) examination. Ethical approval for this retrospective study was waived by the BIDMC Institutional Review Board (IRB), as the database contains exclusively de-identified and anonymized patient information. Informed consent requirements were not applicable due to the retrospective nature of this analysis and the anonymization of all patient data. Study design and population This study focused on critically ill patients with AF, with or without diabetes, admitted to the intensive care unit (ICU) for the first time. A total of 18,805 patients with AF were identified using the International Classification of Diseases, Ninth Revision (ICD-9) and Tenth Revision (ICD-10) codes, including I42.7, I48, I480, I481, I482, I489, I481.1, I481.9, I482.0, I482.1, and I489.1. The exclusion criteria were as follows: (1) patients aged less than 18 years or older than 80 years; (2) ICU stay duration of less than 1 day; and (3) missing data on HbA1c or fasting blood glucose levels. After applying these exclusion criteria, a final cohort of 3,157 patients with AF was included in the study for further analysis. The flowchart of patient selection is shown in Fig. 1. Fig. 1Flowchart of the selection of patients Flowchart of the selection of patients Data extraction Data extraction was performed using PostgreSQL software (version 17.0.13) and Navicat Premium (version 16) software via Structured Query Language (SQL). The extracted data included: Demographic information: Age, gender, race, weight, height, and body mass index (BMI).Vital signs: Heart rate (HR), systolic blood pressure (SBP), diastolic blood pressure (DBP), mean blood pressure (MBP), respiratory rate (RR), and peripheral oxygen saturation (SpO₂).Comorbidities: Hypertension, diabetes, acute kidney injury (AKI), chronic kidney disease (CKD), hyperlipidemia, coronary artery disease (CAD), acute myocardial infarction (AMI), congestive heart failure (CHF), obesity, cardiomyopathy, peripheral vascular disease, cerebrovascular disease, dementia, chronic pulmonary disease, rheumatic disease, peptic ulcer, mild liver disease, paraplegia, and malignant cancer.Interventions: Continuous renal replacement therapy (CRRT) and mechanical ventilation.Medications: Heparin, insulin, antiplatelets, beta-blockers, lipid-lowering drugs, calcium channel blockers (CCB), angiotensin-converting enzyme inhibitors/angiotensin receptor blockers (ACEI/ARB), amiodarone, non-vitamin K antagonist oral anticoagulants (NOACs), digoxin, oral glucose-lowering drugs, mineralocorticoid receptor antagonists (MRA), loop diuretics, angiotensin receptor neprilysin inhibitors (ARNI).Severity scores: Systemic Inflammatory Response Syndrome (SIRS), Sequential Organ Failure Assessment (SOFA), Simplified Acute Physiology Score (SAPS II), Oxford Acute Severity of Illness Score (OASIS), and Acute Physiology Score III (APS III).Laboratory data: Hemoglobin, hematocrit, platelets, red blood cell distribution width (RDW), red blood cells (RBC), white blood cells (WBC), anion gap, calcium, chloride, potassium, sodium, lactate, total CO₂, partial pressure of arterial oxygen (PO₂), partial pressure of carbon dioxide (PaCO₂), bicarbonate, pH, base excess (BE), international normalized ratio (INR), prothrombin time (PT), partial prothrombin time (PTT), creatinine, urea nitrogen, estimated glomerular filtration rate (eGFR), glycated hemoglobin (HbA1c), and glucose.Length of stay (LOS): LOS in the hospital and LOS in the ICU.All blood indicators were measured for the first time after the patients were admitted into hospital. Variables with more than 20% missing values were excluded (). Outcomes In the MIMIC-IV database, the prognosis of patients with AF was assessed. The mortality rates at 30 days, 90 days, 180 days, and 365 days were examined. For this particular study, the main focus was on all-cause mortality at 30 days and 365 days. In addition, all-cause mortality at 90 days and 180 days served as secondary measures. Calculation of HGI A linear regression model linking FPG (Fasting Plasma Glucose) and HbA1c (Glycated Hemoglobin) was constructed using data from all the patients involved in this study [11]. With this model, the predicted HbA1c value was derived (predicted HbA1c = 0.01*glucose + 4.875). After that, the difference between the actual observed HbA1c and the predicted HbA1c was figured out, and this difference was defined as the HGI. The relationship between HGI and HbA1c is presented in Fig. 2. Fig. 2The correlation between HGI and HbA1c The correlation between HGI and HbA1c Statistical analysis Continuous variables were assessed for normality using the Shapiro-Wilk test. Non-normally distributed variables were analyzed with the Wilcoxon rank-sum test and presented as median and interquartile range (IQR). Categorical variables were compared using chi-square or Fisher’s exact tests as appropriate and reported as frequencies and percentages.Participants were stratified into HGI tertiles: T1 (n = 1,052; HGI ≤ −0.505), T2 (n = 1,047; −0.505 < HGI ≤ 0.035), and T3 (n = 1,058; HGI > 0.035). Kaplan-Meier survival curves were constructed for each tertile, and between-group differences were evaluated using log-rank tests.To address baseline heterogeneity, we applied inverse probability weighting (IPW) using covariates such as age, SOFA, diabetes status, and mechanical ventilation. We then created weighted KM curves and Cox models to enhance traditional analyses.To assess associations between HGI and mortality, we employed multivariable Cox proportional hazards regression models. HGI was analyzed both as a continuous variable and as a categorical variable, with T2 serving as the reference group. Covariates were selected based on both clinical relevance and prognostic significance. To address multicollinearity, variables with variance inflation factors (VIF) exceeding 10 were excluded from the analysis(Supplementary Table 1).We constructed three progressive adjustment models: Model 1: Unadjusted analysis; Model 2: Adjusted for demographic factors (age, gender, and race); Model 3: Further adjusted for clinical characteristics (hypertension, diabetes, congestive heart failure, cerebrovascular disease, BMI, SOFA score, ventilation, insulin use), medication use (beta-blockers, lipid-lowering drugs, NOACs, antiplatelets, ACEI/ARB), and laboratory parameters (heart rate, platelet count, white blood cell count, red blood cell count, serum potassium, and lactate).To explore potential non-linear associations, we employed restricted cubic splines (RCS) with three knots. Threshold effects were identified using recursive partitioning algorithms, and piecewise Cox models were applied at identified inflection points. We conducted stratified analyses and interaction tests across predefined subgroups based on gender, age (< 65 vs. ≥65 years), BMI categories (< 25, 25–30, > 30 kg/m²), and comorbidities (hypertension, diabetes, acute kidney injury, congestive heart failure, cerebrovascular disease, and chronic pulmonary disease) using Model 3. To evaluate potential mediating effects of eGFR on observed associations, we performed mediation analysis using the mediation package with bootstrap resampling (1,000 iterations).Variables with more than 20% missing data were excluded from analysis; remaining missing values were imputed using random forest-based multiple imputation.We performed a sensitivity analysis by excluding patients with abnormal HbA1c and glucose levels. Z-scores were computed for each data point, with a threshold of |Z| >3 applied to identify outliers. After these exclusions, we conducted Cox regression analysis and gender-stratified RCS analysis using Model 3. Additionally, to assess the interaction effects of insulin on outcomes, we incorporated relevant interaction terms into our models. Given the inherent heterogeneity in the ICU population, we stratified the analyses by SOFA scores and performed corresponding interaction analyses. All statistical analyses were performed using SPSS (version 29.0, IBM Corp) and R (version 4.4.3, R Foundation for Statistical Computing). Results are presented as hazard ratios (HR) with 95% confidence intervals (CI). A two-tailed p-value < 0.05 was considered statistically significant. Results Baseline characteristics of study individuals In this study, data from a total of 3,157 patients were analyzed. The enrolled patients had a mean age of 68.5 ± 8.9 years, and 66.8% were male. According to the admission HGI tertiles, the baseline characteristics of the participants were examined and are presented in Table 1. The three groups were characterized by different HGI levels, with T1 having the lowest, T2 the moderate, and T3 the highest.Participants in the lowest HGI group were older and had a lower prevalence of certain comorbidities such as diabetes and hypertension. However, they had a higher prevalence of conditions like chronic kidney disease and obesity. In terms of medication usage, they had lower rates of heparin, insulin, and lipid-lowering drugs, but higher use of antiplatelets. Compared to those in the higher HGI groups, they also showed lower vital signs, including heart rate and mean blood pressure, as well as lower laboratory values such as hemoglobin, white blood cell count, and glucose. Additionally, they had longer lengths of stay in both the hospital and ICU.Regarding mortality, the 30-day mortality rate was 11.9% in T1, 6.8% in T2, and 8.9% in T3 (P < 0.001). The 90-day mortality rate was 16% in T1, 9% in T2, and 12.9% in T3 (P < 0.001). The 180-day mortality rate was 19.2% in T1, 11.1% in T2, and 16.2% in T3 (P < 0.001). The 365-day mortality rate was 21.8% in T1, 13.4% in T2, and 19.4% in T3 (P < 0.001). It is notable that the mortality rates in the lowest HGI group were all higher than those in the other two groups, while there were no significant differences between the T2 and T3 groups. Table 1Baseline characteristics of patients stratified by HGI tertilesVariablesTotalT1T2T3 P (N=3157)(N=1052)(N=1047)(N=1058)Demographics Age,years68.5 ± 8.967.7 ± 9.769.0 ± 8.368.7 ± 8.50.002 Male,n (%)2109 (66.8)687 (65.3)706 (67.4)716 (67.7)0.446 White,n (%)2083 (66.0)694 (66)711 (67.9)678 (64.1)0.024 Weight,kg90.2 ± 23.787.2 ± 23.189.8 ± 22.193.5 ± 25.4< 0.001 Height,cm171.7 ± 11.4171.6 ± 13.2172.2 ± 10.5171.4 ± 10.20.295 BMI,kg/m²29.6 (25.9-34.1)28.5 (25.1-32.8)29.4 (25.9-33.7)30.7 (27.2-35.4)< 0.001Vital signs HR,beats/min84.9 ± 18.686.5 ± 20.082.9 ± 17.685.2 ± 18.1< 0.001 SBP-mmHg117.9 ± 22.6117.1 ± 23.0117.6 ± 22.4118.9 ± 22.40.176 DBP,mmHg67.2 ± 17.468.4 ± 18.066.5 ± 16.666.6 ± 17.50.023 MBP,mmHg80.3 ± 17.481.1 ± 17.879.6 ± 16.980.2 ± 17.50.126 RR,times/min16.0 (14.0-20.0)17.0 (14.0-21.0)16.0 (14.0-20.0)16.0 (14.0-20.0)< 0.001 SpO2%98.0 ± 15.898.2 ± 27.097.9 ± 3.597.8 ± 3.10.792Comorbidities, n (%) Hypertension1475 (46.7)461 (43.8)534 (51)480 (45.4)0.002 Diabetes1218 (38.6)246 (23.4)237 (22.6)735 (69.5)< 0.001 Acute kidney injury1016 (32.2)395 (37.5)248 (23.7)373 (35.3)< 0.001 Chronic kidney Disease656 (20.8)216 (20.5)153 (14.6)287 (27.1)< 0.001 Hyperlipidemia1852 (58.7)548 (52.1)596 (56.9)708 (66.9)< 0.001 Coronary artery disease1751 (55.5)531 (50.5)569 (54.3)651 (61.5)< 0.001 Acute myocardial Infarction554 (17.5)210 (20)137 (13.1)207 (19.6)< 0.001 Congestive heart failure1452 (46.0)504 (47.9)420 (40.1)528 (49.9)< 0.001 Peripheral vascular disease491 (15.6)174 (16.5)183 (17.5)134 (12.7)0.005 Cerebrovascular disease827 (26.2)277 (26.3)274 (26.2)276 (26.1)0.992 Dementia53 ( 1.7)23 (2.2)17 (1.6)13 (1.2)0.228 Chronic pulmonary disease764 (24.2)229 (21.8)241 (23)294 (27.8)0.003 Rheumatic disease99 ( 3.1)44 (4.2)32 (3.1)23 (2.2)0.03 Peptic ulcer68 ( 2.2)32 (3)11 (1.1)25 (2.4)0.006 Mild liver disease214 ( 6.8)94 (8.9)57 (5.4)63 (6)0.003 Paraplegia343 (10.9)120 (11.4)122 (11.7)101 (9.5)0.236 Malignant cancer187 ( 5.9)58 (5.5)57 (5.4)72 (6.8)0.329Interventions-n (%) CRRT151 ( 4.8)67 (6.4)31 (3)53 (5)0.001 Ventilation2896 (91.7)957 (91)963 (92)976 (92.2)0.532Medication, n (%) Heparin1606 (50.9)599 (56.9)475 (45.4)532 (50.3)< 0.001 Insulin2527 (80.0)801 (76.1)830 (79.3)896 (84.7)< 0.001 Antiplatelets2072 (65.6)674 (64.1)708 (67.6)690 (65.2)0.217 Beta blockers2195 (69.5)719 (68.3)755 (72.1)721 (68.1)0.084 Lipid-lowering drugs1908 (60.4)556 (52.9)654 (62.5)698 (66)< 0.001 CCB257 ( 8.1)84 (8)85 (8.1)88 (8.3)0.961 ARCE/ARB1131 (35.8)391 (37.2)326 (31.1)414 (39.1)< 0.001 Amiodarone1644 (52.1)542 (51.5)542 (51.8)560 (52.9)0.787 NOACs230 ( 7.3)86 (8.2)71 (6.8)73 (6.9)0.371 Digoxin168 ( 5.3)55 (5.2)49 (4.7)64 (6)0.42 MRAs59 ( 1.9)17 (1.6)15 (1.4)27 (2.6)0.126 Loop diuretics2157 (68.3)694 (66)727 (69.4)736 (69.6)0.132Severity ScoresSirs, n (%)0.017 018 ( 0.6)4 (0.4)8 (0.8)6 (0.6) 1316 (10.0)91 (8.7)134 (12.8)91 (8.6) 21024 (32.4)325 (30.9)341 (32.6)358 (33.8) 31308 (41.4)460 (43.7)407 (38.9)441 (41.7) 4491 (15.6)172 (16.3)157 (15)162 (15.3) SOFA5.0 (3.0-7.0)5.0 (3.0-7.0)4.0 (2.0-7.0)5.0 (3.0-7.0)< 0.001 APS III38.0 (29.0-52.0)40.0 (30.8-54.0)36.0 (27.0-47.0)40.0 (31.0-53.0)< 0.001 SAPS II35.0 (29.0-43.0)36.0 (29.0-43.0)33.0 (28.0-41.5)36.0 (29.0-45.0)< 0.001 OASIS30.0 (25.0-36.0)31.0 (26.0-36.2)29.0 (24.0-35.0)31.0 (26.0-37.0)< 0.001Laboratory data Hemoglobin,g/dL10.5 ± 2.410.4 ± 2.510.6 ± 2.410.4 ± 2.30.194 Hematocrit,%31.9 ± 7.031.8 ± 7.132.1 ± 7.031.9 ± 6.90.509 Platelets,K/µL163.0 (124.0-219.0)162.0 (119.0-223.0)158.0 (122.0-212.0)168.0 (129.5-220.5)0.091 RDW,%14.5 ± 2.114.7 ± 2.314.3 ± 1.914.6 ± 2.0< 0.001 RBC,K/µL3.4 (2.9-4.1)3.4 (2.8-4.0)3.4 (2.9-4.1)3.5 (3.0-4.1)0.004 WBC,K/µL11.6 (8.6-15.5)11.9 (8.9-16.1)11.4 (8.5-14.9)11.7 (8.6-15.7)0.01 Anion gap,mmol/L12.0 (10.0-15.0)13.0 (10.0-16.0)12.0 (10.0-15.0)12.0 (10.0-15.0)< 0.001 Calcium,mg/dL8.4 ± 0.78.4 ± 0.78.4 ± 0.78.4 ± 0.70.581 Chloride,mEq/L105.0 ± 6.1104.3 ± 6.6105.7 ± 5.6105.1 ± 6.1< 0.001 Potassium,mEq/L4.3 ± 0.74.3 ± 0.74.2 ± 0.64.4 ± 0.7< 0.001 Sodium,mEq/L138.0 ± 4.2137.5 ± 4.7138.3 ± 3.6138.1 ± 4.1< 0.001 Lactate,mmol/L1.8 (1.3-2.6)1.8 (1.3-2.7)1.8 (1.3-2.5)1.8 (1.4-2.6)0.475 Total CO2,mmol/L25.4 ± 4.324.7 ± 4.425.8 ± 3.925.8 ± 4.4< 0.001 PO2,mmHg263.0 (96.0-349.0)239.0 (88.0-336.0)281.5 (112.0-362.2)267.0 (90.5-348.0)< 0.001 PaCO2,mmHg41.9 ± 9.241.5 ± 8.841.9 ± 9.542.2 ± 9.30.171 Bicarbonate,mmol/L24.3 ± 4.223.4 ± 4.524.9 ± 3.824.7 ± 4.1< 0.001 PH7.4 ± 0.17.4 ± 0.17.4 ± 0.17.4 ± 0.1< 0.001 BE,mmol/L0.0 (-1.0-2.0)0.0 (-2.0-1.0)0.0 (-1.0-2.0)0.0 (-1.0-2.0)< 0.001 INR1.4 (1.2-1.6)1.4 (1.2-1.6)1.4 (1.2-1.6)1.4 (1.2-1.6)0.528 PT,s15.3 (13.4-17.5)15.3 (13.3-18.0)15.4 (13.4-17.5)15.2 (13.5-17.2)0.785 PTT,s31.0 (27.4-37.3)31.4 (27.7-38.9)31.0 (27.6-36.3)30.5 (27.0-36.8)0.003 Creatinine,mg/dL1.0 (0.8-1.3)1.0 (0.8-1.5)0.9 (0.7-1.1)1.0 (0.8-1.3)< 0.001 Urea nitrogen,mg/dl18.0 (13.0-26.0)18.0 (13.0-29.0)17.0 (13.0-22.0)19.0 (14.0-28.0)< 0.001 eGFR,mL/min/1.73m²86.7 (58.7-97.9)83.0 (51.8-98.2)90.0 (69.6-99.4)82.0 (56.4-95.6)< 0.001 HbA1c,%6.3 ± 1.45.5 ± 0.75.9 ± 0.57.5 ± 1.7< 0.001 Glucose,g/dL122.0 (100.0-163.0)133.0 (105.0-175.0)109.0 (97.0-132.5)132.0 (103.0-182.0)< 0.001Length of stay (LOS) Los in hospital10.0 (6.9-15.9)10.8 (6.8-17.4)9.0 (6.7-13.9)10.9 (7.2-16.6)< 0.001 Los in icu2.9 (1.5-5.2)3.1 (1.6-5.7)2.5 (1.4-4.6)2.9 (1.5-5.2)< 0.001Outcomes, n (%) 30-day mortality290 ( 9.2)125 (11.9)71 (6.8)94 (8.9)< 0.001 90-day mortality398 (12.6)168 (16)94 (9)136 (12.9)< 0.001 180-day mortality489 (15.5)202 (19.2)116 (11.1)171 (16.2)< 0.001 365-day mortality574 (18.2)229 (21.8)140 (13.4)205 (19.4)< 0.001BMI body mass index, HR heart rate, SBP systolic blood pressure, DBP diastolic blood pressure, MBP mean blood pressure, RR respiratory rate, SpO₂ Peripheral Oxygen Saturation, CRRT Continuous Renal Replacement Therapy, Ventilation Mechanical Ventilation, CCB Calcium Channel Blocker, ACE/ARB Angiotensin-Converting Enzyme/Angiotensin Receptor Blocker, MRA Mineralocorticoid Receptor Antagonist , ARNI Angiotensin Receptor Neprilysin Inhibitor, NOACs Non-Vitamin K Antagonist Oral Anticoagulants, Beta blockers Beta-adrenergic receptor antagonists , SIRS Systemic Inflammatory Response Syndrome, SOFA sequential organ failure assessment, SAPS II simplified acute physiology score, OASIS oxford acute severity of illness score, APSIII acute physiological score III, PaCO2 carbon dioxide partial pressure, PaO2 partial pressure of arterial oxygen, PH Potential of Hydrogen, PT prothrombin time, PTT partial prothrombin time, WBC white blood cell, RBC red blood cell, RDW red cell distribution width, HGI Hyperglycemia Index, eGFR Estimated Glomerular Filtration Rate, Antiplatelets Antiplatelet Agents Table 1Baseline characteristics of patients stratified by HGI tertilesVariablesTotalT1T2T3 P (N=3157)(N=1052)(N=1047)(N=1058)Demographics Age,years68.5 ± 8.967.7 ± 9.769.0 ± 8.368.7 ± 8.50.002 Male,n (%)2109 (66.8)687 (65.3)706 (67.4)716 (67.7)0.446 White,n (%)2083 (66.0)694 (66)711 (67.9)678 (64.1)0.024 Weight,kg90.2 ± 23.787.2 ± 23.189.8 ± 22.193.5 ± 25.4< 0.001 Height,cm171.7 ± 11.4171.6 ± 13.2172.2 ± 10.5171.4 ± 10.20.295 BMI,kg/m²29.6 (25.9-34.1)28.5 (25.1-32.8)29.4 (25.9-33.7)30.7 (27.2-35.4)< 0.001Vital signs HR,beats/min84.9 ± 18.686.5 ± 20.082.9 ± 17.685.2 ± 18.1< 0.001 SBP-mmHg117.9 ± 22.6117.1 ± 23.0117.6 ± 22.4118.9 ± 22.40.176 DBP,mmHg67.2 ± 17.468.4 ± 18.066.5 ± 16.666.6 ± 17.50.023 MBP,mmHg80.3 ± 17.481.1 ± 17.879.6 ± 16.980.2 ± 17.50.126 RR,times/min16.0 (14.0-20.0)17.0 (14.0-21.0)16.0 (14.0-20.0)16.0 (14.0-20.0)< 0.001 SpO2%98.0 ± 15.898.2 ± 27.097.9 ± 3.597.8 ± 3.10.792Comorbidities, n (%) Hypertension1475 (46.7)461 (43.8)534 (51)480 (45.4)0.002 Diabetes1218 (38.6)246 (23.4)237 (22.6)735 (69.5)< 0.001 Acute kidney injury1016 (32.2)395 (37.5)248 (23.7)373 (35.3)< 0.001 Chronic kidney Disease656 (20.8)216 (20.5)153 (14.6)287 (27.1)< 0.001 Hyperlipidemia1852 (58.7)548 (52.1)596 (56.9)708 (66.9)< 0.001 Coronary artery disease1751 (55.5)531 (50.5)569 (54.3)651 (61.5)< 0.001 Acute myocardial Infarction554 (17.5)210 (20)137 (13.1)207 (19.6)< 0.001 Congestive heart failure1452 (46.0)504 (47.9)420 (40.1)528 (49.9)< 0.001 Peripheral vascular disease491 (15.6)174 (16.5)183 (17.5)134 (12.7)0.005 Cerebrovascular disease827 (26.2)277 (26.3)274 (26.2)276 (26.1)0.992 Dementia53 ( 1.7)23 (2.2)17 (1.6)13 (1.2)0.228 Chronic pulmonary disease764 (24.2)229 (21.8)241 (23)294 (27.8)0.003 Rheumatic disease99 ( 3.1)44 (4.2)32 (3.1)23 (2.2)0.03 Peptic ulcer68 ( 2.2)32 (3)11 (1.1)25 (2.4)0.006 Mild liver disease214 ( 6.8)94 (8.9)57 (5.4)63 (6)0.003 Paraplegia343 (10.9)120 (11.4)122 (11.7)101 (9.5)0.236 Malignant cancer187 ( 5.9)58 (5.5)57 (5.4)72 (6.8)0.329Interventions-n (%) CRRT151 ( 4.8)67 (6.4)31 (3)53 (5)0.001 Ventilation2896 (91.7)957 (91)963 (92)976 (92.2)0.532Medication, n (%) Heparin1606 (50.9)599 (56.9)475 (45.4)532 (50.3)< 0.001 Insulin2527 (80.0)801 (76.1)830 (79.3)896 (84.7)< 0.001 Antiplatelets2072 (65.6)674 (64.1)708 (67.6)690 (65.2)0.217 Beta blockers2195 (69.5)719 (68.3)755 (72.1)721 (68.1)0.084 Lipid-lowering drugs1908 (60.4)556 (52.9)654 (62.5)698 (66)< 0.001 CCB257 ( 8.1)84 (8)85 (8.1)88 (8.3)0.961 ARCE/ARB1131 (35.8)391 (37.2)326 (31.1)414 (39.1)< 0.001 Amiodarone1644 (52.1)542 (51.5)542 (51.8)560 (52.9)0.787 NOACs230 ( 7.3)86 (8.2)71 (6.8)73 (6.9)0.371 Digoxin168 ( 5.3)55 (5.2)49 (4.7)64 (6)0.42 MRAs59 ( 1.9)17 (1.6)15 (1.4)27 (2.6)0.126 Loop diuretics2157 (68.3)694 (66)727 (69.4)736 (69.6)0.132Severity ScoresSirs, n (%)0.017 018 ( 0.6)4 (0.4)8 (0.8)6 (0.6) 1316 (10.0)91 (8.7)134 (12.8)91 (8.6) 21024 (32.4)325 (30.9)341 (32.6)358 (33.8) 31308 (41.4)460 (43.7)407 (38.9)441 (41.7) 4491 (15.6)172 (16.3)157 (15)162 (15.3) SOFA5.0 (3.0-7.0)5.0 (3.0-7.0)4.0 (2.0-7.0)5.0 (3.0-7.0)< 0.001 APS III38.0 (29.0-52.0)40.0 (30.8-54.0)36.0 (27.0-47.0)40.0 (31.0-53.0)< 0.001 SAPS II35.0 (29.0-43.0)36.0 (29.0-43.0)33.0 (28.0-41.5)36.0 (29.0-45.0)< 0.001 OASIS30.0 (25.0-36.0)31.0 (26.0-36.2)29.0 (24.0-35.0)31.0 (26.0-37.0)< 0.001Laboratory data Hemoglobin,g/dL10.5 ± 2.410.4 ± 2.510.6 ± 2.410.4 ± 2.30.194 Hematocrit,%31.9 ± 7.031.8 ± 7.132.1 ± 7.031.9 ± 6.90.509 Platelets,K/µL163.0 (124.0-219.0)162.0 (119.0-223.0)158.0 (122.0-212.0)168.0 (129.5-220.5)0.091 RDW,%14.5 ± 2.114.7 ± 2.314.3 ± 1.914.6 ± 2.0< 0.001 RBC,K/µL3.4 (2.9-4.1)3.4 (2.8-4.0)3.4 (2.9-4.1)3.5 (3.0-4.1)0.004 WBC,K/µL11.6 (8.6-15.5)11.9 (8.9-16.1)11.4 (8.5-14.9)11.7 (8.6-15.7)0.01 Anion gap,mmol/L12.0 (10.0-15.0)13.0 (10.0-16.0)12.0 (10.0-15.0)12.0 (10.0-15.0)< 0.001 Calcium,mg/dL8.4 ± 0.78.4 ± 0.78.4 ± 0.78.4 ± 0.70.581 Chloride,mEq/L105.0 ± 6.1104.3 ± 6.6105.7 ± 5.6105.1 ± 6.1< 0.001 Potassium,mEq/L4.3 ± 0.74.3 ± 0.74.2 ± 0.64.4 ± 0.7< 0.001 Sodium,mEq/L138.0 ± 4.2137.5 ± 4.7138.3 ± 3.6138.1 ± 4.1< 0.001 Lactate,mmol/L1.8 (1.3-2.6)1.8 (1.3-2.7)1.8 (1.3-2.5)1.8 (1.4-2.6)0.475 Total CO2,mmol/L25.4 ± 4.324.7 ± 4.425.8 ± 3.925.8 ± 4.4< 0.001 PO2,mmHg263.0 (96.0-349.0)239.0 (88.0-336.0)281.5 (112.0-362.2)267.0 (90.5-348.0)< 0.001 PaCO2,mmHg41.9 ± 9.241.5 ± 8.841.9 ± 9.542.2 ± 9.30.171 Bicarbonate,mmol/L24.3 ± 4.223.4 ± 4.524.9 ± 3.824.7 ± 4.1< 0.001 PH7.4 ± 0.17.4 ± 0.17.4 ± 0.17.4 ± 0.1< 0.001 BE,mmol/L0.0 (-1.0-2.0)0.0 (-2.0-1.0)0.0 (-1.0-2.0)0.0 (-1.0-2.0)< 0.001 INR1.4 (1.2-1.6)1.4 (1.2-1.6)1.4 (1.2-1.6)1.4 (1.2-1.6)0.528 PT,s15.3 (13.4-17.5)15.3 (13.3-18.0)15.4 (13.4-17.5)15.2 (13.5-17.2)0.785 PTT,s31.0 (27.4-37.3)31.4 (27.7-38.9)31.0 (27.6-36.3)30.5 (27.0-36.8)0.003 Creatinine,mg/dL1.0 (0.8-1.3)1.0 (0.8-1.5)0.9 (0.7-1.1)1.0 (0.8-1.3)< 0.001 Urea nitrogen,mg/dl18.0 (13.0-26.0)18.0 (13.0-29.0)17.0 (13.0-22.0)19.0 (14.0-28.0)< 0.001 eGFR,mL/min/1.73m²86.7 (58.7-97.9)83.0 (51.8-98.2)90.0 (69.6-99.4)82.0 (56.4-95.6)< 0.001 HbA1c,%6.3 ± 1.45.5 ± 0.75.9 ± 0.57.5 ± 1.7< 0.001 Glucose,g/dL122.0 (100.0-163.0)133.0 (105.0-175.0)109.0 (97.0-132.5)132.0 (103.0-182.0)< 0.001Length of stay (LOS) Los in hospital10.0 (6.9-15.9)10.8 (6.8-17.4)9.0 (6.7-13.9)10.9 (7.2-16.6)< 0.001 Los in icu2.9 (1.5-5.2)3.1 (1.6-5.7)2.5 (1.4-4.6)2.9 (1.5-5.2)< 0.001Outcomes, n (%) 30-day mortality290 ( 9.2)125 (11.9)71 (6.8)94 (8.9)< 0.001 90-day mortality398 (12.6)168 (16)94 (9)136 (12.9)< 0.001 180-day mortality489 (15.5)202 (19.2)116 (11.1)171 (16.2)< 0.001 365-day mortality574 (18.2)229 (21.8)140 (13.4)205 (19.4)< 0.001BMI body mass index, HR heart rate, SBP systolic blood pressure, DBP diastolic blood pressure, MBP mean blood pressure, RR respiratory rate, SpO₂ Peripheral Oxygen Saturation, CRRT Continuous Renal Replacement Therapy, Ventilation Mechanical Ventilation, CCB Calcium Channel Blocker, ACE/ARB Angiotensin-Converting Enzyme/Angiotensin Receptor Blocker, MRA Mineralocorticoid Receptor Antagonist , ARNI Angiotensin Receptor Neprilysin Inhibitor, NOACs Non-Vitamin K Antagonist Oral Anticoagulants, Beta blockers Beta-adrenergic receptor antagonists , SIRS Systemic Inflammatory Response Syndrome, SOFA sequential organ failure assessment, SAPS II simplified acute physiology score, OASIS oxford acute severity of illness score, APSIII acute physiological score III, PaCO2 carbon dioxide partial pressure, PaO2 partial pressure of arterial oxygen, PH Potential of Hydrogen, PT prothrombin time, PTT partial prothrombin time, WBC white blood cell, RBC red blood cell, RDW red cell distribution width, HGI Hyperglycemia Index, eGFR Estimated Glomerular Filtration Rate, Antiplatelets Antiplatelet Agents Baseline characteristics of patients stratified by HGI tertiles BMI body mass index, HR heart rate, SBP systolic blood pressure, DBP diastolic blood pressure, MBP mean blood pressure, RR respiratory rate, SpO₂ Peripheral Oxygen Saturation, CRRT Continuous Renal Replacement Therapy, Ventilation Mechanical Ventilation, CCB Calcium Channel Blocker, ACE/ARB Angiotensin-Converting Enzyme/Angiotensin Receptor Blocker, MRA Mineralocorticoid Receptor Antagonist , ARNI Angiotensin Receptor Neprilysin Inhibitor, NOACs Non-Vitamin K Antagonist Oral Anticoagulants, Beta blockers Beta-adrenergic receptor antagonists , SIRS Systemic Inflammatory Response Syndrome, SOFA sequential organ failure assessment, SAPS II simplified acute physiology score, OASIS oxford acute severity of illness score, APSIII acute physiological score III, PaCO2 carbon dioxide partial pressure, PaO2 partial pressure of arterial oxygen, PH Potential of Hydrogen, PT prothrombin time, PTT partial prothrombin time, WBC white blood cell, RBC red blood cell, RDW red cell distribution width, HGI Hyperglycemia Index, eGFR Estimated Glomerular Filtration Rate, Antiplatelets Antiplatelet Agents Survival analysis The K-M curve indicated that the prevalence of 30-day and 365-day all-cause mortality varied among the four groups stratified by HGI (Fig. 3), as well as the differences in 90-day and 180-day all-cause mortality among the four groups (Supplementary Figure. 2). Notably, the medium HGI group had a significantly lower 30-day, 90-day, 180-day, and 365-day mortality rate compared to the other two groups (log-rank P < 0.001). To address potential bias from baseline imbalances across HGI groups, we further conducted IPTW Kaplan-Meier curve analysis, and the results were consistent with the initial findings (Supplementary Figure. 8). Fig. 3Kaplan-Meier survival analysis curves: (A) compare 30-day mortality between groups, (B) compare 365-day mortality between groups Kaplan-Meier survival analysis curves: (A) compare 30-day mortality between groups, (B) compare 365-day mortality between groups Relationship between HGI and mortality of patients with AF Cox proportional hazards regression analysis showed a consistent inverse relationship between HGI as a continuous variable and mortality risk at 30, 90, 180, and 365 days, with each unit increase was associated with approximately 10% lower risk after full adjustment (30-day: HR = 0.88, 95% CI: 0.78–0.98; 90-day: HR = 0.88, 95% CI: 0.80–0.97; 180-day: HR = 0.89 95% CI: 0.81–0.97; 365-day: HR = 0.89, 95%CI: 0.82–0.97) (Table 2, Supplementary Table 2). When analyzed categorically, patients in the lowest HGI tertile (T1) exhibited significantly elevated mortality risk compared to the reference middle tertile (T2) at all time points, even after comprehensive confounder adjustment(30-day: HR = 1.50, 95%CI: 1.08–2.08; 90-day: HR = 1.52,95%CI: 1.15–2.02; 180-day: HR = 1.53, 95%CI: 1.18–1.98; 365-day: HR = 1.44, 95%CI: 1.14–1.82). (Table 2, Supplementary Table 2) Notably, while the highest tertile (T3) showed significantly increased mortality risk in unadjusted analyses, these associations became non-significant after demographic and clinical factor adjustment, suggesting that low HGI independently predicts increased mortality risk. Table 2Cox proportional hazard models of association between 30-day and 365-day all-cause mortalityModel 1Model 2Model 3HR (95% CI) P HR(95% CI) P HR (95% CI) P 30-day mortality HGI as continuous0.86 (0.77-0.96)0.0060.82 (0.74-0.92)<.0010.88 (0.78 ~ 0.98)0.022HGI as categorical T11.81 (1.35-2.42)<.0011.59 (1.19-2.14)0.0021.50 (1.08 ~ 2.08)0.016 T21(Ref)1(Ref)1(Ref)1(Ref)1(Ref)1(Ref) T31.33 (0.98-1.81)0.0701.07 (0.77-1.49)0.6731.12 (0.78 ~ 1.62)0.543365-day mortality HGI as continuous0.93 (0.86-0.99)0.0460.86 (0.80-0.93)<.0010.89 (0.82 ~ 0.97)0.005HGI as categorical T11.72 (1.40-2.13)<.0011.55 (1.25 ~ 1.91)<.0011.44 (1.14 ~ 1.82)<.001 T21(Ref)1(Ref)1(Ref)1(Ref)1(Ref) T31.50 (1.21-1.85)<.0011.16 (0.92-1.46)0.2131.16 (0.90 ~ 1.50)0.256Model1: CrudeModel2: Adjust: Gender, Race, Age, BMIModel3: Adjust: Gender, Race, BMI, Age, Hypertension, Diabetes, Congestive Heart Failure, Cerebrovascular disease, Ventilation, Insulin, Antiplatelets, Block, Lipid-lowering drugs,ARCE/ARB ,NOACs,SOFA, Platelets, RBC, WBC,PotassiumHR Hazard Ratio, CI Confidence Interval Table 2Cox proportional hazard models of association between 30-day and 365-day all-cause mortalityModel 1Model 2Model 3HR (95% CI) P HR(95% CI) P HR (95% CI) P 30-day mortality HGI as continuous0.86 (0.77-0.96)0.0060.82 (0.74-0.92)<.0010.88 (0.78 ~ 0.98)0.022HGI as categorical T11.81 (1.35-2.42)<.0011.59 (1.19-2.14)0.0021.50 (1.08 ~ 2.08)0.016 T21(Ref)1(Ref)1(Ref)1(Ref)1(Ref)1(Ref) T31.33 (0.98-1.81)0.0701.07 (0.77-1.49)0.6731.12 (0.78 ~ 1.62)0.543365-day mortality HGI as continuous0.93 (0.86-0.99)0.0460.86 (0.80-0.93)<.0010.89 (0.82 ~ 0.97)0.005HGI as categorical T11.72 (1.40-2.13)<.0011.55 (1.25 ~ 1.91)<.0011.44 (1.14 ~ 1.82)<.001 T21(Ref)1(Ref)1(Ref)1(Ref)1(Ref) T31.50 (1.21-1.85)<.0011.16 (0.92-1.46)0.2131.16 (0.90 ~ 1.50)0.256Model1: CrudeModel2: Adjust: Gender, Race, Age, BMIModel3: Adjust: Gender, Race, BMI, Age, Hypertension, Diabetes, Congestive Heart Failure, Cerebrovascular disease, Ventilation, Insulin, Antiplatelets, Block, Lipid-lowering drugs,ARCE/ARB ,NOACs,SOFA, Platelets, RBC, WBC,PotassiumHR Hazard Ratio, CI Confidence Interval Cox proportional hazard models of association between 30-day and 365-day all-cause mortality Model1: Crude Model2: Adjust: Gender, Race, Age, BMI Model3: Adjust: Gender, Race, BMI, Age, Hypertension, Diabetes, Congestive Heart Failure, Cerebrovascular disease, Ventilation, Insulin, Antiplatelets, Block, Lipid-lowering drugs,ARCE/ARB ,NOACs,SOFA, Platelets, RBC, WBC,Potassium HR Hazard Ratio, CI Confidence Interval The detection of nonlinear relationships RCS curves were performed to detect the nonlinear relationship between HGI and 30-day, 90-day, 180-day, and 365-day all-cause mortality in AF patients. We found L-shaped associations between HGI and 30-day, 90-day, 180-day, and 365-day all-cause mortality (Fig. 4, Supplementary Fig. 3). The Cox proportional hazards models and a two-piecewise Cox proportional hazards model were combined to investigate the non-linear relationship between HGI levels and all-cause mortality in AF patients (both P for log-likelihood ratio < 0.05) (Table 3, Supplementary Table 3). The inflection points for 30-day, 90-day, 180-day, and 365-day all-cause mortality were identified as −0.255, −0.435, −0.435, and − 0.475, respectively. Below these thresholds, the effect of increasing HGI was substantially stronger (30-day: HR = 0.704, 95% CI: 0.596–0.831; 90-day: HR = 0.682, 95% CI: 0.587–0.791; 180-day: HR = 0.678, 95% CI: 0.593–0.775; 365-day: HR = 0.679, 95% CI:0.597–0.772),representing approximately 30% lower mortality risk per unit increase in HGI. In contrast, above these thresholds, no significant associations were observed, demonstrating that the relationship between HGI and mortality is distinctly non-linear across all examined time horizons, with significant inverse associations were observed below specific thresholds. Fig. 4Restricted cubic spline regression analysis of the HGI and 30-day (A) and 365-day (B) all-cause mortality Restricted cubic spline regression analysis of the HGI and 30-day (A) and 365-day (B) all-cause mortality Table 3Threshold effect analysis of HGI-Related 30-Day and 365-Day All-Cause mortality in AF patientsHR(95%CI)P-value30-day mortality Fitting model by standard linear regression0.877(0.785–0.981)0.022Fitting model by two-piecewise linear regression Inflection point− 0.255 HGI < − 0.2550.704(0.596–0.831)< 0.001 HGI > − 0.2551.038(0.902–1.196)0.602 P for likelihood ratio test0.004365-day mortalityFitting model by standard linear regressionFitting model by two-piecewise linear regression Inflection point-0.475 HGI < -0.4750.679(0.597-0.772)<0.001 HGI >-0.4751.036(0.944-1.136)0.457 P for likelihood ratio test<0.001 Table 3Threshold effect analysis of HGI-Related 30-Day and 365-Day All-Cause mortality in AF patientsHR(95%CI)P-value30-day mortality Fitting model by standard linear regression0.877(0.785–0.981)0.022Fitting model by two-piecewise linear regression Inflection point− 0.255 HGI < − 0.2550.704(0.596–0.831)< 0.001 HGI > − 0.2551.038(0.902–1.196)0.602 P for likelihood ratio test0.004365-day mortalityFitting model by standard linear regressionFitting model by two-piecewise linear regression Inflection point-0.475 HGI < -0.4750.679(0.597-0.772)<0.001 HGI >-0.4751.036(0.944-1.136)0.457 P for likelihood ratio test<0.001 Threshold effect analysis of HGI-Related 30-Day and 365-Day All-Cause mortality in AF patients Subgroup analysis In addition to gender, consistent findings were observed in the subgroup analyses for all-cause mortality at 30-day and 365-day (Figs. 5 and 6), similarly, consistent results were also noted at 90-day and 180-day (Supplementary Fig. 4, Supplementary Fig. 5). No significant interactions were found when stratified by Age, BMI, Hypertension, Diabetes Acute kidney injury, Congestive Heart Failure, Cerebrovascular disease, Chronic pulmonary disease (P for interaction > 0.05). However, a significant interaction was noted for Gender (P for interaction < 0.001).Subgroup analyses stratified by gender indicated that both male and female participants exhibited increased mortality risks associated with lower HGI levels, with risk plateauing as HGI values increased. Notably, female participants displayed significantly higher mortality risk than their male counterparts at lower HGI levels, although this gender-specific disparity diminished progressively with rising HGI concentrations (Fig. 7, Supplementary Fig. 6). Moreover, in the association between HGI and all-cause mortality, a nonlinear relationship was observed in the female cohort across all evaluation time points (30-day, 90-day, 180-day, and 365-day mortality). In contrast, male participants exhibited notable differences, showing only a marginally clinically significant linear relationship, with no significant associations observed (Fig. 7). Fig. 5Stratified analysis forest plots of HGI and 30-day mortality Stratified analysis forest plots of HGI and 30-day mortality Fig. 6Stratified analysis forest plots of HGI and 365-day mortality Stratified analysis forest plots of HGI and 365-day mortality Fig. 7Restricted cubic spline regression analysis of the association between HGI and 30-day (A) and 365-day (B) all-cause mortality, stratified by gender Restricted cubic spline regression analysis of the association between HGI and 30-day (A) and 365-day (B) all-cause mortality, stratified by gender Mediation analysis Causal mediation analysis was employed to investigate the potential mediating role of eGFR in the relationship between HGI and all-cause mortality. The eGFR exhibited statistically significant mediating effects on mortality risk across all evaluated time intervals. The mediated proportion demonstrated a temporal gradient of increasing magnitude with extended follow-up duration, progressively accounting for 19.3%, 19.1%, 22.8%, and 25.2% of the total all-cause mortality association at 30 days, 90 days, 180 days, and 365 days post-diagnosis, respectively (Fig. 8, Supplementary Fig. 7). Fig. 8Mediation effect of renal function between the HGI and 30-day (A) and 365-day (B) all-cause mortality Mediation effect of renal function between the HGI and 30-day (A) and 365-day (B) all-cause mortality Sensitivity analysis We performed a sensitivity analysis by excluding patients with abnormal HbA1c and glucose levels. Subsequently, we conducted Cox regression analysis and executed gender-stratified RCS analyses using Model 3; the results were consistent with our previous findings (Supplementary Table 4, Supplementary Fig. 9).Additionally, to assess the interaction effects of insulin on outcomes, as well as the heterogeneity within the ICU population, we included interaction terms in Model 3. However, the analyses indicated that there were no significant interaction effects between insulin and oral hypoglycemic agents and the various subgroups of SOFA scores (Supplementary Table 5). Discussion This retrospective analysis represents the first investigation to examine the association between HGI and all-cause mortality in critically ill patients with AF. Our primary findings demonstrate an L-shaped nonlinear association between HGI and all-cause mortality across multiple time intervals (30, 90, 180, and 365 days), where lower HGI levels were associated with significantly increased mortality risk, with this association being more pronounced in female patients. Notably, our study population included both diabetic (38.6%) and non-diabetic patients, suggesting that the utility of HGI as a metabolic marker extends beyond traditional diabetes management. After comprehensive adjustment for confounding factors, the lowest HGI tertile (T1) showed significantly increased mortality risk at all time points. Mediation analysis identified eGFR as a significant intermediary factor in this relationship. These findings highlight the potential clinical utility of HGI as a valuable risk stratification parameter in critically ill patients with AF. Our findings show both consistency and divergence with previous research. Similar to Wei et al.‘s study in coronary artery disease patients [12], we observed a nonlinear association between HGI and mortality. However, a key difference lies in the pattern of association: we observed an L-shaped relationship in AF patients, primarily emphasizing the risk at lower HGI levels, while Wei et al. reported a U-shaped association in CAD patients, where both high and low HGI levels were associated with adverse outcomes [12].This difference may reflect distinct clinical implications of HGI across different disease contexts.Compared to findings in ischemic stroke studies [13], our results are partially consistent, showing that lower HGI is associated with increased short-term mortality. However, in patients with metabolic dysfunction-associated steatotic liver disease (MASLD), HGI exhibits a U-shaped mortality association [14], further emphasizing the importance of disease-specificity in the prognostic value of HGI. These different association patterns suggest that clinical interpretation of HGI requires consideration of specific disease contexts and patient population characteristics.A recent retrospective cohort study on heart failure patients presented findings entirely opposite to ours [15]. Although both cohorts demonstrated nonlinear associations with mortality, there were significant differences in the inflection points and risk directions. The L-shaped curve observed in the AF cohort highlights the risk primarily at lower HGI levels, whereas the heart failure cohort exhibited increased mortality risk at higher HGI levels, with no significant risk associated with low HGI levels. These differences may reflect distinct disease-specific pathophysiological mechanisms differentiating AF, CAD, and heart failure. The underlying mechanisms governing the observed nonlinear relationship between HGI and mortality remain incompletely understood, though several plausible biological pathways merit consideration. As HGI quantifies deviations between measured HbA1c levels and glucose-predicted values, it may capture individual metabolic heterogeneity that extends beyond conventional glycemic control parameters. Elevated HGI has been hypothetically linked to enhanced non-enzymatic protein glycation and accelerated formation of advanced glycation end-products (AGEs). Experimental evidence suggests that AGE accumulation contributes to endothelial dysfunction, atherosclerotic plaque progression, and myocardial fibrosis [16, 17], although the translation of these laboratory observations to clinical outcomes requires further validation through prospective studies.Conversely, low HGI may signify occult hypoglycemic episodes or substantial glycemic variability [2], potentially triggering sympathoadrenal activation that could exacerbate arrhythmic complications in AF patients and precipitate sudden cardiac death [18]. Within the specific pathophysiological context of AF, reduced HGI might reflect compromised antioxidant capacity or mitochondrial dysfunction, thereby amplifying AF-associated myocardial injury [19]. Additionally, low HGI could indicate impaired β-cell function or nutritional deficiencies, resulting in disrupted cellular energy metabolism and diminished cardiac repair mechanisms [20, 21]. While these mechanistic hypotheses provide a theoretical framework for understanding the HGI-mortality relationship, rigorous prospective investigations are essential to establish definitive causal relationships and clinical relevance in AF populations.It should be emphasized that these mechanistic explanations are primarily based on theoretical considerations, and their clinical relevance and causal relationships await further research validation. Notably, although 38.6% of patients in our study had diabetes, our findings suggest that HGI may have potential value for prognostic assessment in all AF patients, regardless of diabetes status. In non-diabetic populations, HGI may reflect individual differences in glucose metabolism efficiency, including sensitivity to short-term glycemic fluctuations, variations in erythrocyte lifespan, and the impact of genetic polymorphisms on hemoglobin structure.Previous studies have shown that even in individuals with normal blood glucose levels, HGI is associated with metabolic abnormalities such as insulin resistance, chronic inflammation, and endothelial dysfunction. Fiorentino et al. found that in non-diabetic populations, higher HGI was associated with increased risk of kidney function decline [18], which aligns with our mediation analysis results. Additionally, in patients with metabolic syndrome, regardless of diabetes status, HGI has shown a U-shaped relationship with cardiovascular event risk [22].This evidence suggests that HGI, as a metabolic marker, has clinical significance beyond traditional diabetes management and may provide new perspectives for risk stratification and personalized treatment in a broader population. In our study, HGI showed associations with mortality in both diabetic and non-diabetic subgroups, although the strength of associations may differ between these populations. One of the most notable findings in our study is the significant gender difference in the association between HGI and mortality. In female patients, we observed a more pronounced L-shaped association, with stronger associations between low HGI levels and mortality risk, while male patients showed only marginally significant linear associations. This finding has important clinical implications, suggesting that gender-specific interpretation criteria should be considered when using HGI for risk assessment.This gender difference may be related to multiple factors. First, female AF patients typically have a heavier burden of comorbidities, including higher prevalence of hypertension, diabetes, and heart failure [23]. In our study, female patients had significantly higher BMI (28.7 vs. 26.8 kg/m²), which may exacerbate adverse outcomes through inflammatory and metabolic pathways [24].Second, female-specific pathophysiological mechanisms may influence the prognostic value of HGI.Postmenopausal estrogen decline is associated with atrial fibrosis and an elevation in CHA₂DS₂-VASc score, thereby contributing to the procoagulant state [25, 26]. Female patients have 30% higher rates of non-pulmonary vein triggers [27], potentially increasing ablation complexity and recurrence risk (HR = 1.31 for post-ablation recurrence in women) [23].Additionally, inflammatory response patterns may differ in women, with elevated C-reactive protein showing stronger mortality associations in women (HR = 1.35) [28]. These findings emphasize the importance of developing gender-specific HGI interpretation criteria in clinical applications, which has significant implications for achieving precision medicine and individualized treatment.These observational findings emphasize the importance of developing gender-specific HGI interpretation criteria in clinical applications. However, definitive causal relationships cannot be established at present. Future research is needed to validate these findings. Our mediation analysis revealed that eGFR partially mediated the association between HGI and mortality, with the mediation proportion increasing over time (from 19.3% at 30 days to 25.2% at 365 days). This finding has important clinical implications, suggesting that renal function may be one of the important pathways through which HGI exerts its prognostic effects.In AF patients, reduced renal function is associated with increased mortality through multiple mechanisms. Decreased eGFR may lead to uremic toxin accumulation, which theoretically could interfere with cardiac myocyte electrophysiology and promote arrhythmogenesis [29, 30]. Simultaneously, chronic inflammation and oxidative stress associated with chronic kidney disease, characteristically manifested by elevated IL-6 and TNF-α levels, may promote atrial fibrosis and adverse electrical remodeling [31].Furthermore, renal insufficiency may induce coagulation abnormalities, creating a paradox of both thrombotic and hemorrhagic risks in anticoagulation management of AF patients [32]. Electrolyte imbalances, particularly hyperkalemia and hypocalcemia, may interfere with cardiac ion channel function [33]. Finally, the cardio-renal syndrome establishes a deleterious cycle wherein cardiac and renal dysfunction mutually exacerbate each other, accelerating hemodynamic instability and multi-organ failure, particularly evident in patients with concurrent left ventricular hypertrophy and reduced eGFR [34].However, it should be emphasized that mediation analysis results should be interpreted cautiously, as mediation effects in observational studies may be influenced by unmeasured confounding factors. The exact causal relationships between HGI, renal function, and mortality require further validation through prospective studies and mechanistic research. This study contributes to the HGI research field in several key aspects: First, we are the first to validate the prognostic value of HGI in critically ill AF patients, filling a knowledge gap in this specific population. Second, we demonstrated the utility of HGI in non-diabetic populations, extending the applicability of this metabolic marker. Third, we identified significant gender differences, providing new perspectives for individualized risk assessment. Fourth, we revealed the important role of renal function in the HGI-mortality association through mediation analysis, providing insights into potential mechanisms underlying this association.From a clinical application perspective, our findings suggest that HGI may serve as a useful tool for risk stratification in critically ill AF patients. The L-shaped association pattern indicates that identifying patients with lower HGI levels may help in early identification of high-risk individuals. Through restricted cubic spline analysis, we identified specific threshold values (30-day: −0.255, 90-day: −0.435, 180-day: −0.435, 365-day: −0.475) that may provide reference points for clinical decision-making.Additionally, the gender differences we observed suggest that gender-specific HGI interpretation criteria may be needed in clinical applications. Given that female patients showed higher mortality risk at lower HGI levels, clinicians should pay particular attention to HGI values when assessing prognosis in female AF patients.Our findings position HGI primarily as a novel prognostic biomarker or risk stratification tool, rather than a directly modifiable therapeutic target at this stage. The L-shaped association suggests that targeting patients with very low HGI values (< identified inflection points) might be a priority for intensified monitoring or investigation into underlying contributors (e.g., nutritional deficiencies, occult inflammation, specific comorbidities like severe CKD, potential glycemic instability). However, whether interventions aimed at raising HGI (e.g., nutritional support, managing underlying conditions, potentially modifying glycemic control strategies) can improve outcomes remains speculative and requires investigation in prospective interventional studies. Limitations Several important limitations warrant acknowledgment. First, Despite using multivariable Cox regression with extensive covariate adjustments, residual confounding is possible. We lacked consistent data on factors like nutritional status, specific inflammatory cytokines, and glycemic variability indices in the MIMIC-IV database, which could influence the observed associations in critically ill AF patients.Furthermore, the MIMIC-IV database lacks detailed information on key factors potentially explaining the observed sex differences, such as menopausal status, history of hormone replacement therapy, or specific hormonal assays. This precluded direct adjustment for these covariates or deeper mechanistic exploration within the database.Second, missing parameters in FPG and HbA1c calculations may have resulted in incomplete adjustment for factors potentially influencing mortality outcomes, particularly in diabetic subpopulations. Third, the study population was restricted to ICU patients with atrial fibrillation, and the HGI was derived from this specific cohort, potentially limiting generalizability to other populations. Additionally, we could not obtain detailed information about hemoglobin variants, erythrocyte lifespan, or genetic polymorphisms affecting hemoglobin structure, which may influence HGI interpretation. We also lacked dynamic monitoring data on glycemic variability, which might provide additional prognostic information. Finally, while Kaplan-Meier curves are valuable for survival analysis, the imbalance in sample sizes between groups may affect the interpretation of results, though we controlled for these potential confounding factors through multivariable Cox regression models. Future research should develop population-specific HGI regression models using comprehensive data from diverse large-scale databases to ensure broader applicability. Prospective studies are also needed to validate the stability of these associations and explore potential biological mechanisms underlying the relationship between HGI and clinical outcomes. Conclusions In conclusion, this large-scale retrospective cohort study demonstrates that lower HGI was independently associated with increased mortality in critically ill AF patients, with this association being more pronounced in female patients. The relationship between HGI and mortality exhibited an L-shaped nonlinear pattern, and statistical mediation analysis suggested this association was partially mediated through renal function. These findings suggest that HGI may have potential value for risk stratification in populations including both diabetic and non-diabetic patients. However, the observational nature of our study limits causal inference. Future prospective studies are needed to validate these findings and explore potential biological mechanisms underlying these associations. Additionally, developing gender-specific HGI interpretation criteria may help optimize the clinical application of this metabolic marker. Further research should also focus on the application of HGI in other cardiovascular diseases and how to integrate HGI into existing risk assessment models to improve prognostic evaluation and management of critically ill patients. Supplementary Information Supplementary Material 1. Supplementary Material 1. Supplementary Material 2. Supplementary Material 2. Supplementary Material 3. Supplementary Material 3.