[Paper Review] Generalizing electrocardiogram delineation -- Training convolutional neural networks with synthetic data augmentation
This paper proposes a deep learning framework for electrocardiogram (ECG) delineation using synthetic data augmentation and novel loss functions, achieving an F1-score of 99.38% and sub-20ms delineation error across diverse ECG databases. The method combines pseudo-synthetic ECG generation with shape-regularized training to improve generalization and robustness in beat-level fiducial detection.
Obtaining per-beat information is a key task in the analysis of cardiac electrocardiograms (ECG), as many downstream diagnosis tasks are dependent on ECG-based measurements. Those measurements, however, are costly to produce, especially in recordings that change throughout long periods of time. However, existing annotated databases for ECG delineation are small, being insufficient in size and in the array of pathological conditions they represent. This article delves has two main contributions. First, a pseudo-synthetic data generation algorithm was developed, based in probabilistically composing ECG traces given "pools" of fundamental segments, as cropped from the original databases, and a set of rules for their arrangement into coherent synthetic traces. The generation of conditions is controlled by imposing expert knowledge on the generated trace, which increases the input variability for training the model. Second, two novel segmentation-based loss functions have been developed, which attempt at enforcing the prediction of an exact number of independent structures and at producing closer segmentation boundaries by focusing on a reduced number of samples. The best performing model obtained an $F_1$-score of 99.38\\% and a delineation error of $2.19 \\pm 17.73$ ms and $4.45 \\pm 18.32$ ms for all wave's fiducials (onsets and offsets, respectively), as averaged across the P, QRS and T waves for three distinct freely available databases. The excellent results were obtained despite the heterogeneous characteristics of the tested databases, in terms of lead configurations (Holter, 12-lead), sampling frequencies ($250$, $500$ and $2,000$ Hz) and represented pathophysiologies (e.g., different types of arrhythmias, sinus rhythm with structural heart disease), hinting at its generalization capabilities, while outperforming current state-of-the-art delineation approaches.
Motivation & Objective
- To address the scarcity and limited diversity of annotated ECG databases for training deep learning models.
- To improve generalization of ECG delineation models across varying lead configurations, sampling frequencies, and pathological conditions.
- To reduce reliance on large annotated datasets by introducing a pseudo-synthetic data generation scheme based on fundamental ECG segments.
- To enhance model robustness through novel segmentation-based loss functions that enforce accurate boundary prediction and fixed structure counts.
- To develop a clinically applicable, end-to-end deep learning pipeline for automatic ECG fiducial detection with high precision and generalization.
Proposed method
- A pseudo-synthetic data generation scheme was developed by probabilistically composing fundamental ECG segments (P, QRS, T waves) from real databases using expert-defined rules for coherent trace assembly.
- The synthetic data generator incorporates controlled variability by applying morphological modifications and pathophysiological conditions such as arrhythmias and conduction abnormalities.
- A fully convolutional U-Net-based architecture was trained to predict fiducial points (onsets and offsets) for P, QRS, and T waves across multiple leads and sampling rates.
- Two novel loss functions were introduced: one enforcing the prediction of exactly one instance per cardiac structure, and another focusing on precise boundary localization by concentrating on a reduced set of critical samples.
- Input signals were normalized using a median-based moving window (256 samples) to improve robustness to amplitude variations across different rhythms.
- The model was trained and evaluated on three open-source databases: QT, LU, and Zhejiang Hospital, covering 12-lead and Holter recordings at 250, 500, and 2000 Hz.
Experimental results
Research questions
- RQ1Can synthetic data augmentation based on real ECG segments improve the generalization of deep learning models in ECG delineation across diverse databases?
- RQ2How effective are shape-regularized loss functions in enforcing accurate detection of a fixed number of cardiac waveforms and precise boundary localization?
- RQ3To what extent can a deep learning model trained on synthetic data achieve state-of-the-art performance on real-world ECG databases with varying lead configurations and pathologies?
- RQ4Does the integration of expert knowledge into synthetic data generation enhance model robustness and reduce overfitting to specific morphologies?
- RQ5How does the model perform on challenging cases such as fast ventricular tachycardia or subtle wave morphologies?
Key findings
- The proposed model achieved an F1-score of 99.38% on the combined test set across three public ECG databases, indicating near-perfect detection of fiducial points.
- The mean delineation error was 2.19 ± 17.73 ms for onsets and 4.45 ± 18.32 ms for offsets across P, QRS, and T waves, demonstrating high temporal precision.
- The model generalized well across databases with different lead configurations (12-lead vs. Holter), sampling frequencies (250, 500, 2000 Hz), and pathophysiologies, including various arrhythmias and structural heart disease.
- The model outperformed existing state-of-the-art approaches, particularly in reducing erroneous predictions such as mistagged waves, misplaced fiducials, or noisy activations.
- Despite its robustness, the model showed some sensitivity to input normalization, with performance improved by median-based moving window normalization over 256 samples.
- The model struggled slightly with very fast ventricular tachycardia, a known challenge even for expert cardiologists, indicating a remaining clinical frontier.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.