Skip to main content
Log in

A hybrid depression detection model and correlation analysis for social media based on attention mechanism

  • Original Article
  • Published:
International Journal of Machine Learning and Cybernetics Aims and scope Submit manuscript

Abstract

As a serious mental illness, depression can be extremely harmful to the physical and mental health of individuals. However, detecting depression can be challenging due to the reluctance of the depressed to actively express themselves. Fortunately, in modern society, online social platforms provide an opportunity for genuine self-expression in our daily lives. Leveraging the power of social data, we can identify potentially depressed users efficiently and accurately. This lays a strong foundation for subsequent interventions. In this paper, we propose a hybrid model that comprehensively considers the features and post texts of users by utilizing a simplified multi-head attention mechanism for detecting user depression. Compared to traditional models, such as Decision Tree and Random Forest, the simplified multi-head attention mechanism achieves higher classification accuracy while offering enhanced interpretability at the individual level. To verify the validity of our model, we apply it to the Weibo User Depression Detection Dataset (WU3D) containing approximately 1,150,000 posts from around 21,000 users. The dataset has been classified by human experts as either depressed or not. The results show that our model both explains the association of each feature of a single user well and achieves better performance than traditional methods. Notably, the final F1-score of our new model on the test set is 0.9473. Furthermore, by visualizing attention scores, we conduct a correlation analysis between different features and results for individual users, which can facilitate further analysis of the behavior and psychological characteristics of specific depressed users by professionals.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Data availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

References

  1. Depression W (2017) Other common mental disorders: global health estimates. Geneva: World Health Organization 24

  2. Orsolini L, Latini R, Pompili M et al (2020) Understanding the complex of suicide in depression: from research to clinics. Psychiatry Investig 17(3):207

    Article  Google Scholar 

  3. Orehek E, Human LJ (2017) Self-expression on social media: do tweets present accurate and positive portraits of impulsivity, self-esteem, and attachment style? Personality Soc Psychol Bull 43(1):60–70

    Article  Google Scholar 

  4. Xia H, Liu J, Zhu H (2011) A comparative study on key technologies of the chinese sentiment classification preprocessing. J Inform 30:160–163

    Google Scholar 

  5. Orabi AH, Buddhitha P, Orabi MH, et al (2018) Deep learning for depression detection of twitter users. In: Proceedings of the fifth workshop on computational linguistics and clinical psychology: from keyboard to clinic, pp 88–97

  6. Kumnunt B, Sornil O (2020) Detection of depression in thai social media messages using deep learning. In: DeLTA, pp 111–118

  7. Poświata R, Perełkiewicz M (2022) Opi@ lt-edi-acl2022: Detecting signs of depression from social media text using roberta pre-trained language models. In: Proceedings of the Second Workshop on Language Technology for Equality, Diversity and Inclusion, pp 276–282

  8. Maxim S, Ignatiev N, Smirnov I (2020) Predicting depression with social media images. Proc Int Conf Pattern Recognit Appl Methods 2:128–138

    Google Scholar 

  9. Poria S, Cambria E, Bajpai R et al (2017) A review of affective computing: from unimodal analysis to multimodal fusion. Inform Fusion 37:98–125

    Article  Google Scholar 

  10. Wang Y, Wang Z, Li C, et al (2020) A multimodal feature fusion-based method for individual depression detection on sina weibo. In: 2020 IEEE 39th International Performance Computing and Communications Conference (IPCCC), IEEE, pp 1–8

  11. Lyu S, Ren X, Du Y et al (2023) Detecting depression of chinese microblog users via text analysis: Combining linguistic inquiry word count (liwc) with culture and suicide related lexicons. Front Psych 14:1121583

    Article  Google Scholar 

  12. Men X, Wei R, Wu X (2020) Analysis and detection of language and behavior characteristics of depression in social network. J Mod Inf 40(06):76–87

    Google Scholar 

  13. Liu D, Qiu J, Wan C et al (2018) Feasibility of detecting depressive users using quasi-private social text. J Chin Inform Process 32:93–102

    Google Scholar 

  14. Liaw AS, Chua HN (2022) Depression detection on social media with user network and engagement features using machine learning methods. In: 2022 IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET), IEEE, pp 1–6

  15. Shuotian B, Bibo H, Ang L et al (2014) Depression and anxiety prediction on microblogs. J Univ Chin Acad Sci 31(6):814

    Google Scholar 

  16. Xiong X, Chen X, Liu Y et al (2018) Research on psychological depression symptom detection based on behavior data. Mod Electr Tech 41:121–124. https://doi.org/10.16652/j.issn.1004-373x.2018.24.030

    Article  Google Scholar 

  17. Islam MR, Kabir MA, Ahmed A et al (2018) Depression detection from social network data using machine learning techniques. Health Inform Sci Syst 6:1–12

    Google Scholar 

  18. Musleh DA, Alkhales TA, Almakki RA et al (2022) Twitter arabic sentiment analysis to detect depression using machine learning. Comput Mater Contin 71(2):3463

    Google Scholar 

  19. Putri AM, Wijaya K, Salomo OA et al (2022) A review paper: accuracy of machine learning for depression detection in social media. 2022 IEEE International Conference on Communication. Networks and Satellite (COMNETSAT), IEEE, pp 39–45

    Google Scholar 

  20. Almars AM (2022) Attention-based bi-lstm model for arabic depression classification. Comput Mater Cont 71(2):3463

    Google Scholar 

  21. Ren L, Lin H, Xu B et al (2021) Depression detection on reddit with an emotion-based attention network: algorithm development and validation. JMIR Med Inform 9(7):e28754

    Article  Google Scholar 

  22. Li Z, An Z, Cheng W et al (2023) Mha: a multimodal hierarchical attention model for depression detection in social media. Health Inform Sci Syst 11(1):6

    Article  Google Scholar 

  23. Devlin J, Chang MW, Lee K, et al (2018) Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805

  24. González-Carvajal S, Garrido-Merchán EC (2020) Comparing bert against traditional machine learning text classification. arXiv preprint arXiv:2005.13012

  25. Lan Z, Chen M, Goodman S, et al (2019) Albert: A lite bert for self-supervised learning of language representations. arXiv preprint arXiv:1909.11942

  26. Yang Z, Yang D, Dyer C, et al (2016) Hierarchical attention networks for document classification. In: Proceedings of the 2016 conference of the North American chapter of the association for computational linguistics: human language technologies, pp 1480–1489

  27. Vaswani A, Shazeer N, Parmar N et al (2017) Attention is all you need. Adv Neural Inform Process Syst. https://doi.org/10.1109/ICASSP.2019.8683634

    Article  Google Scholar 

  28. Zang G, Kong X, Zhang K, et al (2021) Research on social network willingness of users to self-disclosure: A case of sina microblog. Library and Information Service 16

  29. Yang Z, Dai Z, Yang Y, et al (2019) Xlnet: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems 32

  30. Pandey A, Wang D (2019) Tcnn: Temporal convolutional neural network for real-time speech enhancement in the time domain. ICASSP 2019–2019 IEEE International Conference on Acoustics. Speech and Signal Processing (ICASSP), IEEE, pp 6875–6879

    Google Scholar 

Download references

Acknowledgements

The authors would like to express gratitude to all individuals who contribute open-source materials on the Internet, with special thanks to the providers of the WU3D dataset used in this article, which is available for access at https://github.com/aidenwang9867/Weibo-User-Depression-Detection-Dataset. We also extend our gratitude to the providers of the initial pre-trained models. The pre-trained models used in this paper can be found at https://github.com/brightmart/albert_zh.

Funding

The study was supported by a grant from the Shanghai Chenguang Scholar Project (17CG30) and Shanghai Pujiang Talent Program (2021PJC031) to Dr. Chen.

Author information

Authors and Affiliations

Authors

Contributions

JL, FD; Methodology, formal analysis and investigation: JL, FD; Writing - original draft preparation: JL; Writing - review and editing: WC, LW, JL; Funding acquisition: WC; Supervision: WC.

Corresponding author

Correspondence to Wanzhen Chen.

Ethics declarations

Conflict of interest

The authors have no competing interests to declare that are relevant to the content of this article.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, J., Chen, W., Wang, L. et al. A hybrid depression detection model and correlation analysis for social media based on attention mechanism. Int. J. Mach. Learn. & Cyber. (2023). https://doi.org/10.1007/s13042-023-02053-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s13042-023-02053-8

Keywords

Navigation