Deteksi Stres Berbasis Teks pada Dreaddit Menggunakan Fine Tuning DeBERTa-v3

Authors

DOI:

https://doi.org/10.30865/jurikom.v12i6.9318

Keywords:

DeBERTa-v3, TF-IDF, LinearSVC, Deteksi Stres, NLP

Abstract

Mental health has become an important issue in the digital era, as psychological expressions are increasingly reflected through social media posts such as Reddit. This study uses the publicly available Dreaddit dataset containing Reddit user texts labeled with stress categories. The objective is to compare two text-based stress detection approaches: fine-tuning the transformer model DeBERTa-v3 and the classical TF-IDF LinearSVC method. Both approaches are implemented as binary classification systems to automatically distinguish stress and non-stress texts. The research workflow includes data preprocessing, tokenization, model training, validation, and evaluation using Accuracy, Precision, Recall, F1-score, and AUROC metrics. DeBERTa-v3 is fine-tuned using contextual representations with a self-attention mechanism, while TF-IDF LinearSVC relies on statistical n-gram weighting. Experimental results show that DeBERTa-v3 achieves superior performance with an Accuracy of 0.830, Precision of 0.802, Recall of 0.889, F1-score of 0.843, and AUROC of 0.918. Meanwhile, TF-IDF LinearSVC obtains an Accuracy of 0.732, Precision of 0.722, Recall of 0.783, F1-score of 0.751, and AUROC of 0.817. The experiments were conducted with consistent training configurations, data splits, and evaluation procedures to ensure a fair comparison. The confusion matrix analysis indicates that DeBERTa-v3 produces fewer false positives and false negatives, demonstrating stronger capability in recognizing implicit stress expressions. These findings highlight the advantages of transformer-based models in capturing emotional and semantic context and indicate the potential for real-time deployment in social-media-based mental health monitoring systems.

References

[1] WHO, “Transforming mental health for all EXECUTIVE SUMMARY,” World Ment. Heal. Rep., 2022.

[2] C. Su, Z. Xu, J. Pathak, and F. Wang, “Deep learning in mental health outcome research : a scoping review,” Transl. Psychiatry, 2020, doi: 10.1038/s41398-020-0780-3.

[3] C. Sunkel, “The World Mental Health Report : transforming mental health for all,” pp. 391–392, 2001, doi: 10.1002/wps.21018.

[4] S. Inamdar, R. Chapekar, S. Gite, and B. Pradhan, “Machine Learning Driven Mental Stress Detection on Reddit Posts Using Natural Language Processing,” Human-Centric Intell. Syst., vol. 3, no. 2, pp. 80–91, 2023, doi: 10.1007/s44230-023-00020-8.

[5] S. M. Joseph, S. Citraro, V. Morini, G. Rossetti, and and M. Stella1, “Cognitive network neighbourhoods quantify feelings expressed in suicide notes and Reddit mental health communities,” ScienceDirect, 2023.

[6] D. F. Risa, F. Pradana, F. A. Bachtiar, and U. Brawijaya, “IMPLEMENTASI METODE NAÏVE BAYES UNTUK MENDETEKSI STRES SISWA IMPLEMENTATION OF THE NAÏVE BAYES METHOD FOR DETECTING STUDENT,” vol. 8, no. 6, 2021, doi: 10.25126/jtiik.202184372.

[7] K. Yang, T. Zhang, and S. Ananiadou, “A mental state Knowledge–aware and Contrastive Network for early stress and depression detection on social media,” Inf. Process. Manag., vol. 59, no. 4, p. 102961, 2022, doi: 10.1016/j.ipm.2022.102961.

[8] O. K. Burhan, “MELAMPAUI TRADISI : ANALISIS GALIAN TEKS UNTUK DATA KUALITATIF BERSKALA BESAR,” vol. d, pp. 162–168, 2024, doi: 10.24854/jpu1154.

[9] A. Pathirana, D. K. Rajakaruna, D. Kasthurirathna, and A. Atukorale, “Journal of Future Artificial Intelligence A Reinforcement Learning-Based Approach for Promoting Mental Health Using Multimodal Emotion Recognition,” 2024.

[10] J. B. Oluwagbemi, A. E. Mesioye, and R. S. Akinbo, “Journal of Future Artificial Intelligence Depress-HybridNet : A Linguistic-Behavioral Hybrid Framework for Early and Accurate Depression Detection on Social Media,” 2025.

[11] E. Turcan, S. Muresan, and K. McKeown, “Emotion-Infused Models for Explainable Psychological Stress Detection,” NAACL-HLT 2021 - 2021 Conf. North Am. Chapter Assoc. Comput. Linguist. Hum. Lang. Technol. Proc. Conf., pp. 2895–2909, 2021, doi: 10.18653/v1/2021.naacl-main.230.

[12] Y. Tolla, “Deteksi Stres dan Depresi Unggahan Media Sosial dengan Machine Learning,” vol. 15, no. 1, pp. 84–92, 2025.

[13] M. E. Johan and S. A. Azka, “G-Tech : Jurnal Teknologi Terapan using Multilayer Perceptron,” vol. 7, no. 3, pp. 958–966, 2023.

[14] D. Suhartono, “ScienceDirect ScienceDirect Top 10 Countries with the Highest Rates of Stress,” Procedia Comput. Sci., vol. 216, pp. 672–681, 2023, doi: 10.1016/j.procs.2022.12.183.

[15] S. Muñoz and C. A. Iglesias, “A text classification approach to detect psychological stress combining a lexicon-based feature framework with distributional representations,” Inf. Process. Manag., vol. 59, no. 5, p. 103011, 2022, doi: 10.1016/j.ipm.2022.103011.

[16] A. Le Glaz et al., “Machine learning and natural language processing in mental health: Systematic review,” J. Med. Internet Res., vol. 23, no. 5, 2021, doi: 10.2196/15708.

[17] R. KS, “Analyzing Online Conversations on Reddit: A Study of Stress and Anxiety Through Topic Modeling and Sentiment Analysis,” Cureus, vol. 16, no. 9, 2024, doi: 10.7759/cureus.69030.

[18] S. Ji, T. Zhang, L. Ansari, J. Fu, P. Tiwari, and E. Cambria, “MentalBERT: Publicly Available Pretrained Language Models for Mental Healthcare,” 2022 Lang. Resour. Eval. Conf. Lr. 2022, no. June, pp. 7184–7190, 2022.

[19] T. Zhang, “Natural language processing applied to mental illness detection : a narrative review,” no. December, pp. 1–13, 2021, doi: 10.1038/s41746-022-00589-7.

[20] M. Islam, S. Hassan, S. Akter, and F. Anam, “Healthcare Analytics A comprehensive review of predictive analytics models for mental illness using machine learning algorithms,” Healthc. Anal., vol. 6, no. June, p. 100350, 2024, doi: 10.1016/j.health.2024.100350.

[21] L. Ilias, S. Mouzakitis, and D. Askounis, “Calibration of Transformer-Based Models for Identifying Stress and Depression in Social Media,” IEEE Trans. Comput. Soc. Syst., vol. 11, no. 2, pp. 1979–1990, 2024, doi: 10.1109/TCSS.2023.3283009.

[22] G. F. Situmorang and R. Purba, “Deteksi Potensi Depresi dari Unggahan Media Sosial X Menggunakan Teknik NLP dan Model IndoBERT,” vol. 6, no. 2, pp. 649–661, 2024, doi: 10.47065/bits.v6i2.5496.

[23] J. Nicholas, S. Onie, and M. E. Larsen, “Ethics and Privacy in Social Media Research for Mental Health.,” Curr. Psychiatry Rep., vol. 22, no. 12, p. 84, Nov. 2020, doi: 10.1007/s11920-020-01205-9.

[24] Z. Chen, R. Yang, S. Fu, N. Zong, H. Liu, and M. Huang, “Detecting Reddit Users with Depression Using a Hybrid Neural Network SBERT-CNN,” Proc. - 2023 IEEE 11th Int. Conf. Healthc. Informatics, ICHI 2023, pp. 193–199, 2023, doi: 10.1109/ICHI57859.2023.00035.

[25] A. A. Dalimunthe and N. A. Hasibuan, “Klasifikasi Arthropoda Dengan Pendekatan Convolutional Neural Network ( CNN ),” vol. 5, no. 1, pp. 119–125, 2025.

[26] N. Yulianti, M. Afdal, M. Jazman, M. Megawati, and A. Anofrizen, “Analisis Sentimen Masyarakat Menggunakan Algoritma Long Short Term Memory ( LSTM ) Pada Ulasan Aplikasi Halodoc,” vol. 7, no. 2, 2025, doi: 10.47065/bits.v7i2.7243.

Additional Files

Published

2025-12-15

How to Cite

Ramadhan, P., & Setiadi, D. R. I. M. (2025). Deteksi Stres Berbasis Teks pada Dreaddit Menggunakan Fine Tuning DeBERTa-v3. JURNAL RISET KOMPUTER (JURIKOM), 12(6), 815–826. https://doi.org/10.30865/jurikom.v12i6.9318