Skip to content

Electrode-level artifact simulation and corruption-aware gated reconstruction of the 12-lead ECG, with real-noise and paper-ECG external validation

Sanjoy Das Joy, Arfatul Islam Asif, Unayes Ahmed Khan, Anupam Kumar Bairagi, Abdullah Al Noman, Mohammad Shahidur Rahman

cs.LG

Abstract

Deep learning denoisers for the electrocardiogram (ECG) are trained on noise added to individual leads, whereas real artifacts arise at the electrodes and reach the leads through the lead equations. We present a simulator that generates seven artifact mechanisms, including lead-off and cable reversal, on the electrodes and projects them exactly to the 12 leads with per-lead and per-electrode severity. On it we build CAG-UNet, a corruption-aware gated U-Net in which a Monte Carlo dropout estimate of where a record is corrupted conditions the reconstruction through gating and feature-wise linear modulation. Four training noise models were compared in two architectures, with an analysis plan fixed before a single PTB-XL test evaluation. Every denoiser removed almost only the noise it was trained on. On 517 real noisy recordings, electrode-level training removed more noise than additive training in both architectures, mainly through lead-off and Wilson-terminal propagation. On electrode-level artifacts, CAG-UNet reduced per-record RMSE by 4.1% and 8.5% versus an unconditioned network and a multi-lead U-Net; a three-seed ablation located the gain in the conditioning. Its corruption output ranked annotated noisy leads in real records (AUROC 0.784), and keeping its 80% most trusted leads cut their error by 26%, close to an oracle. A frozen classifier's macro AUROC rose from 0.906 to 0.921 under simulated artifacts (clean signal 0.925), but not significantly under real noise. On 397 photographed paper ECGs from Bangladesh, digitized heart rate agreed with the devices (ICC 0.95) and a distortion-robust classifier reached macro AUROC 0.836 against device diagnoses.

Create a lesson

Metadata

Comments
21 pages, 14 figures, 10 tables, 3 appendices. Code and trained models: https://github.com/sanjoydasjoy/cag-unet-ecg