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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

TimePatch-SSL: Contrastive Self-Supervised Learning with Hierarchical Time-Patch Transformers for Multimodal Stress Detection

Cristian Lopez, Aurea Soriano-Vargas, Rensso Mora-Colque, Leonardo Isidro-Salazar et al.
Sensors
Emotion and Mood Recognition
article

TimePatch-SSL: Contrastive Self-Supervised Learning with Hierarchical Time-Patch Transformers for Multimodal Stress Detection

Cristian Lopez, Aurea Soriano-Vargas, Rensso Mora-Colque, Leonardo Isidro-Salazar, Matias Maravi-Anyosa
article en

Abstract

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.

SensorsVol. 26(23)
Universidad de Ingeniería y Tecnología (PE)
Emotion and Mood Recognition
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon