Domain-Adversarial Pretrained Encoder for ECG-Based Chagas Disease Screening

Tianzheng Dong1, Xinqi Bao1, Jia Bi2, Saikat Chatterjee1
1KTH Royal Institute of Technology, 2Rutherford Appleton Laboratory


Abstract

Chagas disease (ChD) remains a major health burden in Latin America, and scalable screening tools are required to pre-select high-risk patients for confirmatory testing. Electrocardiograms (ECGs) are widely available, but machine learning models trained on heterogeneous datasets are vulnerable to domain bias. A domain-aware framework was proposed using a transformer encoder initialized with released pretrained weights, combined with a four-class reformulation of SaMi-Trop and PTB-XL cohorts and a domain-adversarial head to promote domain-invariant features. In local five-fold cross-validation, the model achieved an average challenge score (Recall@5\%) of 0.824 (best 0.852, with AUROC/AUPRC of 0.883/0.852). Predicted probabilities remained conservative, avoiding extreme confidence while maintaining strong ranking. On the hidden external test set, the challenge score decreased to 0.270, indicating sensitivity to domain shift. These results demonstrate that the transformer encoder structure with multi-class adversarial training improve local robustness, but domain-aware validation and dataset diversification are necessary for generalizable ChD ECG screening.