Outlier Detection in ECG

Omar Atamny, Ardan M. Saguner, Roger Abächerli, Ender KonukogluCinC 2023 · OpenReview

Abstract

This study investigates the efficacy of unsupervised deep learning models for the automatic detection of electrocardiogram (ECG) abnormalities. By training models exclusively on healthy heart signals, the research frames cardiac diagnosis as an outlier detection problem. Results indicate that Variational Autoencoders (VAEs) outperform other architectures, achieving an Area Under the Curve (AUC) of up to 0.89 for specific conditions like conduction disturbances. This approach offers a scalable alternative to supervised methods that require extensive manual labeling by clinical experts.

Introduction

Electrocardiography (ECG) is a fundamental tool for diagnosing cardiovascular disease, the leading cause of death worldwide. However, the development of reliable AI for ECG interpretation typically necessitates massive, manually labeled datasets. This labeling process is resource-intensive and prone to inter-observer variability. To address this, the authors propose an unsupervised approach: outlier detection. By training models to learn the representation of "normal" healthy heart signals, any significant deviation in a test signal can be flagged as a potential pathology.

Methodology

The researchers benchmarked several probabilistic and deep learning architectures to evaluate their ability to distinguish normal from abnormal signals:

  • Autoencoders (AE) & Variational Autoencoders (VAE): These models utilize a bottleneck architecture to compress an ECG signal into a lower-dimensional latent space before attempting reconstruction. A model trained solely on healthy data is expected to yield high reconstruction errors when processing abnormal signals.
  • Diffusion Models (DM): These generative models learn to reverse a noise-addition process, serving here as a mechanism for signal reconstruction and denoising.
  • Normalizing Flow (NF) & Gaussian Mixture Models (GMM): These methods estimate the probability density of the training data, flagging signals with low probability as outliers.
Figure 1: General architecture of an Autoencoder, featuring the encoder, bottleneck (latent space), and decoder components used for signal reconstruction.

Experimental Setup

The study utilized two major public datasets: PTB-XL, containing nearly 22,000 12-lead ECG recordings, and CPSC 2018, featuring various arrhythmias. For model training, a subset of approximately 5,700 "normal" samples was used. Evaluation was conducted on a mixed test set of normal and abnormal samples to measure detection performance via Area Under the Curve (AUC).

Results and Discussion

The Variational Autoencoder (VAE) emerged as the most effective model for this task. Its stochastic latent space allows it to capture the essential characteristics of healthy ECG waveforms more robustly than deterministic models.

Table 1: Comparative performance (AUC) of different unsupervised models. The VAE demonstrates superior performance across Mean Absolute Error (MAE) and Mean Squared Error (MSE) metrics.

Key findings include:

  • Top Performance: The VAE achieved an overall AUC of 0.85 on PTB-XL and 0.83 on CPSC.
  • Pathology Sensitivity: The models showed varying sensitivity to different conditions. While conduction disturbances were detected with high accuracy (0.89 AUC), hypertrophy was significantly more difficult to identify (0.60 AUC). This suggests that some pathologies manifest as subtle structural changes that the reconstruction process may inadvertently "normalize."
  • Baseline Comparison: Traditional density estimation methods like GMM performed poorly (AUC ~0.70) compared to deep generative models.

Conclusion

Unsupervised outlier detection represents a viable path toward automated ECG screening without the need for exhaustive labeling. While VAEs show strong promise, particularly for conduction disturbances, further research is needed to improve sensitivity to subtle pathologies like hypertrophy. Future work will explore specialized signal pre-processing and larger, more diverse training datasets to enhance clinical generalizability.

Summary updated

BibTeX
@inproceedings{atamny2023outlier,
  author = {Omar Atamny and Ardan M. Saguner and Roger Abächerli and Ender Konukoglu},
  title = {{Outlier Detection in ECG}},
  booktitle = {CinC},
  year = {2023},
  url = {https://openreview.net/forum?id=GViOQbd3qT},
}
Figure