###### Abstract
Instead of annotating in a conventional way, researchers adopt domain adaptation (DA) methods to solve these limitations, where domain shift refers to distribution diversity between train and test samples [6]. And DA is a prominent method that solves the issue of domain shift. In that case, training and test samples are considered as source and target samples, respectively. However, ECG datasets are often limited for real-time testing, and data imbalance issues are also there. For example, the MIT-BIH arrhythmia dataset is an imbalanced dataset, where normal class data are higher than rare disease class data. In other datasets, this sparse representation of data is presented. Another challenge is collecting well-representable data for model training. Technically, deep learning models show an inherent bias towards classes that are more common in training [7]. But individual performance in minor classes is not appreciable considering the relative overall performance based on accuracy. Hence, we need a well-occupied data augmentation method that can create synthetic data with respect to the original data for the minor classes. But it causes a marginal performance boost that might not be sufficient in medical diagnosis. Hence, generative models can learn the distribution of the training data so that it generates samples that have the same distribution. Thus, it can improve the classification performance in minor classes. Most of the unsupervised domain adaptation (UDA)-based methods require a common connection between source and target distributions [8], and also need access to source data during real-time deployment. But in medical cases, it is intended to be highly impractical due to the nature of privacy concerns in patient data due to several ethical implication issues, such as how most UDA cases and other traditional models tend to access the direct patient data in the real-time adaptation, which breaks data confidentiality. It is also highly risky that traditional approaches are vulnerable in preserving data anonymization since most of the deep learning approaches tend to memorize specific information of the patient. There are some other ethical concerns that are associated with data privacy, such as data sharing without explicit consent, bias, and discrimination, etc. And it is not feasible to train a model with limited computational resources. On the other hand, an accidental loss of source data can make it impossible for traditional UDA techniques to generalize in new subject data. Therefore, there are many underlying challenges even in the UDA setting for ECG classification tasks. In Figure 1, we illustrate the source and target sample before adaptation and also illustrate the effect of source-free adaptation with generated samples. To tackle the aforementioned issues in traditional DL-based models and UDA methods in ECG classification, we adopt a novel problem-setting source-free adaptation. Source-free adaptation (SFA) [8,9] is a new extension of the area of DA/UDA, where in real-time adaptation, a source dataset is not required. Perhaps, it is suitable for overcoming all the open challenges in ECG classification can be solved via the SFA method. So, we reinforce the SFA idea into ECG classification, which is totally a novel scenario in this problem. We propose a source-free intersubject method, SF-ECG, for ECG classification. Our proposed framework can improve the intersubject performance of DNN without requiring source data in adaptation. Our framework consists of three modules: data adjustment, local clustering, and data adaptation. More of the details can be found in Section 3. Our contributions are summarized into four folds:  
* To the best of our knowledge, we first incorporate the source-free adaptation strategy to address interpatient ECG classification. * We propose an SF-ECG framework, which is an unsupervised domain adaptation method that predicts unlabeled target samples without requiring source data in the test-time adaptation setting.