Exploration of comorbidity mechanisms between chronic pain and depression: Machine learning prediction models and SHAP interpretability analysis based on the CHARLS cohort - Tao-Ming Dai; Jie Yuan; Yue-Yang Ma; Jun-Jun Liu (PLoS ONE, 2026)
Introduction With rapid population aging in China, depression among middle-aged and older adults has become a major public health concern. Chronic pain and sociodemographic factors are closely associated with depressive symptoms, yet their combined and heterogeneous effects are difficult to capture using traditional analytical approaches. Interpretable machine learning provides a framework to explore depression-related risk patterns within a biopsychosocial perspective. Methods Data were obtained from seven waves of the China Health and Retirement Longitudinal Study (CHARLS, 2011–2020), including 38,970 adults aged 45 years and older. Depressive symptoms were assessed using the 10-item Center for Epidemiologic Studies Depression Scale (CES-D-10). Predictors covering sociodemographic characteristics, lifestyle factors, and pain at specific anatomical sites were selected using LASSO regression and recursive feature elimination. Seven machine learning models—logistic regression, Bernoulli and Gaussian Naive Bayes, support vector machine (SVM), random forest, extreme gradient boosting (XGBoost), and k-nearest neighbors—were developed and evaluated using accuracy, area under the receiver operating characteristic curve (AUC), precision, recall, and F1-score. Model interpretability was assessed using SHapley Additive exPlanations (SHAP). Results Chronic pain, particularly involving the lower limbs and spine, showed a strong association with depressive status. Model accuracy ranged from 61.6% to 71.9%, with AUC values between 0.61 and 0.72. SVM and Gaussian Naive Bayes demonstrated relatively better overall discrimination, though sensitivity for depressive cases remained limited. SHAP analysis identified lower limb pain and a nonlinear association with body mass index as key contributors to depression risk prediction. Discussion Integrating interpretable machine learning with a biopsychosocial framework highlights the dominant role of pain-related features in depression risk patterns among older adults. Given limited sensitivity for depressive case identification, these models are more suitable for population-level risk exploration than direct clinical screening.