Key result
Swap detection followed by exact correction restored swap-averaged macro AUROC from 0.732 to 0.923 and reduced diagnosis flips from 78.2% to 0.18%.
Why the study?
Deep learning classifiers read ECGs automatically, but it had not been measured how often their diagnoses change when limb electrodes are swapped or which defense protects the diagnosis best.
Does a swap detection and exact correction defense preserve diagnostic macro AUROC and prevent diagnosis flips in a 1D residual network ECG classifier subjected to limb electrode swaps compared to an undefended baseline classifier?
Does a swap detection and exact correction defense preserve diagnostic macro AUROC and prevent diagnosis flips in a 1D residual network ECG classifier subjected to limb electrode swaps compared to an undefended baseline classifier?
Answers are grounded in this paper and cite their sources.
Standard deep learning ECG classifiers are highly vulnerable to common limb electrode swaps—frequently misdiagnosing them as myocardial infarctions—but placing an automated swap detector with exact mathematical lead correction in front of the classifier nearly completely restores diagnostic stability without sacrificing accuracy on clean recordings.
Swapped limb electrodes are a common technical error in electrocardiography, estimated at about 4% of acute care recordings. Deep learning classifiers now read ECGs automatically, but nobody has measured how often their diagnoses change when the electrodes are swapped, or which defense protects the diagnosis best. We used the public PTB XL dataset (21,388 labeled 12 lead ECGs) with its official training, validation and test folds and five diagnostic super classes. Because every limb lead is a fixed combination of three electrode potentials, all five swaps of the right arm, left arm and left leg electrodes can be computed exactly from real recordings, while the chest leads stay unchanged. We trained a 1D residual network and three defenses: swap augmentation, a swap detector followed by exact correction, and a multitask network that diagnoses and detects the swap together. Each model was trained with three seeds. Three hypotheses were written down before the full run. On correctly recorded test ECGs (2,158 recordings from 1,877 patients), the baseline reached a macro AUROC of 0.923. Averaged over the five swaps, it fell to 0.732 (difference 0.191, 95% CI 0.183 to 0.199) and changed the predicted diagnosis set of 78% of ECGs. After a right arm and left leg swap, 99.7% of ECGs without infarction that had been read correctly were newly called myocardial infarction. Detection followed by correction restored a swap averaged AUROC of 0.923, changed only 0.18% of diagnoses and created no new infarction calls. The detector identified the correct condition in 99.1% of cases, and 92% of its few errors confused conditions that differ only by the left arm and left leg electrodes. Swap augmentation and the multitask network also preserved AUROC (0.919 and 0.922) but still changed 15% and 19% of diagnoses. No defense reduced accuracy on correctly recorded ECGs. All three hypotheses were supported (adjusted p = 0.003). Standard deep learning ECG classifiers are highly vulnerable to limb electrode swaps, and the error most often looks like a myocardial infarction. Detecting the swap and undoing it exactly protects the diagnosis almost completely and also tells the user that the recording needs attention.
No takes yet. Share an insight, caveat, or question.
Assad H. Thary Al-Ghrairi (2026) studied Electrocardiogram diagnostic classification across five superclasses (normal ECG, myocardial infarction, ST and T change, conduction disturbance, and hypertrophy) under limb electrode swaps (n=21,388). Swap detection followed by exact lead correction vs. Standard baseline 1D residual network without swap defense was evaluated on Swap-averaged macro AUROC across the five diagnostic superclasses under simulated limb electrode swaps (MD 0.191, 95% CI 0.183 to 0.199, p=<0.001 (adjusted p = 0.003)). Swap detection followed by exact correction restored swap-averaged macro AUROC from 0.732 to 0.923 and reduced diagnosis flips from 78.2% to 0.18%.
Synapse has enriched 10 related papers. Consider them for comparative context: