Early Detection for Depression in Indonesian Social Media Text with IndoBERT
DOI:
https://doi.org/10.32493/jiup.v11i2.58892Keywords:
Depression, Fine-Tuning, IndoBERT, Text-Classification, Twitter MiningAbstract
Depression has led to many cases of suicide across the world. Hence, early screenings are needed to provide the right medical treatments. Recent studies have attempted to use social media text which have become an integral part of people's daily lives to early detect depression, since users primarily post and express their thoughts in the form of text or media that reflect their current mental state. This study aims to fine-tune the pre-trained IndoBERT model on labeled Indonesian social media texts from X (previously Twitter) for binary depression-related text classification. The dataset used in this study, "Depression and Anxiety in Twitter (ID)," consists of 2,201 labeled texts on train set and 550 labeled texts on test set. Several evaluation criteria such as recall, precision, F1-score, and accuracy were used on an unseen test set to calculate how well the model performed. The results show that the IndoBERT model achieved an overall accuracy of 86% and a 74.75% F1-score in identifying the depressed class, notably achieving a strong precision score of 79.17%. These findings show the potential of IndoBERT fine-tuning for Indonesian text-based depression-related classification while highlighting the need for further improvements and validation.
References
Katalog Data, “Katalog Data - Layanan Permintaan Data | Kementerian Kesehatan RI.” Accessed: Aug. 02, 2026. [Online]. Available: https://layanandata.kemkes.go.id/katalog-data/ski/ketersediaan-data/ski-2023
D. William and D. Suhartono, “Text-based Depression Detection on Social Media Posts: A Systematic Literature Review,” Procedia Computer Science, vol. 179, pp. 582–589, Jan. 2021, https://doi.org/10.1016/j.procs.2021.01.043
F. I. Kurniadi, N. L. P. S. P. Paramita, E. F. A. Sihotang, M. S. Anggreainy, and R. Zhang, “BERT and RoBERTa Models for Enhanced Detection of Depression in Social Media Text,” Procedia Computer Science, vol. 245, pp. 202–209, Jan. 2024, https://doi.org/10.1016/j.procs.2024.10.244
C. Lin et al., “SenseMood: Depression Detection on Social Media,” in Proceedings of the 2020 International Conference on Multimedia Retrieval, in ICMR ’20. New York, NY, USA: Association for Computing Machinery, Jun. 2020, pp. 407–411. https://doi.org/10.1145/3372278.3391932
C. Xin and L. Q. Zakaria, “Integrating Bert With CNN and BiLSTM for Explainable Detection of Depression in Social Media Contents,” IEEE Access, vol. 12, pp. 161203–161212, 2024, https://doi.org/10.1109/ACCESS.2024.3488081
N. V. Babu and E. G. M. Kanaga, “Sentiment Analysis in Social Media Data for Depression Detection Using Artificial Intelligence: A Review,” SN COMPUT. SCI., vol. 3, no. 1, p. 74, Nov. 2021, https://doi.org/10.1007/s42979-021-00958-1
S. P. Devika, M. R. Pooja, M. S. Arpitha, and R. Vinayakumar, “BERT-Based Approach for Suicide and Depression Identification,” in Proceedings of Third International Conference on Advances in Computer Engineering and Communication Systems, A. B. Reddy, S. Nagini, V. E. Balas, and K. S. Raju, Eds., Singapore: Springer Nature, 2023, pp. 435–444. https://doi.org/10.1007/978-981-19-9228-5_36
M. Pota, M. Ventura, H. Fujita, and M. Esposito, “Multilingual evaluation of pre-processing for BERT-based sentiment analysis of tweets,” Expert Systems with Applications, vol. 181, p. 115119, Nov. 2021, https://doi.org/10.1016/j.eswa.2021.115119
L. A. Widjayanto and E. B. Setiawan, “Depression Detection using Convolutional Neural Networks and Bidirectional Long Short-Term Memory with BERT variations and FastText Methods,” Jurnal Teknik Informatika (Jutif), vol. 6, no. 3, pp. 1555–1568, Jun. 2025, https://doi.org/10.52436/1.jutif.2025.6.3.4874
A. Raj, Z. Ali, S. Chaudhary, K. K. Bali, and A. Sharma, “Depression Detection Using BERT on Social Media Platforms,” in 2024 IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET), Aug. 2024, pp. 228–233. https://doi.org/10.1109/IICAIET62352.2024.10730329
I. R. Hidayat and W. Maharani, “General Depression Detection Analysis Using IndoBERT Method,” International Journal on Information and Communication Technology (IJoICT), vol. 8, no. 1, pp. 41–51, Aug. 2022, https://doi.org/10.21108/ijoict.v8i1.634
A. S. Rizky and E. Y. Hidayat, “Emotion Classification in Indonesian Text Using IndoBERT,” Computer Engineering and Applications Journal, vol. 14, no. 1, pp. 1–11, Feb. 2025, https://doi.org/10.18495/comengapp.v14i1.494
S. S. Wibisono, M. A. Ulinuha, and S. Nur’aini, “Text Mining for Classifying Potentially Depressive Tweets on X Using IndoBERT,” J Statistika: Jurnal Ilmiah Teori dan Aplikasi Statistika, vol. 18, no. 2, pp. 1073–1085, Dec. 2025, https://doi.org/10.36456/jstat.vol18.no2.a10873
G. H. Martono and N. Sulistianingsih, “Fine-tuning Transformer Models for Emotion Detection in Indonesian Tweets Indicating Depression,” Vietnam J. Comp. Sci., pp. 1–22, Nov. 2025, https://doi.org/10.1142/S2196888825500253
G. F. Situmorang and R. Purba, “Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan IndoBERT,” Building of Informatics, Technology and Science (BITS), vol. 6, no. 2, pp. 649–661, Sep. 2024, https://doi.org/10.47065/bits.v6i2.5496
S. Hans, “Depression and Anxiety in Twitter (ID),” Kaggle. Accessed: Feb. 01, 2026. [Online]. Available: https://www.kaggle.com/datasets/stevenhans/depression-and-anxiety-in-twitter-id
A. F. Tatang and M. H. Assidiqi, “Comparative Analysis of Bidirectional Encoder Representations from Transformers Models for Twitter Sentiment Classification using Text Mining on Streamlit,” Jurnal Ilmu Komputer dan Informatika, vol. 5, no. 2, pp. 127–142, Dec. 2025, https://doi.org/10.54082/jiki.307.
J. Huang et al., “Incorporating emoji sentiment information into a pre-trained language model for Chinese and English sentiment analysis,” Intelligent Data Analysis, vol. 28, no. 6, pp. 1601–1625, Nov. 2024, https://doi.org/10.3233/IDA-230864
A. Bustamin, A. A. Prayogi, D. Siswanto, M. Rafrin, and A. Nurdin, “Text Normalization for Indonesian Slang Words in Sentiment Analysis Development,” ICIC Express Letters, Part B: Applications, vol. 16, no. 2, pp. 121–129, Feb. 2025, https://doi.org/10.24507/icicelb.16.02.121.
F. Koto, A. Rahimi, J. H. Lau, and T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP,” in Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain (Online): International Committee on Computational Linguistics, Dec. 2020, pp. 757–770. https://doi.org/10.18653/v1/2020.coling-main.66
J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” May 24, 2019, arXiv: arXiv:1810.04805. https://doi.org/10.48550/arXiv.1810.04805.
B. Wilie et al., “IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding,” in Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing, K.-F. Wong, K. Knight, and H. Wu, Eds., Suzhou, China: Association for Computational Linguistics, Dec. 2020, pp. 843–857. https://doi.org/10.18653/v1/2020.aacl-main.85.
A. Vaswani et al., “Attention is All you Need,” in Advances in Neural Information Processing Systems, Curran Associates, Inc., 2017. Accessed: Feb. 28, 2026. [Online]. Available: https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html
F. Muftie and M. Haris, “IndoBERT Based Data Augmentation for Indonesian Text Classification,” in 2023 International Conference on Information Technology Research and Innovation (ICITRI), Aug. 2023, pp. 128–132. https://doi.org/10.1109/ICITRI59340.2023.10250061
C. Sun, X. Qiu, Y. Xu, and X. Huang, “How to Fine-Tune BERT for Text Classification?,” in Chinese Computational Linguistics, M. Sun, X. Huang, H. Ji, Z. Liu, and Y. Liu, Eds., Cham: Springer International Publishing, 2019, pp. 194–206. https://doi.org/10.1007/978-3-030-32381-3_16
T. Wolf et al., “Transformers: State-of-the-Art Natural Language Processing,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, Q. Liu and D. Schlangen, Eds., Online: Association for Computational Linguistics, Oct. 2020, pp. 38–45. https://doi.org/10.18653/v1/2020.emnlp-demos.6
A. Vaswani et al., “Attention is All you Need,” Advances in Neural Information Processing Systems, vol. 30, pp. 5998–6008, 2017.
Downloads
Published
Issue
Section
Categories
License
Copyright (c) 2026 Ninda Khoirunnisa, Sheraton Pawestri

This work is licensed under a Creative Commons Attribution-NonCommercial 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 a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) that allows others to share the work with an acknowledgement 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 acknowledgement 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 (See The Effect of Open Access).
Jurnal Informatika Universitas Pamulang have CC-BY-NC or an equivalent license as the optimal license for the publication, distribution, use, and reuse of scholarly work.
In developing strategy and setting priorities, Jurnal Informatika Universitas Pamulang recognize that free access is better than priced access, libre access is better than free access, and libre under CC-BY-NC or the equivalent is better than libre under more restrictive open licenses. We should achieve what we can when we can. We should not delay achieving free in order to achieve libre, and we should not stop with free when we can achieve libre.
Jurnal Informatika Universitas Pamulang is licensed under a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
YOU ARE FREE TO:
- Share : copy and redistribute the material in any medium or format
- Adapt : remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms

