Abstract
BACKGROUND: Chronic heart failure (CHF) is frequently complicated by depression, which worsens prognosis but remains underdiagnosed due to symptom overlap and a lack of objective screening tools. Although biomarkers reflecting lipid metabolism, insulin resistance, inflammation, and neuro-immuno-endocrine imbalance have been implicated in both CHF and depression, their predictive value for psychiatric outcomes in CHF patients is unclear. AIM: This study aimed to develop and validate interpretable machine learning (ML) models for predicting depression risk in CHF patients via the use of clinical and biomarker data. METHODS: We retrospectively enrolled 3, 110 CHF patients admitted between January 2015 and December 2024 at Guang'anmen Hospital. Demographic, clinical, and laboratory indicators, including apolipoprotein B (ApoB), the triglyceride-glucose (TyG) index, and a novel glycated TyG (gTyG) index, were collected. Logistic regression and restricted cubic spline analyses were used to assess dose-response associations between biomarkers and depression. Eight ML algorithms were trained and evaluated, with model interpretability assessed via SHapley Additive exPlanation (SHAP). RESULTS: Among the 3, 110 patients, 37.3% had comorbid depression. Elevated ApoB and gTyG indices were strongly associated with depression risk in both the unadjusted and fully adjusted models (ApoB Q4 vs. Q1: OR 5.41, 95% CI 3.72-7.87; gTyG Q4 vs. Q1: OR 2.88, 95% CI 1.88-4.41; both P < 0.001), demonstrating clear nonlinear dose-response relationships. The TyG index was associated with depression in the crude analyses but lost significance after adjustment. Among the ML models, the RF model achieved the best performance (AUC 0.933 in training, accuracy 0.814, sensitivity 0.939). SHAP analysis revealed that the ApoB and gTyG indices were the most influential predictors. A user-friendly web application was developed for individualized risk prediction. CONCLUSION: This study demonstrated that the ApoB and gTyG index are robust biomarkers for predicting depression risk in CHF patients. The RF model provided the highest predictive accuracy and interpretability, highlighting its potential utility for early risk stratification and targeted intervention. The incorporation of these biomarkers into routine clinical practice may facilitate timely identification and management of depression in CHF patients, ultimately improving patient outcomes.