1. Introduction
Chronic heart failure (CHF), the terminal stage of various cardiovascular diseases, is characterized by high prevalence and poor prognosis. Disease progression is frequently associated with recurrent hospitalizations, posing a substantial burden on individuals and the healthcare system [
1,
2]. The readmission rate among patients with chronic heart failure remains alarmingly high. The early post-discharge period (60–90 days), termed the “vulnerable phase”, carries a disproportionately high risk, with mortality and readmission rates approaching 15% and 30%, respectively [
3]. Regarding longer-term outcomes, the all-cause readmission rate within 1 year after discharge has been reported to be as high as 69.0% in a nationwide Chinese cohort [
4].
While disease progression and comorbidities contribute substantially to the risk of readmission, modifiable care-related factors, including medication adherence, self-management capabilities, and psychosocial support, are recognized as critical factors associated with clinical outcomes. Addressing these crucial factors may help reduce the likelihood of rehospitalization and enhance long-term disease management.
In recent years, machine learning (ML) strategies have emerged as promising tools for predicting readmission risk in CHF by utilizing complex, multidimensional clinical data. Unlike conventional statistical models, ML algorithms can integrate heterogeneous variables, such as demographic characteristics, clinical history, and laboratory findings, to uncover hidden risk patterns, thereby enhancing prediction accuracy and temporal resolution. Incorporating nursing-related assessment indicators, such as functional status and caregiver burden, into predictive models may further refine risk stratification, enabling earlier identification of high-risk patients and personalized management approaches.
Despite these advances, investigations using ML strategies to predict long-term readmission risks in patients with CHF remain limited in China [
5]. Existing studies have predominantly focused on short-term outcomes, such as 30-day readmission [
6], or have not been assessed across diverse clinical settings. Therefore, this study aims to develop and validate a machine learning-based model to predict the risk of all-cause readmission within one-year risk among CHF patients.
2. Methods
2.1 Research Subjects
This retrospective study included a cohort of 293 patients with CHF who were consecutively admitted to Affiliated Hospital of Nantong University between January 2023 and May 2024. Using a randomly split, patients were allocated into a training set (n = 205) and a validation set (n = 88) in a 7:3 ratio, ensuring preservation of the original distribution of cases and controls during stratification.
Inclusion criteria for patient selection were as follows: (1) confirmed CHF diagnosis according to the Chinese Guidelines for the Diagnosis and Treatment of Heart Failure (2018) [
7]; (2) age ≥18 years, with no cognitive or psychiatric impairment to ensure effective communication; (3) discharge following standardized treatment; and (4) availability of complete clinical and follow-up data. However, patients with terminal illnesses (e.g., malignant tumors or end-stage terminal illnesses), in-hospital death, discontinuation of treatment, loss to follow-up during the study time, or planned cardiac surgical intervention within the follow-up period were excluded from the study cohort.
2.2 Research Methods
Clinical and demographic data were extracted from the electronic medical record (EMR) system. The dataset included several variables, including demographic information, co-existing disease, laboratory parameters, and clinical assessment indicators.
(a) Demographic characteristics included age, sex, HF subtype (e.g., heart failure with reduced ejection fraction [HFrEF] or heart failure with preserved ejection fraction [HFpEF]), and history of coronary artery surgery. (b) Clinical assessment indicators included New York Heart Association (NYHA) functional classification, heart rate at admission, lifestyle-related parameters (e.g., dietary habits such as sodium intake and overall calorie consumption), and adherence to guideline-directed medical therapy (GDMT) (e.g., β-blocker, ACEI/ARB use). (c) Comorbidities included hypertension, diabetes mellitus, hyperlipidemia, atrial fibrillation, respiratory infections, anemia, and other clinically relevant diseases documented in the medical records. (d) Laboratory parameters comprised estimated glomerular filtration rate (eGFR), high-sensitivity C-reactive protein (hsCRP), blood urea nitrogen (BUN), and N-terminal pro-B-type natriuretic peptide (NT-proBNP).
Psychological status was evaluated within 48 hours of hospital admission by two cardiologists who had received standardized training in psychiatric rating tools. Depression was assessed using the Hamilton Depression Rating Scale (HAMD) [
8], and anxiety was evaluated using the Hamilton Anxiety Rating Scale (HAMA) [
9]. Depression severity was categorized as no depression (0–7), mild depression (8–17), moderate depression (18–24), or severe depression (≥25) [
8]. Anxiety severity was classified as no anxiety (0–6 points), mild anxiety (7–14 points), moderate anxiety (15–21 points), or severe anxiety (≥22 points) [
9]. Inter-rater consistency between the two evaluators was substantially high (Kappa >0.8). In cases of any discrepancies, final scoring was determined by involving a third senior physician to ensure reliability and accuracy.
2.3 Outcome Metrics
The primary outcome of this study was all-cause readmission occurring within 1 year (365 days) after discharge following treatment for chronic heart failure. All cause-readmission was defined as hospitalization for any reason during the follow-up period. Outcome data were obtained through reviewing electronic medical record systems and confirmed through telephone follow-ups.
2.4 Statistical Analysis
Statistical analyses were conducted using SPSS version 25.0 (IBM Corp., Armonk, NY, USA) and R software version 4.4.2 (R Foundation for Statistical Computing, Vienna, Austria). Normality of continuous variables was assessed using the Shapiro-Wilk test. Normally distributed variables were expressed as mean ± standard deviation (mean ± SD), and comparison between groups was determined using independent samples t-tests. Non-normally distributed variables were reported as median (interquartile range, [M (Q1, Q3)]) and analyzed using the Mann-Whitney U tests. Categorical variables were reported as frequencies and percentages (n%), with group comparisons performed using the χ2 tests. Statistical significance was determined at a two-tailed p-value of <0.05.
2.5 Machine Learning Workflow
Continuous variables, including age, NT-proBNP, and BUN, were standardized using a Z-score to ensure comparability across features. Ordinal categorical variables (e.g., NYHA functional class, HAMD scores) were encoded using ordinal encoding, while nominal categorical variables (e.g., heart failure subtypes) were converted using one-hot encoding to mitigate scale effects and optimize compatibility across ML algorithms.
To prevent the risk of overfitting and enhance model generalizability, feature selection was performed using the Least Absolute Shrinkage and Selection Operator (LASSO) regression. The optimal regularization parameter (λ) was determined via 10-fold cross-validation using the “lambda.1se” criterion, which selects the largest λ within one standard error of the minimum cross-validation error. This approach favors a simple and more stable model while maintaining predictive performance.
Using one-year readmission status as the primary outcome, variables indicating potential association in univariate analysis (p < 0.1) were retained for further feature engineering. LASSO regression (glmnet package, version 4.1‑8; Stanford University, Stanford, CA, USA) was applied to reduce dimensionality and identify the most informative predictors (optimal λ). Based on the features selected through LASSO, five predictive models were developed: logistic regression (LR, glm function in the stats package; R Foundation for Statistical Computing, Vienna, Austria), support vector machine (SVM, e1071 package, version 1.7-14 with radial basis kernel; TU Wien, Vienna, Austria), elastic net regression (ElasticNet, glmnet package), extreme gradient boosting (XGBoost, xgboost package, version 1.7.7.1; XGBoost Contributors), and Gradient Boosting Decision Trees (GBDT, gbm package, version 2.1.9; Ridgeway, University of Pennsylvania, Philadelphia, PA, USA). Model hyperparameters (e.g., SVM’s C and γ, XGBoost’s max_depth and eta) were optimized using grid search combined with 10-fold cross-validation within predefined parameter ranges.
Model performance was evaluated in the internal validation dataset using the area under the Receiver Operating Characteristic (ROC) curve (AUC; pROC package, version 4.1-8; University of Geneva and Geneva University Hospitals, Geneva, Switzerland), sensitivity, specificity, precision, recall, F1-score, and overall accuracy. Stability of the optimal model was assessed by reporting the mean ± standard deviation of performance metrics across 10-fold cross-validation. Finally, SHapley Additive exPlanations (SHAP) values (shapr package, version 0.2.3; Norsk Regnesentral/Norwegian Computing Center, Oslo, Norway) were computed for the final best-performing model to interpret feature contributions and the direction of its contribution to readmission risk.
2.6 Baseline Characteristics Comparability
To confirm comparability between the training and validation cohorts, baseline demographic characteristics, clinical features, and laboratory parameters were systematically compared. No statistically significant differences were observed between the groups (p > 0.05), suggesting adequate comparability of baseline variables and supporting the reliability of the random allocation process.
3. Results
3.1 Comparison of Baseline Characteristics Between the Two Groups
The training cohort included 205 patients with CHF, of whom 115 (56.1%) experienced all-cause readmission within 1 year. In this group, significant differences were observed in atrial fibrillation, respiratory infections, hyponatremia, hypokalemia, NT-proBNP levels, eGFR <60 mL/min/1.73 m2, BUN levels, medication nonadherence, high-sodium dietary intake, adherence to GDMT, HF subtype, NYHA functional class, and HAMD scores (all p < 0.05). The internal validation cohort comprised 88 patients, of whom 50 (56.8%) were readmitted during the follow-up period. Similarly, respiratory infections, hyponatremia, hypokalemia, NT-proBNP levels, eGFR <60 mL/min/1.73 m2, medication nonadherence, high-sodium diet, GDMT adherence, HF subtype, NYHA functional class, and HAMD scores demonstrated statistically significant differences between readmitted and non-readmitted patients (all p < 0.05).
Comparative analyses of clinical and laboratory parameters between readmitted and non-readmitted CHF patients are summarized in Table
1. Based on the findings of univariate analysis (variables with
p < 0.1 in Table
1), LASSO regression was applied to reduce dimensionality and identify the most informative predictors. This process identified 10 predictors with non-zero coefficients. The coefficient paths and cross-validation error profile are shown in Fig.
1A,B, respectively. The final selected variables are listed in Table
2.
3.2 Construction and Comparative Performance of Machine Learning Model
Five machine learning models were constructed using the variables identified through LASSO feature selection. The comparative performance of these models on the internal validation dataset is presented in Table
3. All models demonstrated excellent discriminative ability, with internal validation AUC values ranging from 0.949 to 0.969.
Among them, the GBDT model exhibited the most favorable overall performance in the validation set, achieving an AUC of 0.969 (95% CI: 0.950–0.988), along with a sensitivity of 0.896, specificity of 0.922, precision of 0.925, recall of 0.896, and an F1-score of 0.910. Receiver Operating Characteristic (ROC) curves for all five models are shown in Fig.
2. Despite the comparable AUC values between the training and internal validation sets, the relatively limited sample size should be considered when interpreting model performance, as the likelihood of potential overfitting cannot be excluded.
3.3 Robustness of Model and Optimal Model Interpretation
The optimal GBDT model showed stable predictive performance during 10-fold cross-validation in the training cohort, achieving an average AUC of 0.964 with a standard deviation of 0.012. This small variation suggests consistent model performance across different subsets of the data. To enhance interpretability and better understand how individual predictors contributed to model predictions, SHAP analysis was conducted. As illustrated in Fig.
3A, the top 10 predictors were ranked according to their average absolute SHAP values. Among them, NT-proBNP levels, NYHA functional class, respiratory infection, hyponatremia, and eGFR <60 mL/min/1.73 m
2 were detected as the most influential features contributing to the risk of readmission.
The SHAP summary plot in Fig.
3B illustrates the SHAP value distribution of these features for each sample. In this plot, red indicates high feature values (e.g., elevated NT-proBNP levels or more severe NYHA classification), which were generally associated with increased predicted risk of readmission (positive SHAP values). Conversely, blue represents lower feature values, which tended to correspond to reduced predicted risk (negative SHAP values).
4. Discussion
Chronic heart failure (CHF) is a major clinical concern due to high incidence, recurrent hospitalizations, and poor long-term prognosis, all of which impose a substantial burden on patients and healthcare systems worldwide [
10]. While machine learning (ML) has demonstrated potential in predicting readmission risk in CHF, numerous existing domestic studies continue to rely on traditional Logistic regression models. Such methods often inadequately address complex interactions among multiple clinical variables or account for nonlinear relationships between predictors and outcomes. Furthermore, limited incorporation of modifiable clinical and behavioral factors, including medication adherence, nutritional patterns, and psychological status, has minimized the clinical applicability of many previously published models.
To address these gaps, the present study integrated diverse clinical features and systematically compared multiple ML algorithms, such as GBDT and XGBoost. Moreover, SHAP was used to enhance model explainability. Among these models, the GBDT model demonstrated the most optimal performance in internal validation, achieving an AUC of 0.969, sensitivity of 0.896, and specificity of 0.922. These observations suggest that the proposed model may offer a promising framework for risk stratification and early detection of patients at increased risk of readmission, thereby supporting personalized management approaches in CHF care.
NT-proBNP serves as a critical biomarker for predicting readmission risk in HF patients [
11]. A study has demonstrated that NT-proBNP levels are significantly elevated in readmitted patients compared to non-readmitted counterparts, with concentration demonstrating a strong positive correlation with readmission risk [
12]. Notably, an NT-proBNP threshold ≥425.5 pmol/L increases cardiac-related mortality risk by 5.1-fold, paralleling a marked rise in readmission incidence [
13]. Pathophysiologically, elevated NT-proBNP may exacerbate HF progression through neuroendocrine system activation, thereby perpetuating a cycle of worsening cardiac function and recurrent hospitalizations. Clinically, structured interventions targeting NT-proBNP reduction—such as standardized monitoring protocols during hospitalization, discharge, and follow-up—have reduced 30-day readmission rates from 30% to 5% [
14]. Evidence-based structured nursing strategies therefore emphasize: Dynamic NT-proBNP surveillance to track treatment efficacy and disease trajectory; Targeted interventions, including medication adherence reinforcement, strict fluid balance management, and personalized exercise prescription, to mitigate neurohormonal activation and improve outcomes.
In the present study, both NYHA functional classification and 6MWT performance were associated with readmission risk. While NYHA class is a known independent predictor in CHF patients, our findings support 6MWT as a practical functional predictor of readmission, with NYHA serving as a complementary measure [
15]. Individuals with advanced NYHA classes (III–IV) exhibit greater functional limitations and more severe cardiac dysfunction. For instance, HFpEF patients classified as NYHA III–IV demonstrated 3-fold higher readmission rates compared to those in classes I–II [
16]. This pronounced risk gradient underscores the necessity for tiered nursing interventions stratified by NYHA class. During acute phases, critical measures include absolute bed rest, hemodynamic load reduction, continuous vital sign monitoring, and complication prevention. Transitioning to stable or pre-discharge stages necessitates structured home management plans encompassing: Activity prescription with clear intensity guidelines (e.g., bedside mobility, progressive functional exercises); Symptom-triggered protocols outlining specific thresholds for interventions (e.g., diuretic escalation or emergency consultation). By integrating nursing protocols with NYHA classification, this approach enables targeted management of high-risk populations, improving functional outcomes and reducing readmission burdens.
Respiratory infections serve as pivotal risk factors for readmission in CHF patients [
2], primarily through mechanisms including fever-induced cardiac workload escalation, inflammatory-mediated myocardial suppression, and subsequent hypoxemia-driven pulmonary hypertension, which exacerbates pulmonary congestion and precipitates acute decompensation. Proactive prevention and early intervention are therefore critical to mitigating readmission risks. Evidence-based management strategies emphasize a “preventive-first” paradigm: Vaccination campaigns during influenza seasons, coupled with hygiene education (e.g., hand sanitization) and avoidance of crowded environments; Symptom surveillance systems enabling rapid identification of early infection markers (fever, dyspnea, sputum production) and immediate medical escalation protocols. For infected patients, interventions focus on hemodynamic stabilization through controlled oxygen therapy, strict activity restriction, and continuous monitoring of pulmonary auscultation findings and oxygen saturation. Integrating infection management into CHF risk stratification frameworks may disrupt disease progression pathways.
Hyponatremia, defined as serum sodium <135 mmol/L, is a frequent electrolyte imbalance in CHF patients, affecting 8.4%–30.7% during hospitalization [
17,
18]. Its pathogenesis primarily stems from effective circulating blood volume depletion in CHF, which activates the renin-angiotensin-aldosterone system (RAAS) and arginine vasopressin (AVP) secretion, leading to dilutional fluid retention [
19,
20]. Multivariate analyses confirm hyponatremia as an independent predictor of readmission and mortality in CHF, with heightened risks in patients comorbid with hypertension, diabetes, or atrial fibrillation. Notably, persistent hyponatremia (unresolved at discharge) correlates with 30-day unplanned readmission/death risks, whereas timely monitoring of sodium levels and implementing personalized fluid and electrolyte management approaches may support improved clinical outcomes [
21,
22]. Clinically, this necessitates a tripartite nursing framework: Close monitoring of serum sodium and vigilance for symptoms (e.g., fatigue, nausea, altered mental status); Precision fluid/electrolyte management involving strict fluid restriction (<1.5 L/day), sodium intake titration based on lab results, and patient education on hydration discipline; Pharmacovigilance-monitoring traditional diuretics for electrolyte imbalances and mitigating osmotic demyelination risks during tolvaptan use. For discharged patients with unresolved hyponatremia, establishing follow-up protocols ensures continuity of care and reduces short-term readmission risks [
23].
Renal dysfunction is another key independent predictor identified in our study. Previously, reduced eGFR has been associated with increased risk of readmission in CHF patients [
24]. Renal impairment exacerbates fluid overload and sodium retention, thereby increasing cardiac preload, while simultaneously activating the RAAS and sympathetic nervous system, which further impair left ventricular diastolic function and cardiac output [
25]. Additionally, uremic toxin accumulation directly damages cardiomyocytes, inducing arrhythmias and myocardial fibrosis. Epidemiological evidence demonstrates that Lower discharge eGFR (per 10 mL/min per 1.73 m
2 decrease) was independently associated with a higher rate of readmission for dialysis (AHR, 2.23; 95% CI, 2.14–2.32), dialysis or end-stage kidney disease (AHR, 2.34; 95% CI, 2.24–2.44), and AKI (AHR, 1.25; 95% CI, 1.23–1.27) [
26]. 2 years of study entry was associated with greater adjusted risks for CKD progression (1 hospitalization: hazard ratio [HR]: 1.93; 95% confidence interval [CI]: 1.40 to 2.67; 2+ hospitalizations: HR: 2.14; 95% CI: 1.30–3.54) and all-cause death (1 hospitalization: HR: 2.20; 95% CI: 1.71–2.84; 2+ hospitalizations: HR: 3.06; 95% CI: 2.23– 4.18) [
27]. Severe renal dysfunction (eGFR <30 mL/min/1.73 m
2) remains an independent predictor of readmission even after adjusting for other heart failure covariates, underscoring its prognostic primacy. Meta-analyses further confirm that renal impairment confers a pooled odds ratio (OR) of 2.0 for CHF readmission, positioning it as a robust biomarker for adverse outcomes. Clinically, this necessitates a tripartite nursing framework: Dynamic monitoring of eGFR and serum creatinine to detect early renal deterioration; Precision fluid management involving 24-hour intake/output tracking, daily weight surveillance, and collaborative titration of diuretics/SGLT2 inhibitors based on renal-cardiac interaction status; Patient empowerment through education on fluid/sodium restriction and self-monitoring of edema, establishing a closed-loop system to mitigate renal-driven readmission risks [
28].
Although the GBDT model developed in this study demonstrated a strong predictive performance in both training and internal validation datasets (AUC = 0.969), some differences in baseline characteristics were observed in atrial fibrillation and BUN between the two groups. Such variations likely stem from the random variability inherent in data partitioning within a single-center, small-sample retrospective study. It is important to clarify that such differences are not equivalent to model overfitting—overfitting is typically characterized by a significant decline in validation set performance, whereas our model maintained high discriminative ability in the validation set, indicating that it learned generalizable patterns rather than fitting to noise. To enhance the model’s generalizability, LASSO regression was used for feature selection and optimized hyperparameters through 10-fold cross-validation to reduce the impact of subset-specific fluctuations. However, baseline heterogeneity underscores the need for external validation of the model in multicenter, prospective cohorts. Future data partitioning could consider covariate adjustment or stratified sampling to improve balance, further strengthening the model’s clinical applicability and robustness.
SHAP analysis identified NT-proBNP, NYHA functional class, renal function, electrolyte imbalance, and infection as critical risk factors for 1-year all-cause readmission in chronic heart failure (CHF) patients. These findings provide practical targets for tailored nursing interventions. For instance, patients with concurrent high NT-proBNP levels and high-sodium dietary habits exhibited a synergistic increase in readmission risk, necessitating integrated management strategies: (1) NT-proBNP-Guided Dynamic Monitoring: Establish standardized monitoring protocols integrating real-time NT-proBNP assessments with goal-directed care, including optimized medication adherence, fluid balance management, and exercise rehabilitation guidance. (2) NYHA Class-Based Activity Escalation: Design progressive activity plans for NYHA III–IV patients, transitioning from acute-phase strict bed rest to structured home-based cardiac rehabilitation during stable periods. (3) Renal Function Closed-Loop Management: Implement a “monitor-intervene-educate” cycle with regular eGFR assessments, precision fluid management, and patient self-monitoring education to mitigate renal deterioration. (4) Electrolyte and Infection Prophylaxis: Aggressively monitor serum sodium levels, enforce strict fluid/electrolyte restriction protocols, and prioritize vaccination adherence, hand hygiene, and early symptom recognition to prevent respiratory infections.
5. Limitation
This study has several limitations. Firstly, a single-center retrospective design and relatively small sample size may introduce selection bias and reduce generalizability. Second, although cross-validation and regularization approaches were used to minimize the risk of overfitting, the high model performance observed (AUC >0.95) in a relatively small validation cohort should be interpreted carefully. Despite the use of LASSO regularization and cross‑validation, the notably similar AUC values between the training and validation sets indicate that the model did not exhibit significant overfitting and demonstrated satisfactory generalizability. Certain psychosocial and behavioral predictors may not have been fully captured in the available datasets. Future studies should include larger multicenter cohorts and incorporate broader clinical, behavioral and social factors of health to enhance stability and clinical utility.
In summary, this study constructed and initially validated a GBDT-based ML model to predict one-year all-cause readmission risk in patients with chronic heart failure. In internal validation, the model showed excellent discriminative ability (AUC = 0.969) and provided interpretable insights into key clinical predictors. SHAP analysis identified core risk features, including NT-proBNP, NYHA class, renal insufficiency, hyponatremia, and respiratory tract infection. These findings reinforce the significance of ML approaches in facilitating risk stratification and informing tailored management methods in CHF. However, further extensive multicenter validation is required before this model can be adopted in routine clinical management.
6. Conclusion
This study developed and validated a machine learning model based on the Gradient Boosting Decision Tree (GBDT) to predict the risk of all-cause readmission within one year among patients with CHF. The model demonstrated a strong predictive performance in internal validation (AUC = 0.969). SHAP analysis identified NT-proBNP level, NYHA functional classification, respiratory tract infection, hyponatremia, and renal insufficiency as key predictors associated with readmission risk. These observations offer clinically promising insights that may support personalized patient management approaches. Given the single-center, retrospective design and limited sample size, further validation in large-scale, prospective studies is warranted before broader clinical application.
Guiding Scientific Research Project of Nantong Municipal Health Commission (2025)(MSZ2025007)