Compact, Uncertainty-Aware mLSTM Model for Real-Time ECG Delineation on Edge Devices

Accurate electrocardiogram (ECG) waveform delineation underpins cardiac diagnosis and screening, yet the most accurate deep-learning models are too large for resource-constrained wearable and implantable systems. We present a compact, uncertainty-aware bidirectional matrix-memory LSTM (Bi-mLSTM) for per-sample P, QRS, and T delineation with only 2,522 parameters. The model operates on beat windows placed by automatic R-peak detection. It was selected and trained on the automatic annotations of the PhysioNet QT Database, frozen, and evaluated against expert annotations of the Lobachevsky University Database (LUDB, 200 subjects) and a clinical cohort of 25 patients with left ventricular assist devices (LVAD-DB). The tolerance-aware macro-F1 was 0.919 on LUDB and 0.875 on LVAD-DB (strict 0.850 and 0.761), the expected calibration error of the raw confidence was 0.054 and 0.041, and low confidence flagged the model’s own errors. Under tolerance-aware scoring, the model exceeded three published architectures with 0.3 to 1.4 million parameters, trained with the same windowing and procedure, on LUDB and matched the strongest of them on LVAD-DB with 119 times fewer parameters. Per record, model-derived QRS duration and QT exceeded the expert values by 12.7 and 11.3ms on LUDB, which supports trend monitoring rather than replacement of expert measurement. On an Arduino Portenta H7 microcontroller, a separately trained earlier version of the same architecture delineated a live recording in real time without quantization, with 128.6ms of processing per beat and 22 kB of memory. Accurate, calibrated, and uncertainty-aware ECG delineation is therefore feasible in real time on resource-constrained devices.

Authors

Institutions

Publication Details

Journal
Engineering Archive (engrXiv)
Published
2026-11-16
DOI
https://doi.org/10.31224/8818
Primary Topic
ECG Monitoring and Analysis
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Compact, Uncertainty-Aware mLSTM Model for Real-Time ECG Delineation on Edge Devices

Max Haberbusch, Daniel Zimpfer, Julia Riebandt, Thomas Schlöglhofer et al.
2 links
Engineering Archive (engrXiv)
ECG Monitoring and Analysis
preprint

Compact, Uncertainty-Aware mLSTM Model for Real-Time ECG Delineation on Edge Devices

Max Haberbusch, Daniel Zimpfer, Julia Riebandt, Thomas Schlöglhofer, Manfred Marx, Theodor Abart, David Lung, Philipp Heute, Francesco Moscato
preprint en

Abstract

Accurate electrocardiogram (ECG) waveform delineation underpins cardiac diagnosis and screening, yet the most accurate deep-learning models are too large for resource-constrained wearable and implantable systems. We present a compact, uncertainty-aware bidirectional matrix-memory LSTM (Bi-mLSTM) for per-sample P, QRS, and T delineation with only 2,522 parameters. The model operates on beat windows placed by automatic R-peak detection. It was selected and trained on the automatic annotations of the PhysioNet QT Database, frozen, and evaluated against expert annotations of the Lobachevsky University Database (LUDB, 200 subjects) and a clinical cohort of 25 patients with left ventricular assist devices (LVAD-DB). The tolerance-aware macro-F1 was 0.919 on LUDB and 0.875 on LVAD-DB (strict 0.850 and 0.761), the expected calibration error of the raw confidence was 0.054 and 0.041, and low confidence flagged the model’s own errors. Under tolerance-aware scoring, the model exceeded three published architectures with 0.3 to 1.4 million parameters, trained with the same windowing and procedure, on LUDB and matched the strongest of them on LVAD-DB with 119 times fewer parameters. Per record, model-derived QRS duration and QT exceeded the expert values by 12.7 and 11.3ms on LUDB, which supports trend monitoring rather than replacement of expert measurement. On an Arduino Portenta H7 microcontroller, a separately trained earlier version of the same architecture delineated a live recording in real time without quantization, with 128.6ms of processing per beat and 22 kB of memory. Accurate, calibrated, and uncertainty-aware ECG delineation is therefore feasible in real time on resource-constrained devices.

Engineering Archive (engrXiv)
Medical University of Vienna (AT)
Good health and well-being
ECG Monitoring and Analysis
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