Abstract:The 12-lead electrocardiogram (ECG) is the most commonly used signal source for testing cardiac activity, and its automatic classification and interpretability are crucial for the early screening and diagnosis of cardiovascular diseases. Most ECG classification studies focus on single-label classification, where each ECG record corresponds to only one type of cardiac dysfunction. However, in clinical practice, patients with cardiovascular diseases often have multiple concurrent heart diseases, making multi-label ECG classification more aligned with real-world needs. Existing deep learning-based multi-label ECG classification methods have mostly concentrated on label correlation analyses or neural network modifications, neglecting the fundamental issue in multi-label learning: the inherent imbalance between positive and negative labels. To address this issue, this study proposes a novel strategy that balances positive and negative labels during training by pushing away only one pair of labels each time. Specifically, it maximizes the margin between positive and negative labels and derives a new loss function to mitigate the imbalance issue. Furthermore, to address the insufficiency of interpretability in existing ECG methods, which hinders diagnostic assistance, the study introduces a temporal saliency rescaling method to visualize the experimental results of the proposed method, aiding in the localization and interpretation of different diseases. Experiments conducted on the PhysioNet Challenge 2021 ECG dataset, which includes 8 subsets, demonstrate that the proposed method outperforms state-of-the-art multi-label ECG classification methods.