COMPARATIVE ANALYSIS OF LSTM, BILSTM, GRU, CNN, AND RNN FOR DEPRESSION DETECTION IN SOCIAL MEDIA
Abstract
The prevalence of mental health issues and the increasing use of social media provide an opportunity to leverage technology for early detection of depression. This study evaluates and compares five deep learning models, LSTM, BiLSTM, GRU, CNN, and RNN for detecting depressive tendencies from over 10,000 annotated social media messages. These models were trained on preprocessed data using standard techniques, including cleansing, tokenization, and padding. Evaluation metrics such as accuracy, precision, recall, and F1-score were utilized. BiLSTM emerged as the best-performing model with an accuracy of 98.45% and an F1-score of 96.37%, attributed to its bidirectional architecture for contextual analysis. In contrast, CNN achieved high precision (98.55%) but struggled with recall (15.14%), while RNN and GRU exhibited limitations in capturing complex patterns, with GRU showing no measurable performance. These findings establish BiLSTM as a robust tool for mental health monitoring. Future research could explore transformer-based models such as BERT or multilingual datasets for enhanced applicability.
Downloads
References
P. Kaushik, K. Bansal, and Y. Kumar, “Deep Learning in Mental Health: An In-Depth Analysis of Prediction Systems,” in 2023 International Conference on Communication, Security and Artificial Intelligence, ICCSAI 2023, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 364–369. doi: 10.1109/ICCSAI59793.2023.10421590.
S. F. C. Haviana and B. S. W. Poetro, “Deep Learning Model for Sentiment Analysis on Short Informal Texts,” Indonesian Journal of Electrical Engineering and Informatics, vol. 10, no. 1, 2022, doi: 10.52549/ijeei.v10i1.3181.
N. V. Babu and E. G. M. Kanaga, “Sentiment Analysis in Social Media Data for Depression Detection Using Artificial Intelligence: A Review,” 2022. doi: 10.1007/s42979-021-00958-1.
J. Yuan, X. Lu, Y. Liu, D. Shi, T. Pan, and Y. Li, “Depressive Tendency Recognition Using the Gated Recurrent Unit From Speech and Text Features,” in 2021 International Conference on Asian Language Processing, IALP 2021, 2021. doi: 10.1109/IALP54817.2021.9675265.
X. Hu, J. Shu, and Z. Jin, “Depression tendency detection model for Weibo users based on Bi-LSTM,” in 2021 IEEE International Conference on Artificial Intelligence and Computer Applications, ICAICA 2021, 2021. doi: 10.1109/ICAICA52286.2021.9497931.
A. Amanat et al., “Deep Learning for Depression Detection from Textual Data,” Electronics (Switzerland), vol. 11, no. 5, Mar. 2022, doi: 10.3390/electronics11050676.
D. Liu, X. L. Feng, F. Ahmed, M. Shahid, and J. Guo, “Detecting and Measuring Depression on Social Media Using a Machine Learning Approach: Systematic Review,” Mar. 01, 2022, JMIR Publications Inc. doi: 10.2196/27244.
K. M. Hasib, M. R. Islam, S. Sakib, M. A. Akbar, I. Razzak, and M. S. Alam, “Depression Detection From Social Networks Data Based on Machine Learning and Deep Learning Techniques: An Interrogative Survey,” IEEE Trans Comput Soc Syst, vol. 10, no. 4, pp. 1568–1586, Aug. 2023, doi: 10.1109/TCSS.2023.3263128.
W. Ma et al., “Detecting depression tendency based on deep learning and multi-sources data,” Biomed Signal Process Control, vol. 86, p. 105226, Sep. 2023, doi: 10.1016/J.BSPC.2023.105226.
V. D. Derbentsev, V. S. Bezkorovainyi, A. V. Matviychuk, O. M. Pomazun, A. V. Hrabariev, and A. M. Hostryk, “A comparative study of deep learning models for sentiment analysis of social media texts,” in CEUR Workshop Proceedings, 2023.
M. A. Alshamari, “Evaluating User Satisfaction Using Deep-Learning-Based Sentiment Analysis for Social Media Data in Saudi Arabia’s Telecommunication Sector,” Computers, vol. 12, no. 9, 2023, doi: 10.3390/computers12090170.
D. William and D. Suhartono, “Text-based Depression Detection on Social Media Posts: A Systematic Literature Review,” in Procedia Computer Science, Elsevier B.V., 2021, pp. 582–589. doi: 10.1016/j.procs.2021.01.043.
A. Onan and M. A. Tocoglu, “A Term Weighted Neural Language Model and Stacked Bidirectional LSTM Based Framework for Sarcasm Identification,” IEEE Access, vol. 9, pp. 7701–7722, 2021, doi: 10.1109/ACCESS.2021.3049734.
C. Wu, Y. Zhang, S. Lu, and G. Xu, “Short Text Sentiment Analysis Based on Multiple Attention Mechanisms and TextCNN-BiLSTM,” in ICEIEC 2023 - Proceedings of 2023 IEEE 13th International Conference on Electronics Information and Emergency Communication, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 124–128. doi: 10.1109/ICEIEC58029.2023.10199931.
Y. He, “BERT-CNN-BiLSTM: A Hybrid Deep Learning Model for Accurate Sentiment Analysis,” in 2023 IEEE 5th International Conference on Power, Intelligent Computing and Systems, ICPICS 2023, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 921–926. doi: 10.1109/ICPICS58376.2023.10235335.
Y. Cao, Y. Hao, B. Li, and J. Xue, “Depression prediction based on BiAttention-GRU,” J Ambient Intell Humaniz Comput, vol. 13, no. 11, pp. 5269–5277, Nov. 2022, doi: 10.1007/s12652-021-03497-y.
J. Philip Thekkekara, S. Yongchareon, and V. Liesaputra, “An attention-based CNN-BiLSTM model for depression detection on social media text,” Expert Syst Appl, vol. 249, Sep. 2024, doi: 10.1016/j.eswa.2024.123834.
H. Kour and M. K. Gupta, “An hybrid deep learning approach for depression prediction from user tweets using feature-rich CNN and bi-directional LSTM,” Multimed Tools Appl, vol. 81, no. 17, pp. 23649–23685, Jul. 2022, doi: 10.1007/s11042-022-12648-y.
W. Ying and H. Yufan, “Research on Sentiment Analysis of Travel Reviews Based on Word2Vec and RNN,” in 2023 IEEE International Conference on Electrical, Automation and Computer Engineering, ICEACE 2023, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 133–137. doi: 10.1109/ICEACE60673.2023.10442629.
A. S. Jaiswal, D. V. Bhavsagar, K. Dhole, S. Chaurasia, M. Daph, and S. Chourasia, “Sentiment Analysis of Election Result Prediction using Twitter Data by NLP and ML,” in 2024 International Conference on Innovations and Challenges in Emerging Technologies, ICICET 2024, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/ICICET59348.2024.10616319.
H. Zogan, I. Razzak, X. Wang, S. Jameel, and G. Xu, “Explainable depression detection with multi-aspect features using a hybrid deep learning model on social media,” World Wide Web, vol. 25, no. 1, pp. 281–304, Jan. 2022, doi: 10.1007/s11280-021-00992-2.
A. Ahmed et al., “Machine learning models to detect anxiety and depression through social media: A scoping review,” Computer Methods and Programs in Biomedicine Update, vol. 2, p. 100066, Jan. 2022, doi: 10.1016/J.CMPBUP.2022.100066.
J. Kim, J. Lee, E. Park, and J. Han, “A deep learning model for detecting mental illness from user content on social media,” Sci Rep, vol. 10, no. 1, Dec. 2020, doi: 10.1038/s41598-020-68764-y.
D. Hatta Fudholi, “Kinetik: Game Technology, Information System,” Mental Health Prediction Model on Social Media Data Using CNN-BiLSTM, vol. 9, no. 1, pp. 29–44, 2019.
Y. Wang, Q. Chen, and W. Wang, “Multi-task BERT for Aspect-based Sentiment Analysis,” in Proceedings - 2021 IEEE International Conference on Smart Computing, SMARTCOMP 2021, Institute of Electrical and Electronics Engineers Inc., Aug. 2021, pp. 383–385. doi: 10.1109/SMARTCOMP52413.2021.00077.
Copyright (c) 2024 Alam Muhammad Huda, Guruh Fajar Shidik, Vincentius Praskatama

This work is licensed under a Creative Commons Attribution 4.0 International License.