Abstract
Predicting "state anxiety"—the momentary spikes in stress experienced in real-world situations—is critical for the development of Just-In-Time Adaptive Interventions (JITAIs). However, this task is complicated by data scarcity, sensor noise, and contextual confounding. We introduce WatchAnxiety, a framework that utilizes smartwatch heart rate data and transfer learning to bridge this gap. By pre-training a deep learning model on a large-scale dataset of hospital workers and fine-tuning it on socially anxious students, we achieved a 60.4% balanced accuracy in detecting anxiety in real-time, representing a 7% improvement over previous benchmarks.
Introduction
Most research in passive mental health sensing focuses on trait anxiety, a person's general, long-term predisposition toward anxiety. While valuable for clinical diagnosis, trait anxiety does not provide the temporal resolution needed for JITAIs, which require identifying if a person is anxious at a specific moment.
Predicting state anxiety is significantly more challenging due to three primary factors:
- Data Scarcity: Obtaining high-frequency, real-world anxiety labels (Ecological Momentary Assessments) is difficult.
- Sensor Noise: Smartwatch data is less precise than clinical-grade equipment.
- Contextual Ambiguity: Physiological signals like elevated heart rate can be caused by physical exertion rather than emotional stress.
WatchAnxiety addresses these issues by leveraging transfer learning to maximize the utility of limited labeled data.
Methods
The WatchAnxiety system captures heart rate data via a custom Wear OS application on a 5-minute duty cycle. The modeling pipeline consists of three distinct stages:
- Image-Based Representation: Heart rate variability is converted into Recurrence Plots (or Recurrence Quantification Analysis Matrices). These 2D images reveal hidden dynamic patterns in physiological signals that are often missed by traditional time-series analysis.
- Transfer Learning: A ResNet-18 architecture is pre-trained on the TILES-18 dataset, which contains over 10,000 days of heart rate data from hospital workers. This stage allows the model to learn a robust representation of human physiological signals before being exposed to the target task.
- Meta-Learner for Personalization: The final classification is performed by a meta-learner (Logistic Regression) that integrates two inputs: the probabilistic prediction from the fine-tuned ResNet-18 (the "dynamic" feature) and static trait-level measures from baseline psychological surveys, such as the Social Interaction Anxiety Scale (the "static" feature).
Datasets
The study utilized two primary datasets:
- WatchAnxiety Dataset: Collected from 72 undergraduate students with moderate-to-severe social anxiety, featuring 2,742 real-world anxiety self-reports.
- TILES-18 Dataset: A public dataset of 212 hospital workers used for pre-training and external validation, containing 10,095 daily anxiety reports.
Key Insights and Results
- Temporal Windowing: Analysis of different time windows revealed that a 1.5-hour window of data leading up to a report provided the optimal balance for capturing the transient nature of state anxiety.
- Model Performance: The system achieved 60.4% balanced accuracy and F1 score on the student dataset. On the external TILES-18 dataset, it reached 59.1% balanced accuracy, outperforming previous state-of-the-art methods by 7%.
- Cross-Population Generalizability: The effectiveness of a model pre-trained on hospital staff for predicting anxiety in college students suggests that physiological signatures of stress are largely universal across different demographics and stressors.
Discussion and Future Work
While WatchAnxiety demonstrates the power of transfer learning for physiological sensing, several avenues for improvement remain. Currently, the model relies exclusively on heart rate; integrating other smartwatch data such as acoustics (voice) or behavioral patterns (step counts, sleep) could further enhance accuracy. Additionally, future research will focus on improving the interpretability of the "black box" ResNet-18 model and deploying the system on-device to trigger real-time interventions, such as guided breathing or cognitive prompts.
Summary updated