# Data Augmentation-Enhanced Myocardial Infarction Classification and Localization Using a ResNet-Transformer Cascaded Network

**Authors:** Yunfan Chen, Qi Gao, Jinxing Ye, Yuting Li, Xiangkui Wan

PMC · DOI: 10.3390/biology14101425 · Biology · 2025-10-16

## TL;DR

This paper introduces a new AI model combining ResNet and Transformer to better detect and locate heart attacks using ECGs, improving accuracy and interpretability.

## Contribution

A novel ResNet-Transformer cascaded network with data augmentation using DDPM to address data imbalance and improve ECG analysis.

## Key findings

- The model increases inter-patient accuracy from 61.66% to 68.39% using synthesized ECG samples.
- Grad-CAM visualization shows the model's attention aligns with clinical pathological features.
- The S-transform and cascaded network effectively capture dynamic cardiac cycle changes.

## Abstract

Myocardial infarction is a major cause of deaths worldwide, and electrocardiograms (ECGs) are key to diagnosis. Current ECG analysis has limitations such as overlooking dynamic cardiac cycle changes, failing to capture both local and global heart activity features, and being trained on imbalanced datasets. To address these issues, we developed a novel model that combines two deep neural networks, ResNet and Transformer. In addition, we introduced a method to generate more high-quality, samples from underrepresented classes. Our model performs well even with data from different patients. It also shows which parts of ECGs it uses for decisions, matching clinical signs. This helps doctors diagnose faster and more reliably, supporting better public health care.

Accurate diagnosis of myocardial infarction (MI) holds significant clinical importance for public health systems. Deep learning-based ECG, classification and localization methods can automatically extract features, thereby overcoming the dependence on manual feature extraction in traditional methods. However, these methods still face challenges such as insufficient utilization of dynamic information in cardiac cycles, inadequate ability to capture both global and local features, and data imbalance. To address these issues, this paper proposes a ResNet-Transformer cascaded network (RTCN) to process time frequency features of ECG signals generated by the S-transform. First, the S-transform is applied to adaptively extract global time frequency features from the time frequency domain of ECG signals. Its scalable Gaussian window and high phase resolution can effectively capture the dynamic changes in cardiac cycles that traditional methods often fail to extract. Then, we develop an architecture that combines the Transformer attention mechanism with ResNet to extract multi-scale local features and global temporal dependencies collaboratively. This compensates for the existing deep learning models’ insufficient ability to capture both global and local features simultaneously. To address the data imbalance problem, the Denoising Diffusion Probabilistic Model (DDPM) is applied to synthesize high-quality ECG samples for minority classes, increasing the inter-patient accuracy from 61.66% to 68.39%. Gradient-weighted Class Activation Mapping (Grad-CAM) visualization confirms that the model’s attention areas are highly consistent with pathological features, verifying its clinical interpretability.

## Linked entities

- **Diseases:** myocardial infarction (MONDO:0005068)

## Full-text entities

- **Diseases:** MI (MESH:D009203)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12561165/full.md

## Figures

14 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12561165/full.md

## References

43 references — full list in the complete paper: https://tomesphere.com/paper/PMC12561165/full.md

---
Source: https://tomesphere.com/paper/PMC12561165