ComTech: Computer, Mathematics and Engineering Applications
Vol. 15 No. 1 (2024): ComTech

Psychological Stress Detection Using Transformer-Based Models

Derwin Suhartono (Bina Nusantara University)
Irfan Fahmi Saputra (Bina Nusantara University)
Andhika Rizki Pratama (Bina Nusantara University)
Gabriel Nathaniel (Bina Nusantara University)



Article Info

Publish Date
22 Jun 2024

Abstract

Stress is a significant mental health problem that results in a lack of concentration. It has been more widely identified through social media since people who are under stress usually post about their physical pain and tiredness. However, stress assessment through social media by professionals can be expensive and time-consuming. The research aimed to produce a stress detection system trained using a Twitter dataset to predict stress using the user’s input sentence. The experiments that were done in the research used transformer-based models such as Bidirectional Encoder Representations from Transformers (BERT) and Robustly Optimized BERT (RoBERTa). The research involved data pre-processing, model training, and model evaluation to ensure high-quality train data. Since the data were imbalanced, data trimming was performed in pre-processing to select data randomly until the balance matched. This process ensured the model’s effectiveness in the training and evaluation stages. The features used in these experiments were features from each pre-trained model. In evaluating the model, accuracy, loss, and F1 score were used as metrics. In the result, for BERT, accuracy reaches 0.848 with an F1 score of 0.847. Meanwhile, RoBERTa has an accuracy of 0.837 and 0.834. The results prove that BERT and RoBERTa can be used to classify stress with accuracy and an F1 score above 0.8. The experiment result shows that the BERT deep learning model can detect stress using the Twitter datasets.

Copyrights © 2024






Journal Info

Abbrev

comtech

Publisher

Subject

Computer Science & IT Engineering Mathematics

Description

The journal invites professionals in the world of education, research, and entrepreneurship to participate in disseminating ideas, concepts, new theories, or science development in the field of Information Systems, Architecture, Civil Engineering, Computer Engineering, Industrial Engineering, Food ...