Deep learning for mental health analysis: long short-term memory approach to text-based condition classification
International Journal of Artificial Intelligence
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.
Discover Our Library
Embark on a journey through our expansive collection of articles and let curiosity lead your path to innovation.





