Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences

Davide Gabrielli, Bardh Prenkaj, Paola Velardi · DOI

Monitoring stress levels is a critical component in managing neurodegenerative diseases such as Alzheimer’s and Parkinson’s. In these conditions, elevated stress can significantly exacerbate symptoms, yet continuous, non-invasive monitoring remains a significant challenge. This paper introduces a novel framework that utilizes UniTS, a foundational model for time series, to detect stress from wearable data. By reframing stress detection as an anomaly detection task and integrating Large Language Models (LLMs) for clinical explainability, the authors achieve a 22% performance improvement over current state-of-the-art methods.

The Challenges of Modern Stress Monitoring

Current solutions for stress detection face a "Goldilocks" problem characterized by three primary hurdles:

  1. Invasiveness vs. Data Quality: High-fidelity clinical tools like Electrocardiograms (ECGs) provide excellent data but are too invasive for daily use. Conversely, "seamless" wearables like smartwatches produce noisier data that traditional AI models often fail to interpret accurately.
  2. Classification vs. Personalization: Most research treats stress detection as a binary classification problem (e.g., "stressed" vs. "not stressed"). This approach ignores individual physiological baselines; a heart rate that indicates stress for one person might be normal for another.
  3. The "Black Box" Problem: Clinicians require transparency. AI predictions without human-readable explanations regarding why a patient is flagged are difficult to trust in a medical context.

As shown in the literature summary above, the vast majority of previous research has focused on classification tasks. This paper departs from that trend by adopting an Anomaly Detection (AD) framework to better handle individual variability.

Methodology: UniTS and Anomaly Detection

The proposed framework is built upon three core pillars designed to address the aforementioned challenges:

Foundational Time Series Modeling

The system utilizes UniTS, a multi-task foundational model specifically designed for multivariate time series. Unlike standard Transformer architectures, UniTS incorporates a modified structure featuring "Time" and "Variable" Multi-Head Self-Attention (MHSA). This allows the model to capture complex dependencies both across time steps and between different sensor inputs (e.g., Heart Rate and Heart Rate Variability).

Anomaly Detection (AD) Framework

Instead of training a standard classifier, the authors fine-tune UniTS for reconstruction. The model is trained to learn and rebuild "normal" physiological patterns. During inference, if the reconstruction error—the difference between the actual signal and the model's attempt to rebuild it—exceeds a dynamic threshold, the system flags an anomaly, which is interpreted as a stress event. This approach allows the system to inherently adapt to a user's unique physiological baseline.

LLM-Powered Explainability

To provide clinical utility, anomaly scores and signal data are fed into a Large Language Model (GPT-4o). Using persona-based prompting, the LLM generates structured clinical reports. These reports detail the analysis, identify potential causes based on signal patterns, and assess the criticality of the detected stress event, bridging the gap between raw data and actionable medical insights.

Experimental Evaluation and Results

The model was rigorously evaluated on three benchmark datasets: DREAMER (ECG/EEG), MAHNOB-HCI (multimedia stimulation), and WESAD (medical-grade ECG vs. wristband BVP).

Key Performance Metrics

  • Superior Accuracy: UniTS achieved an average F1 score of 0.821, outperforming 12 leading methods (including DAGMM and USAD) by an average of 22%.
  • Hardware Resilience: On the WESAD dataset, the model demonstrated comparable performance between invasive ECG (0.793 F1) and lightweight wristband BVP (0.800 F1). This suggests that foundational models can effectively "boost" the utility of lower-cost wearable hardware.
  • Clinical Validation: A medical professional with over 40 years of experience evaluated the LLM-generated reports, rating them highly for analysis (4.875/5) and criticality assessment (4.625/5).

Discussion and Future Directions

A critical insight from the study is the trade-off regarding sampling rates. The authors found that performance drops by approximately 54% if the sampling interval exceeds 10 seconds, identifying this as the "sweet spot" for balancing battery life with diagnostic accuracy. Furthermore, the reconstruction-based approach provides inherent transparency, as clinicians can see which specific variables (e.g., HRV vs. HR) contributed most to an anomaly flag.

Despite these successes, limitations remain. The current study relies on controlled laboratory data, which is less noisy than real-world "naturalistic" data. Additionally, the LLM lacks context regarding a patient's daily routine (e.g., distinguishing between exercise-induced heart rate spikes and emotional stress). Future work will focus on integrating actigraphy and sleep data to provide a more holistic view of patient health and testing the system in home-based environments.

Summary updated

BibTeX
@misc{gabrielli2024seamless,
  author = {Davide Gabrielli and Bardh Prenkaj and Paola Velardi},
  title = {{Seamless Monitoring of Stress Levels Leveraging a Universal Model for Time Sequences}},
  year = {2024},
  eprint = {2407.03821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.03821},
}
Figure