Table of Contents
Fetching ...

TSRNet: Simple Framework for Real-time ECG Anomaly Detection with Multimodal Time and Spectrogram Restoration Network

Nhat-Tan Bui, Dinh-Hieu Hoang, Thinh Phan, Minh-Triet Tran, Brijesh Patel, Donald Adjeroh, Ngan Le

TL;DR

This paper introduces a specialized network called the Multi-modal Time and Spectrogram Restoration Network (TSRNet) designed specifically for detecting anomalies in ECG signals, and introduces a novel inference method, termed Peak-based Error, that specifically focuses on ECG peaks, a critical component in detecting abnormalities.

Abstract

The electrocardiogram (ECG) is a valuable signal used to assess various aspects of heart health, such as heart rate and rhythm. It plays a crucial role in identifying cardiac conditions and detecting anomalies in ECG data. However, distinguishing between normal and abnormal ECG signals can be a challenging task. In this paper, we propose an approach that leverages anomaly detection to identify unhealthy conditions using solely normal ECG data for training. Furthermore, to enhance the information available and build a robust system, we suggest considering both the time series and time-frequency domain aspects of the ECG signal. As a result, we introduce a specialized network called the Multimodal Time and Spectrogram Restoration Network (TSRNet) designed specifically for detecting anomalies in ECG signals. TSRNet falls into the category of restoration-based anomaly detection and draws inspiration from both the time series and spectrogram domains. By extracting representations from both domains, TSRNet effectively captures the comprehensive characteristics of the ECG signal. This approach enables the network to learn robust representations with superior discrimination abilities, allowing it to distinguish between normal and abnormal ECG patterns more effectively. Furthermore, we introduce a novel inference method, termed Peak-based Error, that specifically focuses on ECG peaks, a critical component in detecting abnormalities. The experimental result on the large-scale dataset PTB-XL has demonstrated the effectiveness of our approach in ECG anomaly detection, while also prioritizing efficiency by minimizing the number of trainable parameters. Our code is available at https://github.com/UARK-AICV/TSRNet.

TSRNet: Simple Framework for Real-time ECG Anomaly Detection with Multimodal Time and Spectrogram Restoration Network

TL;DR

This paper introduces a specialized network called the Multi-modal Time and Spectrogram Restoration Network (TSRNet) designed specifically for detecting anomalies in ECG signals, and introduces a novel inference method, termed Peak-based Error, that specifically focuses on ECG peaks, a critical component in detecting abnormalities.

Abstract

The electrocardiogram (ECG) is a valuable signal used to assess various aspects of heart health, such as heart rate and rhythm. It plays a crucial role in identifying cardiac conditions and detecting anomalies in ECG data. However, distinguishing between normal and abnormal ECG signals can be a challenging task. In this paper, we propose an approach that leverages anomaly detection to identify unhealthy conditions using solely normal ECG data for training. Furthermore, to enhance the information available and build a robust system, we suggest considering both the time series and time-frequency domain aspects of the ECG signal. As a result, we introduce a specialized network called the Multimodal Time and Spectrogram Restoration Network (TSRNet) designed specifically for detecting anomalies in ECG signals. TSRNet falls into the category of restoration-based anomaly detection and draws inspiration from both the time series and spectrogram domains. By extracting representations from both domains, TSRNet effectively captures the comprehensive characteristics of the ECG signal. This approach enables the network to learn robust representations with superior discrimination abilities, allowing it to distinguish between normal and abnormal ECG patterns more effectively. Furthermore, we introduce a novel inference method, termed Peak-based Error, that specifically focuses on ECG peaks, a critical component in detecting abnormalities. The experimental result on the large-scale dataset PTB-XL has demonstrated the effectiveness of our approach in ECG anomaly detection, while also prioritizing efficiency by minimizing the number of trainable parameters. Our code is available at https://github.com/UARK-AICV/TSRNet.
Paper Structure (8 sections, 5 equations, 3 figures, 3 tables)

This paper contains 8 sections, 5 equations, 3 figures, 3 tables.

Figures (3)

  • Figure 1: The overall of our proposed TSRNet framework: Starting with a 12-lead ECG time-series signal $x_{ecg}$, we generate a time-frequency spectral signal $x_{spec}$ using Short Time Fourier Transform (STFT). Both $x_{ecg}$ and $x_{spec}$ undergo a Masking-Out procedure before being processed by a 1D-CNN encoder $\phi$ and a 2D-CNN encoder $\theta$, resulting in $f_{ecg}$ and $f_{spec}$, respectively. A shared-weight two-layer cross-attention module is proposed to fuse these features, creating a fused feature $f_{fused}$. Finally, a 1D-CNN decoder $\omega$ processes the fused feature $f_{fused}$ to generate the reconstructed ECG signal $y$ and the uncertainty $\sigma$.
  • Figure 2: Illustration of Cross-Attention Fusion. Two features, $f_{ecg}$ and $f_{spec}$, are concatenated to form $f_{concat}$. Subsequently, this concatenated feature undergoes processing by two shared-weight self-attention layers. $\bigoplus$ denotes the element-wise addition.
  • Figure 3: Visualization of Peak-based Error in the ECG signal. We only consider the R-peaks when detecting the anomaly signal, which is marked by the pink segments.