Initial Development of a Twelve-Lead Electrocardiogram Model for Digoxin Exposure Detection as a First Step Toward Toxicity Stratification

Jose Moon
Korea University


Abstract

Background: Digoxin remains clinically relevant in patients with atrial fibrillation and heart failure, but electrocardiogram-based toxicity discrimination is difficult because disease-related electrical abnormalities can overlap with digoxin-associated changes. As an initial step toward toxicity stratification in this population, we first evaluated whether a twelve-lead electrocardiogram model could distinguish normal controls from digoxin-exposed patients before focusing on high-versus-non-high classification among digoxin users.

Methods: We trained ECGResNet1D models using twelve-lead, 10-second electrocardiograms from three tertiary hospitals. Site A was used for training, site B for validation (70%) and internal testing (30%), and site C for external testing. In the balanced normal-plus-digoxin cohort, sample sizes were 3,368, 1,628, 700, and 666 for train, validation, internal, and external sets, respectively; digoxin-high cases numbered 67, 39, 8, and 38. Metadata included age, sex, heart rate, PR interval, QRS duration, QT interval, corrected QT, and RR interval. Normal was defined as digoxin_value=0 with no digoxin history, digoxin exposure as digoxin_value>0, and high level as digoxin_value≥2.0.

Results: On the external test set, normal-versus-digoxin discrimination was excellent for both ECG-only and ECG-plus-metadata models (AUROC 0.982 and 0.985; AUPRC 0.981 and 0.987, respectively). Within digoxin-exposed patients, high versus non-high classification was evaluated under marked class imbalance, with positive prevalence ranging from 2.3% to 11.4% across splits. In this setting, the ECG-plus-metadata model achieved AUROC 0.709 and AUPRC 0.339 on the external test set, outperforming ECG alone (AUROC 0.639; AUPRC 0.250), with 55.3% sensitivity and 82.0% specificity. Notably, the external prevalence baseline was 0.114, so the observed AUPRC represented approximately threefold enrichment over baseline.

Conclusions: A twelve-lead electrocardiogram robustly captures digoxin exposure signatures. Under low-prevalence conditions, electrocardiogram plus metadata provided meaningful precision-recall enrichment beyond chance-level performance for identifying high digoxin levels, supporting the feasibility of the next stage of toxicity-focused modeling.