Depression is a major global mental health concern, and early detection is vital for timely intervention. With the widespread use of social media, individuals frequently share emotions, thoughts, and struggles online, creating opportunities for artificial intelligence (AI) to identify signs of depression. This study compares traditional models, including Long Short-Term Memory (LSTM), Random Forest (RF), Support Vector Machine (SVM), and a one-dimensional Convolutional Neural Network (1D CNN), with Transformer-based and deep learning models such as a fine-tuned BERT classifier (cBERT), two-dimensional Convolutional Neural Network (2D CNN), and Vision Transformer (ViT). For ViT and 2D CNN, text data is encoded with BERT and converted into visual representations (histograms, bar graphs, heatmaps) for classification. While traditional models depend on established text-processing methods, deep learning and Transformer-based models capture richer linguistic patterns and contextual cues. Experimental results show that although deep models provide valuable insights, the LSTM model achieves the highest classification accuracy. This work advances AI-driven mental health research by systematically evaluating diverse methodologies, highlighting their strengths and limitations, and supporting the development of scalable depression detection systems.
Raj et al. (Thu,) studied this question.