Skip to main content
medRxiv
  • Home
  • About
  • Submit
  • ALERTS / RSS
Advanced Search

Teaching an ECG model where to look does not make it more robust to missing leads: a pre-registered comparison of guideline-based attention guidance with random lead masking

View ORCID ProfileMohamed Nour Bou Ali, Mohamed Mahmoud
doi: https://doi.org/10.64898/2026.10.17.26365795
Mohamed Nour Bou Ali
1Faculty of Medicine of Monastir, University of Monastir, Monastir, Tunisia
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Mohamed Nour Bou Ali
  • For correspondence: mohamednourbouali87{at}gmail.com
Mohamed Mahmoud
1Faculty of Medicine of Monastir, University of Monastir, Monastir, Tunisia
Roles: (cardiologist)
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • Abstract
  • Full Text
  • Info/History
  • Metrics
  • Supplementary material
  • Data/Code
  • Preview PDF
Loading

Abstract

Background Real-world 12-lead electrocardiograms (ECGs) often have missing or corrupted leads. A deep-learning classifier can be prepared for this by random lead masking during training, or by injecting clinical knowledge, for example by pulling its attention towards the leads that guidelines use for each diagnosis. Whether this knowledge adds robustness beyond masking is unknown.

Methods Pre-registered comparison of three arms sharing one network (per-lead 1D-ResNet encoder and per-diagnosis attention over the 12 leads): standard training (M0); random whole-lead masking (M1); masking plus a Kullback-Leibler penalty pulling attention towards a fixed guideline-derived key-lead map (M2, guideline-based attention guidance). Six diagnoses; five seeds per arm. Development on PTB-XL (21,799 ECGs); single sealed evaluation on PTB-XL fold 10 (2,198 ECGs) and on CODE-15% (233,204 exams, external validation). Primary endpoint: AUROC difference M2 − M1, averaged over first-degree AV block, right and left bundle branch block and atrial fibrillation and over 1 to 6 lost (zeroed) leads, with a patient-level paired BCa bootstrap 95% confidence interval.

Results The guidance did not change robustness: ΔAUROC −0.0010 (95% CI −0.0033 to +0.0006), an interval entirely within the pre-specified ±0.02 margin; the result was unchanged with another bootstrap seed, other interval methods and leave-one-diagnosis-out analyses. Masking improved AUROC: M1 − M0 = +0.0134 (95% CI +0.0102 to +0.0172) when one key lead was lost, and the number of lost leads tolerated before AUROC fell by more than 0.02 rose from 7 (M0) to 10 (M1). M2 attention matched the map and M2 was non-inferior on intact ECGs, but its calibration slope was lower for all six diagnoses in both datasets. M2 lost slightly more when all key leads were lost together (−0.0067) and gained only when one to three leads remained (exploratory; AUROC 0.9408 vs 0.9210 with 11 leads lost). CODE-15% reproduced every pattern (primary −0.0007, 95% CI −0.0011 to −0.0003).

Conclusions Random lead masking suffices to make an ECG classifier robust to missing leads; adding guideline knowledge aligns attention with clinical criteria but adds no robustness and worsens calibration. Guideline-aligned attention should not be taken as evidence of robustness.

Competing Interest Statement

The authors have declared no competing interest.

Clinical Protocols

https://doi.org/10.17605/OSF.IO/M9UR2

Author Declarations

I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.

Yes

The details of the IRB/oversight body that provided approval or exemption for the research described are given below:

The study used ONLY openly available human data that were publicly accessible before the initiation of the study (secondary analysis of two public, de-identified ECG datasets). No application, registration or access request was required. PTB-XL v1.0.3 (21,799 ECGs from 18,869 patients; Germany; CC BY 4.0), originally located at: https://physionet.org/content/ptb-xl/1.0.3/ (DOI: https://doi.org/10.13026/kfzx-aw45) CODE-15% (233,647 first exams from the CODE cohort; Brazil; CC BY 4.0), originally located at: https://zenodo.org/records/4916206 (DOI: https://doi.org/10.5281/zenodo.4916206) Both datasets were downloaded from these public pages without restriction. The study protocol was pre-registered on OSF (https://doi.org/10.17605/OSF.IO/M9UR2) on 16 October 2026, before any prediction on the test data.

I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.

Yes

I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).

Yes

I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.

Yes

Footnotes

  • Pre-registration: OSF, doi:10.17605/OSF.IO/M9UR2 (16 October 2026).

  • Reporting guideline: TRIPOD+AI.

Data Availability

All data analysed in this study are publicly available. PTB-XL v1.0.3 is available at https://physionet.org/content/ptb-xl/1.0.3/ and CODE-15% at https://zenodo.org/records/4916206. The study protocol was pre-registered on OSF (doi:10.17605/OSF.IO/M9UR2).

https://physionet.org/content/ptb-xl/1.0.3/

https://zenodo.org/records/4916206

https://doi.org/10.17605/OSF.IO/M9UR2

Copyright 
The copyright holder for this preprint is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. It is made available under a CC-BY-NC-ND 4.0 International license.
Back to top
PreviousNext
Posted October 19, 2026.
Download PDF

Supplementary Material

Data/Code
Email

Thank you for your interest in spreading the word about medRxiv.

NOTE: Your email address is requested solely to identify you as the sender of this article.

Enter multiple addresses on separate lines or separate them with commas.
Teaching an ECG model where to look does not make it more robust to missing leads: a pre-registered comparison of guideline-based attention guidance with random lead masking
(Your Name) has forwarded a page to you from medRxiv
(Your Name) thought you would like to see this page from the medRxiv website.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Share
Teaching an ECG model where to look does not make it more robust to missing leads: a pre-registered comparison of guideline-based attention guidance with random lead masking
Mohamed Nour Bou Ali, Mohamed Mahmoud
medRxiv 2026.10.17.26365795; doi: https://doi.org/10.64898/2026.10.17.26365795
Twitter logo Facebook logo LinkedIn logo Mendeley logo
Citation Tools
Teaching an ECG model where to look does not make it more robust to missing leads: a pre-registered comparison of guideline-based attention guidance with random lead masking
Mohamed Nour Bou Ali, Mohamed Mahmoud
medRxiv 2026.10.17.26365795; doi: https://doi.org/10.64898/2026.10.17.26365795

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Subject Area

  • Cardiovascular Medicine
Subject Areas
All Articles
  • Addiction Medicine (642)
  • Allergy and Immunology (925)
  • Anesthesia (355)
  • Cardiovascular Medicine (5040)
  • Dentistry and Oral Medicine (496)
  • Dermatology (431)
  • Emergency Medicine (680)
  • Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1702)
  • Epidemiology (16324)
  • Forensic Medicine (36)
  • Gastroenterology (1244)
  • Genetic and Genomic Medicine (7312)
  • Geriatric Medicine (758)
  • Health Economics (1099)
  • Health Informatics (5325)
  • Health Policy (1478)
  • Health Systems and Quality Improvement (1842)
  • Hematology (600)
  • HIV/AIDS (1386)
  • Infectious Diseases (except HIV/AIDS) (16518)
  • Intensive Care and Critical Care Medicine (1206)
  • Medical Education (702)
  • Medical Ethics (157)
  • Nephrology (755)
  • Neurology (7641)
  • Nursing (380)
  • Nutrition (1138)
  • Obstetrics and Gynecology (1301)
  • Occupational and Environmental Health (1045)
  • Oncology (3756)
  • Ophthalmology (1101)
  • Orthopedics (413)
  • Otolaryngology (470)
  • Pain Medicine (506)
  • Palliative Medicine (144)
  • Pathology (722)
  • Pediatrics (1871)
  • Pharmacology and Therapeutics (758)
  • Primary Care Research (789)
  • Psychiatry and Clinical Psychology (6168)
  • Public and Global Health (10033)
  • Radiology and Imaging (2550)
  • Rehabilitation Medicine and Physical Therapy (1533)
  • Respiratory Medicine (1277)
  • Rheumatology (663)
  • Sexual and Reproductive Health (811)
  • Sports Medicine (601)
  • Surgery (807)
  • Toxicology (109)
  • Transplantation (320)
  • Urology (309)