Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers Model
- 1 Department of Computer Science, BINUS Graduate Program Master of Computer Science, Bina Nusantara University, Jakarta, Indonesia
Abstract
The increasing use of social media has enabled large-scale analysis of user-generated content to monitor mental health trends. This study focuses on sentiment prediction of mental health-related posts on platform X using transformer-based models, specifically IndoBERT, DistilBERT, and IndoRoBERTa. The goal is to evaluate the effectiveness of these models in classifying social media posts into positive, negative, and neutral sentiment categories. The research involves data preprocessing, feature extraction using contextual embedding, and sentiment classification. IndoBERT, as a full-sized transformer model, provides high accuracy but requires significant computational resources. DistilBERT, a lightweight version of BERT, offers a more efficient alternative while maintaining competitive performance. Meanwhile, IndoRoBERTa, an optimized variation of RoBERTa for the Indonesian language, enhances contextual understanding for improved classification. The experimental results demonstrate that IndoRoBERTa achieves the highest accuracy at 95.00%, outperforming IndoBERT (93.50%) and DistilBERT (91.67%), while DistilBERT provides a faster inference time with only a slight reduction in performance. These findings suggest that transformer-based models can effectively analyze sentiment in mental health-related social media posts, offering insights into emotional patterns that could support early mental health monitoring.
DOI: https://doi.org/10.3844/jcssp.2026.244.259
Copyright: © 2026 Andika Dwi Asmoro Wicaksono and Rojali. This is an open access article distributed under the terms of the
Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
- 56 Views
- 17 Downloads
- 0 Citations
Download
Keywords
- Social Media
- IndoBERT
- DistilBERT
- IndoRoBERTa
- Mental Health
- Transformer Model