Multi-Granularity Transformer Network for Enhanced Chagas Disease Detection in ECGs

Md Kamrujjaman Mobin1, Md Saiful Islam2, Sadik Al Barid3, Md Masum4
1Student, Department of Computer Science and Engineering, Shahjalal University of Science and Technology (SUST), 2Athabasca University, 3Shahjalal University of Science and Technology, Sylhet, 4Professor, CSE Department, SUST


Abstract

Accurate and early detection of Chagas disease through electrocardiograms (ECGs) is essential to reduce associated morbidity and mortality. In response to the PhysioNet Challenge 2025, team ECGenius introduces an innovative deep-learning framework utilizing a multi-granularity transformer network to enhance automated screening for Chagas disease. Our proposed approach employs a cross-channel, multi-granularity patch embedding strategy, segmenting the 12-lead ECG signals into non-overlapping patches of varying scales. This method effectively captures both local, fine-grained cardiac features and global, holistic contexts across different ECG leads, reflecting distinct yet correlated cardiac activity. To efficiently leverage this multi-scale representation, we propose a two-stage self-attention approach: intra-granularity attention captures local ECG morphology, while inter-granularity attention synthesizes critical relationships across different scales. Residual connections further improve training stability and representation depth. Preliminary evaluation of the PhysioNet Challenge 2025 dataset demonstrated promising results (leaderboard score: 0.102), highlighting the approach's potential. Future research will prioritize adaptive strategies for optimizing patch lengths dynamically, thereby enhancing model robustness and generalization across diverse ECG morphologies. In addition, we are focusing on selective channel attention to identify diagnostically relevant ECG leads and the integration of selective state space models (SSMs) for better modeling of long-range cardiac dynamics. These enhancements aim to deliver an accurate, computationally efficient AI solution for Chagas disease detection, contributing directly to improved clinical decision-making.