Table of Contents
Fetching ...

An Attention-Augmented VAE-BiLSTM Framework for Anomaly Detection in 12-Lead ECG Signals

Marc Garreta Basora, Mehmet Oguz Mulayim

TL;DR

The paper tackles unsupervised anomaly detection in multivariate 12-lead ECGs by comparing three autoencoder-based architectures: CAE, VAE-BiLSTM, and the novel VAE-BiLSTM-MHA. Training is performed solely on normal ECGs to learn the healthy morphology, with anomaly scores derived from reconstruction or ELBO-based criteria and thresholded to flag deviations. The VAE-BiLSTM-MHA model, incorporating lead-wise and multi-head attention, achieves the best performance (AUPRC ≈ 0.81 and recall ≈ 0.85 on CPSC 2018) and is paired with an interactive dashboard for anomaly localization, enhancing clinical interpretability. The study provides a public codebase and highlights limitations such as evaluation on a single benchmark and offline deployment, pointing to future work in real-time analysis and broader clinical data integration.

Abstract

Anomaly detection in 12-lead electrocardiograms (ECGs) is critical for identifying deviations associated with cardiovascular disease. This work presents a comparative analysis of three autoencoder-based architectures: convolutional autoencoder (CAE), variational autoencoder with bidirectional long short-term memory (VAE-BiLSTM), and VAE-BiLSTM with multi-head attention (VAE-BiLSTM-MHA), for unsupervised anomaly detection in ECGs. To the best of our knowledge, this study reports the first application of a VAE-BiLSTM-MHA architecture to ECG anomaly detection. All models are trained on normal ECG samples to reconstruct non-anomalous cardiac morphology and detect deviations indicative of disease. Using a unified preprocessing and evaluation pipeline on the public China Physiological Signal Challenge (CPSC) dataset, the attention-augmented VAE achieves the best performance, with an AUPRC of 0.81 and a recall of 0.85 on the held-out test set, outperforming the other architectures. To support clinical triage, this model is further integrated into an interactive dashboard that visualizes anomaly localization. In addition, a performance comparison with baseline models from the literature is provided.

An Attention-Augmented VAE-BiLSTM Framework for Anomaly Detection in 12-Lead ECG Signals

TL;DR

The paper tackles unsupervised anomaly detection in multivariate 12-lead ECGs by comparing three autoencoder-based architectures: CAE, VAE-BiLSTM, and the novel VAE-BiLSTM-MHA. Training is performed solely on normal ECGs to learn the healthy morphology, with anomaly scores derived from reconstruction or ELBO-based criteria and thresholded to flag deviations. The VAE-BiLSTM-MHA model, incorporating lead-wise and multi-head attention, achieves the best performance (AUPRC ≈ 0.81 and recall ≈ 0.85 on CPSC 2018) and is paired with an interactive dashboard for anomaly localization, enhancing clinical interpretability. The study provides a public codebase and highlights limitations such as evaluation on a single benchmark and offline deployment, pointing to future work in real-time analysis and broader clinical data integration.

Abstract

Anomaly detection in 12-lead electrocardiograms (ECGs) is critical for identifying deviations associated with cardiovascular disease. This work presents a comparative analysis of three autoencoder-based architectures: convolutional autoencoder (CAE), variational autoencoder with bidirectional long short-term memory (VAE-BiLSTM), and VAE-BiLSTM with multi-head attention (VAE-BiLSTM-MHA), for unsupervised anomaly detection in ECGs. To the best of our knowledge, this study reports the first application of a VAE-BiLSTM-MHA architecture to ECG anomaly detection. All models are trained on normal ECG samples to reconstruct non-anomalous cardiac morphology and detect deviations indicative of disease. Using a unified preprocessing and evaluation pipeline on the public China Physiological Signal Challenge (CPSC) dataset, the attention-augmented VAE achieves the best performance, with an AUPRC of 0.81 and a recall of 0.85 on the held-out test set, outperforming the other architectures. To support clinical triage, this model is further integrated into an interactive dashboard that visualizes anomaly localization. In addition, a performance comparison with baseline models from the literature is provided.

Paper Structure

This paper contains 20 sections, 11 equations, 11 figures, 7 tables.

Figures (11)

  • Figure 1: ECG morphology of two normal beats. Reproduced from Zhang et al. zhang2015robust with permission.
  • Figure 2: Approaches for Anomaly Detection (AD) in ECGs
  • Figure 3: Example of a raw 12-lead ECG sample from the MIMIC-IV ECG dataset. The red and black boxes show consecutive windows extracted for training.
  • Figure 4: Comparison of non-processed and preprocessed ECG signals
  • Figure 5: CAE architecture
  • ...and 6 more figures