Health & Medicinepreprint2026-08-08

Interpretable ECG Arrhythmia Classification via 1D-CNN and Grad-CAM: Evaluating Lead-Wise Attention and Cross-Institutional Generalization on PTB-XL

Open access0 citations

Abstract

Deep learning models for automated ECG interpretation are typically evaluated only on the dataset they are trained on, leaving open the question of whether they generalize to recordings from other institutions. We present ECGNet, a compact 1D convolutional network (~47,000 parameters) trained on PTB-XL for multi-label classification across five diagnostic superclasses (NORM, MI, STTC, CD, HYP), achieving a macro-AUC of 0.920 ± 0.002 on the held-out PTB-XL test set, within 0.008 of published results from architectures with orders of magnitude more parameters. We then evaluate cross-institutional generalization on two external, unseen ECG datasets, Georgia and Chapman-Shaoxing. Performance degrades substantially on both (macro-AUC 0.681 and 0.729, without adaptation). We show that part of this drop stems from a mismatch in the network's internal Batch Normalization statistics, and that recomputing these statistics from a small unlabeled batch of the target distribution (AdaBN), without retraining or labels, partially recovers performance (to 0.753 on Georgia, 0.823 on Chapman-Shaoxing). This recovery is uneven and dataset-dependent: AdaBN substantially improves MI detection on Chapman-Shaoxing while barely improving it on Georgia, despite identical technique and model. We also use Grad-CAM to examine model attention, finding it broadly consistent with diagnostic criteria and surfacing a specific, explicable failure mode in the HYP class.

// Source

View paper (DOI)Open access versionOpenAlexZenodo (CERN European Organization for Nuclear Research)Published 2026-08-08

Authors: Saim Zafar

Institutions: Bahria University