DeScoD-ECG: Deep Score-Based Diffusion Model for ECG Baseline Wander and Noise Removal

Huayu Li, Gregory Ditzler, Janet Roveda, Ao Li

Abstract

Electrocardiogram (ECG) signals are essential for cardiac diagnosis but are highly susceptible to noise, particularly low-frequency "baseline wander" from patient movement or respiration. Traditional denoising methods often fail under high-amplitude noise, leading to signal distortion. We present DeScoD-ECG, a conditional score-based diffusion model that treats denoising as a generative task. By learning the score of the clean ECG data distribution, the model iteratively refines noisy signals into high-fidelity reconstructions. Utilizing a specialized architecture with Half Normalized Filters (HNF) and Bridge blocks, DeScoD-ECG achieves a 20% performance improvement over existing state-of-the-art methods. Our multi-shot averaging strategy further ensures stability and accuracy even in extreme noise scenarios.

Introduction: The Challenge of ECG Denoising

Electrocardiograms (ECGs) are notoriously sensitive to environmental and physiological noise. In real-world clinical settings, such as stress tests, signals are often obscured by baseline wander and electrode artifacts. Traditional digital filters (FIR/IIR) and discriminative deep learning models like autoencoders struggle when noise amplitudes are high, often failing to distinguish between the cardiac signal and interference. This can result in distorted waveforms and potential misdiagnosis. DeScoD-ECG addresses this by leveraging the generative power of diffusion models to "hallucinate" the clean signal based on the learned distribution of clean ECG data.

Methods: Conditional Score-Based Diffusion

The proposed DeScoD-ECG model employs a conditional diffusion framework. Unlike standard generative models that start from pure Gaussian noise, this approach uses the noisy ECG observation to guide the reverse diffusion process.

The conditional diffusion process for ECG denoising, illustrating the transition from noisy observations to clean latent variables through iterative refinement.

Network Architecture

The backbone of the model consists of two innovative components designed for signal processing:

  • Half Normalized Filters (HNF): These blocks use multi-scale filters to capture features across different resolutions. A "half-instance-norm" technique is applied to maintain training stability while preserving the natural statistical properties of the ECG signal.
  • Bridge Blocks: These blocks utilize Feature-wise Linear Modulation (FiLM) to inject information about the current noise level into the processing stream. This allows the network to dynamically adapt its denoising strategy at each step of the diffusion process.
The detailed architecture of DeScoD-ECG, highlighting the HNF Block and Bridge components used for feature extraction and noise-level conditioning.

Multi-Shot Averaging

To mitigate the inherent stochasticity of the diffusion process, the authors implemented a "self-ensemble" strategy. By performing multiple inference runs (e.g., 10 "shots") and averaging the results, the model significantly reduces reconstruction error and enhances the stability of the final output.

Datasets and Evaluation

The model was trained and validated using two primary PhysioNet benchmarks: the QT Database for clean ECG morphologies and the MIT-BIH Noise Stress Test (NST) Database for realistic noise profiles. This combination allowed for testing across a wide range of noise-to-signal ratios (0.2 to 2.0).

Key Results

DeScoD-ECG demonstrated superior performance compared to traditional filters and deep learning baselines like DeepFilter.

  • Quantitative Gains: The model achieved at least a 20% improvement across key metrics, including Sum of Square Distances (SSD) and Cosine Similarity.
  • Robustness to Extreme Noise: In high-noise tests (1.5 to 2.0 amplitude), the 10-shot DeScoD-ECG maintained a Cosine Similarity of 0.889, outperforming DeepFilter's 0.844.
  • Visual Fidelity: Qualitative assessments show that DeScoD-ECG excels at preserving fine details, such as P-waves and T-waves, which are frequently lost or smoothed by conventional denoising techniques.

Conclusion and Future Work

DeScoD-ECG represents a significant step forward in robust ECG signal processing by reframing denoising as a conditional generative task. While the iterative nature of diffusion models introduces higher computational costs compared to single-pass networks, the gains in signal fidelity under extreme conditions are substantial. Future research will focus on optimizing inference speed using ODE solvers and exploring more complex, non-stationary noise types.

Summary updated

BibTeX
@article{li2024descod,
  author = {Huayu Li and Gregory Ditzler and Janet Roveda and Ao Li},
  title = {{DeScoD-ECG: Deep Score-Based Diffusion Model for ECG Baseline Wander and Noise Removal}},
  journal = {IEEE J. Biomed. Health Informatics},
  year = {2024},
  doi = {10.1109/jbhi.2023.3237712},
}
Figure