Stress Detection in Digital Conversational Text Using a Long Short-Term Memory (LSTM) Model

Authors

  • Agni Musadad Sistem Informasi, Fakultas Teknik, Universitas Siliwangi
  • Heni Sulastri Sistem Informasi, Fakultas Teknik, Universitas Siliwangi

DOI:

https://doi.org/10.25077/TEKNOSI.v12i1.2026.152-159

Keywords:

Stress Detection, Long Short-Term Memory (LSTM), Natural Languange Processing, Mental Health, Hyperparameter Analysis

Abstract

Early stress detection through digital conversational text is crucial for mental health, but research in Indonesian is still limited. This study designs and evaluates a Long Short-Term Memory (LSTM)-based deep learning model to classify Indonesian text as stressful or non-stressful. The model was trained and tested using a labeled dataset of 11,000 samples. The methodology included text preprocessing, model training, and sensitivity analysis of hyperparameters such as learning rate, batch size, and number of LSTM units to find the optimal configuration. The proposed model demonstrated strong performance with an accuracy of 86.48% and a balanced F1-Score of 0.87 (non-stress) and 0.86 (stress), outperforming several previous baselines. Training curve analysis identified clear overfitting, while hyperparameter sensitivity analysis revealed that the default configuration with 64 LSTM units was suboptimal—performance improved with the use of 128 LSTM units or a batch size of 128. This study confirms the effectiveness of LSTM for stress detection in Indonesian text, while also demonstrating the need for further hyperparameter optimization and the need for more robust overfitting handling techniques.

References

T. Zhang, A. M. Schoene, S. Ji, and S. Ananiadou, ‘Natural language processing applied to mental illness detection: a narrative review’, Dec. 01, 2022, Nature Research. doi: 10.1038/s41746-022-00589-7.

A. Sherstinsky, ‘Fundamentals of Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) Network’, Jul. 2023, doi: 10.1016/j.physd.2019.132306.

M. Dwirizqy Wimbassa, T. Marsyah Noor, S. Yasara, and T. Muhammad Arsyah, ‘Emotional Text Detection dengan Long Short Term Memory (LSTM) 1’, Jurnal Format, vol. 12, 2023.

M. Liang and T. Niu, ‘Research on Text Classification Techniques Based on Improved TF-IDF Algorithm and LSTM Inputs’, in Procedia Computer Science, Elsevier B.V., 2022, pp. 460–470. doi: 10.1016/j.procs.2022.10.064.

K. S. Witanto, N. A. Sanjaya ER, A. E. Karyawati, I. G. A. G. A. Kadyanan, I. K. G. Suhartana, and L. G. Astuti, ‘Implementasi LSTM Pada Analisis Sentimen Review Film Menggunakan Adam Dan RMSprop Optimizer’, JELIKU (Jurnal Elektronik Ilmu Komputer Udayana), vol. 10, no. 4, p. 351, Jun. 2022, doi: 10.24843/jlk.2022.v10.i04.p05.

A. Lisanthoni et al., ‘Penerapan LSTM dalam Analisis Sentimen Berbasis Lexicon untuk Meningkatkan Sistem Pemantauan Citra PLN di Platform Digital’, Seminar Nasional Sains Data, vol. 2024.

L. Ilias, S. Mouzakitis, and D. Askounis, ‘Calibration of Transformer-based Models for Identifying Stress and Depression in Social Media’, Jul. 2023, doi: 10.1109/TCSS.2023.3283009.

S. Inamdar, R. Chapekar, S. Gite, and B. Pradhan, ‘Machine Learning Driven Mental Stress Detection on Reddit Posts Using Natural Language Processing’, Human-Centric Intelligent Systems, vol. 3, no. 2, pp. 80–91, Mar. 2023, doi: 10.1007/s44230-023-00020-8.

X. Wan and L. Tian, ‘User Stress Detection Using Social Media Text: A Novel Machine Learning Approach’, International Journal of Computers, Communications and Control, vol. 19, no. 5, pp. 1–15, 2024, doi: 10.15837/ijccc.2024.5.6772.

T. Nijhawan, G. Attigeri, and T. Ananthakrishna, ‘Stress detection using natural language processing and machine learning over social interactions’, J Big Data, vol. 9, no. 1, Dec. 2022, doi: 10.1186/s40537-022-00575-6.

M. Krichen and A. Mihoub, ‘Long Short-Term Memory Networks: A Comprehensive Survey’, Sep. 01, 2025, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/ai6090215.

K. Taha, P. D. Yoo, C. Yeun, D. Homouz, and A. Taha, ‘A comprehensive survey of text classification techniques and their research applications: Observational and experimental insights’, Nov. 01, 2024, Elsevier Ireland Ltd. doi: 10.1016/j.cosrev.2024.100664.

F. Zakariya, J. Zeniarja, and S. Winarno, ‘Pengembangan Chatbot Kesehatan Mental Menggunakan Algoritma Long Short-Term Memory’, Jurnal Media Informatika Budidarma, vol. 8, no. 1, p. 251, Jan. 2024, doi: 10.30865/mib.v8i1.7177.

R. Ilyas, F. Kasyidi, and M. N. Eriyadi, ‘Penanganan Overfitting pada Klasifikasi Berita Hoax berbasis Neural Networks dengan Dropout dan Regularization’, vol. 10, no. 2, pp. 156–162, 2024, doi: 10.31294/jtk.v4i2.

N. Nordin, Z. Zainol, M. H. Mohd Noor, and L. F. Chan, ‘An explainable predictive model for suicide attempt risk using an ensemble learning and Shapley Additive Explanations (SHAP) approach’, Asian J Psychiatr, vol. 79, p. 103316, 2023, doi: 10.1016/j.ajp.2022.103316.

J. Cahyani, S. Mujahidin, and T. P. Fiqar, ‘Implementasi Metode Long Short Term Memory (LSTM) untuk Memprediksi Harga Bahan Pokok Nasional’, Jurnal Sistem dan Teknologi Informasi (JustIN), vol. 11, no. 2, p. 346, Jul. 2023, doi: 10.26418/justin.v11i2.57395.

Submitted

2025-11-13

Accepted

2026-05-08

Published

2026-05-12

How to Cite

[1]
A. Musadad and H. Sulastri, “Stress Detection in Digital Conversational Text Using a Long Short-Term Memory (LSTM) Model”, TEKNOSI, vol. 12, no. 1, pp. 152–159, May 2026.

Issue

Section

Articles

Similar Articles

1 2 3 4 5 6 7 8 > >> 

You may also start an advanced similarity search for this article.