GNN-Enhanced TCN Algorithms for ECG Anomaly Detection

Angelica Simonetti, Ferdinando ZanchettaarXiv 2026 · arXiv

TL;DR

This paper introduces a novel geometric deep learning pipeline that treats ECG time series as directed graphs, allowing Graph Neural Networks (GNNs) to enhance traditional Temporal Convolutional Networks (TCNs). By formally proving that TCNs are a special case of GNNs, the authors develop hybrid autoencoders that achieve state-of-the-art anomaly detection performance while being significantly more parameter-efficient than existing models.

What Problem Does This Paper Address?

Electrocardiogram (ECG) signals are the frontline for diagnosing heart conditions, but they are notoriously noisy and complex. Detecting anomalies—whether they are biological (like arrhythmias) or technical artifacts (like sensor malfunctions)—is a critical task for automated health monitoring.

While Temporal Convolutional Networks (TCNs) have recently surpassed traditional Recurrent Neural Networks (RNNs) in time-series tasks due to their speed and scalability, they still struggle to capture certain types of temporal dependencies and lack the inherent "permutation equivariance" that makes geometric models robust. The authors tackle the challenge of merging the temporal strengths of TCNs with the structural flexibility of Graph Neural Networks (GNNs) to create more accurate and lightweight anomaly detection models.

Methods

The core innovation lies in viewing a time series not just as a sequence, but as a directed graph (digraph). In this setup, each time step is a node, and directed edges represent temporal relations (e.g., information flowing from the past to the present).

Key components of their approach include:

  • Mathematical Unification: The authors provide a formal proof (Proposition 3.7) showing that 1D temporal convolutions can be realized as graph convolutions on specific digraph structures. This bridges the gap between TCN and GNN theory.
  • Hybrid Autoencoders: They designed several architectures (TCNGraphAE, TGraphAE, etc.) that combine TCN layers with GNN layers (using Sage, GCN, or GAT convolutions). These models use a "skip-connection block" to aggregate information across different temporal scales.
  • Semi-Supervised Pipeline: The models are trained as autoencoders with an auxiliary classification head. After training, the latent space embeddings are used for anomaly detection via Support Vector Classifiers (SVC) or K-means clustering.
One possible structure of a time-digraph where nodes receive information from past time steps.

Datasets

The primary evaluation was conducted on the ECG5000 dataset, a standard benchmark containing 5,000 ECG signals labeled as normal or anomalous. The authors also reference an industry validation set from the ButterfLife Device (used in their preliminary work) to confirm the stability and competitiveness of their graph-based architectures in real-world scenarios.

Key Insights and Ideas

  • TCNs are GNNs in Disguise: The realization that TCNs are essentially a subclass of GNNs is a major "aha" moment. It allows researchers to stop choosing between the two and instead use a unified geometric framework to design better models.
  • Geometric Efficiency: By using graph structures to encode time dependencies, the models can achieve high performance with far fewer parameters. This is crucial for deploying models on low-power medical devices or wearables.
  • Inference Speedup: Unlike many autoencoder-based methods that rely on "reconstruction error" (requiring the full encoder-decoder pass), this pipeline can assign labels using only the encoder and the latent space centroids. This effectively halves the computational resources needed during deployment.

Key Results

The hybrid models demonstrated exceptional performance on the ECG5000 benchmark:

  • Top Accuracy: Their best model, a variational graph-based autoencoder (TCNGraphVAE1), achieved 98.7% accuracy, outperforming several established baselines.
  • Extreme Efficiency: Their "best small" model (TCNGraphAE4) reached 98.5% accuracy with only 82k parameters. For comparison, the AttentivECGRU model achieves 98.96% but requires 743k parameters—nearly ten times the size.
  • Stability: The graph-enhanced models showed high stability across different random seeds, a common pain point in deep learning for medical signals.

Limitations and Future Work

While the results are promising, the authors acknowledge a few areas for growth:

  • Dataset Diversity: The current pipeline has primarily been validated on the ECG5000 dataset. Testing on more diverse, multi-lead ECG datasets is necessary to prove generalizability.
  • Explainability: Although GNNs are often touted for their explainability (e.g., by looking at which edges/nodes contribute most to a decision), this was not explored in the current paper and remains a target for future research.
  • Complex Topologies: The authors plan to investigate more sophisticated digraph structures and advanced message-passing mechanisms to further refine how temporal dependencies are captured.

Summary updated

Abstract

To a time series can be also given the structure of directed graph, opening the doors to the usage of graph neural networks (GNNs) in this context. In this paper we develop a new pipeline involving novel geometric deep learning models that merge the capabilities of ordinary TCNs with the ones of GNNs to solve an anomaly detection problem on electrocardiogram signals.
BibTeX
@misc{simonetti2026gnn,
  author = {Angelica Simonetti and Ferdinando Zanchetta},
  title = {{GNN-Enhanced TCN Algorithms for ECG Anomaly Detection}},
  year = {2026},
  eprint = {2611.16648},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.16648},
}
Figure