Impact of heart rate trajectories on mortality in critically Ill patients with atrial fibrillation and heart failure: a longitudinal cohort study Authors: Qian Ni, Jialin Qi, Qinghe Wang, Chen Tang, Zishun Liang, Jing Cai, Tong Qiao, Baoyan Wang Published: 2026 ABSTRACT BackgroundThis study investigated the prognostic significance of dynamic heart rate trajectories and heart rate coefficient of variation (CV) in critically ill patients with atrial fibrillation and heart failure (AF-HF).MethodsThis retrospective multicenter cohort study included 8,356 ICU patients with AF-HF from the MIMIC-IV and eICU databases. We applied a Joint Latent Class Model (JLCM), which simultaneously identifies distinct longitudinal heart rate trajectories and estimates their associations with survival, to classify patients into different heart rate trajectory groups over the first 30 days after ICU admission. Multivariable Cox models were used to evaluate the associations between heart rate patterns and 30-day all-cause mortality. A Bayesian joint model was further developed for dynamic risk prediction.ResultsCompared with a baseline heart rate < 80 bpm, the fully adjusted HRs were 1.13 (95% CI: 1.01–1.26) for 80–110 bpm and 1.28 (95% CI: 1.10–1.49) for > 110 bpm. Three distinct heart rate trajectory groups were identified, with a progressively increasing trajectory associated with higher mortality (HR = 2.96, 95% CI: 2.24–3.92). Similarly, patients with increasing heart rate CV trajectories had higher mortality than those with stable CV patterns (HR = 3.11, 95% CI: 2.40–4.03). Subgroup analyses showed significant interactions by renal function and mechanical ventilation status (P for interaction < 0.05). Dynamic prediction models showed improved discrimination with longer observation windows.ConclusionsHeart rate trajectories were associated with short-term mortality in ICU patients with AF-HF, and similar associations were observed for heart rate variability trajectories in exploratory analyses. These findings suggest that longitudinal heart rate monitoring may have value for short-term risk stratification, although further validation is required.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12872-026-05947-x. Introduction Atrial fibrillation (AF) and heart failure (HF) are closely interrelated cardiovascular disorders that affect more than 33 million people worldwide, with reported comorbidity rates ranging from 37% to 57% [1]. Epidemiological studies have demonstrated a bidirectional pathophysiological relationship: AF can worsen HF through mechanisms such as tachycardia-mediated cardiomyopathy and impaired ventricular filling, whereas HF can promote AF through atrial stretch, fibrotic remodeling, and neurohormonal activation [2]. Together, these interactions not only increase the likelihood of developing the other condition but also worsen clinical outcomes and increase mortality risk [3, 4]. Current guidelines, largely informed by the RACE II trial, recommend a target resting heart rate below 110 bpm in patients with AF, as no significant difference in outcomes was observed between strict (< 80 bpm) and lenient heart rate control. However, the optimal heart rate threshold remains uncertain in patients with concomitant AF and HF (AF-HF) [5, 6]. Resting heart rate is an important physiological indicator in AF-HF because it reflects disease severity, treatment response, and prognosis. Previous studies have shown that each 10-bpm increase in resting heart rate is associated with at least a 20% increase in cardiovascular mortality risk [7, 8]. However, most prior studies relied on single-point heart rate measurements and therefore could not capture dynamic changes over time [9, 10]. Although evidence on longitudinal heart rate trajectories is limited, existing studies have demonstrated that higher resting heart rate, increased heart rate variability, and unstable heart rate patterns are associated with elevated risks of adverse cardiovascular outcomes and mortality in AF-HF patients [11]. Given that the clinical status of AF-HF patients often varies due to treatment modifications and changes in volume status, static measurements may not accurately capture disease dynamics or identify critical risk periods. To date, distinct heart rate trajectory subgroups in AF-HF patients and their association with short‑term mortality have not been well characterized. To address these gaps, we used a Joint Latent Class Model (JLCM), a statistical approach that jointly models repeated longitudinal measurements and time-to-event outcomes, to identify distinct heart rate trajectories in AF-HF patients. We also developed a Bayesian joint model that integrated longitudinal heart rate trajectories with 30-day mortality risk to enable dynamic prediction. The aim of this study was to evaluate the association between dynamic heart rate trajectories and 30-day mortality and to explore the potential value of trajectory-based risk stratification in ICU patients with AF-HF. Methods This was a multicenter, retrospective observational study using data from MIMIC-IV (v3.0) and eICU-CRD. Access to these databases was granted upon completion of the National Institutes of Health (NIH) and Collaborative Institutional Training Initiative (CITI) training on human subject protection. Informed consent was waived due to the use of de-identified data. Study design and patients We included consecutive patients hospitalized with a confirmed diagnosis of AF and HF. AF diagnosis was defined by at least one of the following criteria: (1) a 12-lead electrocardiogram indicating AF; (2) an AF-related ICD-9 or ICD-10 discharge diagnosis; or (3) a documented prior medical history of AF. HF diagnosis was confirmed based on ICD-9/10 codes consistent with international heart failure diagnostic criteria, including systolic and/or diastolic dysfunction [12]. Exclusion criteria were as follows: (1) Age < 18 years; (2) ICU stay duration < 24 h; (3) Fewer than 3 days with available heart rate measurements within the first 30 days after ICU admission; (4) Extreme bradycardia or implausible heart rate values (heart rate < 30 bpm); (5) Incomplete clinical data or laboratory results (i.e., > 20% of required variables missing). Only the first ICU stay was included for patients with multiple ICU admissions, whether across separate hospitalizations or within the same hospitalization. Data extraction and Covariates Data extraction was conducted using Navicat Premium (Version 17.0.4) with structured query language (SQL). The following covariates were included: (1) Demographics: age, sex, body mass index (BMI), race; (2) Comorbidities: myocardial infarction (MI), cerebrovascular disease (CVD), peripheral vascular disease (PVD), chronic pulmonary disease (CPD), diabetes, malignancy (3). Severity scores and support: Acute Physiology Score III (APSIII), Charlson Comorbidity Index (CCI) and use of mechanical ventilation. The APSIII (range 0-252) reflects the degree of organ dysfunction and predicts mortality risk by evaluating the 12 most abnormal physiological indices (e.g., temperature, heart rate, blood pressure, blood gas values, blood electrolytes, etc.) within 24 h of ICU admission. The CCI was used to predict long-term mortality risk and disease burden by assessing 19 chronic diseases (e.g., myocardial infarction, diabetes mellitus, neoplasms) with weighted scores based on severity (4). Laboratory values (baseline): hemoglobin (HB) and potassium (K+). The baseline was extracted using the first record after ICU admission. Creatinine clearance (CrCl) was estimated using the Cockroft-Gault formula, and patients were stratified into: normal renal function (CrCl ≥ 80 mL/min), abnormal renal function included mild (CrCl 50–79 mL/min), moderate (CrCl 30–49 mL/min), and severe insufficiency (CrCl < 30 mL/min) (5). Medications: β‑blockers, diuretics, angiotensin converting enzyme inhibitors (ACEI) or angiotensin receptor blockers (ARB), and anticoagulants (6). Heart rate metrics: Heart rate measurements were obtained from routinely documented bedside monitor-derived vital sign records in the MIMIC-IV and eICU databases. Because these data were collected during routine ICU care, measurement timing and frequency were not standardized by the present study. For the primary trajectory analysis, all available heart rate values within each calendar day were summarized as the daily mean heart rate over the first 30 days after ICU admission. The coefficient of variation of daily heart rate (CV = SD/mean) was also calculated to quantify heart rate variability. Daily mean heart rate was selected for the primary trajectory analysis to summarize overall day-level heart rate burden, while the coefficient of variation was analyzed separately as a complementary measure of heart rate variability. Study outcome The primary outcome was 30-day all-cause mortality. Mortality status was identified from the mortality or discharge information recorded in the source databases. Survival time was defined as the duration from ICU admission to death or the end of the 30-day follow-up, whichever occurred first. Patients who survived beyond 30 days or were discharged alive before 30 days without a recorded death were considered censored. Statistical analysis Daily heart rate trajectory: To identify groups of patients with similar longitudinal heart rate patterns, we fitted JLCMs with 1 to 6 latent classes. The number of classes was selected by jointly considering model fit, classification quality, class size, convergence, and clinical interpretability, rather than relying on a single statistical index. Specifically, we compared candidate models using the Bayesian Information Criterion (BIC), adjusted BIC, entropy, posterior classification probabilities, and the size of each latent class. The three-class solution provided the best overall balance between statistical fit, classification performance, adequate class size, and clinical interpretability, and was therefore retained for the primary analysis. Based on the observed temporal patterns, the final latent classes were descriptively labeled as gradual decrease, gradual increase, and medium stable trajectory groups. Grouping and patient characteristics of baseline: Patients were grouped according to: (1) baseline heart rate using guideline-recommended thresholds for AF management [6]; (2) Heart rate trajectories identified via JLCM; and (3) Heart rate CV trajectories. Continuous variables were presented as mean ± standard deviation (SD) or median with interquartile range (IQR), and categorical variables as counts and percentages. Variables with > 20% missing data were excluded. Remaining missing values were imputed using multiple imputation via chained equations, based on baseline covariates. For comparisons among the three groups, one‑way ANOVA was used for normally distributed continuous variables, the Kruskal‑Wallis test for skewed continuous variables, and Pearson’s chi‑square test or Fisher’s exact test for categorical variables, as appropriate. The proportional hazards assumption for the Cox models was assessed using Schoenfeld residuals. Survival analysis: To adjust for baseline imbalances and evaluate clinical outcomes across different groups, multivariable Cox proportional hazards models were applied. Three models were constructed with progressive adjustments: (1) Model 1: unadjusted; (2) Model 2: adjusted for age, sex, BMI, and comorbidities; (3) Model 3: further adjusted for APSIII, laboratory indexes, concomitant medications, and mechanical ventilation. Hazard ratios (HRs) and 95% confidence intervals (CIs) were calculated to estimate the strength of association between heart rate patterns and 30-day mortality. In addition, Kaplan-Meier survival curves and log-rank tests were used to compare cumulative 30-day mortality among different trajectory groups. Subgroup analyses: Subgroup analyses were conducted to assess the consistency of associations across strata of gender, age, APSⅢ scores, CrCl, CCI, and mechanical ventilation. Interaction terms were included in multivariable Cox models, and statistical significance for interaction was defined as P for interaction < 0.05. Dynamic prediction (Joint Modeling): To dynamically predict short-term mortality while accounting for repeated heart rate measurements, we developed a Bayesian joint model. This model included two components: (1) longitudinal heart rate changes within each trajectory group, modeled using linear mixed-effects models with patient-specific random intercepts and slopes; and (2) time to 30-day all-cause mortality, modeled using a time-dependent Cox model. By integrating these components, the joint model generated updated individualized survival probabilities as new heart rate measurements became available. Data was extracted using PostgreSQL 17 and all statistical analyses were performed using R (version 4.4.0). Results Baseline characteristics by baseline heart rate Among 8,356 included patients, 3,059 had a baseline heart rate < 80 bpm, 4,059 had 80–110 bpm, and 1,238 had > 110 bpm (Table 1). Compared to the < 80 bpm group, patients in the higher heart rate groups were younger, had higher APSIII scores and HB levels, lower CCI scores, and a lower prevalence of MI, CVD, PVD, and diabetes. They were also less likely to receive mechanical ventilation or treatment with ACEI/ARB, but had a higher prevalence of malignancy and more frequent use of diuretics. Additionally, significant differences were observed among the heart rate groups in terms of race, prevalence of CPD and renal function (all P < 0.05). Table 1Baseline characteristics of patients stratified by baseline heart rate: <80 bpm, 80–110 bpm, and >110 bpmCharacteristics< 80 bpm(n = 3059)80–110 bpm(n = 4059)>110 bpm(n = 1238) P Age, years76.89 ± 10.6474.99 ± 11.6173.47 ± 12.97< 0.001Male, n(%)1768 (57.8)2285 (56.3)698 (56.4)0.419BMI, kg/m228.52 (24.10,34.52)28.40 (23.87,34.59)28.71 (23.53,35.37)0.593Race, n(%)0.039 White2272 (74.3)3008 (74.1)916 (74.0) Black209 (6.8)317 (7.8)119 (9.6) Asian65 (2.1)92 (2.3)29 (2.3) Other513 (16.8)642 (15.8)174 (14.1)ApsⅢ, scores52.36 ± 21.2756.17 ± 21.5264.05 ± 22.22< 0.001HB, g/dL10.78 ± 2.2111.00 ± 2.3111.29 ± 2.40< 0.001K+, mmol/L4.32 ± 0.774.30 ± 0.794.30 ± 0.770.519CCI, scores7.18 ± 2.276.91 ± 2.366.49 ± 2.46< 0.001MI, n(%)817 (26.7)1079 (26.6)244 (19.7)< 0.001CVD, n(%)476 (15.6)534 (13.2)131 (10.6)< 0.001PVD, n(%)506 (16.5)539 (13.3)115 (9.3)< 0.001CPD, n(%)1034 (33.8)1393 (34.3)375 (30.3)0.029Diabetes, n(%)1164 (38.1)1487 (36.6)397 (32.1)0.001Malignant Cancer, n(%)191 (6.2)332 (8.2)121 (9.8)< 0.001Renal function, n(%)< 0.001 CrCl ≥ 80 ml/min555 (18.1)918 (22.6)313 (25.3) CrCl 50–79 ml/min860 (28.1)1104 (27.2)328 (26.5) CrCl 30–49 ml/min869 (28.4)1067 (26.3)331 (26.7) CrCl <30 ml/min775 (25.3)970 (23.9)266 (21.5)Mechanical ventilation, n(%)2226 (72.8)2854 (70.3)795 (64.2)< 0.001β-blockers, n(%)449 (14.7)678 (16.7)194 (15.7)0.067Diuretic, n(%)416 (13.6)638 (15.7)228 (18.4)< 0.001ACEI/ARB, n(%)614 (20.1)765 (18.8)189 (15.3)0.001Anticoagulant, n(%)2409 (78.8)3105 (76.5)944 (76.3)0.051Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Table 1Baseline characteristics of patients stratified by baseline heart rate: <80 bpm, 80–110 bpm, and >110 bpmCharacteristics< 80 bpm(n = 3059)80–110 bpm(n = 4059)>110 bpm(n = 1238) P Age, years76.89 ± 10.6474.99 ± 11.6173.47 ± 12.97< 0.001Male, n(%)1768 (57.8)2285 (56.3)698 (56.4)0.419BMI, kg/m228.52 (24.10,34.52)28.40 (23.87,34.59)28.71 (23.53,35.37)0.593Race, n(%)0.039 White2272 (74.3)3008 (74.1)916 (74.0) Black209 (6.8)317 (7.8)119 (9.6) Asian65 (2.1)92 (2.3)29 (2.3) Other513 (16.8)642 (15.8)174 (14.1)ApsⅢ, scores52.36 ± 21.2756.17 ± 21.5264.05 ± 22.22< 0.001HB, g/dL10.78 ± 2.2111.00 ± 2.3111.29 ± 2.40< 0.001K+, mmol/L4.32 ± 0.774.30 ± 0.794.30 ± 0.770.519CCI, scores7.18 ± 2.276.91 ± 2.366.49 ± 2.46< 0.001MI, n(%)817 (26.7)1079 (26.6)244 (19.7)< 0.001CVD, n(%)476 (15.6)534 (13.2)131 (10.6)< 0.001PVD, n(%)506 (16.5)539 (13.3)115 (9.3)< 0.001CPD, n(%)1034 (33.8)1393 (34.3)375 (30.3)0.029Diabetes, n(%)1164 (38.1)1487 (36.6)397 (32.1)0.001Malignant Cancer, n(%)191 (6.2)332 (8.2)121 (9.8)< 0.001Renal function, n(%)< 0.001 CrCl ≥ 80 ml/min555 (18.1)918 (22.6)313 (25.3) CrCl 50–79 ml/min860 (28.1)1104 (27.2)328 (26.5) CrCl 30–49 ml/min869 (28.4)1067 (26.3)331 (26.7) CrCl <30 ml/min775 (25.3)970 (23.9)266 (21.5)Mechanical ventilation, n(%)2226 (72.8)2854 (70.3)795 (64.2)< 0.001β-blockers, n(%)449 (14.7)678 (16.7)194 (15.7)0.067Diuretic, n(%)416 (13.6)638 (15.7)228 (18.4)< 0.001ACEI/ARB, n(%)614 (20.1)765 (18.8)189 (15.3)0.001Anticoagulant, n(%)2409 (78.8)3105 (76.5)944 (76.3)0.051Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Baseline characteristics of patients stratified by baseline heart rate: <80 bpm, 80–110 bpm, and >110 bpm Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Baseline heart rate and mortality risk The 30-day mortality rates were 16.7%, 18.8%, and 21.7% in the < 80 bpm, 80–110 bpm, and > 110 bpm groups, respectively. As shown in Fig. 1, compared with the < 80 bpm group, both the 80–110 bpm and >110 bpm groups demonstrated increased risks of 30-day mortality across all three Cox regression models. In the unadjusted model (Model 1), the HRs for 30-day mortality were 1.13 (95% CI: 1.01–1.27) for the 80–110 bpm group and 1.34 (95% CI: 1.16–1.56) for the >110 bpm group. In Model 2, the HRs were 1.22 (95% CI: 1.09–1.36) for the 80–110 bpm group and 1.61 (95% CI: 1.39–1.87) for the >110 bpm group. In the fully adjusted model (Model 3), the HRs were 1.13 (95% CI: 1.01–1.26) for the 80–110 bpm group and 1.28 (95% CI: 1.10–1.49) for the >110 bpm group. The association between higher heart rate categories and increased mortality remained robust and consistent across all models. Fig. 1Hazard ratios and 95% confidence intervals for 30-day mortality in the 80–110 bpm and >110 bpm groups compared with the < 80 bpm group across three Cox regression models Hazard ratios and 95% confidence intervals for 30-day mortality in the 80–110 bpm and >110 bpm groups compared with the < 80 bpm group across three Cox regression models Identification of heart rate trajectory groups The metrics of the goodness-of-fit model were shown in Table S1. Based on the JLCM, daily heart rate measurements were classified into three distinct trajectories: trajectory 1 group-a gradual decrease (n = 210, 2.51%), trajectory 2 group- a gradual increase (n = 111, 1.33%), and trajectory 3 group-a medium stable pattern (n = 8035, 96.16%) (Fig. 2). Baseline characteristics of patients across the three heart rate trajectories were presented in Table 2. Compared with the trajectory 3 group, patients in the trajectory 1 group had a lower prevalence of CVD and CPD, and a higher proportion of β-blocker and diuretic use. The trajectory 2 group showed higher CCI scores, a higher prevalence of MI and PVD, and greater use of mechanical ventilation. Additionally, significant differences were observed among the three groups in age, ApsIII scores, and Hb levels (all P < 0.05). Fig. 2Trajectories of heart rate over time identified by the JLCM Trajectories of heart rate over time identified by the JLCM Table 2Baseline characteristics of patients stratified by heart rate trajectoriesCharacteristicsTrajectory 1(n = 210)Trajectory 2(n = 111)Trajectory 3(n = 8035) P Age, years71.34 ± 13.9575.15 ± 11.4875.57 ± 11.45< 0.001Male, n(%)113 (53.8)59 (53.2)4579 (57.0)0.479BMI, kg/m229.39 (23.88,35.81)28.16 (24.85,34.21)28.47 (23.89,34.71)0.513Race, n(%)0.422 White155 (73.8)87 (78.4)5954 (74.1) Black21 (10.0)4 (3.6)620 (7.7) Asian3 (1.4)4 (3.6)179 (2.2) Other31 (14.8)16 (14.4)1282 (16.0)ApsⅢ, scores62.86 ± 20.2560.06 ± 25.8555.70 ± 21.81< 0.001Hb, g/dL11.61 ± 2.5410.96 ± 2.4810.95 ± 2.28< 0.001K+, mmol/L4.32 ± 0.744.34 ± 0.804.31 ± 0.780.899CCI, scores6.05 ± 2.737.04 ± 2.346.97 ± 2.34< 0.001MI, n(%)32 (15.2)30 (27.0)2078 (25.9)0.002CVD, n(%)17 (8.1)12 (10.8)1112 (13.8)0.039PVD, n(%)16 (7.6)19 (17.1)1125 (14.0)0.019CPD, n(%)52 (24.8)34 (30.6)2716 (33.8)0.019Diabetes, n(%)61 (29.0)38 (34.2)2949 (36.7)0.067Renal function, n(%)0.230 CrCl ≥ 80 ml/min60 (28.6)20 (18.0)1706 (21.2) CrCl 50–79 ml/min53 (25.2)30 (27.0)2209 (27.5) CrCl 30–49 ml/min54 (25.7)30 (27.0)2183 (27.2) CrCl <30 ml/min43 (20.5)31 (27.9)1937 (24.1)Malignant Cancer, n(%)22 (10.5)5 (4.5)617 (7.7)0.144Mechanical ventilation, n(%)123 (58.6)92 (82.9)5660 (70.4)< 0.001β-blockers, n(%)43 (20.5)8 (7.2)1270 (15.8)0.008Diuretic, n(%)53 (25.2)13 (11.7)1216 (15.1)< 0.001ACEI/ARB, n(%)41 (19.5)20 (18.0)1507 (18.8)0.942Anticoagulant, n(%)157 (74.8)92 (82.9)6209 (77.3)0.254Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Table 2Baseline characteristics of patients stratified by heart rate trajectoriesCharacteristicsTrajectory 1(n = 210)Trajectory 2(n = 111)Trajectory 3(n = 8035) P Age, years71.34 ± 13.9575.15 ± 11.4875.57 ± 11.45< 0.001Male, n(%)113 (53.8)59 (53.2)4579 (57.0)0.479BMI, kg/m229.39 (23.88,35.81)28.16 (24.85,34.21)28.47 (23.89,34.71)0.513Race, n(%)0.422 White155 (73.8)87 (78.4)5954 (74.1) Black21 (10.0)4 (3.6)620 (7.7) Asian3 (1.4)4 (3.6)179 (2.2) Other31 (14.8)16 (14.4)1282 (16.0)ApsⅢ, scores62.86 ± 20.2560.06 ± 25.8555.70 ± 21.81< 0.001Hb, g/dL11.61 ± 2.5410.96 ± 2.4810.95 ± 2.28< 0.001K+, mmol/L4.32 ± 0.744.34 ± 0.804.31 ± 0.780.899CCI, scores6.05 ± 2.737.04 ± 2.346.97 ± 2.34< 0.001MI, n(%)32 (15.2)30 (27.0)2078 (25.9)0.002CVD, n(%)17 (8.1)12 (10.8)1112 (13.8)0.039PVD, n(%)16 (7.6)19 (17.1)1125 (14.0)0.019CPD, n(%)52 (24.8)34 (30.6)2716 (33.8)0.019Diabetes, n(%)61 (29.0)38 (34.2)2949 (36.7)0.067Renal function, n(%)0.230 CrCl ≥ 80 ml/min60 (28.6)20 (18.0)1706 (21.2) CrCl 50–79 ml/min53 (25.2)30 (27.0)2209 (27.5) CrCl 30–49 ml/min54 (25.7)30 (27.0)2183 (27.2) CrCl <30 ml/min43 (20.5)31 (27.9)1937 (24.1)Malignant Cancer, n(%)22 (10.5)5 (4.5)617 (7.7)0.144Mechanical ventilation, n(%)123 (58.6)92 (82.9)5660 (70.4)< 0.001β-blockers, n(%)43 (20.5)8 (7.2)1270 (15.8)0.008Diuretic, n(%)53 (25.2)13 (11.7)1216 (15.1)< 0.001ACEI/ARB, n(%)41 (19.5)20 (18.0)1507 (18.8)0.942Anticoagulant, n(%)157 (74.8)92 (82.9)6209 (77.3)0.254Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Baseline characteristics of patients stratified by heart rate trajectories Note: BMI Body mass index, ApsⅢ Acute Physiology Score III, HB Hemoglobin, K+ potassium, CCI Charlson comorbidity index, MI Myocardial infarction, CVD Cerebrovascular disease, PVD Peripheral vascular disease, CPD Chronic pulmonary disease, CrCl Creatinine clearance, ACEI/ARB Angiotensin converting enzyme inhibitors/ angiotensin receptor blockers Heart rate trajectories and mortality In the comparison among the trajectory 1, trajectory 2 and trajectory 3 groups, the incidences of mortality were 15.71%, 45.95% and 18.15%, respectively. As shown in Fig. 3, the cumulative incidence of mortality varied significantly across the heart rate trajectory groups, with the highest risk observed in trajectory 2. This finding was consistent with the results of the Cox regression analysis shown in Fig. 4, where trajectory 2 group was associated with a markedly higher risk of mortality compared to trajectory 3 group in all three Cox proportional hazards models. In contrast, trajectory 1 group showed no significant difference in mortality risk compared to trajectory 3 group. Fig. 3Cumulative incidence curves of mortality for the three heart rate trajectory groups Cumulative incidence curves of mortality for the three heart rate trajectory groups Fig. 4Hazard ratios and 95% confidence intervals for mortality in trajectory 1 and trajectory 2 groups compared with trajectory 3 group across three Cox regression models Hazard ratios and 95% confidence intervals for mortality in trajectory 1 and trajectory 2 groups compared with trajectory 3 group across three Cox regression models Trajectories of Heart Rate Variability Patients were categorized into three trajectory groups based on the CV of heart rate over time: the gradual increase trajectory (trajectory 1, n = 152, 1.82%), the stable trajectory (trajectory 2, n = 7886, 94.38%) and the gradual decrease trajectory (trajectory 3, n = 318, 3.81%) (Figure S1). As shown in Figure S2, Cox proportional hazards models revealed a significant association between heart rate CV trajectories and mortality. Compared with the trajectory 2 group, trajectory 1 group was associated with a markedly higher risk of mortality in all three Cox proportional hazards models and trajectory 3 group showed no significant difference. Subgroup analysis Subgroup analysis of mortality risk across trajectory groups were presented in Fig. 5. Compared to the trajectory 3 group, the trajectory 2 group consistently exhibited a significantly higher risk of mortality across all subgroups, including gender, age, APSⅢ scores, CrCl, CCI, and mechanical ventilation. In contrast, the trajectory 1 group showed no significant difference in mortality risk compared with trajectory 3 group across all subgroups. In the renal function subgroup, a significant interaction was observed with renal function status and trajectory groups (P for interaction < 0.05). In the renal function subgroup analysis, the association between trajectory 2 and 30-day mortality, relative to trajectory 3, appeared stronger in patients with preserved renal function than in those with impaired renal function. In the mechanical ventilation subgroup analysis, the association between trajectory 2 and 30-day mortality, relative to trajectory 3, appeared stronger in patients without mechanical ventilation than in those receiving mechanical ventilation. Fig. 5Hazard ratios and 95% confidence intervals for mortality across subgroups in trajectory 1 and trajectory 2 groups compared with trajectory 3 groups Hazard ratios and 95% confidence intervals for mortality across subgroups in trajectory 1 and trajectory 2 groups compared with trajectory 3 groups Dynamic prediction Figure 6 illustrated the dynamic association between heart rate measurements and predicted survival probabilities across the three trajectory groups. As the duration of heart rate monitoring increased from 1 day (Fig. 6a) to 9 days (Fig. 6d), the separation in predicted survival curves among trajectory groups became more apparent. The distinction was most evident in Fig. 6d, where heart rate data from the first 9 days yielded a clearly stratified prediction of 30-day mortality. In contrast, predictions based on only 1 day of heart rate data (Fig. 6a) showed minimal differentiation between groups. Fig. 6Mean heart rates and predicted survival probability over time for three trajectory groups. a HR measurements in the first 1 day and predicted survival probability in the next 29 days; b HR measurements in the first 3 days and predicted survival probability in the next 27 days; c HR measurements in the first 5 days and predicted survival probability in the next 25 days; d HR measurements in the first 9 days and predicted survival probability in the next 21 days Mean heart rates and predicted survival probability over time for three trajectory groups. a HR measurements in the first 1 day and predicted survival probability in the next 29 days; b HR measurements in the first 3 days and predicted survival probability in the next 27 days; c HR measurements in the first 5 days and predicted survival probability in the next 25 days; d HR measurements in the first 9 days and predicted survival probability in the next 21 days The time-dependent AUC curves (Figure S3) demonstrated improved discriminative performance of the dynamic prediction model as heart rate data accumulated, with the highest AUC observed around day 6. Additionally, we selected three patients from each heart rate trajectory group and plotted their mean heart rate values and predicted survival probabilities over different observation periods (1, 3, 5, and 9 days) (Figure S4). These individualized prediction curves showed increasing separation among trajectory groups with longer observation, indicating potential early risk stratification value. Discussion Heart rate management in patients with atrial fibrillation and heart failure (AF-HF) is clinically important because it may influence prognosis. However, the prognostic significance of dynamic heart rate trajectories in this population remains unclear. In this retrospective cohort study of 8,356 ICU patients with AF-HF, we found that elevated baseline heart rate, progressively increasing heart rate trajectories, and increasing trajectories of heart rate coefficient of variation (CV) were associated with higher 30-day mortality. These findings suggest that early heart rate escalation, persistent elevation, and sustained variability may serve as markers of increased short-term risk in AF-HF patients. Compared with static single-time-point assessments, longitudinal heart rate monitoring may provide additional prognostic information. However, this observation should be interpreted cautiously, and our findings do not establish an optimal therapeutic heart rate target. Previous studies on heart rate in AF-HF patients yielded inconsistent results, largely because they relied on single-timepoint measurements. For example, the AFFIRM and AF-CHF sub-studies found no significant association between resting heart rate and mortality, possibly because static measurements could not capture evolving periods of risk [9]. In contrast, our study shows that patients with progressively increasing heart rate trajectories have a substantially higher risk of 30-day mortality than those with stable trajectories. This finding supports the hypothesis that temporal patterns of heart rate may better reflect underlying pathophysiological changes. Mechanistically, persistent tachycardia might reflect heightened sympathetic activation, reduced cardiac output, and increased myocardial oxygen demand, all of which can contribute to hemodynamic instability and end-organ dysfunction [13–15]. In AF-HF patients, these effects may be amplified by the loss of atrial contribution to ventricular filling and the irregular ventricular response characteristic of AF. In addition, sustained neurohormonal activation associated with elevated heart rate may accelerate myocardial remodeling and fibrosis, thereby further impairing cardiac function and increasing arrhythmic risk [16]. Current guidelines recommend catheter ablation as a rhythm-control strategy for selected patients with AF and HF, particularly those with reduced ejection fraction and suspected tachycardia-induced cardiomyopathy [17]. Recent meta-analyses have suggested that catheter ablation may reduce all-cause mortality compared with medical therapy alone [18]. In parallel, the COVID-19 pandemic has highlighted the broader importance of heart rate variability under conditions of systemic inflammatory stress. Accumulating evidence indicates that SARS-CoV-2 infection can impair autonomic function, with reduced parasympathetic activity and relative sympathetic predominance [19, 20]. Together, these observations support the clinical relevance of dynamic heart rate metrics beyond conventional static measurements. The optimal heart rate control strategy in AF-HF patients remains controversial. The AFFIRM trial and earlier guidelines favored stricter control (< 80 bpm at rest), while the RACE II trial supported a more lenient target (< 110 bpm) [21]. Registry data also suggested that heart rates > 80 bpm at discharge were associated with worse outcomes in AF-HF patients [22]. In addition, a U-shaped relationship between heart rate and mortality was observed in HFpEF patients, with the lowest risk seen between 81 and 110 bpm [23, 24]. These inconsistencies underscored the need for individualized, context-based heart rate management strategies. In our study, both elevated baseline heart rate and a progressively increasing heart rate trajectory are associated with higher short-term mortality. These findings suggest that a single heart rate threshold may be insufficient for risk stratification in this population. Rather than supporting a specific treatment threshold, our results highlight the potential value of continuous or longitudinal heart rate monitoring for identifying patients with worsening physiological status. Whether trajectory-guided rate-control or rhythm-control strategies can improve outcomes remains uncertain and requires prospective evaluation. Beyond mean heart rate, heart rate CV also appears to have prognostic value. In our study, a gradually increasing CV trajectory is associated with higher mortality. This observation suggests that heart rate CV may serve as an early marker of autonomic imbalance and reduced cardiovascular reserve. Large fluctuations in heart rate may reflect impaired baroreflex function, greater arrhythmogenic potential, and reduced physiological resilience [25]. Heart rate CV instability may also indicate an inadequate response to treatment, such as fluid management or rate-control therapy, and therefore may serve as a potential marker of clinical decompensation. These findings also have implications for risk stratification. Single heart rate measurements may underestimate mortality risk in patients whose heart rate pattern is worsening or fluctuating over time. Our identification of high-risk heart rate and heart rate CV trajectories supports the potential value of longitudinal heart rate monitoring through telemetry or automated ICU systems. Patients with upward trajectories may warrant closer surveillance and reassessment of overall clinical status, although whether trajectory-guided interventions improve outcomes remains uncertain. The dynamic prediction model further supports these observations. Time-dependent AUC analyses show that predictive performance improves as the duration of observation increases, reaching a peak around day 6. The subsequent decline in AUC likely reflects decreasing sample size and increasing data sparsity later in the ICU course. Notably, individualized prediction curves become more clearly separated across trajectory groups as more heart rate data accumulate. These findings suggest the potential feasibility of dynamic, trajectory-informed risk prediction in critically ill patients, although external validation and prospective evaluation are still needed. We further propose that worsening heart rate trajectories, including progressively increasing mean heart rate or increasing heart rate CV, may reflect a combination of inadequate rate control, greater disease severity, and unsuccessful rhythm-control efforts. In the ICU setting, acute hemodynamic instability, heightened sympathetic activation, and organ dysfunction may limit the use of early aggressive rhythm-control strategies such as cardioversion or antiarrhythmic drugs. Our findings suggest that dynamic heart rate trajectories should be interpreted primarily as real-time markers of clinical decompensation rather than as direct indicators of failure of rate control versus rhythm control. Clinically, rising heart rate trajectories may help identify patients at higher short-term risk who may warrant closer monitoring and clinical reassessment of overall hemodynamic status and treatment adequacy. However, our observational findings do not establish a specific treatment sequence or management algorithm regarding rhythm control versus rate control. Subgroup analyses reveal that renal function modifies the association between heart rate trajectory and mortality. Although previous studies suggested that elevated heart rate may be particularly harmful in patients with renal impairment [26, 27], we observe a stronger association in those with preserved renal function within the increasing trajectory group. Several explanations are possible. Patients with preserved renal function may have died from acute systemic illness, such as infection or inflammation, in which rapid heart rate elevation reflects physiological collapse. By contrast, patients with renal impairment may have received closer monitoring and earlier intervention because of their known high-risk status, potentially attenuating the impact of heart rate changes. A competing-risk mechanism is also possible: patients with severe renal dysfunction may die from other causes before heart rate trajectories fully evolve, whereas those with preserved renal function may survive long enough for progressive heart rate elevation to become clinically apparent. In addition, among patients with chronic kidney disease, short-term mortality may be driven more by metabolic derangements and comorbidity burden than by heart rate itself. These findings should be interpreted cautiously and require confirmation in future studies. Mechanical ventilation status also appears to modify the association between heart rate trajectory and mortality. Among non-ventilated patients, those in the progressively increasing heart rate group have a much greater relative increase in mortality than ventilated patients. One possible explanation is that mechanical ventilation may attenuate the adverse effects of heart rate elevation by improving oxygenation, reducing sympathetic drive, and stabilizing hemodynamics [28]. Conversely, non-ventilated patients may remain more vulnerable to the pathophysiological consequences of uncontrolled heart rate elevation [29]. These findings highlight the importance of considering respiratory status when interpreting heart rate dynamics in critically ill patients. This study has several limitations. First, the retrospective design precluded causal inference and may be affected by residual confounding. Second, our analysis was limited to ICU patients, which may reduce the generalizability of findings to broader AF-HF populations. Third, the databases did not provide NT-proBNP, LVEF, or NYHA class, preventing classification of HF into HFrEF, HFpEF, or HFmrEF. Similarly, AF subtype could not be reliably categorized as paroxysmal, persistent, or permanent across both databases, and the lack of daily rhythm status data limited our ability to determine whether the observed trajectories reflected AF burden or intermittent sinus rhythm. Dynamic changes in heart rate and heart rate CV may also have been influenced by treatment-related factors, such as medication adjustments, cardioversion, or worsening illness, which could not be fully captured. In addition, because heart rate data were derived from routine ICU monitoring rather than a predefined protocol, monitoring intensity likely varied across patients and over time. We did not formally quantify measurement density, and differential monitoring intensity may have influenced estimation of the daily aggregated heart rate trajectories. Furthermore, although the selected three-class model showed acceptable classification performance, the marked imbalance in group size and the limited number of events in the smaller classes may have reduced the precision of the corresponding HR estimates. This pattern suggests that the non-stable trajectory groups may represent relatively rare but clinically high-risk phenotypes, rather than broadly generalizable subpopulations, which should be considered when interpreting their clinical implications. Finally, the requirement for at least 3 days of heart rate data may have excluded some patients who died very early after ICU admission. Nonetheless, a minimum number of repeated measurements was necessary to support stable trajectory estimation. These limitations underscore the need for prospective validation and real-time monitoring studies. Importantly, the primary analysis of this study focused on the association between heart rate trajectories and 30-day mortality. All other analyses, including baseline heart rate categories, heart rate CV trajectories, subgroup analyses, and the dynamic prediction model, should be regarded as exploratory and hypothesis-generating. These findings therefore require cautious interpretation and further validation. Conclusion In our study, both elevated baseline heart rate and a progressively increasing heart rate trajectory are associated with higher short-term mortality. The dynamic prediction model also showed potential for time-updated risk stratification, although this exploratory finding requires further validation before clinical implementation. Supplementary Information Supplementary Material 1. Supplementary Material 1.