Implementation of IndoBERT Model in Predicting Anxiety Disorders from Comments on Social Media
DOI:
https://doi.org/10.31294/ji.v13i1.11213Keywords:
IndoBERT, Anxiety Disorders, Social Media, NLPAbstract
The development of social media as a means of emotional expression has opened up new opportunities in the early detection of mental health disorders, particularly anxiety disorders, which are still rarely analyzed using Indonesian-language computational approaches. To implement and evaluate IndoBERT model in detecting indications of anxiety disorders based on Indonesian-language social media comments. The method of study used an experimental quantitative approach with a total of 6,075 comments collected from Twitter, Instagram, and TikTok, which were classified into two categories: anxiety and normal. Pre-processing processes were carried out through text cleaning, slang normalization, and stopword removal before the IndoBERT model was trained using fine-tuning techniques for three epochs. Model performance was tested using accuracy, precision, recall, and F1- score metrics, and evaluated through confusion matrix analysis and k-fold cross-validation to ensure consistency of results. The results show that IndoBERT achieved 99.67% accuracy, 0.98 precision, 0.96 recall, and 0.97 F1-score in the anxiety class, with very low classification errors. This performance demonstrates that the model is able to effectively recognize linguistic patterns of anxiety despite data imbalance between classes. These findings confirm IndoBERT’s potential as a basis for developing a text-based early detection system for anxiety disorders in Indonesia. It is recommended for future studies to expand the data sources, add other psychological disorder categories, and compare performance with other algorithms to improve the model’s reliability.
Downloads
References
Ahmed, A., Aziz, S., Toro, C. T., Alzubaidi, M., Irshaidat, S., Serhan, H. A., Abd-alrazaq, A. A., & Househ, M. (2022). Machine learning models to detect anxiety and depression through social media: A scoping review. Computer Methods and Programs in Biomedicine Update, 2, 100066. https://doi.org/10.1016/j.cmpbup.2022.100066
Aprilia Hastuti, E., Widianti, E., & Aryani, Y. A. (2023). Pengaruh Penggunaan Media Sosial Twitter Terhadap Kesehatan Mental Emosional Pada Remaja. Jurnal Keperawatan ’Aisyiyah, 10(1), 1–9. https://doi.org/10.33867/jka.v10i1.353
Arif, M., Ameer, I., Bölücü, N., Sidorov, G., Gelbukh, A., & Elangovan, V. (2024). Mental Illness Classification on Social Media Texts Using Deep Learning and Transfer Learning. Computación y Sistemas, 28(2). https://doi.org/10.13053/cys-28-2-4873
Azzahra, S. A., & Majid, N. W. A. (2025). Klasifikasi dan Analisis Semantik Cyberbullying Sosial Media X: Integrasi Web Scraping dan Natural Language Processing (NLP). Jurnal Educatio FKIP UNMA, 11(2). https://doi.org/10.31949/educatio.v11i2.12725
Bangyal, W. H., Qasim, R., Rehman, N. ur, Ahmad, Z., Dar, H., Rukhsar, L., Aman, Z., & Ahmad, J. (2021). Detection of Fake News Text Classification on COVID-19 Using Deep Learning Approaches. Computational and Mathematical Methods in Medicine, 2021, 1–14. https://doi.org/10.1155/2021/5514220
Hayati, S. A., & Tohari, S. (2022). Cognitive Behavioral Therapy (CBT) dalam Menurunkan Social Anxiety Disorder (SAD) dan Obsessive Compulsive Disorder (OCD) Pada Remaja. Bulletin of Counseling and Psychotherapy, 4(2), 153–159. https://doi.org/10.51214/bocp.v4i2.163
Ilias, L., Mouzakitis, S., & Askounis, D. (2024). Calibration of Transformer-Based Models for Identifying Stress and Depression in Social Media. IEEE Transactions on Computational Social Systems, 11(2), 1979–1990. https://doi.org/10.1109/TCSS.2023.3283009
Jang, B., Kim, M., Harerimana, G., Kang, S., & Kim, J. W. (2020). Bi-LSTM Model to Increase Accuracy in Text Classification: Combining Word2vec CNN and Attention Mechanism. Applied Sciences, 10(17), 5841. https://doi.org/10.3390/app10175841
Juanita, S., Daeli, A. H., Syafrullah, M., Anggraeni, W., & Purnomo, M. H. (2025). A machine learning approach for text pattern diagnosis in mental health consultations. Decision Analytics Journal, 15, 100572. https://doi.org/10.1016/j.dajour.2025.100572
Kenwood, M. M., Kalin, N. H., & Barbas, H. (2022). The prefrontal cortex, pathological anxiety, and anxiety disorders. Neuropsychopharmacology, 47(1), 260–275. https://doi.org/10.1038/s41386-021-01109-z
Khalaf, A. M., Alubied, A. A., Khalaf, A. M., & Rifaey, A. A. (2023). The Impact of Social Media on the Mental Health of Adolescents and Young Adults: A Systematic Review. Cureus. https://doi.org/10.7759/cureus.42990
Mansoor, M., & Ansari, K. (2024). Early Detection of Mental Health Crises through Artificial-Intelligence-Powered Social Media Analysis: A Prospective Observational Study. Journal of Personalized Medicine, 14(9), 958. https://doi.org/10.3390/jpm14090958
Mutmainah, S. (2022). Kemungkinan Depresi Dari Postingan Pada Sosial Media. Jurnal Sains, Nalar, Dan Aplikasi Teknologi Informasi, 1(2). https://doi.org/10.20885/snati.v1i2.11
O’Day, E. B., & Heimberg, R. G. (2021). Social media use, social anxiety, and loneliness: A systematic review. Computers in Human Behavior Reports, 3, 100070. https://doi.org/10.1016/j.chbr.2021.100070
Prabowo, A., & Indra Sanjaya, F. (2024). Penerapan Metode Transfer Learning Pada Indobert Untuk Analisis Sentimen Teks Bahasa Jawa Ngoko Lugu. Simkom, 9(2), 205–217. https://doi.org/10.51717/simkom.v9i2.478
Prawira, A., Herry Chrisnanto, Y., & Kania Ningsih, A. (2024). Deteksi Kecemasan Di Twitter Menggunakan Fitur Word Embedding Bert Dan Metode Bidirectional-Long Short Term Memory. Jati (Jurnal Mahasiswa Teknik Informatika), 8(4), 7795–7800. https://doi.org/10.36040/jati.v8i4.10436
Rahmadika Putri Tresyani, Wahyu Utomo, D., & Maldini, N. (2025). Deteksi Dini Gangguan Kesehatan Mental dengan Model Bert dan Algoritma Xgboost. Infotekmesin, 16(1), 93–98. https://doi.org/10.35970/infotekmesin.v16i1.2535
Setyo Nugroho, K., Akbar, I., & Nizar Suksmawati, A. (2021a). Seminar Nasional Hasil Riset Prefix-RTR Deteksi Depresi Dan Kecemasan Pengguna Twitter Menggunakan Bidirectional Lstm.
Setyo Nugroho, K., Akbar, I., & Nizar Suksmawati, A. (2021b). Seminar Nasional Hasil Riset Prefix-RTR Deteksi Depresi Dan Kecemasan Pengguna Twitter Menggunakan Bidirectional LSTM.
Utami, M. P., Juniar, A., & Trisanto, D. (2023). Aplikasi C-Service Motor dengan Algoritma Artificial Neural Network Terintegrasi Sistem Pakar. Jurnal Eksplora Informatika, 13(1), 55–68. https://doi.org/10.30864/eksplora.v13i1.965
Vidya Chandradev, I Made Agus Dwi Suarjaya, & I Putu Agung Bayupati. (2023). Analisis Sentimen Review Hotel Menggunakan Metode Deep Learning BERT. Jurnal Buana Informatika, 14(02), 107–116. https://doi.org/10.24002/jbi.v14i02.7244
WHO. (2022). Mental disorders. WHO. https://www.who.int/news-room/fact-sheets/detail/mental-disorders (30 September 2025)
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Rekha Inaya Putri, Lathifah Alfat (Author)

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





