A Comparative Study of Traditional Machine Learning, Deep Learning, and Large Language Models for Mental Health Forecasting using Smartphone Sensing Data

Kaidong Feng, Zhu Sun, Roy Ka-Wei Lee, Xun Jiang, Yin Leng Theng, Yi Ding

Abstract

Smartphone sensing offers an unobtrusive and scalable way to track daily behaviors linked to mental health, capturing changes in sleep, mobility, and phone use that often precede symptoms of stress, anxiety, or depression. While most prior studies focus on detection that responds to existing conditions, forecasting mental health enables proactive support through Just-in-Time Adaptive Interventions. In this paper, we present the first comprehensive benchmarking study comparing traditional machine learning (ML), deep learning (DL), and large language model (LLM) approaches for mental health forecasting using the College Experience Sensing (CES) dataset, the most extensive longitudinal dataset of college student mental health to date. We systematically evaluate models across temporal windows, feature granularities, personalization strategies, and class imbalance handling. Our results show that DL models, particularly Transformer (Macro-F1 = 0.58), achieve the best overall performance, while LLMs show strength in contextual reasoning but weaker temporal modeling. Personalization substantially improves forecasts of severe mental health states. By revealing how different modeling approaches interpret phone sensing behavioral data over time, this work lays the groundwork for next-generation, adaptive, and human-centered mental health technologies that can advance both research and real-world well-being.

Introduction

Most AI research in mental health focuses on detection—identifying a condition that a person is already experiencing. While useful, detection is inherently reactive. To enable "Just-in-Time Adaptive Interventions" (JITAIs), we need forecasting: the ability to predict a decline in mental health before it manifests as a crisis. Passive smartphone sensing (tracking sleep, mobility, and screen time) is unobtrusive and scalable, but it is also noisy, multimodal, and highly individualized. This study benchmarks three AI paradigms—Traditional ML, Deep Learning (DL), and Large Language Models (LLMs)—to determine which best handles this complexity.

Dataset and Methodology

The study utilizes the College Experience Sensing (CES) dataset, which tracks 215 college students over five years (2017–2022). This dataset captures the pre-pandemic, pandemic, and recovery phases, providing a rich longitudinal view of student well-being.

Summary statistics of the College Experience Sensing (CES) dataset, showing the distribution of samples across mental health states.

Researchers compared three distinct modeling approaches:

  1. Traditional ML: Baselines like Random Forest and XGBoost using statistical aggregations.
  2. Deep Learning (DL): Sequence-aware models including LSTMs with Attention and Transformers.
  3. Large Language Models (LLMs): Qwen and GPT-4, utilizing structured Markdown tables and In-Context Learning (ICL).

Key Insights and Results

The Dominance of Transformers

DL models, specifically Transformers, achieved the best overall performance with a Macro-F1 of 0.5808. Their ability to capture non-linear temporal dependencies across multimodal streams makes them superior for raw time-series forecasting. In contrast, LLMs (Macro-F1 ≈ 0.44) showed impressive semantic reasoning but struggled with numerical temporal modeling.

Feature Importance and Personalization

Analysis of feature importance reveals that specific behavioral markers carry more weight than others. However, the study found that noise reduction is critical; models generally performed better with 5-dimension aggregated features (Leisure, Me Time, Phone, Sleep, Social) than with the raw 35-dimension set.

Distribution of feature importance across users within a 2-week window, highlighting the variance in behavioral predictors.

A critical finding was that personalization is non-negotiable. Adding user-specific embeddings to DL models led to Macro-F1 improvements of over 0.3. This suggests that mental health AI must understand an individual's unique baseline to effectively forecast deviations into severe states.

Handling Class Imbalance

Given that "Normal" states far outnumber "Severe" ones in real-world data, the researchers tested various loss functions. Focal Loss proved most effective for high-capacity models like Transformers, forcing the model to prioritize "hard" minority cases (severe states) rather than optimizing for majority-class accuracy.

Conclusion

While Transformers currently hold the performance crown for temporal forecasting, LLMs offer unique strengths in contextual reasoning. Future work should explore hybrid architectures that combine the temporal processing power of DL with the semantic reasoning of LLMs. Furthermore, integrating physiological data (e.g., heart rate) and expanding the study to more diverse populations will be essential for deploying these models in real-world clinical settings.

Summary updated

BibTeX
@misc{feng2026comparative,
  author = {Kaidong Feng and Zhu Sun and Roy Ka-Wei Lee and Xun Jiang and Yin Leng Theng and Yi Ding},
  title = {{A Comparative Study of Traditional Machine Learning, Deep Learning, and Large Language Models for Mental Health Forecasting using Smartphone Sensing Data}},
  year = {2026},
  eprint = {2601.03603},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.03603},
}
Figure