TLDR: The research paper introduces the Unsupervised Identification and Replay-based Detection (UIRD) framework for ECG signal anomaly detection. It addresses challenges like class imbalance, data storage, and catastrophic forgetting in traditional methods. UIRD uses MadeGAN for unsupervised identification of novel anomalies and a pseudo-replay strategy with SMOTE to generate synthetic data for continual learning. This allows the model to adapt to new heart rhythm patterns without forgetting old ones, while also being memory-efficient. Validated on four public ECG datasets, UIRD demonstrates superior performance in detecting both existing and new anomalies.
Heart disease remains a leading cause of death globally, making early and accurate detection of heart abnormalities crucial. Electrocardiograms (ECG) are a primary tool for monitoring the heart’s electrical activity, providing vital insights into heart rhythm and conduction. However, automatically analyzing ECG data for anomalies presents significant challenges, particularly in real-world clinical settings.
Traditional methods often struggle with the sheer volume of patient data, the scarcity of samples for rare heart conditions (leading to class imbalance), and the difficulty of storing all historical data for retraining. Moreover, as new types of irregular heart rhythms emerge, existing models can suffer from ‘catastrophic forgetting,’ where learning new patterns causes them to forget previously learned ones.
To address these critical issues, researchers have developed a novel framework called Unsupervised Identification and Replay-based Detection (UIRD). This innovative approach aims to enhance anomaly detection performance while efficiently managing data storage limitations.
The UIRD Framework: A Two-Pronged Approach
The UIRD framework is built on two main components: unsupervised identification and replay-based detection. It creates a closed-loop system that seamlessly connects the detection of new anomalies with the continuous updating of the model.
For the unsupervised identification part, the framework integrates a generative adversarial network (GAN)-based system called MadeGAN. MadeGAN is designed to detect novel patterns in ECG signals without needing explicit labels for every anomaly type. It uses a memory-augmented autoencoder combined with adversarial training to learn the distribution of normal ECG signals. When an ECG signal deviates significantly from this learned ‘normal’ pattern, MadeGAN flags it as a potential new anomaly.
Once a new anomaly type is identified, the system triggers its second component: replay-based detection. Instead of storing all historical ECG data, which can be burdensome, the UIRD framework employs a pseudo-replay learning strategy. This strategy utilizes a generator, specifically the Synthetic Minority Oversampling Technique (SMOTE) in this study, to learn the data distribution for each individual heart rhythm type. When a new anomaly arises, this generator synthesizes ‘pseudo data’ that accurately represents the previously learned classes. The model is then retrained using both this synthetic data and the newly collected data from the current abnormal pattern. This process allows the model to detect both existing patterns and newly presented anomalies without forgetting old knowledge.
Key Advantages of UIRD
The UIRD framework offers several significant advantages:
- Integrated Anomaly Detection and Continual Learning: Unlike many existing continual learning methods that assume prior knowledge of when new anomalies occur, UIRD actively detects novel anomalies and then initiates the learning process, making it highly practical for real-world scenarios.
- Memory and Hardware Efficiency: By generating pseudo data instead of storing all historical data, the framework strikes an effective balance between maintaining high model performance and reducing hardware constraints, making it suitable for environments with limited resources.
- Robustness and Adaptability: MadeGAN’s adversarial training enriches the learned normal data distribution, making the anomaly detector more robust against noise and subtle signal variations. The pseudo-replay mechanism helps the model adapt to evolving data patterns and new anomaly signatures without suffering from catastrophic forgetting.
Also Read:
- Conditional-t3VAE: A New Approach for Fair Image Generation in Imbalanced Datasets
- Balancing Data Privacy and Utility with Curvature-Guided Perturbation
Real-World Validation
The effectiveness of the UIRD framework was rigorously tested on four public ECG datasets: MIT-BIH Arrhythmia Database (MITDB), MIT-BIH Supraventricular Arrhythmia Database (SVDB), MIT-BIH Noise Stress Test Database (NSTDB), and European ST-T Database (EDB). These datasets cover a wide range of heart conditions and noisy environments, providing a comprehensive evaluation.
The experiments were structured into sequential tasks, where each task introduced a new heartbeat anomaly type. The UIRD framework consistently demonstrated strong performance, often achieving superior or comparable F-scores (a measure of accuracy) compared to established benchmark methods, including traditional continual learning approaches and baseline models that train on all data simultaneously. Notably, UIRD showed a strong ability to handle the catastrophic forgetting issue, maintaining high accuracy on previously learned classes while effectively identifying new ones.
This research presents a promising step forward in automatic ECG analysis, offering a scalable and adaptive solution for identifying irregular heart rhythms and other electrical anomalies. For more in-depth technical details, you can refer to the full research paper here.


