Research Article Open Access

Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers Model

Andika Dwi Asmoro Wicaksono1 and Rojali1
  • 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.

Journal of Computer Science
Volume 22 No. 1, 2026, 244-259

DOI: https://doi.org/10.3844/jcssp.2026.244.259

Submitted On: 11 November 2024 Published On: 11 February 2026

How to Cite: Wicaksono, A. D. A. & Rojali, . (2026). Classifcation of Social Media Posts X For Mental Health Symptoms Identification Using NLP Techniques and Transformers Model. Journal of Computer Science, 22(1), 244-259. https://doi.org/10.3844/jcssp.2026.244.259

  • 79 Views
  • 23 Downloads
  • 0 Citations

Download

Keywords

  • Social Media
  • IndoBERT
  • DistilBERT
  • IndoRoBERTa
  • Mental Health
  • Transformer Model