Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan IndoBERT
Abstract
Over the past few decades, mental disorders such as depression have increased and become a serious public health issue. Many affected individuals choose not to seek professional support due to social stigma. Social media platforms like X provide opportunities to study mental health on a large scale because users often share their personal experiences and emotions. However, there are challenges in understanding language patterns and context in posts, necessitating appropriate techniques and models to effectively detect potential depressions. Utilizing Natural Language Processing (NLP) techniques, this study analyzes 37,554 texts from social media posts to detect potential depressions. This study employs the IndoBERT model, an adaptation of BERT trained on Indonesian text data, to identify potential depression from social media texts. Data were collected through scrapping using negatively and positively connotated keywords, which were consulted with psychiatrists. The text pre-processing includes case folding, text cleaning, spell normalization, stopword removal and stemming. The data were then labeled using the IndoBERT emotion classification model, categorizing negative emotions as depression and positive emotions as normal. The model was trained and evaluated using accuracy, precision, recall, and F1-score metrics, with the best results showing an accuracy of 94.91%, precision of 94.91%, recall of 94.91%, and an F1-score of 94.91%. The results indicate that the IndoBERT model is effective in detecting potential depression from social media texts. However, there are limitations due to the reliance on social media posts, which may not fully reflect the users’ emotional conditions.
Downloads
References
R. Ding and Y. Sun, “Detecting Depression in Social Media using Machine Learning,” Academy and Industry Research Collaboration Center (AIRCC), Jul. 2022, pp. 277–291. doi: 10.5121/csit.2022.121223.
World Health Organization, “Depressive disorder (depression),” World Health Organization. Accessed: Jul. 04, 2024. [Online]. Available: https://www.who.int/news-room/fact-sheets/detail/depression
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.
A. Del Casale, C. Zocchi, G. D. Kotzalidis, F. Fiaschè, and P. Girardi, “Prevention of Depression in Children, Adolescents, and Young Adults: The Role of Teachers and Parents,” Psychiatry International, vol. 2, no. 3, pp. 353–364, Sep. 2021, doi: 10.3390/psychiatryint2030027.
F. Apriliani and W. Maharani, “DEPRESSION DETECTION ON SOCIAL MEDIA TWITTER USING XLNET METHOD,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 8, no. 1, pp. 172–180, Feb. 2023, doi: 10.29100/jipi.v8i1.3345.
A. Annadurai, P. Anand, S. R. Madhavan, and V. R. S. M, “Deep Learning for Detecting Depression: Unveiling Emotional Distress from Tweets,” in 2023 7th International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), 2023, pp. 848–855. doi: 10.1109/I-SMAC58438.2023.10290160.
M. R. Febriansyah, Nicholas, R. Yunanda, and D. Suhartono, “Stress detection system for social media users,” in Procedia Computer Science, Elsevier B.V., 2022, pp. 672–681. doi: 10.1016/j.procs.2022.12.183.
S. Islam et al., “A Comprehensive Survey on Applications of Transformers for Deep Learning Tasks,” Jun. 2023, [Online]. Available: http://arxiv.org/abs/2306.07303
A. Roethel, M. Ganzha, and A. Wróblewska, “Enriching language models with graph-based context information to better understand textual data,” May 2023, [Online]. Available: http://arxiv.org/abs/2305.11070
F. Koto, A. Rahimi, J. H. Lau, and T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP,” Online. [Online]. Available: https://huggingface.co/
F. Darmawan, M. Joe, Y. I. Kurniawan, and L. Afuan, “Analisis Sentimen Kemungkinan Depresi dan Kecemasan pada Twitter Menggunakan Support Vector Machine,” Jurnal Eksplora Informatika, vol. 13, no. 1, pp. 24–36, Sep. 2023, doi: 10.30864/eksplora.v13i1.854.
Ivan Dwi Nugraha and Y. Azhar, “Deteksi Depresi Pengguna Twitter Indonesia Menggunakan LSTM-RNN,” Jurnal Nasional Pendidikan Teknik Informatika (JANAPATI), vol. 11, no. 3, pp. 320–329, Dec. 2022, doi: 10.23887/janapati.v11i3.50674.
K. Setyo Nugroho, I. Akbar, and A. Nizar Suksmawati, “Seminar Nasional Hasil Riset Prefix-RTR DETEKSI DEPRESI DAN KECEMASAN PENGGUNA TWITTER MENGGUNAKAN BIDIRECTIONAL LSTM,” 2021.
A. A. Khaparde, R. Das, and R. Bhargava, “Transformer Based Approach for Depression Detection,” in Proceedings - International Conference on Developments in eSystems Engineering, DeSE, Institute of Electrical and Electronics Engineers Inc., 2023, pp. 369–374. doi: 10.1109/DeSE58274.2023.10099629.
Mohammad Kaosain Akbar and Sk. Musfique Ahmed, “A Systematic Review on Strategies of Depression Detection from Social Media,” international journal of engineering technology and management sciences, vol. 6, no. 5, pp. 885–897, Sep. 2022, doi: 10.46647/ijetms.2022.v06i05.136.
N. Nofiyani and W. Wulandari, “Implementasi Electronic Data Processing Untuk meningkatkan Efektifitas dan Efisiensi Pada Text Mining,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 6, no. 3, p. 1621, Jul. 2022, doi: 10.30865/mib.v6i3.4332.
S. Sarica and J. Luo, “Stopwords in Technical Language Processing,” Jun. 2020, doi: 10.1371/journal.pone.0254937.
S. Islam and L. Zhang, “A Review on BERT: Language Understanding for Different Types of NLP Task,” 2024, doi: 10.20944/preprints202401.1857.v1.
Towards AI, “Understanding BERT,” Towards AI. Accessed: Jul. 03, 2024. [Online]. Available: https://towardsai.net/p/nlp/understanding-bert
P. Jain, W. Quamer, R. Pamula, and V. Saravanan, “SpSAN: Sparse self-attentive network-based aspect-aware model for sentiment analysis,” J Ambient Intell Humaniz Comput, vol. 14, Aug. 2021, doi: 10.1007/s12652-021-03436-x.
T. Wolf et al., “Transformers: State-of-the-Art Natural Language Processing.” [Online]. Available: https://github.com/huggingface/
B. Wilie et al., “IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding,” Sep. 2020, [Online]. Available: http://arxiv.org/abs/2009.05387
C. Sun, X. Qiu, Y. Xu, and X. Huang, “How to Fine-Tune BERT for Text Classification?,” May 2019, [Online]. Available: http://arxiv.org/abs/1905.05583
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan IndoBERT
Pages: 649-661
Copyright (c) 2024 Gilbert Fernando Situmorang, Ronsen Purba

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).