ECG-Mamba vs Improved ECG-Mamba: Cardiac Abnormality Classification
This repository contains an implementation and comparison of two Vision Mamba-based architectures for cardiac abnormality classification from 12-lead ECG signals, with a focus on Noise Handling Comparison.
Overview
This project compares two approaches with emphasis on noise handling techniques:
Baseline ECG-Mamba - A straightforward Vision Mamba architecture for ECG classification
Improved ECG-Mamba - An enhanced version featuring:
Lead-Specific Multi-Branch Architecture
Mamba-Transformer Hybrid with Attention layers
Bi-Directional Scanning capabilities
Noise Handling Comparison
Non-Uniform-Mix vs Contrastive Learning + Masking
A key contribution of this work is the comparison of different noise handling and data augmentation strategies:
Non-Uniform-Mix Augmentation: A novel augmentation technique specifically designed for ECG signals that applies non-uniform mixing across different leads and time segments
Contrastive Learning + Masking: Traditional contrastive learning approaches combined with random masking strategies
The notebook provides detailed analysis and comparative results demonstrating the effectiveness of each approach under various noise conditions.
Reference
This implementation is based on:
ECG-Mamba: Cardiac Abnormality Classification With Non-Uniform-Mix Augmentation on 12-Lead ECGsIEEE Journal of Translational Engineering in Health and Medicine (IEEE JTEHM), 2025
Dataset
The models are trained and evaluated on the PTB-XL dataset from PhysioNet:
300 records sampled from the full PTB-XL database
12-lead ECG recordings
Multiple cardiac abnormality classes
Dataset Citation
Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., ... & Stanley, H. E. (2000).
PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals.
Circulation [Online]. 101 (23), pp. e215–e220.
Features
Baseline ECG-Mamba
Vision Mamba-based architecture
Patch-based ECG signal processing
Efficient sequence modeling with State Space Models (SSM)
Improved ECG-Mamba
Multi-Branch Architecture: Separate processing branches for different ECG leads
Hybrid Architecture: Combines Mamba SSM with Transformer attention mechanisms
Bi-Directional Scanning: Processes ECG signals in both forward and backward directions
Enhanced feature extraction and representation learning
IEEE JTEHM for publishing the original ECG-Mamba paper
Citation
If you use this code in your research, please cite:
bibtex
1@article{ecg-mamba-2025,
2 title={ECG-Mamba: Cardiac Abnormality Classification With Non-Uniform-Mix Augmentation on 12-Lead ECGs},
3 journal={IEEE Journal of Translational Engineering in Health and Medicine},
4 year={2025},
5 volume={TBD},
6 pages={TBD}
7}