Skip to content
Sri Sai Hemanth Bollepalli
All work

03Clinical signalsSubmitted

What atrial fibrillation detectors rely on in 12-lead ECGs

A cross-hospital test of whether a deep AF detector uses atrial activity or only irregular beat timing, measured against a model that sees RR intervals alone.

Manuscript submitted · code archived on Zenodo · 2026

PTB-XL ECGs, 7.0% AF
21,742
Chapman-Shaoxing ECGs, 18.2% AF
9,794
attribution methods compared
6
seeds per network
5

Problem

Deep learning detects atrial fibrillation on the ECG very accurately, but it is not clear what the models rely on: the atrial signs of AF, such as missing P-waves and fibrillatory waves, or the simpler cue of irregular beat timing.

If timing alone explains the score, a logistic regression on RR-interval features already captures it, and the deep model has learnt nothing about the atrium.

Approach

  1. 01

    Train once, test elsewhere

    A 1D ResNet, with an InceptionTime network as a check, trains on PTB-XL and is tested without retraining on Chapman-Shaoxing and Georgia. The external sets are never used for training or tuning.

  2. 02

    A baseline that sees only timing

    A logistic regression on RR-interval features is trained on the same split. Every deep model is compared with it on the same ECGs.

  3. 03

    Where the evidence falls

    Integrated Gradients, DeepLIFT, GradientSHAP, Input × Gradient, Grad-CAM and sliding-window occlusion each report the share of evidence in the atrial, QRS and ST-T windows of every beat.

  4. 04

    What the model needs

    Controlled edits remove atrial activity, regularise the rhythm, or apply a matched control. AF with a regular ventricular response and paced rhythms are analysed separately, because the timing cue is weak there.

  5. 05

    Held-out data, used once

    Every evaluation is recorded with a SHA-256 fingerprint of each model file. The script refuses to score a model whose file changed after it was tested.

Results

The manuscript on this study, “Deep ECG Atrial Fibrillation Detectors Rely on Absent P-Waves Rather Than RR Irregularity: Evidence From Beat-Preserving Counterfactual Edits”, has been submitted and is not yet peer reviewed. The repository ships its results folder empty, because the reports are regenerated from datasets that cannot be redistributed, so no figure is quoted here.

Data and roles
DatasetRoleECGs keptAF share
PTB-XLTraining, validation, internal test21,7427.0%
Chapman-ShaoxingExternal test only9,79418.2%
GeorgiaExternal test onlyIn the repo reportIn the repo report

All three are 12-lead recordings at 500 Hz.

How the question is decided
  1. 01

    Remove atrial activity

    Does the AF probability fall?

  2. 02

    Regularise the rhythm

    Does it fall further?

  3. 03

    Compare with a matched control

    Which edit matters more?

If removing atrial activity lowers the AF probability more than regularising the rhythm, the model depends on atrial morphology. The reverse means it depends on timing.

Limits

What this work did not show.

  1. The manuscript is submitted and not yet peer reviewed. No performance figure is quoted on this page, because the reports are regenerated by the pipeline and are not committed to the repository.
  2. The challenge copies of the external sets carry no patient IDs, so each Georgia record is treated as its own patient in the bootstrap.
  3. A removed segment is a flat line with no P-wave, which the model may itself read as evidence of AF. The deletion test is reported with that caveat.
  4. Some counterfactual tests were added after the first occlusion results and are labelled as such.

Stack

  • PyTorch
  • 1D ResNet
  • Integrated Gradients
  • Grad-CAM
  • DeepLIFT
HomeTop of page
WorkSection
ResearchSection
ArchiveSection
AboutSection
ContactSection
CVPage
Finding the resection cavities a standard nnU-Net misses01
Twelve knee findings, no expert image labels02
Does an ECG model read the atrium?03
ADMET predictions that say when not to trust them04
A CRM whose records can be verified offline05
An accounting engine that never stores money as a float06
Copy email addressCopy
Write an emailMail
Copy BibTeX for the MICCAI 2026 paperCopy
MICCAI 2026 paperPDF
GitHubProfile
ORCIDProfile
LinkedInProfile
Source code for this siteGitHub

21 results