Indonesian Social Media Text Classification for Mental Health Risk Detection Using Bidirectional LSTM
Keywords:
Bidirectional LSTM; Mental Health Detection; Indonesian Social Media; Text Classification; Deep Learning; Health Informatics
Abstract
Mental health disorders, particularly depression and anxiety, have become increasingly prevalent in Indonesia, affecting millions of individuals across all age groups. However, limited access to mental health professionals and persistent social stigma frequently prevent timely early detection and intervention. Social media platforms serve as digital diaries where Indonesian users express their emotional states, presenting a unique opportunity for automated mental health risk screening. This study proposes a deep learning approach using Bidirectional Long Short-Term Memory (BiLSTM) for classifying Indonesian social media text into three mental health risk categories: Normal (low risk), Depression (high risk), and Anxiety (moderate risk). Unlike standard LSTM, which processes text in a single direction, BiLSTM captures contextual information from both forward and backward directions — a critical advantage for understanding nuanced expressions in Indonesian informal language. A dataset of 1,488 Indonesian text samples (500 Normal, 494 Depression, 494 Anxiety) was collected from Twitter and labeled by expert annotators with an inter-annotator agreement (Cohen's Kappa) of 0.87. Comprehensive text preprocessing was applied, including case folding, noise removal, stopword elimination using NLTK, and stemming using Sastrawi. The proposed BiLSTM model was evaluated against three baseline methods: Naïve Bayes, Support Vector Machine (SVM), and standard LSTM. Experimental results demonstrate that BiLSTM achieves superior performance with 87.5% accuracy, 86.8% precision, 86.2% recall, and 86.5% F1-score, outperforming standard LSTM by 4.2% and SVM by 12.1%. A desktop application with a graphical user interface was developed for practical deployment, featuring real-time detection, confidence scoring, and prediction history logging. This research contributes an effective, reproducible, and deployable deep learning-based screening tool for mental health risk detection from Indonesian social media text.
Downloads
References
[2] Kementerian Kesehatan, “Survei Kesehatan Indonesia,” 2023.
[3] D. Reportal, “DIGITAL 2024,” 2024.
[4] T. Mikolov, G. Corrado, K. Chen, and J. Dean, “Efficient Estimation of Word Representations in Vector Space,” pp. 1–12, 2013, [Online]. Available: https://arxiv.org/abs/1301.3781
[5] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” vol. 9, no. 8, pp. 1–32, 1997, [Online]. Available: https://arxiv.org/abs/1301.3781
[6] A. Graves and J. Schmidhuber, “Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures,” vol. 18, no. 5–6, pp. 602–610, 2005, [Online]. Available: https://www.sciencedirect.com/science/article/abs/pii/S0893608005001206
[7] Z. Huang, W. Xu, and K. Yu, “Bidirectional LSTM-CRF Models for Sequence Tagging,” Arxiv, 2015.
[8] Y. Wang, M. Huang, L. Zhao, and X. Zhu, “Attention-based LSTM for Aspect-level Sentiment Classification,” pp. 606–615, 2016.
[9] G. Coppersmith, R. Leary, P. Crutchley, and A. Fine, “Natural Language Processing of Social Media as Screening for Suicide Risk,” 2018, doi: 10.1177/1178222618792860.
[10] K. S. Nugroho et al., “DETEKSI DEPRESI DAN KECEMASAN PENGGUNA TWITTER,” no. Ciastech, pp. 287–296, 2021.
[11] K. K. Putri and E. B. Setiawan, “Depression Detection in Indonesian X Social Media Text using Convolutional Neural Networks and Long Short-Term Memory with TF- IDF and FastText Methods,” vol. 6, no. 2, pp. 557–574, 2025.
[12] M. Fadhel and W. Maharani, “Depression Detection of Users in Social Media X using IndoBERTweet,” vol. 8, no. 2, pp. 885–891, 2024.
[13] A. M. Alayba, V. Palade, M. England, and R. Iqbal, “Arabic Language Sentiment Analysis on Health Services”.
[14] M. D. Purbolaksono, F. D. Reskyadita, and A. A. Suryani, “Indonesian Text Classification using Back Propagation and Sastrawi Stemming Analysis with Information Gain for Selection Feature,” vol. 10, no. 1, pp. 234–238, 2020.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Arief Rahman Hakim Arief, Yuni Franciska Br. Tarigan, Khairul Fadhli MargolangAuthors who publish in Hanif Journal of Information Systems agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 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 (See The Effect of Open Access).
Similar Articles
- Julia Namira Nasution, Zainal Azis, Comparison of Logistic Regression and K-Nearest Neighbor (KNN) Algorithms in a Heart Failure Prediction Dataset , Hanif Journal of Information Systems : Vol. 3 No. 1 (2025): August Edition
- Zulkifli Hasibuan, Implementation of the Least Significant Bit (LSB) Method for Data Security in a Mandailing Language Dictionary , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
- Pastima Simanjuntak, Rika Harman, Predicting Non-Performing Loan Levels Using XGBoost and Explainable Data Mining , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
- Aulia Jannah, Abdillah Husaini, Aulia Ichsan, Mulkan Azhari, Implementation of Fuzzy K-Nearest Neighbor Method in Dengue Disiase Classification , Hanif Journal of Information Systems : Vol. 1 No. 2 (2024): February Edition
- Perdinal Nasution, Mulkan Azhari, Application of Data Mining to Determine the Performance of Family Planning Field Officers (PLKB) Using the C4.5 Algorithm , Hanif Journal of Information Systems : Vol. 3 No. 1 (2025): August Edition
- Malinar Nasution, Nizwardi Jalinus, The Philosophy and Foundations of Vocational Technology in Education with IT Integration , Hanif Journal of Information Systems : Vol. 1 No. 2 (2024): February Edition
- Yohanni Syahra, Natasya Nabaceva, Application of Data Mining to Analyze BPJS Patient Satisfaction Levels Regarding the Service Attitude of PTPN II Tanjung Selamat General Hospital Using the K-Means Clustering Algorithm , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
- Deal Alfi Juliaz, Halim Maulana, Design of Fire Detector with Water Sprinkler Based on Internet of Things (IoT) , Hanif Journal of Information Systems : Vol. 2 No. 2 (2025): February Edition
- Andi Zulherry, Al-Khowarizmi, Implementation of Multi-Room Computer Laboratory Network Infrastructure Based on Star Topology in an Educational Environment , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
- Sumita Wardani, Sartika Mandasari, Meisarah Riandini, Predicting Student Dropout Risk Using XGBoost and Explainable AI , Hanif Journal of Information Systems : Vol. 3 No. 2 (2026): February Edition
You may also start an advanced similarity search for this article.









