A CNN-based Local-Global Self-Attention via Averaged Window Embeddings for Hierarchical ECG Analysis

Arthur Buzelin, Pedro Robles Dutenhefner, Turi Rezende, Luisa G. Porfirio, Pedro Bento +7 more
4/13/2025
eess.SPcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Cardiovascular diseases remain the leading cause of global mortality, emphasizing the critical need for efficient diagnostic tools such as electrocardiograms (ECGs). Recent advancements in deep learning, particularly transformers, have revolutionized ECG analysis by capturing detailed waveform features as well as global rhythm patterns. However, traditional transformers struggle to effectively capture local morphological features that are critical for accurate ECG interpretation. We propose a novel Local-Global Attention ECG model (LGA-ECG) to address this limitation, integrating convolutional inductive biases with global self-attention mechanisms. Our approach extracts queries by averaging embeddings obtained from overlapping convolutional windows, enabling fine-grained morphological analysis, while simultaneously modeling global context through attention to keys and values derived from the entire sequence. Experiments conducted on the CODE-15 dataset demonstrate that LGA-ECG outperforms state-of-the-art models and ablation studies validate the effectiveness of the local-global attention strategy. By capturing the hierarchical temporal dependencies and morphological patterns in ECG signals, this new design showcases its potential for clinical deployment with robust automated ECG classification.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{buzelin2025cnnbased,
  title  = {A CNN-based Local-Global Self-Attention via Averaged Window Embeddings for Hierarchical ECG Analysis},
  author = {Arthur Buzelin and Pedro Robles Dutenhefner and Turi Rezende and Luisa G. Porfirio and Pedro Bento and Yan Aquino and Jose Fernandes and Caio Santana and Gabriela Miana and Gisele L. Pappa and Antonio Ribeiro and Wagner Meira},
  year   = {2025},
  eprint = {2504.16097},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.16097v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.16097.svg)](https://codeofpaper.com/paper/2504.16097)

Discussion