Depression Detection in Indonesian X Social Media Text using Convolutional Neural Networks and Long Short-Term Memory with TF- IDF and FastText Methods
DOI:
https://doi.org/10.52436/1.jutif.2025.6.2.4206Keywords:
CNN, Depression detection, FastText, LSTM, Social media, TF-IDFAbstract
Depression is a growing mental health issue in the modern era, with social media offering a unique opportunity for automated detection through text analysis. However, challenges such as unstructured language, ambiguity, and contextual complexity in social media text hinder accurate detection. This research aims to develop and evaluate a hybrid deep learning model to detect depression in Indonesian social media text. A data set of 50523 entries was obtained and cleaned and TF-IDF was used for feature extraction while FastText was used for feature expansion. The classification was done by using Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM), and a combination of both CNN and LSTM models and the performance of the models was measured using the accuracy, precision and recall scores. The experimental results showed that the LSTM model gave the best result in terms of accuracy which is 83.58%, the second best was the LSTM-CNN hybrid model with an accuracy of 83.20%. The current study thus provides a new approach for identifying depression in Indonesian language data and can be said to significantly advance the fields of informatics and computer science. It also shows how AI can be utilized in improving mental health practices and in designing better social media environments. The findings of this study contribute to the growing body of research on cross-cultural mental health detection and highlight the importance of developing language-specific machine learning models.
Downloads
References
C. D. Mathers and D. Loncar, “New projections of global mortality and burden of disease from 2002 to 2030 Protocol S1. Technical Appendix Major cause regressions,” PloS Med, vol. 3, no. 1, pp. 1–23, 2006, [Online]. Available: https://pubmed.ncbi.nlm.nih.gov/17132052/#:~:text=The proportion of deaths due,drugs reaches 80%25 by 2012.
Y. Zhang, C. Shaojun, T. Y. Akintunde, E. F. Okagbue, S. O. Isangha, and T. H. Musa, “Life course and mental health: a thematic and systematic review,” Front. Psychol., vol. 15, no. September, 2024, doi: 10.3389/fpsyg.2024.1329079.
A. Kupferberg and G. Hasler, “The social cost of depression: Investigating the impact of impaired social emotion regulation, social cognition, and interpersonal behavior on social functioning,” J. Affect. Disord. Reports, vol. 14, no. July, 2023, doi: 10.1016/j.jadr.2023.100631.
A. Zafar and S. Chitnis, “Survey of depression detection using social networking sites via data mining,” Proc. Conflu. 2020 - 10th Int. Conf. Cloud Comput. Data Sci. Eng., pp. 88–93, 2020, doi: 10.1109/Confluence47617.2020.9058189.
W. H. Organization, “Suicide worldwide in 2019,” 2019. [Online]. Available: https://www.who.int/teams/mental-health-and-substance-use/data-research/suicide-data.
J. I. Hlynsson and P. Carlbring, “Diagnostic accuracy and clinical utility of the PHQ-2 and GAD-2: a comparison with long-format measures for depression and anxiety,” Front. Psychol., vol. 15, no. May, pp. 1–12, 2024, doi: 10.3389/fpsyg.2024.1259997.
J. Robinson et al., “What Works in Youth Suicide Prevention? A Systematic Review and Meta- Analysis,” EClinicalMedicine, vol. 4–5, pp. 52–91, 2018, doi: 10.1016/j.eclinm.2018.10.004.
M. I. Mobin, A. F. M. Suaib Akhter, M. F. Mridha, S. M. Hasan Mahmud, and Z. Aung, “Social Media as a Mirror: Reflecting Mental Health through Computational Linguistics,” IEEE Access, vol. 12, no. September, pp. 130143–130164, 2024, doi:
1109/ACCESS.2024.3454292.
C. G. Davey and P. D. McGorry, “Early intervention for depression in young people: a blind spot in mental health care,” The Lancet Psychiatry, vol. 6, no. 3, pp. 267–272, 2019, doi: 10.1016/S2215-0366(18)30292-X.
Y. L. Chen et al., “Effectiveness of health checkup with depression screening on depression treatment and outcomes in middle-aged and older adults: a target trial emulation study,” Lancet Reg. Heal. - West. Pacific, vol. 43, p. 100978, 2024, doi: 10.1016/j.lanwpc.2023.100978.
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, 2023, doi: 10.1109/TCSS.2023.3263128.
L. Ansari, S. Ji, Q. Chen, and E. Cambria, “Ensemble Hybrid Learning Methods for Automated Depression Detection,” IEEE Trans. Comput. Soc. Syst., vol. 10, no. 1, pp. 211–219, 2023, doi: 10.1109/TCSS.2022.3154442.
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, vol. 81, no. 17. Multimedia Tools and Applications, 2022.
V. Tejaswini, K. S. Babu, and B. Sahoo, “Depression Detection from Social Media Text Analysis using Natural Language Processing Techniques and Hybrid Deep Learning Model,” ACM Trans. Asian Low-Resource Lang. Inf. Process., vol. 23, no. 1, 2024, doi: 10.1145/3569580.
Vandana, N. Marriwala, and D. Chaudhary, “A hybrid model for depression detection using deep learning,” Meas. Sensors, vol. 25, no. November 2022, p. 100587, 2023, doi: 10.1016/j.measen.2022.100587.
G. Muthukumar and J. Philip, “CNN-LSTM Hybrid Deep Learning Model for Remaining Useful Life Estimation,” pp. 38–53, 2024.
A. Halbouni, T. S. Gunawan, M. H. Habaebi, M. Halbouni, M. Kartiwi, and R. Ahmad, “CNN- LSTM: Hybrid Deep Neural Network for Network Intrusion Detection System,” IEEE Access, vol. 10, no. September, pp. 99837–99849, 2022, doi: 10.1109/ACCESS.2022.3206425.
A. Pandey, P. K. Mannepalli, M. Gupta, and S. Denmark, “A Deep Learning-based Hybrid CNN-LSTM Model for Location-Aware Web Service Recommendation,” Neural Process. Lett., vol. 56, no. 5, pp. 1–25, 2024, doi: 10.1007/s11063-024-11687-w.
P. K. Jain, V. Saravanan, and R. Pamula, “A Hybrid CNN-LSTM: A Deep Learning Approach for Consumer Sentiment Analysis Using Qualitative User-Generated Contents,” ACM Trans. Asian Low-Resource Lang. Inf. Process., vol. 20, no. 5, 2021, doi: 10.1145/3457206.
I. Kartika, F. H. Barmawi, and N. Yuningsih, “VISA : Journal of Visions and Ideas Kepemimpinan Ideal di Era Milenial VISA : Journal of Visions and Ideas,” Visa, vol. 4, no. 1,
pp. 104–113, 2024.
A. Ranjith Kumar, K. Aditya, S. Antony Joseph Raj, and V. Nandhakumar, “Depression Detection Using Optical Characteristic Recognition and Natural Language Processing in SNS,” 4th Int. Conf. Comput. Commun. Signal Process. ICCCSP 2020, 2020, doi: 10.1109/ICCCSP49186.2020.9315254.
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,” JMIR Ment. Heal., vol. 9, no. 3, pp. 1–18, 2022, doi: 10.2196/27244.
S. M. Cheok, L. M. Hoi, S. K. Tang, and R. Tse, “Crawling Parallel Data for Bilingual Corpus Using Hybrid Crawling Architecture,” Procedia Comput. Sci., vol. 198, no. 2021, pp. 122–127, 2021, doi: 10.1016/j.procs.2021.12.218.
Marshall1632, “Mental Health and Suicide Ideation Assement with Social Media,” 2022. https://github.com/marshall1632/Mental-health-and-suicide-ideation-assement-with-social- media-/tree/master/Dataset/data (accessed Nov. 02, 2024).
N. Vedula and S. Parthasarathy, “Emotional and linguistic cues of depression from social media,” ACM Int. Conf. Proceeding Ser., vol. Part F1286, pp. 127–136, 2017, doi: 10.1145/3079452.3079465.
L. Nahar, F. Alam, and K. S. Fairose, “Depression Level Detection Using CNN Approach from Tweet Data Depression level detection using CNN approach from Tweet data,” 2020.
V. Çetin and O. Yıldız, “A comprehensive review on data preprocessing techniques in data analysis,” Pamukkale Univ. J. Eng. Sci., vol. 28, no. 2, pp. 299–312, 2022, doi: 10.5505/pajes.2021.62687.
K. Maharana, S. Mondal, and B. Nemade, “A review: Data pre-processing and data augmentation techniques,” Glob. Transitions Proc., vol. 3, no. 1, pp. 91–99, 2022, doi: 10.1016/j.gltp.2022.04.020.
R. Lourdusamy and S. Abraham, “A Survey on Text Pre-processing Techniques and Tools,”
Int. J. Comput. Sci. Eng., vol. 06, no. 03, pp. 148–157, 2018, doi: 10.26438/ijcse/v6si3.148157.
H. U. Khan, S. Nasir, K. Nasim, D. Shabbir, and A. Mahmood, “Twitter trends: A ranking algorithm analysis on real time data,” Expert Syst. Appl., vol. 164, no. August 2019, p. 113990, 2021, doi: 10.1016/j.eswa.2020.113990.
E. F. Unsvåg and B. Gambäck, “The Effects of User Features on Twitter Hate Speech Detection,” 2nd Work. Abus. Lang. Online - Proc. Work. co-located with EMNLP 2018, no. 2012, pp. 75–85, 2018, doi: 10.18653/v1/w18-5110.
B. Edizel, A. Piktus, P. Bojanowski, R. Ferreira, E. Grave, and F. Silvestri, “Misspelling oblivious word embeddings,” NAACL HLT 2019 - 2019 Conf. North Am. Chapter Assoc. Comput. Linguist. Hum. Lang. Technol. - Proc. Conf., vol. 1, pp. 3226–3234, 2019, doi: 10.18653/v1/n19-1326.
H. V. Manalu and A. P. Rifai, “Detection of human emotions through facial expressions using hybrid convolutional neural network-recurrent neural network algorithm,” Intell. Syst. with Appl., vol. 21, no. January, p. 200339, 2024, doi: 10.1016/j.iswa.2024.200339.
Z. Wang, L. Chen, L. Wang, and G. Diao, “Recognition of Audio Depression Based on Convolutional Neural Network and Generative Antagonism Network Model,” IEEE Access, vol. 8, pp. 101181–101191, 2020, doi: 10.1109/ACCESS.2020.2998532.
Y. Zheng and Y. Ye, “Prediction of Cognitive-Behavioral Therapy using Deep Learning for the Treatment of Adolescent Social Anxiety and Mental Health Conditions,” Sci. Program., vol. 2022, 2022, doi: 10.1155/2022/3187403.
J. Singh, M. Wazid, D. P. Singh, and S. Pundir, “An embedded LSTM based scheme for depression detection and analysis,” Procedia Computer Science, vol. 215. pp. 166–175, 2022, doi: 10.1016/j.procs.2022.12.019.
B. Fatima, M. Amina, R. Nachida, and H. Hamza, “A mixed deep learning based model to early detection of depression,” J. Web Eng., vol. 19, no. 3–4, pp. 429–456, 2020, doi: 10.13052/jwe1540-9589.19344.
I. Barranco-Chamorro and R. M. Carrillo-García, “Techniques to deal with off-diagonal elements in confusion matrices,” Mathematics, vol. 9, no. 24, 2021, doi: 10.3390/math9243233.
F. Rahmad, Y. Suryanto, and K. Ramli, “Performance Comparison of Anti-Spam Technology Using Confusion Matrix Classification,” IOP Conf. Ser. Mater. Sci. Eng., vol. 879, no. 1, 2020, doi: 10.1088/1757-899X/879/1/012076.
J. H. M. D. Jurafsky, “N-Gram Language Models N-Gram Language Models,” 2020.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 KARINA KHAIRUNNISA PUTRI, Erwin Budi Setiawan

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