## 5 Conclusions  
This study introduces a novel cross-database learning framework for ECG arrhythmia classification based on a 2D BSM representation. By effectively utilizing both fine-grained beat-level annotations and coarse-grained record-level annotations, our approach addresses the limitations of the existing supervised and weakly supervised methods. Unlike other approaches for cross-database applications, we pretrain on fine-grained annotated databases and then implicitly incorporate domain adaptation via weakly supervised learning on coarse-grained annotated databases to improve model generalization on heterogeneous datasets.  
Experimental evaluations on the SPH and PTB-XL datasets demonstrate that the proposed framework consistently outperforms the baseline methods that do not use pretraining or weakly supervised adaptation, achieving F1 scores of 0.9301 and 0.9267 for classifying different arrhythmia rhythm types, respectively. Additionally, t-SNE visualizations clearly confirmed the proposed framework's capability to distinctly separate complex arrhythmia classes, enhancing both classification performance and clinical applicability.  
Despite its advantages, our proposed method has several limitations. Firstly, its effectiveness depends on the accuracy and granularity of the available record-level annotations, indicating that incorrect or overly coarse labels could reduce classification accuracy. Integrating additional semi-supervised or self-supervised methods could further enhance the discriminative capability of the learned BSM embeddings, leading to improved overall  
Figure 7: t-SNE visualization of ECG embedding distributions for two arrhythmia classes at different training stages on the PTB-XL database.  
classification performance. Moreover, computational efficiency remains a challenge; optimizing the framework for efficient real-time processing, especially in wearable and mobile devices, would significantly enhance its practical deployment in clinical settings. While this study conducted experiments on a PC equipped with a GPU, it would be worthwhile to investigate how the framework could be adapted for energy-constrained environments, such as embedded or portable systems.  
Future research directions include validating the framework's generalizability across a broader range of public and clinical ECG databases. Furthermore, extending the DA-BSM beyond ECGs to multimodal biomedical signals such as PPG and EEG could increase its clinical utility. Such extensions would not only demonstrate the versatility of our method but also facilitate the development of scalable multimodal diagnostic solutions. By continuing to enhance the efficiency and adaptability of the DA-BSM framework, we aim to establish a robust foundation for practical, real-time, and clinically meaningful biomedical signal analysis applications.  
Conceptualization, J.L.; methodology, M.S.; formal analysis, J.L.; investigation, J.L.; data curation, J.L.; writing--original draft preparation, J.L.; writing--review and editing, M.S. and J.L.; visualization, J.L.; supervision, M.S.; project administration, M.S.; funding acquisition, M.S. All authors have read and agreed to the published version of the manuscript.  
This work was mainly supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (2022R11A3054343).  
Not applicable.  
The data presented in this study are openly available in PhysioNet. Reference number [28; 29; 30].  
The authors declare no conflicts of interest.