Next Article in Journal
Calculation of Consistent Plasma Parameters for DEMO-FNS Using Ionic Transport Equations and Simulation of the Tritium Fuel Cycle
Previous Article in Journal
A Multi-Layer Feature Fusion Model Based on Convolution and Attention Mechanisms for Text Classification
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

SF-ECG: Source-Free Intersubject Domain Adaptation for Electrocardiography-Based Arrhythmia Classification

Department of Computer Engineering, Hallym University, Chuncheon 24252, Republic of Korea
*
Author to whom correspondence should be addressed.
This work has been done during this author’s work at Hallym University.
Appl. Sci. 2023, 13(14), 8551; https://doi.org/10.3390/app13148551
Submission received: 2 July 2023 / Revised: 20 July 2023 / Accepted: 21 July 2023 / Published: 24 July 2023
(This article belongs to the Section Biomedical Engineering)

Abstract

:
Electrocardiography (ECG)-based arrhythmia classification intends to have a massive role in cardiovascular disease monitoring and early diagnosis. However, ECG datasets are mostly imbalanced and have regularization to use real-time patient data due to privacy concerns. Traditional models do not generalize on unseen cases and are also unable to preserve data privacy. Which incentivizes performance degradation in existing models with privacy limitations. To tackle generalization and privacy issues together, we introduce the framework SF-ECG, a source-free domain adaptation approach for patient-specific ECG classification. This framework does not require source data during adaptation, which solves the privacy issue during adaptation. We adopt a generative model (GAN) that learns to synthesize patient-specific ECG data in data-inefficient classes to make additional source data for imbalanced classes. Then, we use the local structure clustering method to strongly align target ECG features with similar neighbors. After seizing clustered target features, we use a classifier that is trained on source data with generated source samples, which makes the model generalizable in classifying unseen data. Empirical results under different experimental conditions in various interdomain datasets prove that the proposed framework achieves 0.8% improvements in UDA settings, along with preserving privacy and generalizability.

1. Introduction

Electrocardiography is a noninvasive tool that is accessible globally for the initial diagnosis of cardiovascular diseases [1,2]. There are many forms of cardiovascular disease that can be identified via the ECG graph of a patient, including arrhythmia [3] Due to the huge volume of its application, researchers are developing several effective tools to classify ECG signals effectively. Arrhythmia is considered the most common form of heart disease, which refers to a condition where heart rhythms are irregular. It can be detected with abnormalities in the ECG graph. But analyzing the ECG graph abnormalities is time-consuming and difficult without expert supervision. On the other hand, the morphology and characteristics of different patients’ ECG signals have diversity due to different physiological situations. Some of the same diseases can have different patterns in the ECG signals [4], which can be difficult to interpret or annotate for generating training samples’ deep learning models. Recently, deep learning (DL) appears with strong baseline capabilities in many real-life applications. DL-based ECG classification has become so popular and mainstream nowadays due to the growth of AI in disease diagnosis. As DL has the powerful attribute to learn features from large-scale clinical data in various conditions, several successful DL-based diagnosis tools are designed [3]. Mostly, CNNs and RNNs are used to learn the high-level features from raw time series ECG data, and these features are utilized in the classification task. But these classification models are not generalizable in new subject data during testing. In most real-time applications, these models fail to deliver desired precision in classification.
ECG classification can be referred into two schemes, namely, intrasubject and intersubject. However, the training and test examples are differently distributed but belong to the same subject and can be referred to as intrasubject. The main limitation of developing the intrasubject scheme is that models are not well generalized in new subject cases; hence, there is a noticeable performance drop, whereas if the training and test examples are not overlapping and belong to different subjects, that can be referred to as intersubject. In the intersubject scheme, the samples have differences individually. Individual differences refer to differences in sex, age, physiological conditions, etc. In this case, the classification performance is based on being subject-to-subject. Therefore, differences in the training and testing examples make the whole learning generalizability difficult; hence, it is considered the most challenging and realistic setting for developing ECG classification models [5].
Even though DL methods have made great advances in the intrasubject scheme, they are still facing considerable performance degradation in the intersubject scheme, as the intersubject scheme is a more realistic setting for developing applications, since each subject/patient has different morphological characteristics in ECG signal data due to the variance in individual cases. Considering the application reliability, a method called subject-independent refers to the training of a model with labeled training samples and testing the model into the new test samples strictly. But in this case, the model performance deteriorates by a significant margin, which can not be relied on while building models. The problem can be solved via subject-specific training with a specific model, where the whole scheme can be divided into two phases, such as initial training and fine tuning [5]. Usually, in the initial training, the model uses the training samples to train, and in the next stage, the model is fine-tuned by partially labeled samples from test samples. The whole phase increases the adaptation capacity of intersubject variation. But this scheme is associated with various underlying issues, such as developing models for each individual subject or patient is not feasible for real-time deployment where computational resources are limited. Another major drawback is that annotating such a large amount of subject-wise data tends to be expensive and laborious. 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.
  • We adopt a generative model that generates high-quality ECG training samples for the source classifier. It alleviates the data insufficiency problem in class-wise training. Which exhibits a strong source classifier that is utilized in the test-time adaptation.
  • Empirical experiments show that our framework is capable of classifying interpatient ECG samples with high precision even in this novel scenario, outperforming many state-of-art methods in the same settings with a better generalization ability.
Organizations. The remaining part of the paper is organized as follows, Section 2 discusses related work. Section 3 provides an extensive demonstration of our proposed framework in detail. Section 4 presents the experimental setting, results, and ablation studies. And finally, Section 5 ends with a discussion and conclusion of this work.

2. Related Work

This section is comprised of recent related works on unsupervised domain adaptation (UDA) and generative adversarial network (GAN) for ECG classification tasks.

2.1. UDA for ECG Signal Classification

Recently, there are many recent works that adopt the UDA method in interclass ECG classification tasks. Chen et al. [1] proposed a multipath network as a baseline classification model assigned with cluster-aligning separating loss to reduce the discrepancy between train and test distributions for ECG-enabled arrhythmia classification. Deng et al. [2] proposed a multisource UDA method that utilizes multiple data sources to incorporate generalization. This method comprises a two-stage adaptation and imbalance-aware mixing strategy to learn features across all domains from multiple sources. Wang et al. [3] introduced a UDA method that learns discriminative features from clustering characteristics of source and target data. They also utilized cluster-aligning and maintaining losses to regulate and structure feature information of the source and target data in invariant space. Yuan et al. [4] introduced a hypergraph-based UDA method that exploits cross-attention dual-channel networks in adaptation tasks. They also used a domain alignment method based on Wasserstein distance for edge features, which also applies a pseudo-label generation technique for retaining category-level fine-grained information of the distribution. He et al. [5] proposed a multilevel UDA method, which comprises an ASPP-R module to extract SP features; then, they used Graph-CN to extract structural features of the data. The whole framework exhibits three feature alignment stages, namely, domain, semantic, and structure alignment. Bazi et al. [10] utilized domain transfer SVM and weighted KLR methods to compare within the MIT-BIH dataset to see the statistical shift between the train and test ECG samples. Niu et al. [11] proposed an adversarial DA method that comprises three different modules, namely, feature extractor, discriminator, and classification tasks. These modules reduced the performance gap under discrepant ECG data distribution. Yin et al. [12] introduced a self-adjustable domain adaptation method to dispute the overfitting issue and unlabeled data exploitation. They adapted data augmentation methods to extend the ECG database in training conditions and a self-obtained map of the unlabeled data features with the transfer learning strategy. He et al. [13] introduced an online cross-domain DA approach, which is based on a shared subspace classifier. It reduces the interclass discrepancy. It also includes an online adaptation method for emotion recognition via ECG data, which apparently defers from the ECG-based disease classification.
Natarajan et al. [14] addressed the generalization issue of DA methods in lab-to-field data scenarios in ECG-based cocaine use detection. This works limits the prior probability, covariate, and label granularity shifts in lab-field data usage. Hang et al. [15] proposed a UDA method that uses a CNN to extract deep features from raw data; then, they used MMD to increase distribution gaps between source and target features. Ammour [16] proposed an asymmetric DANN method that uses a denoising autoencoder to learn features and FCNN layers to alienate data-shift. Helm et al. [17] introduced a Fisher’s linear discriminant method for DA that determines the expected risk of the combined hypothesis of the target distribution and also estimates a convex coefficient of BV-trade between source and target samples. This method explores both ECG and EEG data in the DA setting. Carrera [18] et al. proposed a DA method that learns the user-independent linear transformation of the ECG data. They also modeled heartbeat-based sparse representations. This transformation method maps the patient-specific dictionaries in modeling ECG heartbeats, which is usable for online ECG monitoring. Chen et al. [19] proposed a UDA method based on an adaptive region network; they utilized adversarial training to reduce the discrepancy of the domain. The proposed model learns the invariant features with a generative network, consisting of one generator and one discriminator. Yamac et al. [20] proposed a null space-based analysis for healthy cardiac signal space, reducing computational complexity. However, they also introduced a sparse-representation-based UDA method that learns new signals without having a domain shift between existing signals and new signals. Ye et al. [21] introduced a clustering-enhanced UDA method that relies on a discriminative attribute. They used a self-supervised loss on the target data and obtained pseudolabels based on the target data. The framework encourages ambiguous target data to be correctly classified. Li et al. [22] proposed a signal quality assessment strategy based on the UDA method, which increases the feature extraction from target data. The framework is based on a feature distribution alignment strategy by an adaptation layer. Peng et al. [23] introduced a UDA method that learns universal features by adversarial autoencoder. The embedding space after adversarial training aligned with the Riemannian manifold prior to obtaining cross-domain features. They also used a variational interface method to increase the generalization capacity of the framework.

2.2. GAN for ECG Signal Classification

Previous works have also explored generative adversarial networks (GANs) for generating synthetic data for imbalanced datasets, whereas most of the well-known ECG datasets and real-world databases are not balanced. Shaker et al. [7] proposed a data augmentation method with GAN; they utilized a CNN to extract features and leverage a feature reduction strategy for their framework that increases the high number of samples in the training set. Golany et al. [24] proposed a simulation-based GAN framework that understands the complex dynamics of generating close-to-real ECG training samples with the help of ordinary differential equations. Golany and Radinsky [25] introduced a GAN-based semisupervised framework that learns to generate synthetic per-patient ECG data to improve the patient-specific ECG classification. Golany et al. [26] studied GAN for generating improved training ECG samples following LSTM-based ECG classification. Wang et al. [27] introduced a data augmentation method based on an auxiliary GAN classifier. They constructed a classification model based on a stacked residual network with LSTM. Yang et al. [28] propose ProGAN method based on GAN that solves the data imbalance issue. They generated a diverse state of ECG samples so that the model obtains higher fidelity and diversity in training samples. Hence, that ensures better generalization in the test set. Ye et al. [29] introduced a policy gradient-based sequence GAN framework for negotiating with low-quality training without insufficient extracting global ECG features. The proposed framework shows a stable variance in generation loss. Zhu et al. [30] proposed a bidirectional LSTM-CNN-based GAN framework for ECG training sample generation with a diverse combination of generators and discriminators. Wang et al. [31] proposed a conditional GAN-based ECG denoising method that comprises a convolutional autoencoder as the generator, which preserves spatial locality and feature representations. Several hidden layers are the discriminator. Harada et al. [32] proposed a recurrent neural network-based GAN framework for ECG data augmentation and generation. Singh and Pradhan [33] proposed a CNN-GAN framework for ECG noise filtering for denoising. Adib et al. [34] studied five different GANs, including BiLSTM-DC-GAN and WGAN, for generating synthetic ECG signals for robust training ECG samples. They also proposed a residual ECG network for ECG classification. Rafi and Young [35] proposed a multihead attention-based CNN framework that adopts GAN to tackle data insufficiency issues in imbalanced datasets by generating additional ECG data samples.

3. Proposed Method

Our framework for source-free intersubject ECG classification is divided into three modules, namely, data adjustment, local structure learning, and adaptation network. In the data adjustment module, we use a generative model to generate synthetic samples based on the source sample distribution. The local structure module learns the target features and clusters these features based on the neighbors. An illustration of the overall framework is shown in Figure 2.

3.1. Preliminaries

In the source-free domain adaptation task (SFDA), we consider D s = { ( x i s , y i s ) } i = 1 n s ; here, n s is the number of samples in the source set that are labeled. x i s and y i s are the source samples and their corresponding labels, respectively. We also have the target set D t = { x j t } j = 1 n t ; here, n t is the number of samples that have no corresponding labels. In the SFDA settings, we only have access to the source set in the model pretraining condition. However, it is not available in the real-time adaptation task.

3.2. Generative Model for Data Adjustment

In various cases, ECG datasets often face data imbalance in minor classes. To generate synthesized data, we use a generative model, GAN [25,26,27]. Generally, GAN is formulated into two modules: (1) generator and (2) discriminator. The generator takes source samples with random noise, z. This random noise z learns the distribution of the source data D s = ( X s , Y s ) and outputs synthetic samples D f = ( X f , Y f ) . The output of the discriminator is usually the synthetic and original data. The discriminators’ objective is to distinguish the synthetic and original data precisely. Basically, the generator is trained to generate synthetic data to classify the original by the discriminator. On the other hand, the discriminator tends to recognize the synthetic and original data as accurately as possible. The training objective of GAN can be described as the value function V ( D , G ) , where the generator value function V ( G ) is expected to maximize and the discriminator value function V ( D ) is expected to minimize:
min G max D V ( G , D ) = E x P d a t a ( x ) [ l o g D ( x ) ] + E z P z ( z ) [ l o g ( 1 D ( G ( z ) ) ) ] .
Here, D ( x ) and G ( z ) are denoted as the probability of x, which belongs to the original data distribution P d a t a , and a substantial mapping function obtained from the noise vector to the generated vector, respectively. However, the optimal parameters can be obtained by maximizing and minimizing the value function of the discriminator and generator, respectively. Discriminator D is trained with both positive and negative ECG samples in each iteration. And the generator G is updated with policy gradients two times, while D is updated once; we consider this strategy from [25]. Training converges until G is indistinguishable. Generated synthetic samples on the class-deficient category alleviate this issue, and certainly make the dataset considerably balanced. We use the balanced dataset in the local structure module (C). Adversarial loss and cross-entropy loss are adopted for the GAN module. Table 1 depicts the model description.

3.3. Local Structure Module

In traditional settings, UDA methods are based on the feature alignment strategy of source and target features. But in the SFA setting, it is not feasible to access the source data. We usually obtain a class prediction p ( x ) and feature embedding space f ( x ) . Following [9], the local structure method intends to shift the target features with the source domain. In the first place, due to the expected domain shift, some of the target features can be deviated by far from the source feature region. But in this case, we still consider that feature space retains the clusters that are formed by the classes. For this, we actually measure the distance and move the data point into the close likely data point cluster. Due to the domain shift between the source and target interpatient data, there can be wrong predictions by the classifier. So, it is essential to cluster target features that are in the same class clustered together. Therefore, it is obvious that the nearest neighbor target features tend to have share category labels. As a result, the clustered features are most likely to have an inclination toward a common label jointly. As shown in Figure 2, this scheme helps to classify target features correctly that possibly have the wrong classification.
To ensure semantically close neighborhoods, we use a feature extractor bank F = { ( f ( x i ) } ϵ D i to accumulate joint target features. Then, we utilize a neighborhood selection procedure to ensure the best clusters among target features. It explicitly encourages correct classification. We take a few nearest neighbors from the feature extractors with a consistency regularization. To store the softmax predicted scores, we use a score bank S = { g ( f ( x i ) } ϵ D i . Here, g , f ( x i ) are the classifier and feature extractor, respectively. To achieve this, we adopt the ResNet-50 model with a fully connected layer as the feature extractor f ( x i ) , and an additional fully connected layer as classifier g. The local clustering is obtained by adopting the following loss in Equation (2) for consistent predictions in the k-nearest features [9].
L LC = 1 n i = 1 n k = 1 K log p x i · s N k + c = 1 C KL p ¯ c q c N { 1 , , K } = F j top K cos f x i , F j , F j F p ¯ = 1 n i = 1 n p c x i , and q { c = 1 , C } = 1 C .
Here, N is the k-nearest neighbors stored in the feature extractors for each target feature; it is calculated based on the cosine similarities. The dot product between stored prediction scores s ( N k ) and target sample x i is minimized of the negative log values. Equation (2) intends to ensure the consistent correct prediction between the nearest neighbors and features. Here, the term p c and q are the empirical label distributions and uniform distribution, respectively. And finally, the old items are replaced in the bank with the new items using the corresponding minibatch. Figure 3 illustrates the local structure module.

3.4. Source-Free Domain Adaptation Module

Our domain adaptation module has the feature extractor from the local structure module, which is a shared feature extractor with source and target features aligned. We also have a classifier network and a discriminator; the whole setting is replicated from [36]. As we know, in the SFDA setting, source data are not accessible during the adaptation. So, in this case, using the GAN framework we generated identically distributed samples from the source samples to use in the training time with D t . As we already have the feature extractor, which exhibits the neighborhood-based domain-invariant target feature alignment with the source samples, the discriminator tends to separate the generated samples from the unlabeled target samples. The classifier network is utilized to classify the target samples while it is trained and fine-tuned with the D f . As such, no source database D s is required in the adaptation time, since we are only using the generated source samples. All the feature extractors, classifiers, and discriminators have learnable parameters. However, in the adaptation task, fixed numbers of generated source samples from D f are taken; hence, the adaptation performance is based on the number of source samples that are used during the adaptation.

3.5. Objective Function

Following the work in [36], we use four types of loss functions in our framework to train. Here is the description of each loss function.
Adversarial Loss ( L a d v ): Adversarial loss is used during the GAN discriminator training; it actually helps the discriminator to discriminate between synthetic data and original data. There are two adversarial losses for the generator and discriminator. Here, L g ( a d v ) and L d ( a d v ) are the generator and discriminator loss, respectively. Generator loss L g ( a d v ) is denoted as:
L g ( a d v ) = i n l o g ( 1 D ( G ( z i , y i ) ) )
where z and y are the random noise and generated class labels, respectively. The discriminator loss L d ( a d v ) is denoted as:
L d ( a d v ) = i n l o g D ( G ( z i , y i ) ) + t i τ l o g D ( t i )
Here, t i is the target data, which are sampled from τ distribution.
Cross-Entropy Loss ( L C E ) : This loss is calculated when the generated samples are used in the pretrained classifier. This loss ensures consistent parameters by not updating the pretrained classifier. ( L C E ) is denoted as:
L C E = 1 D n f G ( z i , y i ) D L t ( P c ( G ( z i , y i ) ) , y i )
Here, P c , L t is the pre-trained classifier and traditional cross-entropy [36] loss respectively. D n f is the number of synthetically generated samples.
Discriminative Loss ( L D ) : Domain invariant features are obtained from the feature extractor, and discriminative loss is used in the feature extractor. This is apparently a binary loss between generated source and target samples. We train this feature extractor using a gradient reversal layer [37]. ( L D ) is denoted as:
L D = 1 n x i D s D t L t ( D d ( F ( x i ) ) , l i )
Here, n and l i are the total number of generated and target samples and domain labels, respectively.
Classification Loss ( L c l a s ) : The classification loss for the classifier in training with the generated samples. The gradient of classification loss is also utilized in the feature extractor training.
L c l s = 1 D n f G ( z i , y i ) D L t ( C ( F ( G ( z i , y i ) ) , y i )
Here, C is the classifier and D n f is the number of synthetically generated samples.
Total Loss ( L t o t a l ) : The total loss is expressed by:
L t o t a l = α × L a d v + β × L C E + γ × L D + ω × L c l s .
Here, α , β , γ , ω are the tuning factors. Ideally, α , γ , and β are set to 1, and ω is set to 0 until 50 epochs, and then it is set to 1.

4. Experiments

4.1. Datasets

In this experiment, we evaluate our proposed model in six publicly available databases, Which makes our experiment thorough and robust in the domain adaptation context: MIT-BTH arrhythmia database (MITDB), St. Petersburg Institute of Cardiological Technics 12-lead Arrhythmia Database (INCARTDB), Physikalisch-Technische Bundesanstalt (PTB), PTB_XL, e MITBIH Long-Term ECG database (LTDB), and the MIT-BIH Supraventricular Arrhythmia Database (SVDB). These databases are labeled extensively by domain experts. Following the [5] standard protocol based on the AAMI, as per the AAMI standard suggested, all the heartbeats are categorized into five different types, namely, N (normal), V (ventricular ectopic, S (supraventricular ectopic, and F (fusion). Description of respective databases are given below:
  • MITDB [38]: MITBH database is the most commonly utilized database for arrhythmia classification. This dataset has 48 records, with 47 subjects and a sampling rate of 360 Hz. For this experimental purpose, we divided this database into two parts: DS1 and DS2. We use them as a source and target set jointly. This conversion is performed based on the intersubject scheme;
  • This database has 75 records from 30 individual subjects. The sampling frequency chosen for each recording is 257 Hz. This database contains around 175,000 samples.;
  • SVDB [39]: This database contains nearly 78 records, which subsequently belong to the S class of MITDB database. Each sample is recorded at 128 Hz;
  • LTDB [39]: This database contains seven recordings that are long-term, ranging from 14 h to 22 h. Each sample is recorded at 128 Hz, same as the SVDB database;
  • PTB [39]: This database has 549 records from 290 individuals. Each of the recordings is sampled at 100 Hz and the length ranges from 30 s to 120 s. This database has five subtypes, unlike other databases such as (AMI, ASMI, ALMI, IMI, and ILMI);
  • PTB_XL [40]: This database is a large-scale database that consists of 21,887 records from 18,885 individuals. Each record is sampled at 500 Hz and the length is 10 s for each sample. In Table 2 and Table 3, the number of samples in each databases are given.

4.2. Evaluation Protocols

We use four evaluation protocols to evaluate our proposed method: (1) accuracy ( A c c ) , (2) sensitivity ( S e ) , (3) positive predictivity ( P p ) , and (4) F1 score (F1) [3,5]. These metrics are expressed as follows:
A c c = X P + X N X P + X N + Y P + Y N
S e = X P X P + Y N
P p = X P X P + Y P
F 1 = 2 × S e × P p S e + P p .
Here,
XP
= true positive samples
XN
= true negative samples
YP
= false positive samples
YN
= false negative samples

4.3. Experimental Results

4.3.1. Results on DS1 and DS2

Table 4 and Table 5 show the results on the MITDB dataset based on DS1 → DS2 and DS2 → DS2, respectively. As we mentioned, they divided the MITDB dataset into two parts, DS1 and DS2, for the cross-domain task evaluation. We preprocessed the dataset and increased the number of samples in the V, S, and F segments for fair training. In particular, in the sample, deficient classes such as S and F received a boost in Se, Pp, and F1 scores (Figure 4). Overall, both DS1 → DS2 and DS2 → DS1 achieved an acceptable overall accuracy of 98.4% and 96.5% respectively. However, we also tested our model performance in terms of K-fold cross-validation to understand its generalization ability; we also show the confusion matrix of our model in Table 6 and Table 7, respectively.

4.3.2. Results on Original Source to Target Data

In Table 8, we provide the results on the original source and target domains. Here, we consider the source domain as a train set and the target domain as a test set. In this scenario, we do not use the adaptation task to understand how our model can perform in traditional conditions. We observe that the results we obtained in the traditional setting are nearly the same as in the adaptation setting. Hence, our model has generalization power, even without the adaptation setting.

4.3.3. Results on MITBD, INCARTDB, SVDB, and LTDB

In Table 9, we show the results of the generalization of our proposed source-free domain adaptation model in different scenarios. In this case, we only consider overall accuracy by combining each class, such as N, V, S, and F. Here, S and F tend to have fewer samples, but we increase the number of samples adopting the GAN framework. We evaluate the MITDB database as the base database for the adaptation task. Therefore, at first, we use the MITDB database for our initial source training and evaluate each database such as INCARTDB, SVDB, and LTDB. We denote each of the databases as MITDB ( D M ), INCARTDB ( D I ), SVDB ( D S ), and LTDB ( D L ). Then, we also use INCARTDB, SVDB, and LTDB as source sets and MITDB as target sets for experimental purposes. In every case, we have a boost after adopting our source-free domain adaptation method, even in critical S and F classes where the samples are very less than the N and V classes. Our strategy of adopting GAN for generating more synthetic samples increases the generalization of our method.

4.3.4. Results on PTB and PTB_XL

For experimental purposes, we divided the PTB database into two non-overlapping subsets: PTB1 and PTB2. Here, the PTB1 consists of 74 patient data, whereas PTB2 consists of 90 patient data in the PTB1 → PTB2 test case. Table 10 shows the results of each class adaptation. In the second case, PTB → PTB_XL, we utilized all 164 patient data from the PTB database, where PTB_XL is used as a target set. Table 11 shows the detailed results of each class adaptation. Overall, both PTB1 → PTB2 and PTB → PTB_XL achieved an acceptable overall accuracy of 95.5% and 93.2%, respectively.

4.3.5. Comparison with State-of-Art Methods

Table 12 shows the comparison between our model with other methods. We consider all the results from [3] and compared the results with our method. All results in the table are based on only the MITDB database, as it is widely used by other works, and also convenient to use for UDA tasks. For a fair comparison, we utilized several traditional methods [37,41,42,43,44,45,46] methods to compare results. These traditional methods are based on interpatient and patient-specific settings. For comparison purposes, we used DS1 → DS2. These methods can be classified into interpatient, patient-specific, unsupervised domain adaptation, and source-free domain adaptation. In all settings, the results are considerably good in the ECG classification task. But the main challenge of generalization in unseen samples is still unfolding in traditional approaches. On the other hand, UDA methods can unfold this issue with its generalization capability in unseen domains. But it still lacks privacy in real-world settings. On the other hand, our proposed method SF-ECG outperformed the traditional-DL methods as well as UDA methods, even in critical new settings of UDA. Our method has many advantages, since it does not require a source set during training. So, it preserves privacy and generalization. This is considered a great advantage in many ECG classification applications.

4.4. Ablation Studies

4.4.1. Effect of Part by Part Loss Function

In Table 13 and Table 14, we show the ablation of the impact of the loss functions. We show the effect based on the MITDB database, considering two tasks: DS1 → DS2, and DS2 → DS1. In both cases, if we remove the adversarial loss L a d v , the model does not converge. But if we use all the loss functions together, we can have a significant performance boost compared to not using all the loss functions. Each loss function has its own contribution to the overall performance of our framework. Figure 5 shows the effectiveness of using all loss functions together.

4.4.2. Effectiveness in Number of Generated Source Samples

We experiment to examine the effectiveness of our proposed framework on generated source samples. Table 15 shows the results of the effectiveness of our framework on the number of generated samples. We tested our model without generating synthetic samples on the S and F classes. As we can see, both with (source-free) and without domain adaptation, the model has a performance drop, whereas a higher number of samples leads to a better result in all possible cases.

4.4.3. Generalization of Source Free Adaptation

Table 16 shows the generalization of source-free domain adaptation in different case scenarios. As we can see, not utilizing the UDA technique can hinder the performance by a large margin, whereas utilizing the UDA technique can increase the performance by a considerable margin. In all cases, we offer better performance than the traditional UDA method, even altering source-free training during the adaptation, which also offers many advantages over traditional UDA techniques.

5. Conclusions

In this paper, we propose a novel domain adaptation technique called SF-ECG, and also devise a new domain adaptation task in ECG classification, which is source-free domain adaptation. Our framework is developed for interpatient adaptation tasks, mostly for arrhythmia classification. We design a framework that consists of three modules, namely, data adjustment, local clustering, and source-free adaptation. With a more balanced performance across multiple categories, we achieve results that are comparable to those of other contemporary arts. To efficiently improve the deep learning model, we use four loss functions to reduce the performance-degrading distribution discrepancies of various records. In the inference phase, our method does not require additional data or even sources, and does not necessitate the addition of annotations to new records. The proposed approach is adaptable to new data and has the potential to significantly enhance deep learning models’ interpatient performance. Our approach is also capable of data privacy and generalizability in unseen samples. We obtain more stable results in minor categories where samples are deficient.

Author Contributions

Conceptualization, T.H.R.; methodology, T.H.R.; software, T.H.R. and Y.-W.K.; validation, T.H.R. and Y.-W.K.; investigation, T.H.R. and Y.-W.K.; writing—original draft preparation, T.H.R. and Y.-W.K.; visualization, T.H.R.; writing—review and editing, T.H.R. and Y.-W.K.; supervision, Y.-W.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (No. 2021R1F1A1064069).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
GANGenerative Adversarial Networks
UDAUnsupervised Domain Adaptation
SFDASource-Free Domain Adaptation

References

  1. Chen, M.; Wang, G.; Ding, Z.; Li, J.; Yang, H. Unsupervised Domain Adaptation for ECG Arrhythmia Classification. In Proceedings of the 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 304–307. [Google Scholar] [CrossRef]
  2. Deng, F.; Tu, S.; Xu, L. Multi-source unsupervised domain adaptation for ECG classification. In Proceedings of the IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Houston, TX, USA, 9–12 December 2021; pp. 854–859. [Google Scholar] [CrossRef]
  3. Wang, G.; Chen, M.; Ding, Z.; Li, J.; Yang, H.; Zhang, P. Inter-patient ECG arrhythmia heartbeat classification based on unsupervised domain adaptation. Neurocomputing 2021, 454, 339–349. [Google Scholar] [CrossRef]
  4. Yuan, S.; He, Z.; Zhao, J.; Yuan, Z.; Alhudhaif, A.; Alenezi, F. Hypergraph and cross-attention-based unsupervised domain adaptation framework for cross-domain myocardial infarction localization. Inf. Sci. 2023, 633, 245–263. [Google Scholar] [CrossRef]
  5. He, Z.; Chen, Y.; Yuan, S.; Zhao, J.; Yuan, Z.; Polat, K.; Alhudhaif, A.; Alenezi, F.; Hamid, A. A novel unsupervised domain adaptation framework based on graph convolutional network and multi-level feature alignment for inter-subject ECG classification. Expert Syst. Appl. 2023, 221, 119711. [Google Scholar] [CrossRef]
  6. Liu, X.; Yoo, C.; Xing, F.; Oh, H.; El Fakhri, G.; Kang, J.W.; Woo, J. Deep unsupervised domain adaptation: A review of recent advances and perspectives. APSIPA Trans. Signal Inf. Process. 2022, 11, e25. [Google Scholar] [CrossRef]
  7. Shaker, A.M.; Tantawi, M.; Shedeed, H.A.; Tolba, M.F. Generalization of convolutional neural networks for ECG classification using generative adversarial networks. IEEE Access 2020, 8, 35592–35605. [Google Scholar] [CrossRef]
  8. Kundu, J.N.; Venkat, N.; Babu, R.V. Universal source-free domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 4544–4553. [Google Scholar]
  9. Yang, S.; Wang, Y.; Van De Weijer, J.; Herranz, L.; Jui, S. Generalized source-free domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 10–17 October 2021; pp. 8978–8987. [Google Scholar]
  10. Bazi, Y.; Alajlan, N.; AlHichri, H.; Malek, S. Domain adaptation methods for ECG classification. In Proceedings of the International Conference on Computer Medical Applications (ICCMA), Sousse, Tunisia, 20–22 January 2013; pp. 1–4. [Google Scholar]
  11. Niu, L.; Chen, C.; Liu, H.; Zhou, S.; Shu, M. A deep-learning approach to ECG classification based on adversarial domain adaptation. Healthcare 2020, 8, 437. [Google Scholar] [CrossRef] [PubMed]
  12. Yin, W.; Yang, X.; Li, L.; Zhang, L.; Kitsuwan, N.; Shinkuma, R.; Oki, E. Self-adjustable domain adaptation in personalized ECG monitoring integrated with IR-UWB radar. Biomed. Signal Process. Control 2019, 47, 75–87. [Google Scholar] [CrossRef]
  13. He, W.; Ye, Y.; Li, Y.; Pan, T.; Lu, L. Online Cross-subject Emotion Recognition from ECG via Unsupervised Domain Adaptation. In Proceedings of the 43rd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Mexico City, Mexico, 1–5 November 2021; pp. 1001–1005. [Google Scholar]
  14. Natarajan, A.; Angarita, G.; Gaiser, E.; Malison, R.; Ganesan, D.; Marlin, B.M. Domain adaptation methods for improving lab-to-field generalization of cocaine detection using wearable ECG. In Proceedings of the ACM International Joint Conference on Pervasive and Ubiquitous Computing, Heidelberg, Germany, 12–16 September 2016; pp. 875–885. [Google Scholar]
  15. Hang, W.; Feng, W.; Du, R.; Liang, S.; Chen, Y.; Wang, Q.; Liu, X. Cross-subject EEG signal recognition using deep domain adaptation network. IEEE Access 2019, 7, 128273–128282. [Google Scholar] [CrossRef]
  16. Ammour, N. Atrial fibrillation detection with a domain adaptation neural network approach. In Proceedings of the International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 12–14 December 2018; pp. 738–743. [Google Scholar]
  17. Helm, H.S.; Yang, W.; De Silva, A.; Vogelstein, J.T.; Priebe, C.E. Approximately optimal domain adaptation with Fisher’s Linear Discriminant Analysis. arXiv 2023, arXiv:2302.14186. [Google Scholar]
  18. Carrera, D.; Rossi, B.; Fragneto, P.; Boracchi, G. Domain adaptation for online ecg monitoring. In Proceedings of the IEEE International Conference on Data Mining (ICDM), New Orleans, LA, USA, 18–21 November 2017; pp. 775–780. [Google Scholar]
  19. Chen, M.; Wang, G.; Chen, H.; Ding, Z. Adaptive region aggregation network: Unsupervised domain adaptation with adversarial training for ECG delineation. In Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Virtually, 4–8 May 2020; pp. 1274–1278. [Google Scholar]
  20. Yamaç, M.; Duman, M.; Adalıoğlu, İ.; Kiranyaz, S.; Gabbouj, M. A Personalized Zero-Shot ECG Arrhythmia Monitoring System: From Sparse Representation Based Domain Adaption to Energy Efficient Abnormal Beat Detection for Practical ECG Surveillance. arXiv 2022, arXiv:2207.07089. [Google Scholar]
  21. Ye, Y.; Luo, T.; Huang, W.; Sun, Y.; Li, L. ECG-based Cross-Subject Mental Stress Detection via Discriminative Clustering Enhanced Adversarial Domain Adaptation. In Proceedings of the 16th IEEE International Conference on Signal Processing (ICSP), Beijing, China, 21–24 October 2022; Volume 1, pp. 495–499. [Google Scholar]
  22. Li, H.; Zhang, Y.; Han, J.; Yan, Y.; Liu, Y.; Yang, H. AdapSQA: Adaptive ECG Signal Quality Assessment Model for Inter-Patient Paradigm using Unsupervised Domain Adaptation. In Proceedings of the IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Las Vegas, NV, USA, 6–8 December 2022; pp. 3378–3384. [Google Scholar]
  23. Peng, P.; Xie, L.; Zhang, K.; Zhang, J.; Yang, L.; Wei, H. Domain adaptation for epileptic EEG classification using adversarial learning and Riemannian manifold. Biomed. Signal Process. Control 2022, 75, 103555. [Google Scholar] [CrossRef]
  24. Golany, T.; Radinsky, K.; Freedman, D. SimGANs: Simulator-based generative adversarial networks for ECG synthesis to improve deep ECG classification. In Proceedings of the International Conference on Machine Learning, Virtual Event, 13–18 July 2020; pp. 3597–3606. [Google Scholar]
  25. Golany, T.; Radinsky, K. Pgans: Personalized generative adversarial networks for ecg synthesis to improve patient-specific deep ecg classification. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, pp. 557–564. [Google Scholar]
  26. Golany, T.; Lavee, G.; Yarden, S.T.; Radinsky, K. Improving ECG classification using generative adversarial networks. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 13280–13285. [Google Scholar]
  27. Wang, P.; Hou, B.; Shao, S.; Yan, R. ECG arrhythmias detection using auxiliary classifier generative adversarial network and residual network. IEEE Access 2019, 7, 100910–100922. [Google Scholar] [CrossRef]
  28. Yang, H.; Liu, J.; Zhang, L.; Li, Y.; Zhang, H. Proegan-ms: A progressive growing generative adversarial networks for electrocardiogram generation. IEEE Access 2021, 9, 52089–52100. [Google Scholar] [CrossRef]
  29. Ye, F.; Zhu, F.; Fu, Y.; Shen, B. ECG generation with sequence generative adversarial nets optimized by policy gradient. IEEE Access 2019, 7, 159369–159378. [Google Scholar] [CrossRef]
  30. Zhu, F.; Ye, F.; Fu, Y.; Liu, Q.; Shen, B. Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network. Sci. Rep. 2019, 9, 6734. [Google Scholar] [CrossRef] [Green Version]
  31. Wang, X.; Chen, B.; Zeng, M.; Wang, Y.; Liu, H.; Liu, R.; Tian, L.; Lu, X. An ECG Signal Denoising Method Using Conditional Generative Adversarial Net. IEEE J. Biomed. Health Inform. 2022, 26, 2929–2940. [Google Scholar] [CrossRef]
  32. Haradal, S.; Hayashi, H.; Uchida, S. Biosignal data augmentation based on generative adversarial networks. In Proceedings of the 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Honolulu, HI, USA, 18–21 July 2018; pp. 368–371. [Google Scholar]
  33. Singh, P.; Pradhan, G. A new ECG denoising framework using generative adversarial network. IEEE/ACM Trans. Comput. Biol. Bioinform. 2020, 18, 759–764. [Google Scholar] [CrossRef]
  34. Adib, E.; Afghah, F.; Prevost, J.J. Synthetic ecg signal generation using generative neural networks. arXiv 2021, arXiv:2112.03268. [Google Scholar]
  35. Rafi, T.H.; Ko, Y.W. HeartNet: Self Multihead Attention Mechanism via Convolutional Network with Adversarial Data Synthesis for ECG-Based Arrhythmia Classification. IEEE Access 2022, 10, 100501–100512. [Google Scholar] [CrossRef]
  36. Kurmi, V.K.; Subramanian, V.K.; Namboodiri, V.P. Domain impression: A source data free domain adaptation method. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Virtual, 5–9 January 2021; pp. 615–625. [Google Scholar]
  37. Huang, H.; Liu, J.; Zhu, Q.; Wang, R.; Hu, G. A new hierarchical method for inter-patient heartbeat classification using random projections and RR intervals. Biomed. Eng. Online 2014, 13, 90. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  38. Moody, G.B.; Mark, R.G. The impact of the MIT-BIH arrhythmia database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef]
  39. Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef] [Green Version]
  40. Wagner, P.; Strodthoff, N.; Bousseljot, R.D.; Kreiseler, D.; Lunze, F.I.; Samek, W.; Schaeffter, T. PTB-XL, a large publicly available electrocardiography dataset. Sci. Data 2020, 7, 154. [Google Scholar] [CrossRef] [PubMed]
  41. Guo, L.; Sim, G.; Matuszewski, B. Inter-patient ECG classification with convolutional and recurrent neural networks. Biocybern. Biomed. Eng. 2019, 39, 868–879. [Google Scholar] [CrossRef] [Green Version]
  42. Niu, J.; Tang, Y.; Sun, Z.; Zhang, W. Inter-patient ECG classification with symbolic representations and multi-perspective convolutional neural networks. IEEE J. Biomed. Health Inform. 2019, 24, 1321–1332. [Google Scholar] [CrossRef] [PubMed]
  43. Sellami, A.; Hwang, H. A robust deep convolutional neural network with batch-weighted loss for heartbeat classification. Expert Syst. Appl. 2019, 122, 75–84. [Google Scholar] [CrossRef]
  44. Li, F.; Xu, Y.; Chen, Z.; Liu, Z. Automated heartbeat classification using 3-D inputs based on convolutional neural network with multi-fields of view. IEEE Access 2019, 7, 76295–76304. [Google Scholar] [CrossRef]
  45. Zhai, X.; Tin, C. Automated ECG classification using dual heartbeat coupling based on convolutional neural network. IEEE Access 2018, 6, 27465–27472. [Google Scholar] [CrossRef]
  46. Ye, C.; Kumar, B.V.; Coimbra, M.T. An automatic subject-adaptable heartbeat classifier based on multiview learning. IEEE J. Biomed. Health Inform. 2015, 20, 1485–1492. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Illustration of domain adaptation method. (a) Source and target samples before adaptation. (b) New source samples are generated by a generative model for imbalanced datasets with the same distribution as the original source distribution. (c) After adaptation by our SF-ECG using the generated samples.
Figure 1. Illustration of domain adaptation method. (a) Source and target samples before adaptation. (b) New source samples are generated by a generative model for imbalanced datasets with the same distribution as the original source distribution. (c) After adaptation by our SF-ECG using the generated samples.
Applsci 13 08551 g001
Figure 2. Illustration of our SF-ECG framework. Here, GAN model is used to generate synthetic samples from the training distribution, and the local structure module clusters the generated samples in a local neighborhood. Lastly, another GAN model exhibits the prediction without explicitly requiring the source data.
Figure 2. Illustration of our SF-ECG framework. Here, GAN model is used to generate synthetic samples from the training distribution, and the local structure module clusters the generated samples in a local neighborhood. Lastly, another GAN model exhibits the prediction without explicitly requiring the source data.
Applsci 13 08551 g002
Figure 3. Illustration of local structure module.
Figure 3. Illustration of local structure module.
Applsci 13 08551 g003
Figure 4. Class-wise performance of our framework in MITDB at DS1 → DS2 setting.
Figure 4. Class-wise performance of our framework in MITDB at DS1 → DS2 setting.
Applsci 13 08551 g004
Figure 5. Ablation on the effect of loss functions.
Figure 5. Ablation on the effect of loss functions.
Applsci 13 08551 g005
Table 1. Model description of GAN framework for data adjustment.
Table 1. Model description of GAN framework for data adjustment.
Discriminator Generator
LayersOutput ShapeParametersLayersOutput ShapeParameters
Conv1D(None, 180, 8)72Reshape(None, 100, 1)0
LeakyReLU(None, 180, 8)0Bidirectional(None, 100, 32)2304
Dropout(None, 180, 8)0Conv1D(None, 100, 32)8224
MaxPooling1D(None, 60, 8)0LeakyReLU(None, 100, 32)0
Conv1D(None, 60, 16)1040UpSampling1D(None, 200, 32)0
Dropout(None, 60, 16)0Conv1D(None, 200, 16)4112
MaxPooling1D(None, 29, 16)0LeakyReLU(None, 200, 16)0
Conv1D(None, 15, 32)4128UpSampling(None, 200, 16)0
LeakyReLU(None, 15, 32)0Conv1D(None, 200, 16)1032
Dropout(None, 15, 32)0LeakyReLU(None, 400, 8)0
MaxPooling1D(None, 7, 32)0Conv1D(None, 400, 1)65
Conv1D(None, 4, 64)16,448Flatten(None, 400)0
LeakyReLU(None, 4, 64)0Dense(None, 180)72,180
Dropout(None, 4, 64)0Activation(None, 180)0
MaxPooling1D(None, 64)0Reshape(None, 180, 1)0
Flatten(None, 64)0---
Dense(None, 1)65---
Table 2. Number of preprocessed samples in each database.
Table 2. Number of preprocessed samples in each database.
DatabaseNVSFTotalRecordsDatasets
MITDB89,50768722764801100,03544-
INCARTDB152,88919,9141952219174,97475-
SVDB161,509990012,45023183,58278-
LTDB600,16764,08014992906668,6527-
MITDB45,642377694341350,77422DS1
MITDB43,8653196182138849,26122DS2
Table 3. Number of preprocessed samples in PTB and PTB_X databases.
Table 3. Number of preprocessed samples in PTB and PTB_X databases.
DatabaseAMIASMIIMIALMIILMIHCTotal
PTB617811,06212,4026456751310,31853,929
PTB_X85013,89810,37113453228967839,370
Table 4. Results on DS1 → DS2. Here, DS1 and DS2 are utilized as source and target domains. But in the adaptation time, DS1 (source) is not utilized. (All results shown here are without requiring source data).
Table 4. Results on DS1 → DS2. Here, DS1 and DS2 are utilized as source and target domains. But in the adaptation time, DS1 (source) is not utilized. (All results shown here are without requiring source data).
DS1 → DS2Sensitivity (%)Positive Predictivity (%)F1 Score (%)
N99.499.299.7
V96.497.298.2
S97.198.699.4
F85.483.488.2
Overall Accuracy (%) 98.4
Table 5. Results on DS2 → DS1. Here, DS1 and DS2 are utilized as source and target domains. But in the adaptation time, DS2 (source) is not utilized. (All results shown here are without requiring source data).
Table 5. Results on DS2 → DS1. Here, DS1 and DS2 are utilized as source and target domains. But in the adaptation time, DS2 (source) is not utilized. (All results shown here are without requiring source data).
DS2 → DS1Sensitivity (%)Positive Predictivity (%)F1 Score (%)
N94.294.796.2
V96.292.392.3
S96.497.496.2
F85.686.883.2
Overall Accuracy (%) 96.5
Table 6. K-fold cross validation results on DS1 → DS2 with standard deviation.
Table 6. K-fold cross validation results on DS1 → DS2 with standard deviation.
Fold, KSensitivity (%)Positive Predictivity (%)F1 Score (%)Accuracy (%)
K = 193.2 ± 0.693.4 ± 0.694.2 ± 0.592.2 ± 0.3
K = 295.6 ± 0.295.3 ± 0.394.2 ± 0.394.3 ± 0.2
K = 396.1 ± 0.796.7 ± 0.496.2 ± 0.596.8 ± 0.3
K = 498.2 ± 0.897.0 ± 0.798.0 ± 0.797.9 ± 0.5
K = 599.1 ± 0.599.2 ± 0.598.5 ± 0.398.2 ± 0.4
Table 7. Confusion matrix on DS2 → DS1 adaptation.
Table 7. Confusion matrix on DS2 → DS1 adaptation.
NVSF
N44,1762264639
V4331967631
S23736816
F2430381779
Table 8. Results on the original source to target domains.
Table 8. Results on the original source to target domains.
ClassSensitivity (%)Positive Predictivity (%)F1 Score (%)
N98.398.799.1
V97.296.898.1
S96.295.396.6
F85.487.285.1
Overall Accuracy (%) 98.1
Table 9. Cross-domain experimental results on each domain. Here, MITDB ( D M ), INCARTDB ( D I ), SVDB ( D S ), and LTDB ( D L ). Results without domain adaptation and with source-free adaptation are shown.
Table 9. Cross-domain experimental results on each domain. Here, MITDB ( D M ), INCARTDB ( D I ), SVDB ( D S ), and LTDB ( D L ). Results without domain adaptation and with source-free adaptation are shown.
Task N (%)V (%)S (%)F (%)Accuracy (%)
Se Pp F1 Se PpF1 Se Pp F1Se Pp F1
D M D I w/o DA96.596.293.170.491.471.269.240.151.632.442.245.794.2
w SF-DA98.397.296.476.395.282.272.643.862.937.156.266.296.1
D M D S w/o DA93.292.191.483.371.781.446.368.334.623.233.134.092.2
w SF-DA96.894.295.387.777.589.551.178.243.229.038.934.094.7
D M D L w/o DA86.896.395.772.176.367.141.929.025.030.379.241.288.9
w SF-DA96.896.491.277.889.072.346.236.228.034.076.248.294.2
D I D M w/o DA94.197.292.387.467.972.539.040.239.842.046.253.694.6
w SF-DA99.198.496.080.673.381.040.545.149.129.159.056.296.5
D S D M w/o DA92.497.396.379.790.485.452.538.724.039.043.163.292.9
w SF-DA95.198.196.488.794.385.864.246.227.650.547.871.496.1
D L D M w/o DA85.293.292.482.558.859.026.130.029.223.222.023.088.3
w SF-DA92.095.995.377.475.571.427.237.438.225.022.023.095.4
Table 10. Results on PTB 1 → PTB 2 , cross-patient classification task.
Table 10. Results on PTB 1 → PTB 2 , cross-patient classification task.
MI-Sub CategorySensitivity (%)Positive Predictivity (%)F1 Score (%)Accuracy (%)
AMI95.589.290.7
ASMI97.293.393.0
IMI94.696.895.2
ALMI91.895.894.195.5
ALMI91.895.894.1
HC89.292.588.3
Average94.594.493.5
Table 11. Results on PTB → PTB_XL, cross-patient classification task.
Table 11. Results on PTB → PTB_XL, cross-patient classification task.
MI-Sub CategorySensitivity (%)Positive Predictivity (%)F1 Score (%)Accuracy (%)
AMI73.570.369.3
ASMI88.389.292.3
IMI88.292.986.2
ALMI71.373.674.393.2
ALMI86.670.585.2
HC96.496.393.6
Average85.782.183.4
Table 12. Comparison between recent state of the art with our source-free adaptation method and unsupervised domain adaptation method on MITDB DS2. All the results are taken from [3]. Here, we denote interpatient = IP, patient-specific = PS, unsupervised domain adaptation = UDA, and source-free domain adaptation = SFDA.
Table 12. Comparison between recent state of the art with our source-free adaptation method and unsupervised domain adaptation method on MITDB DS2. All the results are taken from [3]. Here, we denote interpatient = IP, patient-specific = PS, unsupervised domain adaptation = UDA, and source-free domain adaptation = SFDA.
MethodsTypesN (%)V (%)S (%)F (%)Accuracy (%)
Se Pp F1 Se PpF1 Se Pp F1Se Pp F1
 [37]IP99.295.290.093.990.992.091.142.258.0---93.8
 [41]IP---91.2588.390.062.761.262.0----
 [42]IP98.997.498.085.794.189.076.576.676.025.01.790.096.4
 [43]IP88.598.893.092.072.180.082.030.444.068.326.638.095.3
 [44]IP91.898.995.095.190.192.089.035.450.032.220.325.091.4
 [45]PS97.698.598.093.892.493.076.874.075.079.662.470.096.1
 [46]PS99.797.298.091.898.095.061.490.773.09.028.314.097.0
 [10]UDA------------93.0
 [3]UDA99.198.499.094.092.393.076.590.283.057.974.165.097.6
 [5]UDA99.498.098.791.487.289.25788.669.437.347.641.896.8
SF-ECG (Ours)SFDA99.499.299.796.497.298.287.188.689.481.786.982.898.4
Table 13. Ablation on the effect of loss functions. Here, we use the MITDB database. Here, results on DS1 → DS2 are presented.
Table 13. Ablation on the effect of loss functions. Here, we use the MITDB database. Here, results on DS1 → DS2 are presented.
L a d v L C E L D L c l s Accuracy (%)
-Not converge
-87.8
98.4
Table 14. Ablation on the effect of loss functions. Here, we use the MITDB database. Here, results on DS2 → DS1 are presented.
Table 14. Ablation on the effect of loss functions. Here, we use the MITDB database. Here, results on DS2 → DS1 are presented.
L a d v L C E L D L c l s Accuracy (%)
-Not converge
-85.4
96.5
Table 15. Results on the effectiveness of increasing the number of samples in adaptation task.
Table 15. Results on the effectiveness of increasing the number of samples in adaptation task.
ClassNo. of Samplesw/o UDASFDA
S371292.296.2
276481.283.2
F187179.486.2
80177.684.8
Table 16. The accuracy of without/with UDA-based tasks in both MITDB, PTB, and PTB_XL, which demonstrates the generalization and impact of our SFDA method.
Table 16. The accuracy of without/with UDA-based tasks in both MITDB, PTB, and PTB_XL, which demonstrates the generalization and impact of our SFDA method.
Tasksw/o UDAUDA with SourceSFDA (Ours)
DS1 → DS291.794.098.4
DS2 → DS189.593.296.5
PTB_1 → PTB_261.493.295.5
PTB → PTB_XL59.890.393.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Rafi, T.H.; Ko, Y.-W. SF-ECG: Source-Free Intersubject Domain Adaptation for Electrocardiography-Based Arrhythmia Classification. Appl. Sci. 2023, 13, 8551. https://doi.org/10.3390/app13148551

AMA Style

Rafi TH, Ko Y-W. SF-ECG: Source-Free Intersubject Domain Adaptation for Electrocardiography-Based Arrhythmia Classification. Applied Sciences. 2023; 13(14):8551. https://doi.org/10.3390/app13148551

Chicago/Turabian Style

Rafi, Taki Hasan, and Young-Woong Ko. 2023. "SF-ECG: Source-Free Intersubject Domain Adaptation for Electrocardiography-Based Arrhythmia Classification" Applied Sciences 13, no. 14: 8551. https://doi.org/10.3390/app13148551

APA Style

Rafi, T. H., & Ko, Y. -W. (2023). SF-ECG: Source-Free Intersubject Domain Adaptation for Electrocardiography-Based Arrhythmia Classification. Applied Sciences, 13(14), 8551. https://doi.org/10.3390/app13148551

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop