Predicting depression risk in middle-aged and elderly adults in China using CNN-BiLSTM-Attention mechanism and LSTM+SHAP framework - Shengxian Bi; Gang Li; Huawei Tan; Yingchun Chen; Dandan Guo (BMC Psychiatry)
Abstract Background Understanding the spatiotemporal characteristics of depression risk in middle-aged and elderly individuals is crucial for early identification and intervention. However, current research predominantly employs machine learning (ML) methods to predict depression risk, often overlooking the spatiotemporal heterogeneity of this risk. Methods This study utilized five waves of data from the China Health and Retirement Longitudinal Study (CHARLS) and constructed nine long short-term memory (LSTM) frameworks using CNN, BiLSTM, and Attention mechanisms to improve the accuracy and stability of depression risk prediction. Dynamic time windows were employed to handle time data sequences of inconsistent lengths, aligning with the structure of public databases. SHAP (SHapley Additive exPlanations) analysis was used to quantify and visualize the impact of each feature on the prediction results. Results Among the nine LSTM frameworks, the CNN-BiLSTM-Attention model demonstrated a potential improvement in predictive performance (AUC between 0.68 and 0.71). It also exhibited the highest stability during feature reduction (∆AUC = 0.0052). SHAP analysis for the LSTM and CNN-BiLSTM-Attention models identified health status and functionality as key factors influencing depression risk in middle-aged and elderly individuals, with pain, gender, sleep duration, and IADL (Instrumental Activities of Daily Living) being the most significant factors. Conclusions The LSTM + SHAP analysis framework showed significant application value in handling complex, high-dimensional spatiotemporal data. Future clinical interventions and public health policies should focus more on pain management and chronic disease management in middle-aged and elderly populations to reduce the risk of depression.