Deep learning for mental health analysis: long short-term memory approach to text-based condition classification

Zaqqi Yamani, Dinda Lestarini, Sarifah Putri Raflesia, Purwita Sari, Ghita Athalina

Abstract


The increasing prevalence of mental health disorders highlights the need for scalable and automated approaches to early detection. This study proposes a deep learning–based text classification framework using a long short-term memory (LSTM) network to identify mental health conditions from user generated textual data. A corpus of 103,488 labeled texts representing anxiety, stress, bipolar disorder, depression, personality disorder, suicidal ideation, and normal states was preprocessed through tokenization, padding, and word embedding. The proposed LSTM model achieved overall accuracy of 87% on test set, with strong class-wise performance reflected by precision, recall, and F1-scores, particularly for anxiety, personality disorder, and normal classes. Comparative error analysis using a confusion matrix revealed challenges in distinguishing depression from suicidal ideation, indicating semantic overlap between these conditions. The results demonstrate that LSTM-based models can effectively capture sequential linguistic patterns relevant to mental health classification. This framework shows potential as a decision-support tool for early screening and digital mental health applications, complementing clinical assessment rather than replacing it.

Keywords


Deep learning; Long short-term memory; Mental health disorder; Natural language processing; Text classification

Full Text:

PDF


DOI: http://doi.org/10.11591/ijai.v15.i2.pp1762-1770

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Dinda Lestarini, Sarifah Putri Raflesia, Purwita Sari, Ghita Atalina

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

IAES International Journal of Artificial Intelligence (IJ-AI)
ISSN/e-ISSN 2089-4872/2252-8938 
This journal is published by the Institute of Advanced Engineering and Science (IAES).

View IJAI Stats