Skip to content
DraconiticResearch
Search Sources API
203,234 studies31 sourcesUpdated 10 min ago
Peer-reviewedCC BY-NC-NDCurrent Directions in Biomedical Engineering

An Explainable, Demographic-Aware ECG Transformer for Atrial Fibrillation Detection

  1. 1Institute of Biomedical Engineering, TU Dresden, Fetscherstrase 29,Dresden, Germany

Abstract

Deep learning models have demonstrated strong performance in electrocardiogram (ECG)-based cardiovascular disease detection, but face the challenge of systematic variation across individual patients. Patient-specific information, a cornerstone of precision medicine, may help models account for this variability, yet its integration into ECG analysis remains underexplored. We present a transformer architecture with cross-attention-based metadata conditioning for atrial fibrillation (AF) detection from single-lead ECGs, trained on a large classbalanced dataset including 77,261 patients. A systematic ablation study evaluated four metadata configurations including age, sex, ethnicity and AF-associated risk factors. All configurations achieved F1 scores between 96.7% and 96.8% on the held-out test set and between 92.7% and 93.4% on an independent multi-source dataset, confirming competitive performance and strong cross-dataset generalisation. Post-hoc explainability analysis revealed that age is the dominant demographic feature, while sex and ethnicity showed negligible contribution. QRS complexes and fibrillatory T-Q intervals were found to be the most highlighted segments, aligning with established clinical markers of AF. These findings provide a quantitative basis for evaluating when demographic conditioning is clinically justified, and establish an interpretable baseline for future patient-specific adaptive models.

Related

  1. Neighborhood Disadvantage and Unequal Detection of Atrial Fibrillation
    Kamala P. Tamirisa, Larry R. Jackson
    JAMA Network OpenPeer-reviewedCC BY 4.0Cardiovascular medicineCrossref
  2. A multicenter randomized controlled study to evaluate the efficacy of an artificial intelligence–based electrocardiography for the detection of atrial fibrillation in patients with suspected symptoms (DEEP-AF)
    Ki-Jeung Lee, Chang-Ok Seo, Joo Hee Jeong +29
    Heart rhythm O2Peer-reviewedCC BY-NC-NDFull textCardiovascular medicineEurope PMC
  3. 2026 Asia Pacific Heart Rhythm Society (APHRS) Guidelines (Part I) on Epidemiology, Detection/Screening and Integrated Patient Care in Atrial Fibrillation.
    Boyoung Joung, Rungroj Krittayaphong, Yutao Guo +16
    Journal of arrhythmiaPeer-reviewedCC BYFull textCardiovascular medicineEurope PMC
  4. Robust and generalizable atrial fibrillation detection from ECG using time-frequency fusion and supervised contrastive learning
    Hongtao Li, Jia Wei, Jia Xiao +4
    Scientific ReportsPeer-reviewedCC BYFull textCardiovascular medicineDOAJ
  5. Atrial fibrillation detection using an implantable loop recorder after cryptogenic stroke.
    Evan C Adelstein, Deborah F Steinberg, David A Steckman +1
    Heart rhythm O2Peer-reviewedCC BY-NC-NDFull textCardiovascular medicineEurope PMC
BibTeX
@article{matteo2026explainable,
  title = {{An Explainable, Demographic-Aware ECG Transformer for Atrial Fibrillation Detection}},
  author = {Zannini Matteo and Malberg Hagen and Schmidt Martin},
  journal = {Current Directions in Biomedical Engineering},
  year = {2026},
  month = oct,
  doi = {10.1515/cdbme-2026-0266},
  url = {https://doi.org/10.1515/cdbme-2026-0266},
  note = {CC BY-NC-ND},
}
RIS
TY  - JOUR
TI  - An Explainable, Demographic-Aware ECG Transformer for Atrial Fibrillation Detection
AU  - Zannini Matteo
AU  - Malberg Hagen
AU  - Schmidt Martin
PY  - 2026
DA  - 2026/10/26
JO  - Current Directions in Biomedical Engineering
DO  - 10.1515/cdbme-2026-0266
UR  - https://doi.org/10.1515/cdbme-2026-0266
AB  - Deep learning models have demonstrated strong performance in electrocardiogram (ECG)-based cardiovascular disease detection, but face the challenge of systematic variation across individual patients. Patient-specific information, a cornerstone of precision medicine, may help models account for this variability, yet its integration into ECG analysis remains underexplored. We present a transformer architecture with cross-attention-based metadata conditioning for atrial fibrillation (AF) detection from single-lead ECGs, trained on a large classbalanced dataset including 77,261 patients. A systematic ablation study evaluated four metadata configurations including age, sex, ethnicity and AF-associated risk factors. All configurations achieved F1 scores between 96.7% and 96.8% on the held-out test set and between 92.7% and 93.4% on an independent multi-source dataset, confirming competitive performance and strong cross-dataset generalisation. Post-hoc explainability analysis revealed that age is the dominant demographic feature, while sex and ethnicity showed negligible contribution. QRS complexes and fibrillatory T-Q intervals were found to be the most highlighted segments, aligning with established clinical markers of AF. These findings provide a quantitative basis for evaluating when demographic conditioning is clinically justified, and establish an interpretable baseline for future patient-specific adaptive models.
SN  - 2364-5504
ER  -