We present a novel deep learning approach to tackle the problem of Chagas classification on 12-lead ECGs as part of the 2025 PhysioNet/CinC challenge. To solve, we develop a pipeline combining robust signal processing with a multiscale-CNN Attention architecture.
First, the raw ECGs from the CODE-15 dataset were processed using a 4th-order Butterworth high-pass filter. A 50Hz notch filter is applied to remove baseline wander and power-line interference. Next, we detected R-peaks on Lead II and segmented 10 consecutive heartbeats of length 400 around the identified peaks from all leads. These individual lead segments formed a 12-lead, 4000-sample signal matrix, which was then zero-padded to 4096 samples, normalized between 0 and 1 for each lead, and reshaped into a 64x64x12 tensor to accommodate 2D inputs.
Our custom feature extraction network employs multiscale convolutional blocks with multiple kernel sizes to capture features across different temporal scales, and a multi-head attention mechanism to highlight those specific waveform patterns that may be associated with Chagas pathology - a combination that has proven to benchmarks tasks in the literature. Considering the severe class imbalance, we trained the network using a weighted binary cross-entropy loss at a ratio of 50:1.
In one experiment , we did an 80/20 train-validation split and achieved an F1 score of 0.03. Due to the highly imbalanced dataset, we performed undersampling of normal samples and training with weighted BCE loss. Unfortunately, time constraints and extensive hyperparameter tuning prevented us from performing cross-validation prior to submission. Nevertheless, our novel multiscale attention architecture and preprocessing pipeline could achieve significantly improved performance with further refinement. We have tested this architecture on the Physionet 2020 challenge and achieved scores comparable to the top of the leaderboard (val_accuracy: 0.6492) on the publicly available training set, suggesting that our approach holds promise for enhancing Chagas screening.