Skip to content

Personalized Electrocardiographic and HRV Dynamics for Acute Stress Detection: A Leave-One-Subject-Out Benchmark on WESAD

Sep 2026 · Zenodo (CERN European Organization for Nuclear Research)
Heart Rate Variability and Autonomic Control Emotion and Mood Recognition

Abstract

Automated classification of acute psychological stress from non-invasive wearable electrocardiography (ECG) is a fundamental problem in physiological computing, affective state recognition, and wearable Internet of Medical Things (IoMT). A central barrier to cross-subject generalization is inter-individual baseline heterogeneity: resting heart rate and basal heart rate variability (HRV) metrics vary widely across individuals due to genetic, cardiorespiratory fitness, and circadian factors, causing uncalibrated global classifiers to degrade substantially on unseen subjects. Furthermore, resource constraints and telemetry-privacy vulnerabilities pose major roadblocks for edge-node wearable deployment. In this work, we present an end-to-end reproducible research pipeline benchmarked across all 15 subjects (N = 15, 445 standardized 60-second windows) of the public Wearable Stress and Affect Detection (WESAD) dataset, paired with a bare-metal embedded microcontroller deployment. Single-lead chest ECG acquired at 700 Hz is conditioned via zero-phase 4th-order Butterworth filtering (0.5–40 Hz), followed by adaptive noise-floor peak prominence detection and physiological interval gating. A selected 8-feature representation capturing heart rate, time-domain variability, and robust spread metrics is transformed via subject-specific relative baseline calibration: X* = (X - Bs) / |Bs|. Key Results and Findings: 1. Generalization Boost: Evaluated under strict 15-fold Leave-One-Subject-Out Cross-Validation (LOSO-CV), baseline-relative calibration elevates classification accuracy from 81.57% to 92.36% (+10.79%) and stress F1-score from 73.03% to 89.03% (+16.00%) over identical unnormalized baselines. 2. Scorecard: At a calibrated decision threshold of tau = 0.35, the primary model achieves an ROC-AUC of 0.9494, PR-AUC of 0.9467, sensitivity of 86.25%, and specificity of 95.79%. A comparative benchmark across six machine learning architectures demonstrates consistent generalization (ROC-AUC > 0.937). 3. Physiological Attribution: Permutation importance and odds ratio analyses indicate that cardiac interval compression (Delta MeanRR) and heart rate acceleration (Delta MeanHR) are the primary contributors to the learned boundary. 4. Bare-Metal ARM Cortex-M4 DSP: Translating this framework to physical hardware, we implement a bare-metal edge processing node on the STM32G474RE (16 MHz HSI). Real-time signal conditioning is executed via an on-chip 5-stage Direct Form II Transposed Biquad IIR filter executing in ~1.87 µs per sample (<0.1% arithmetic CPU utilization at 350 Hz). 5. Telemetry Obfuscation: To safeguard patient privacy against casual wire tapping, an on-chip 32-bit discrete chaotic stream scrambler (Marsaglia Xorshift32 + Golden Ratio Weyl sequence with Nonce-CBC diffusion) executes in 2.0 µs (32 clock cycles), elevating wire Shannon entropy to H = 7.25–7.98 bits/byte while supporting bit-exact (0.000000 V) terminal descrambling. 6. Physical HIL Validation: Continuous hardware-in-the-loop streaming over 15,000 packets demonstrates 100% transmission reliability and zero CRC errors across authorized monitoring and adversarial eavesdropper operating modes.

View source

Similar papers

#computer vision Review Sep 2017

Agile Software Development Methods: Review and Analysis

This publication proposes a definition and a classification of agile software development approaches and analyses ten software development methods that can be characterized as being "agile" against the defined criterion.

P. Abrahamsson, O. Salo, Jussi Ronkainen et al. · 727 citations · ⚡54
#computer vision Jun 2008

The impact of agile practices on communication in software development

The study shows that agile practices improve both informal and formal communication, but indicates that, in larger development situations involving multiple external stakeholders, a mismatch of adequate communication mechanisms can sometimes even hinder the communication.

M. Pikkarainen, Jukka Haikara, O. Salo et al. · 401 citations · ⚡48
#machine learning Review Open access Oct 2014

Software development in startup companies: A systematic mapping study

The results indicate that software engineering work practices are chosen opportunistically, adapted and configured to provide value under the constrains imposed by the startup context.

Nicolò Paternoster, Carmine Giardino, M. Unterkalmsteiner et al. · 394 citations · ⚡54

Related blog posts

Microsoft Research Blog Sep 29, 2026

Introducing Quine: An AI research system designed for the complexity of biology

Biology doesn't operate in silos, and neither should the AI representation of it. Quine is an early-stage research effort to create a multimodal world model of biology. By connecting insights across biological scales and modalities, Quine helps scientists computationally search a space far larger than intuition allows and prioritize hypotheses before they reach the lab. Experimental results provide important feedback, helping researchers sharpen future research directions. The post Introducing Q…

Microsoft Research Blog Aug 31, 2026

GigaPath-Flash and GigaTIME-Flash: Toward population-scale discovery with efficient pathology foundation models

What if pathology foundation models could do more with less? GigaPath-Flash and GigaTIME-Flash cut computational demands while maintaining strong performance, opening the door to larger studies and broader exploration. The post GigaPath-Flash and GigaTIME-Flash: Toward population-scale discovery with efficient pathology foundation models appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.