# Factors linked to depressive symptoms in obsessive-compulsive disorder: a machine learning and network analysis from China OCD Cohort (COCC)

**Authors:** Yu Wu, Jieling Xu, Huan Zhang, Ping Zhou, Chenchen Shao, Xiaolu Zhang, Wenxin Tang, Qianqian Li, Jun Yan, Si Mi, Zhanjiang Li, Bin Li, Guiyun Xu, Congwen Yang, Maorong Hu, Zhenqing Zhang, Yanbin Jia, Zhen Tang, XiaoPing Wang, Jun Ma, Changhong Wang, Wei Liu, Na Liu

PMC · DOI: 10.1186/s12888-026-07854-z · BMC Psychiatry · 2026-01-31

## TL;DR

This study explores how depressive symptoms in obsessive-compulsive disorder are linked to features like anxiety and psychosocial functioning using machine learning and network analysis.

## Contribution

The study introduces an integrative framework combining machine learning and network analysis to identify and map key features associated with depressive symptoms in OCD.

## Key findings

- Anxiety, psychosocial functioning, and mental state were the strongest predictors of depressive symptoms in OCD.
- Network analysis revealed anxiety as a central and bridging feature among emotional, cognitive, and functional domains.
- XGBoost and SHAP analyses identified key features contributing to depressive symptom risk in OCD patients.

## Abstract

Depressive symptoms are highly prevalent in individuals with obsessive-compulsive disorder (OCD) and substantially complicate clinical management. However, the feature structure associated with depressive symptoms in OCD remains insufficiently characterized, particularly from an integrative, multivariate perspective. This study aimed to identify key features associated with depressive symptoms in OCD and to elucidate their interrelationships using machine learning and network analysis.

A multicenter sample of 1,293 patients with OCD was recruited from 15 specialized OCD clinics across China. An extreme gradient boosting (XGBoost) model was developed to predict depressive symptoms, with hyperparameter optimization conducted using Optuna and feature contributions quantified via SHAP values. Multivariable logistic regression was used to examine independent associations, and network analysis was applied to explore the co-occurrence structure among key features.

The XGBoost model identified anxiety, psychosocial functioning, mental state, obsessing, functional impairment, perceived stress, and gender as the most informative features associated with depressive symptoms in OCD. SHAP analyses indicated that higher anxiety levels, poorer psychosocial functioning, and a more negative self-rated mental state contributed most strongly to increased predicted risk. Network analysis further demonstrated that anxiety, mental state, obsessing, and psychosocial functioning occupied central positions within the network. Anxiety showed prominent bridging properties, exhibiting strong associations with obsessing, perceived stress, and mental state, suggesting its integrative role across emotional, cognitive, and functional domains.

Depressive symptoms in OCD are embedded within a tightly interconnected configuration of emotional, cognitive, and functional features, with anxiety occupying a central and bridging position across analytical approaches. The combined application of machine learning and network analysis provides a complementary framework for identifying salient features and elucidating their interrelationships in OCD patients with depressive symptoms, with potential implications for clinical assessment and targeted intervention.

The online version contains supplementary material available at 10.1186/s12888-026-07854-z.

## Linked entities

- **Diseases:** obsessive-compulsive disorder (MONDO:0008114)

## Full-text entities

- **Diseases:** depressive symptoms (MESH:D003866), OCD (MESH:D009771)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12922223/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12922223/full.md

## References

4 references — full list in the complete paper: https://tomesphere.com/paper/PMC12922223/full.md

---
Source: https://tomesphere.com/paper/PMC12922223