Abstract
As mental health issues for young adults present a pressing public health concern, daily digital mood monitoring for early detection has become an important prospect. An active research area, digital phenotyping, involves collecting and analysing data from personal digital devices such as smartphones (usage and sensors) and wearables to infer behaviours and mental health. Whilst this data is standardly analysed using statistical and machine learning approaches, the emergence of large language models (LLMs) offers a new approach to make sense of smartphone sensing data. Despite their effectiveness across various domains, LLMs remain relatively unexplored in digital mental health, particularly in integrating mobile sensor data. Our study aims to bridge this gap by employing LLMs to predict affect outcomes based on smartphone sensing data from university students. We demonstrate the efficacy of zero-shot and few-shot embedding LLMs in inferring general wellbeing. Our findings reveal that LLMs can make promising predictions of affect measures using solely smartphone sensing data. This research sheds light on the potential of LLMs for affective state prediction, emphasizing the intricate link between smartphone behavioral patterns and affective states. To our knowledge, this is the first work to leverage LLMs for affective state prediction and digital phenotyping tasks.
Introduction
Monitoring mental health often relies on "digital phenotyping"—the practice of using digital devices to collect behavioral traces, such as screen unlock frequency or typing speed, to infer wellbeing. However, traditional machine learning approaches face significant hurdles: mental health datasets are typically small and highly sensitive, leading to overfitting and poor generalization. Furthermore, these "black box" models often lack interpretability. This study explores whether Large Language Models (LLMs), pre-trained on vast human knowledge and psychological concepts, can bridge this gap by reasoning through behavioral data to predict emotional states.
Methodology
The researchers employed Gemini 1.5 Pro to perform zero-shot and few-shot prediction tasks. To bridge the gap between numeric sensor data and the text-based nature of LLMs, raw data was transformed into natural language descriptions. For instance, a student's week might be described as having "a moderate number of unlocking episodes" and "travelling a moderate distance."
The study utilized data from the StudentSense study, focusing on a subset of 10 university students. Input data included 77 behavioral features (e.g., battery levels, screen unlocks, GPS, app usage, keyboard activity) extracted via the RAPIDS tool. Ground truth was established using weekly self-reports from the International Positive and Negative Affect Schedule Short Form (I-PANAS-SF), which measures 10 affective items on a 5-point Likert scale. Three prompting strategies were tested: Zero-Shot (intuition-based), Few-Shot (1-10 labeled examples), and Chain-of-Thought (CoT) reasoning.
Results and Discussion
The performance of the LLM was evaluated using Mean Absolute Error (MAE) on a 1–5 scale. A significant finding was the "One-Shot Leap": accuracy improved dramatically when moving from zero-shot to one-shot learning. Providing just a single labeled example allowed the model to calibrate its predictions significantly better than having no examples at all.
As illustrated in Figure 3, the MAE for both positive and negative affects generally decreased as the number of "shots" (examples) increased. By the 10-shot mark, the average MAE for positive affects dropped to 0.75, and negative affects reached 0.74. The model demonstrated a built-in "psychological intuition," correctly associating specific behavioral patterns—such as rapid typing—with states like being "attentive," or frequent backspacing with being "upset."
The study also revealed a linear relationship between the model's predictive accuracy for positive and negative affects, as shown in Figure 2. Initially, the LLM appeared more accurate in identifying negative affects (e.g., "Hostile" with an MAE of 0.66) compared to positive ones. It tended to use a low "default" score for negative emotions unless specific behavioral evidence suggested otherwise. Despite the small sample size, the model's predictive ability remained remarkably consistent across different participants.
Conclusion
While LLMs are not yet ready to replace clinical assessments, this research demonstrates their potential as a powerful tool for grounding digital behavior in psychological context. They offer a more interpretable and data-efficient alternative to traditional deep learning models in digital phenotyping. Future work will focus on larger sample sizes, more granular daily data, and refining the "textualization" of sensor data, while carefully addressing the privacy and ethical concerns inherent in processing sensitive mental health information.
Summary updated