Related Experiment Video
Updated: Apr 22, 2026

Author Spotlight: Advancing the Study of Brain-Heart Interplay with a Comprehensive EEGLAB Plugin for Multimodal Signal Analysis
Published on: April 26, 2024
Low-latency HRV analysis from ultra-short ECG windows using a modular deep-learning framework
Jan Dobrosolski1, Julian Szymański2, Dariusz Kozłowski3
1Faculty of Electronics, Telecommunications and Informatics, Gdansk University of Technology, Narutowicza 11/12, Gdańsk, 80-233, Poland. jan.dobrosolski@pg.edu.pl.
None:
We present a universal modular deep-learning framework and demonstrate its application to low-latency, streaming-compatible heart rate variability (HRV) analysis using RMSSD as an exemplar metric. A convolutional autoencoder is first pretrained and then reused as a frozen encoder that maps raw ECG windows to a compact latent sequence. Task-specific heads, each comprising a BiLSTM adapter, a shallow Conv1D refinement, and temporal attention pooling operate on this shared representation. A discriminator head screens low-quality windows, while a regression head estimates RMSSD; a gated inference block routes outputs so RMSSD is produced only when the discriminator exceeds a threshold, replicating a robust "mask-then-estimate" pipeline in a single deployable graph. Using LUDB and PTB-XL with segmentation-assisted peak extraction for PTB-XL, plus an out-of-distribution Apple Watch subset, we enforce rigorous quality assurance to derive validity labels and RMSSD targets. Compared to two strong classical baselines (HeartPy and NeuroKit2), our discriminator improves combined-set accuracy to 92.12% (vs. 80.54% / 85.58%) with F1 of 95.43% (vs. 88.82% / 91.99%). On RMSSD estimation, the proposed model reduces combined MAE to 10.56 ms (from 45.12 ms / 27.93 ms) and sharply curtails tail errors (P95: 47.00 ms vs. 313.35 ms / 167.84 ms), indicating substantially improved robustness under pathological and noisy ECG. On a small out-of-distribution Apple Watch subset used as a sanity-check for acquisition shift, where the model attains the lowest MAE (7.57 ms vs. 13.96 ms / 9.61 ms) under a selective gating regime. The end-to-end model is compact (2.62 M parameters; 10.07 MB on disk) and real-time capable, achieving 15.0 ms mean latency at batch size 1 (66.5 windows/s) and scaling to ∼4.49k windows/s at batch size 1024 on a single consumer-grade GPU.
Related Concept Videos
Correlation between ECG and Cardiac Cycle
A cardiac action potential originates in the SA node and spreads throughout the atria and the AV node in approximately 0.03 seconds. This results in the P wave in an ECG and triggers atrial contraction. The action potential is then briefly slowed at the AV node, allowing the atria to contract and fill the ventricles with blood before...
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and...
Pulse rhythm
Conversely, an irregular pulse pattern is termed dysrhythmia, stemming from disruptions in cardiac...

