Beyond supervision: Evaluating contrastive self-supervised learning techniques for ECG-based mental stress detection
Year: 2026
Type: article
Abstract: Mental stress contributes to heart disease, depression, and lowered quality of life, yet traditional assessment methods such as self-reports are unsuitable for continuous, real-world monitoring. Electrocardiogram (ECG)-based mental stress detection using machine learning offers a non-invasive alternative, but progress faces key challenges: supervised deep learning requires large amounts of costly labeled data, while unlabeled physiological data are readily accessible. Models also struggle to generalize across datasets due to domain shifts, especially when trained on small datasets. Contrastive self-supervised learning (SSL) shows promise by learning from unlabeled data, but remains underexplored for ECG-based mental stress detection. We present, to our knowledge, one of the first comparative evaluations of multiple time-series-specific contrastive SSL methods for ECG-only mental stress detection, comparing four approaches (SimCLR, TS-TCC, TS2Vec, InfoTS) against supervised deep learning and feature-engineered baselines. Using a dataset of 127 participants across 26 experimental conditions, we evaluated label efficiency over different annotation budgets (1%–100%) and cross-dataset generalization to two external datasets. Time-series-specific methods substantially outperformed the general-purpose SimCLR framework, with TS-TCC achieving 0.719 [0.703, 0.734] AUROC by leveraging unlabeled ECG data and only 10% of labels, recovering 90% of fully supervised CNN performance (74% after baseline adjustment; CNN trained on 100% of labels: 0.796 [0.779, 0.814] AUROC). Cross-dataset evaluation showed that fine-tuning did not meaningfully outperform training from scratch for either SSL or supervised encoders, and that feature-engineered baselines remained highly competitive. Our findings show the potential of contrastive SSL for label-efficient ECG-based mental stress detection, while underlining the continued value of domain knowledge.
Institution: Vrije Universiteit Amsterdam
Language: English
Topic: Emotion and Mood Recognition
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
Estimated APC paid: $2,590
OpenAlex ID: W7225057611
