Multi-scale Cross-restoration Framework for Electrocardiogram Anomaly Detection

Aofan Jiang, Chaoqin Huang, Qing Cao, Shuang Wu, Zi Zeng, Kang Chen, Ya Zhang, Yanfeng Wang · DOI

Introduction

Electrocardiograms (ECGs) are fundamental tools in cardiac diagnostics, yet automating the detection of anomalies remains a significant challenge. Traditional supervised learning models are limited by their reliance on labeled datasets of known diseases, often failing to identify rare or novel cardiac conditions. Furthermore, ECG signals exhibit high inter-individual variability and contain anomalies that manifest across different scales—from local morphological changes in a single heartbeat to global rhythmic irregularities over several seconds.

Methodology: A Dual-Branch Approach

To address these challenges, the proposed Multi-scale Cross-restoration Framework mimics a cardiologist's diagnostic process by simultaneously analyzing global rhythms and local heartbeat details. Unlike simple reconstruction models, this framework uses an unsupervised "mask-and-restore" strategy.

The Multi-scale Cross-restoration Framework architecture, featuring Global and Local branches connected by a Multi-scale Cross-attention module.

The architecture consists of several key components:

  1. Two-Branch Autoencoder: A Global Branch processes the entire 10-second signal to capture rhythm, while a Local Branch focuses on individual heartbeat segments to capture morphology.
  2. Masking and Restoration: By hiding segments of the signal and attempting to reconstruct them based on context, the model—trained exclusively on healthy data—identifies anomalies where restoration error is high.
  3. Multi-scale Cross-attention: This module facilitates information exchange between the two branches, ensuring that local heartbeat morphology is interpreted within the context of the overall global rhythm.
  4. Trend Generation Module (TGM): The TGM extracts the underlying smooth trend of the ECG, allowing the global branch to focus on rhythm without being distracted by high-frequency noise.
  5. Uncertainty-aware Loss: This mechanism helps the model distinguish between naturally complex signal areas and actual anomalies, reducing false positives.

Datasets and Benchmarking

The framework was evaluated on three major benchmarks: the classic MIT-BIH arrhythmia dataset, the Keogh ECG dataset for anomaly localization, and a newly annotated version of PTB-XL. For PTB-XL, experienced cardiologists provided signal point-level annotations for 400 ECGs, creating a more granular and challenging benchmark for the research community.

Key Results and Clinical Utility

The proposed framework achieved state-of-the-art performance across all benchmarks. On the MIT-BIH dataset, it reached a near-perfect 0.969 AUC. On the PTB-XL benchmark, it achieved an 86.0% AUC, significantly outperforming existing methods like BeatGAN.

Beyond detection, the model excels at localization—identifying precisely where an anomaly occurs within a signal. This capability is crucial for clinical applications, providing interpretable results that help medical professionals pinpoint specific cardiac events.

Qualitative comparison of anomaly localization between the proposed framework and BeatGAN across various cardiac conditions, showing superior alignment with ground truth.

Conclusion

By integrating global and local perspectives through an unsupervised restoration task, this framework offers a robust solution for detecting diverse and rare cardiac anomalies. While future work may explore more complex backbones like Transformers or real-time optimization for wearables, the current multi-scale approach sets a new standard for automated, interpretable ECG analysis.

Summary updated

BibTeX
@inproceedings{jiang2023multi,
  author = {Aofan Jiang and Chaoqin Huang and Qing Cao and Shuang Wu and Zi Zeng and Kang Chen and Ya Zhang and Yanfeng Wang},
  title = {{Multi-scale Cross-restoration Framework for Electrocardiogram Anomaly Detection}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2023},
  doi = {10.1007/978-3-031-43907-0\_9},
}
Figure