Ding, Zhanyi
Efficient or Powerful? Trade-offs Between Machine Learning and Deep Learning for Mental Illness Detection on Social Media
Ding, Zhanyi, Wang, Zhongyan, Zhang, Yeyubei, Cao, Yuchen, Liu, Yunchong, Shen, Xiaorui, Tian, Yexin, Dai, Jianglai
Social media platforms provide valuable insights into mental health trends by capturing user-generated discussions on conditions such as depression, anxiety, and suicidal ideation. Machine learning (ML) and deep learning (DL) models have been increasingly applied to classify mental health conditions from textual data, but selecting the most effective model involves trade-offs in accuracy, interpretability, and computational efficiency. This study evaluates multiple ML models, including logistic regression, random forest, and LightGBM, alongside deep learning architectures such as ALBERT and Gated Recurrent Units (GRUs), for both binary and multi-class classification of mental health conditions. Our findings indicate that ML and DL models achieve comparable classification performance on medium-sized datasets, with ML models offering greater interpretability through variable importance scores, while DL models are more robust to complex linguistic patterns. Additionally, ML models require explicit feature engineering, whereas DL models learn hierarchical representations directly from text. Logistic regression provides the advantage of capturing both positive and negative associations between features and mental health conditions, whereas tree-based models prioritize decision-making power through split-based feature selection. This study offers empirical insights into the advantages and limitations of different modeling approaches and provides recommendations for selecting appropriate methods based on dataset size, interpretability needs, and computational constraints.
Tutorial on Using Machine Learning and Deep Learning Models for Mental Illness Detection
Zhang, Yeyubei, Wang, Zhongyan, Ding, Zhanyi, Tian, Yexin, Dai, Jianglai, Shen, Xiaorui, Liu, Yunchong, Cao, Yuchen
Author Note Correspondence concerning this article should be addressed to Yuchen Cao, Northeastern University, E-mail: cao.yuch@northeastern.edu Abstract Social media has become an important source for understanding mental health, providing researchers a way to detect conditions like depression from user-generated posts. This tutorial provides practical guidance to address common challenges in applying machine learning and deep learning methods for mental health detection on these platforms. It focuses on strategies for working with diverse datasets, improving text preprocessing, and addressing issues such as imbalanced data and model evaluation. Real-world examples and step-by-step instructions demonstrate how to apply these techniques effectively, with an emphasis on transparency, reproducibility, and ethical considerations. By sharing these approaches, this tutorial aims to help researchers build more reliable and widely applicable models for mental health research, contributing to better tools for early detection and intervention. Tutorial on Using Machine Learning and Deep Learning Models for Mental Illness Detection Introduction Mental health disorders, especially depression, have become a significant concern worldwide, affecting millions of individuals across diverse populations (Organization, 2020). Early detection of depression is crucial, as it can lead to timely treatment and better long-term outcomes. In today's digital age, social media platforms such as X(Twitter), Facebook, and Reddit provide a unique opportunity to study mental health. People often share their thoughts and emotions on these platforms, making them a valuable source for understanding mental health patterns (De Choudhury et al., 2013; Guntuku et al., 2017). Recent advances in computational methods, particularly machine learning (ML) and deep learning (DL), have shown promise in analyzing social media data to detect signs of depression. These techniques can uncover patterns in language use, emotions, and behaviors that may indicate mental health challenges (Shatte et al., 2020; Yazdavar et al., 2020).