TimePatch-SSL: Contrastive Self-Supervised Learning with Hierarchical Time-Patch Transformers for Multimodal Stress Detection
Physiological signals used in wearable devices for stress detection vary widely across individuals and acquisition settings, which poses challenges in developing models that generalize across datasets. In this paper, we propose TimePatch-SSL, a self-supervised learning framework for multimodal physiological time series that learns transferable representations from unlabeled data through a hierarchical time-patch encoder and a contrastive pretraining strategy. The learned representations are fine-tuned for stress classification using labeled samples. We evaluate the framework on the publicly available WESAD and Stress-Predict datasets under the subject-independent, cross-dataset, and multi-domain protocols. Experimental results showed that the relative performance of the Hierarchical and Standard encoders depended on the dataset, window duration, and evaluation protocol rather than consistently favoring one architecture. TimePatch-SSL achieved 74.81% accuracy and 94.44% AUROC in the cross-dataset protocol, and up to 89.34% accuracy and 88.15% AUROC on WESAD (and 82.24% accuracy and 89.79% AUROC on Stress-Predict) under subject-independent within-dataset SSL evaluation. Under multi-seed combined-dataset training across three independent seeds, the framework achieved up to 79.53±1.40% accuracy and 88.84±1.96% AUROC on held-out WESAD subjects, and 82.90±2.03% accuracy and 92.39±1.60% AUROC on held-out Stress-Predict subjects. A capacity-matched ablation further showed that scaling the Standard encoder’s parameter count did not yield a systematic performance gain, and the Hierarchical encoder did not consistently outperform the capacity-controlled baseline. Paired comparisons at the subject level showed no statistically significant superior performance of self-supervised pretraining over supervised initialization. Consequently, the effectiveness of the hierarchical patch encoding and self-supervised pretraining varied across datasets and evaluation settings.
Authors
- Cristian Lopez (ORCID: https://orcid.org/0000-0002-2568-650X)
- Aurea Soriano-Vargas (ORCID: https://orcid.org/0000-0002-8429-4119)
- Rensso Mora-Colque (ORCID: https://orcid.org/0000-0003-4734-8752)
- Leonardo Isidro-Salazar (ORCID: https://orcid.org/0009-0009-8140-1239)
- Matias Maravi-Anyosa (ORCID: https://orcid.org/0009-0002-3027-622X)
Institutions
- Universidad de Ingeniería y Tecnología (PE)
Publication Details
- Journal
- Sensors
- Published
- 2026-12-03
- DOI
- https://doi.org/10.3390/s26237654
- Primary Topic
- Emotion and Mood Recognition
- Type
- article
- Field-Weighted Citation Impact
- 0.00