Manuscript Offprint

arXiv:2609.35634

DR-net-Mamba: Selective State-Space Modeling for Long-Range ECG Time-Series Denoising

Basile Morel, Samuel Ruiperez-Campillo, Andreas P. Streich, Julia E. Vogt, Thomas Hofmann

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Basile Morel, Samuel Ruipérez-Campillo, Andreas P. Streich, Julia E. Vogt, Thomas Hofmann

Abstract—Electrocardiogram (ECG) recordings are corrupted by non-stationary noise sources that degrade diagnostic reliability, particularly in ambulatory and long-duration recordings. Deep learning denoisers exist, but convolutional architectures are limited by their receptive field, transformer-based models scale quadratically with sequence length, and diffusion-based approaches incur prohibitive inference cost. We propose a Mamba-augmented model that inserts selective state-space blocks at the convolutional bottleneck, combining local feature extraction with long-range temporal modeling at linear complexity. We comprehensively evaluate the proposed model with respect to reconstruction fidelity, noise robustness, recording-length scaling, and downstream diagnostic classification across over 40 pathology classes. On synthetic and real datasets, our model achieves the highest SNR and lowest RMSE, with the Mamba advantage increasing with sequence length and in low-SNR regimes. On classification with two independent classifiers, the proposed Mamba-based models achieve the best macro AUROC among all denoisers and improve over their convolutional base models. Calibration is more nuanced and classifier-dependent: denoising improves Binary Cross-Entropy and Brier score on Inception1D but often fails to beat the noisy input on ResNet1D-Wang, and the lead-specific Mamba variant is the only denoiser to improve both calibration metrics over the noisy baseline on both classifiers. Per-class analysis reveals a morphology-dependent benefit: Mamba substantially improves ST/T-change diagnoses, which depend on broad, context-sensitive waveforms.

Index Terms—Electrocardiogram, selective state-space models, Mamba, deep learning, physiological time series, signal theory, long-range temporal modeling.

I. INTRODUCTION

Cardiovascular diseases remain the leading cause of mortality worldwide [1], motivating the development of scalable, automated screening tools. The electrocardiogram (ECG) is non-invasive, inexpensive, and widely deployed across clinical and ambulatory settings [2]. Recent work has shown that deep learning (DL) applied to ECG signals can aid in the detection and risk assessment of multiple cardiovascular conditions [3], [4], including structural abnormalities [5], ventricular dysfunction in adult [6] and pediatric populations [7], [8], ischemic disease [9], cardiomyopathies [10], arrhythmias [11], [12], or primary prevention [13]. However, downstream analyses depend critically on signal quality, which is often degraded by non-stationary, unstructured noise sources that evolve unpredictably over long recordings. When multiple contaminations overlap, the signal-to-noise ratio (SNR) can drop to levels at which both human readers and automated classifiers fail.

Traditional denoising methods based on filtering, wavelets, and signal decomposition can be effective in controlled settings but require expert-driven parameter tuning and degrade under realistic multi-source noise [14], [15]. DL has advanced the field substantially: convolutional autoencoders [16], [17], recurrent networks [18], GANs [19], [20], and diffusion models [21] all improve reconstruction fidelity over classical pipelines. Yet, supervised methods suffer from the scarcity of clean ground truth in clinical datasets [16], Transformer-based architectures face quadratic compute and memory scaling with sequence length [22], [23], and diffusion models incur high inference costs from iterative sampling [24]. These constraints are especially problematic for long ambulatory recordings, where denoising must operate over tens of seconds of continuous signal at low latency.

Selective state-space models, and Mamba in particular [25], offer a compelling alternative. By making the state-transition parameters input-dependent, Mamba combines long-range temporal modeling with linear-time complexity and efficient recurrent-style inference. Mamba has been explored for ECG classification [26], [27] and short-segment enhancement [28], yet its potential for ECG denoising under diverse noise conditions and recording lengths remains unexplored.

In this work, we propose DR-net-Mamba, a two-stage architecture that inserts selective state-space blocks at the bottleneck of a convolutional UNet encoder-decoder, extending the effective receptive field to the full sequence length while adding only linear computational overhead, with a compact architecture suited for deployment. A learnable log-compression layer normalizes dynamic range. We evaluate DR-net-Mamba across four complementary axes: (i) reconstruction fidelity on synthetic, clinical, and ambulatory datasets under simultaneous four-source noise at clinically calibrated levels; (ii) noise robustness across clinically representative SNR regimes and noise conditions; (iii) recording-length scaling, characterizing how the selective state-space bottleneck leverages increasing temporal context to improve sequence-to-sequence modeling; and (iv) downstream diagnostic classification of 44 PTB-XL pathology classes through two independent classifiers, evaluating whether denoising gains preserve or improve diagnostic accuracy in a clinically actionable setting. To the best of our knowledge, this is the first evaluation framework spanning

B. Morel, S. Ruipérez-Campillo, and A. P. Streich are co-first authors. J.E. Vogt and T. Hofmann as co-senior authors.

B. M., S. R.-C., A. P. S., J.E. V., and T. H. and are with the Department of Computer Science at ETH Zurich, Universitätstrasse 6, 8092 Zürich, Switzerland.

IEEE TRANSACTIONS AND JOURNALS TEMPLATE

reconstruction, noise robustness, length scaling, and clinical utility within a single study for ECG denoising. Our open code is publicly available at https://github.com/...

References (66)

  • Global burden of cardiovascular diseases: Projections from 2025 to 2050
  • Extended ambulatory ecg monitoring enhances identification of higher-risk ventricular tachyarrhythmias in patients with hypertrophic cardiomyopathy
  • Foundation model of ecg diagnosis: Diagnostics and explanations of any form and rhythm on ecg
  • An electrocardiogram foundation model built on over 10 million recordings
  • Detecting structural heart disease from electrocardiograms using ai
  • Using deep-learning algorithms to simultaneously identify right and left ventricular dysfunction from the electrocardiogram
  • Pediatric ecg-based deep learning to predict left ventricular dysfunction and remodeling
  • Electrocardiogram-based deep learning to predict left ventricular systolic dysfunction in paediatric and adult congenital heart disease in the usa: A multicentre modelling study
  • Ecg-based machine learning model for af identification in patients with first ischemic stroke
  • Identification of hypertrophic cardiomyopathy on electrocardiographic images with deep learning
  • Dynamic prediction of malignant ventricular arrhythmias using neural networks in patients with an implantable cardioverter-defibrillator
  • Clustering and machine learning framework for medical time series classification
  • Optimizing patient selection for primary prevention implantable cardioverter-defibrillator implantation: Utilizing multimodal machine learning to assess risk of implantable cardioverter-defibrillator non-benefit
  • Review of noise removal techniques in ecg signals
  • Preprocessing and denoising techniques for electrocardiography and magnetocardiography: A review
  • Noise reduction in ecg signals using fully convolutional denoising autoencoders
  • Two-stage ecg signal denoising based on deep convolutional network
  • K. Antczak, Deep recurrent neural networks for ecg signal denoising, 2019. arXiv: 1807.11551 [cs.NE]. (opens arXiv in a new tab)
  • An ecg signal denoising method using conditional generative adversarial net
  • A new ecg denoising framework using generative adversarial network
  • Descod-ecg: Deep score-based diffusion model for ecg baseline wander and noise removal
  • Attention is all you need
  • Efficient transformers: A survey
  • Denoising Diffusion Implicit Models
  • Mamba: Linear-time sequence modeling with selective state spaces
  • Ecgmamba: Towards ecg classification with state space models
  • Towards transparent cardiac disease diagnosis with electrocardiography using mamba capsule network, 2024 (opens arXiv in a new tab)
  • K.-H. Hung et al., Mecg-e: Mamba-based ecg enhancer for baseline wander removal, 2024. arXiv: 2409.18828 [eess.SP]. (opens arXiv in a new tab)
  • An adaptive kalman filter for ecg signal enhancement
  • Ecg signal denoising and baseline wander correction based on the IEEE TRANSACTIONS AND JOURNALS TEMPLATE empirical mode decomposition
  • ECG-based biometrics using a deep network based on independent component analysis
  • Accurate wavelet thresholding method for ecg signals
  • Characterization of noise in long-term ecg monitoring with machine learning based on clinical criteria
  • Ecgdedrdnet: A deep learning-based method for electrocardiogram noise removal using a double recurrent dense network (opens arXiv in a new tab)
  • Generative adversarial networks with fully connected layers to denoise ppg signals
  • Reducing diverse sources of noise in ventricular electrical signals using variational autoencoders
  • Antithetic sampling enhanced probabilistic diffusion for denoising cardiac time series
  • Deep neural network denoising model based on sparse representation algorithm for ecg signal
  • Deepfilter: An ecg baseline wander removal filter using deep learning techniques
  • Ecg signal denoising using multi-scale patch embedding and transformers
  • S. Kiranyaz et al., Blind ECG restoration by operational cycle-GANs, 2022. arXiv: 2202.00589 [eess.SP]. (opens arXiv in a new tab)
  • A dynamical model for generating synthetic electrocardiogram signals
  • Synthesis of realistic ECG using generative adversarial networks
  • Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network
  • Interpretable feature generation in ECG using a variational autoencoder
  • The hidden attention of mamba models
  • Mamba adaptive anomaly transformer with association discrepancy for time series
  • U-Net: Convolutional Networks for Biomedical Image Segmentation
  • Learning long-term dependencies with gradient descent is difficult
  • On the difficulty of training Recurrent Neural Networks
  • Cleaning ECG with deep learning: A denoiser based on gated recurrent units
  • A Simplified Approach, 10th ed. Philadelphia: Elsevier, 2024, ISBN: 978-0-323-82475-0
  • The art of selecting the ecg input in neural networks to classify heart diseases: A dual focus on maximizing information and reducing redundancy
  • Ptb-xl, a large publicly available electrocardiography dataset
  • The european st-t database: Standard for evaluating systems for the analysis of st-t changes in ambulatory electrocardiography
  • Estimation of QRS complex power spectra for design of a QRS filter
  • A noise stress test for arrhythmia detectors
  • A lightweight u-net model for denoising and noise localization of ecg signals
  • On calibration of modern neural networks
  • Deep learning for ECG analysis: Benchmarks and insights from PTB-XL
  • Inceptiontime: Finding alexnet for time series classification
  • A strong baseline, 2016 (opens arXiv in a new tab)
  • Detection and classification of ECG noises using decomposition on mixed codebook for quality analysis
  • Adult and Pediatric, 6th
  • AHA/ACCF/HRS recommendations for the standardization and interpretation of the electrocardiogram: Part III: Intraventricular conduction disturbances
  • Introducing Hann windows for reducing edge-effects in patch-based image segmentation