<p>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 <i>frozen</i> 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 <b>accuracy</b> to <b>92.12%</b> (vs. 80.54% / 85.58%) with <b>F1</b> of <b>95.43%</b> (vs. 88.82% / 91.99%). On RMSSD estimation, the proposed model reduces combined MAE to <b>10.56&#xa0;ms</b> (from 45.12&#xa0;ms / 27.93&#xa0;ms) and sharply curtails tail errors (<b>P95:</b> 47.00&#xa0;ms vs. 313.35&#xa0;ms / 167.84&#xa0;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 (<b>7.57&#xa0;ms</b> vs. 13.96&#xa0;ms / 9.61&#xa0;ms) under a selective gating regime. The end-to-end model is compact (<b>2.62&#xa0;M</b> parameters; <b>10.07&#xa0;MB</b> on disk) and real-time capable, achieving <b>15.0&#xa0;ms</b> mean latency at batch size 1 (66.5 windows/s) and scaling to <InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\sim\)</EquationSource> </InlineEquation><b>4.49k</b> windows/s at batch size 1024 on a single consumer-grade GPU.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Low-latency HRV analysis from ultra-short ECG windows using a modular deep-learning framework

  • Jan Dobrosolski,
  • Julian Szymański,
  • Dariusz Kozłowski

摘要

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 \(\sim\) 4.49k windows/s at batch size 1024 on a single consumer-grade GPU.