# Scalable NPairLoss-Based Deep-ECG for ECG Verification

Yu-Shan Tai, Yi-Ta Chen, (andy) An-Yeu Wu

► To cite this version:

Yu-Shan Tai, Yi-Ta Chen, (andy) An-Yeu Wu. Scalable NPairLoss-Based Deep-ECG for ECG Verification. 17th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2021, Hersonissos, Crete, Greece. pp.57-68, 10.1007/978-3-030-79150-6_5. hal-03287666

HAL Id: hal-03287666

https://inria.hal.science/hal-03287666

Submitted on 15 Jul 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Scalable NPairLoss-based Deep-ECG for ECG Verification

Yu-Shan Tai¹, Yi-Ta Chen², and An-Yeu (Andy) Wu²

¹ Department of Electrical Engineering, National Taiwan University, Taipei, Taiwan

² Graduate Institute of Electronics Engineering, National Taiwan University, Taipei, Taiwan
{clover, edan}@access.ee.ntu.edu.tw, andywu@ntu.edu.tw

**Abstract.** In recent years, Electrocardiogram (ECG) applications are blooming, such as cardiovascular disease detection and mental condition assessment. To protect the sensitive ECG data from data breach, ECG biometrics system are proposed. Compared to the traditional biometric systems, ECG biometric is known to be ubiquitous, difficult to counterfeit and more suitable in cleanroom or IC fabs. ECG biometric system mainly contains identification task and verification task, and Deep-ECG is the state-of-the-art work in both tasks. However, Deep-ECG only trained on one specific dataset, which ignored the intra-variability of different ECG signals across different situations. Moreover, Deep-ECG used cross-entropy loss to train the deep convolutional neural networks (CNN) model, which is not the most appropriate loss function for such embedding-based problem. In this paper, to solve the above problems, we proposed a scalable NPairLoss-based Deep-ECG (SNL-Deep-ECG) system for ECG verification on a hybrid dataset, mixed with four public ECG datasets. We modify the preprocessing method and trained the deep CNN model with NPairLoss. Compared with Deep-ECG, SNL-Deep-ECG can reduce 90% of the signal collection time during inference with only 0.9% AUC dropped. Moreover, SNL-Deep-ECG outperforms Deep-ECG for approximately 3.5% Area Under ROC Curve (AUC) score in the hybrid dataset. Moreover, SNL-Deep-ECG can maintain its verification performance over the increasing number of the subjects, and thus to be scalable in terms of subject number. The final performance of the proposed SNL-Deep-ECG is 0.975/0.970 AUC score on the seen/unseen-subject task.

**Keywords:** Biometrics, ECG, Deep Learning.

## 1 Introduction

The ECG is the most commonly used non-invasive tool to collect bio-signals from the heart over a period of time. Therefore, by analyzing ECG signals, we can diagnose several cardiovascular diseases, such as atrioventricular block, ventricular tachycardia and atrial fibrillation [1]. On the other hand, we can also assess the subject's mental condition, such as emotion, mental workload, and sustained attention from ECG signals, too. Thus, by getting a specific subject's ECG, we can obtain lots of personal information from it. To protect the subject's ECG signals from data breach, biometric system is required. The definition of a biometric system is to check the identity of the
collected signal. Although the traditional biometric system using fingerprint and face
is popular, it still has several disadvantages [2] :

- Traditional biometrics can be easily imitated or artificially cracked, which may make users' security exposed in high risk.

- In several scenarios such as in cleanroom or IC fabs, where workers need to wear gloves, masks, or goggles, traditional biometrics, such as fingerprint, face, iris, would hardly be measured without taking off the equipment.

Therefore, researches on ECG biometrics have gained more and more attention.
There are some advantages of the ECG biometrics system:

- ECG signals can only be measured from living people. Therefore, ECG signals are more difficult to counterfeit and can also be used to detect the liveness of the subject.

- ECG signals contain clinical information. Therefore, they can not only be used for recognition but also for other applications, such as disease detection, at the same time.

- Users don't need extra operations to get long time periods ECG signals. Hence, ECG signals are also suitable for long-term periodic re-authentication.

However, since ECG performs high interclass variability due to sensor placement or
users' motion, there still exist some challenges to design a highly accurate ECG bio-
metric system.

When it comes to ECG biometrics, two of the most popular tasks are identification and verification. The goal of identification is to classify who the person is in a priorly known subject pool, while verification is to check whether who someone claims to be is the same with his/her real identity. So far, most studies about ECG biometrics put emphasis on identification, but fewer researchers take attention to using ECG for veri-fication. Thus, our work would focus on how to improve the existed ECG verification system. Deep-ECG [3] is the state-of-the-art to tackle the above two tasks until now. The authors of [3] designed a model composed of deep CNN to extract high-level features from the preprocessed ECG signal. During the training phase, Deep-ECG ap-plied cross-entropy loss on output of the model and user id pairs to train the whole network. During inferencing, if the task is identification, then the output neuron with the largest value would be the predicted user id. During verification, they calculate the distance between two output vectors before the fully connected layer of the model from two different input data and determine whether they are from the same user or not. The training and inferencing flows of Deep-ECG [3] are shown in Fig. 1a.

Although Deep-ECG outperformed the other works in both identification and veri-fication task, there exist several issues to be discussed. First, their model is trained on a single dataset, which ignores the intra-variability of different ECG signals across dif-ferent situations, such as collection methods, kind of sensors and sensor placement. Second, the loss function used in Deep-ECG [3] is the cross-entropy loss, which is computed using the model output probability and the ground truth. Therefore, it out-performs other works in identification tasks, which is classification-based problems, as expected. Whereas, verification is an embedding-based problem, the performance of the cross-entropy loss might drop when the verification task becomes harder. In order
<figure><img src="image_2.png" /><figcaption>**Fig. 1.** (a) The flowchart of Deep-ECG; (b) the flowchart of proposed SNL-Deep-ECG, and the contributions are marked in red.</figcaption></figure>

to enhance deep learning-based method in ECG verification, we propose scalable NPairLoss-based deep-ECG (SNL-Deep-ECG) verification system as shown in Fig. 1b.

The three main contributions are as follows and shown in Table.1:

(1) **Applying NPairLoss to train the SNL-Deep-ECG:** This is the first work to apply embedding loss in the ECG verification task. We select NPairLoss as the loss function of the model, which is computed by the relation of output embeddings instead of labels
and output probabilities to perform better in the ECG verification task. From the experiment results, SNL-Deep-ECG outperforms Deep-ECG approximately 2.5% AUC and scores 0.969 AUC in the hybrid dataset.

(2) **Reduce the signal collection time during verification:** We modify the preprocessing method of the Deep-ECG framework, from concatenating 8 QRS segmentations to only using one ECG pulse. Our method reduces 90% of the signal collection time with only 0.9% AUC degradation.

(3) **Generate hybrid dataset settings:** This is the first study to mix four different datasets together to test the capability of the verification system, and therefore the variety and the amount of data are much higher than all of the existed datasets, and is more similar to the real-world scenario.

<table><caption>**Table 1.** Comparison between original Deep-ECG and proposed SNL-Deep-ECG.</caption><thead><tr><td></td><td>Deep-ECG</td><td>SNL-Deep-ECG</td><td>Description</td></tr></thead><tbody><tr><td>Loss function</td><td>Cross-entropy</td><td>NPairLoss</td><td>Proposed method is scalable to larger # subjects in ECG verification task.</td></tr><tr><td>Signal period</td><td>8 heartbeats</td><td>1 heartbeat</td><td>Proposed method saves signal collection time.</td></tr><tr><td>Dataset</td><td>Single</td><td>Mixed</td><td>There is higher variability and larger amount of data in the proposed mixed dataset.</td></tr></tbody></table>

# 2 Related Works

## 2.1 ECG Biometrics

ECG biometric systems can be classified into three ways according to the features used for recognition, which are fiducial, non-fiducial, and hybrid methods [4]. In a healthy ECG signal, there exists 6 fiducial points: P, Q, R, S, T and U. Since R point is the highest peak in one heartbeat, it is the easiest to be searched and is usually used for segmentation. Fiducial methods extract features from the fiducial points, such as amplitude, angle, or some dynamic features. For example, the authors of [5] converted the raw ECG signals into latency and amplitude features, which are obtained from the fiducial points; the authors of [6] took QRS signals with maximum cross-correlation and the average pattern as the template, afterwards, calculating the similarity score between input signals and each template. As for non-fiducial methods, discriminative information directly extracted from the ECG waveform is used instead of considering fiducial points. Take [5] as an instance, the authors applied non-uniform quantization to the ECG signals, and then applied string matching for classification. Another example is [7]. They utilized a sliding window to obtain signal segments with fixed length, and then generated a codebook by k-means. Afterwards, they calculated the appearance of specific codewords and received the bag-of-words (BOW) representation of each signal. Finally, they fed the vectors into a SVM classifier and obtained the final prediction.
Lastly, hybrid methods combined the above two different ways to classify the target
signal.

## 2.2 Deep-ECG

Different from the above methods, which required predefined feature sets from do-
main experts, Deep-ECG [3] used a deep CNN to extract discriminative features in a
data-dependent manner and received state-of-the-art results in ECG biometrics. Deep-
ECG [3] got 100% identification accuracy for Physikalisch-Technische Bundesanstalt
(PTB) Diagnostic ECG Database [8] and outperformed the correlation-based method
in the verification task. In Deep-ECG, the ECG signals are segmented by R points and
fed into a deep CNN to extract their high-level features. Finally, these features are used
in both identification and verification tasks. The flow chart of Deep-ECG [3] is shown
in Fig. 1a, which includes signal preprocessing, CNN feature extraction, and recogni-
tion.

In the signal preprocessing, noise was striped by a notch infinite impulse response
(IIR) filter and a third order high-pass Butterworth filter with cutoff frequency of 0.5
Hz. After that, they applied a time window of 0.125s for each R point and concatenated
the most discriminative windows with cross-correlation. Finally, they subtracted the
signals by their mean value and multiplied by 256.

The CNN in Deep-ECG is composed of six convolution layers followed by Rectified
Linear Unit (ReLU) layers, three Local Response Normalization (LRN) layers, one
dropout layer, and a fully connected layer as well as a Soft-max layer used for identifi-
cation. The model is trained with Stochastic gradient descent (SGD) and updated by the
cross-entropy loss. The above-mentioned architecture is optimized empirically.

After extracting features, the output vectors can be used for identification or verifi-
cation. For identification, the output dimension will be reduced to be the same as the
number of class by a fully-connected layer, and a soft-max layer transforms the output
to [0,1], representing the probability of belonging to each class. The system will further
output the class with maximum corresponding probability as the predicted identity. As
for verification, fully-connected layer and soft-max layer are not included. The output
vectors will directly be used to compute Euclidean distance with another output vector
from different source. If the distance is smaller than a predetermined threshold, they
will be considered from the same user, and vice versa.

3 The Proposed Scalable NPairLoss-based Deep-ECG System

Since embedding-based NPairLoss [9] is calculated by the distance between different
embeddings, it has a competitive edge over the cross-entropy loss in the verification
tasks, which is also an embedding-based problem. Therefore, we propose another
framework — Scalable NPairLoss-based Deep-ECG (SNL-Deep-ECG) comparing to
Deep-ECG, replacing the original loss function from cross-entropy to NPairLoss. On
<figure><img src="image_3.png" /><figcaption>Fig. 2. The main difference between the proposed preprocessing methods and Deep-ECG.</figcaption></figure>

the other hand, we removed the concatenation step from the original signal preprocessing, which reduce the required length of input signals with slight degradation of AUC.

## 3.1 Signal Preprocessing

First, we use a butterworth band pass filter with $f_{low} = 1Hz$ and $f_{high} = 40Hz$ to remove noise and then normalize signals to [0,1]. Second, we use a 1-second window to select the surrounding 200 points for each R point as shown in Fig.2. In general, a normal heart rate for adults ranges from 60 to 100 beats/min, so there are 1 to 2 heartbeats contained in the window in most cases. Compared to the original settings of Deep-ECG, they concatenated eight heartbeats together as one input signal. In other words, the system of Deep-ECG required to wait until collecting enough signals, while proposed SNL-Deep-ECG can train and recognize with only one heartbeat.

## 3.2 Training Phase

In the training phase, we extract hard data by MultiSimilarityMiner [10], which selects hard samples according to the following equations:

$$S(\text{anchor, positive}) < \max(S(\text{anchor}, k) + \epsilon) \forall y_{\text{anchor}} \neq y_k, \quad (1)$$

$$S(\text{anchor, negative}) > \min(S(\text{anchor}, k) - \epsilon) \forall y_{\text{anchor}} = y_k. \quad (2)$$

Positive samples and negative samples stand for signals from the user of anchor and signals from different users respectively. $S(x, y)$ stands for the cosine similarity between the two input embeddings, $y_x$ is the corresponding label of sample x, and $\epsilon$ is the determined margin term.

Since verification is an embedding-based task, we apply NPairLoss to train our model. The goal of the embedding-based loss functions [11] are utilizing the relationships among sample points to make the model capable of projecting raw data to a high dimensional space, where similar data are close together and dissimilar ones are far
<figure><img src="image_4.png" /><figcaption>**Fig. 3.** The training flowchart of SNL-Deep-ECG. 1) Use MultiSimilarityMiner to select hard data. 2) Select a positive sample and N-1 negative samples corresponding to the anchor. 3) Feed selected samples to SNL-Deep-ECG and get their embeddings. 4) Calculate NPairLoss by embedding distances between anchor and other samples, and then update the model by iterative back propagation.</figcaption></figure>

apart. NPairLoss [9] is known for its stability and high convergence rate during training. For each anchor in a training batch, a positive sample and N-1 negative samples will be selected. After that, we feed these samples to our model and get their corresponding embeddings. Eventually, we calculate NPairLoss by their embedding distances with anchor, and the anchor will gradually approach the positive sample and keep away from negative samples after updating the model by iterative back propagation. Intuitively, there are batch_size × (N + 1) data needed to calculate their embeddings in each training batch, which leads to huge computational overhead. However, an efficient way is proposed to solve this problem. In each training phase, two data will be selected from each class to serve as its anchor and positive sample, which can be displayed as: `{f(x₁), f(x₁'), f(x₂), f(x₂'), ..., f(x_N), f(x_N')}`. As for negative samples, they directly use the positive samples from other classes except the class of anchor. For example, `{f(x₂'), f(x₃') ..., f(x_N')}` are treated as the negative samples of anchor x₁, and `{f(x₁'), f(x₃') ..., f(x_N')}` are for x₂. By NPairLoss proposed method, only 2N embeddings are calculated in each training batch, reducing the overall computations and making this algorithm feasible. NPairLoss [9] is formulated as follows:

$$L_{NPair} = \frac{1}{N} \sum_{i=1}^{N} \log(1 + \sum_{j \neq i} \exp(\text{dist}(f(x_i), f(x_j')) - \text{dist}(f(x_i), f(x_j'))). \quad (3)$$
<figure><img src="image_5.png" /><figcaption>Fig. 4. The inference flow chart of proposed SNL-Deep-ECG.</figcaption></figure>

## 3.3 Inference Phase

During the inference phase, two signals will be sent into the system at the same time, which are anchor and unknown, representing the claimed identity and the real input identity respectively. The system will calculate the embeddings of these two signals first, and then output the Euclidean distance between them. If the distance is smaller than the threshold, the two signals are considered from the same person, and vice versa. The flow chart of inference is shown in Fig.4. The evaluation metric we used to judge performance is the AUC.

# 4 Experiments

In this section, we will introduce how we design our hybrid dataset, as well as the settings and results of three experiments, which include comparing the preprocessing methods between Deep-ECG and SNL-Deep-ECG, and comparing the performance between Deep-ECG and SNL-Deep-ECG while the subject number included in the training process increased.

## 4.1 Dataset Design and Experimental Settings

Since most available datasets have the limitation of user number, using only one dataset to train and evaluate the model performance can hardly show the generalizability on the real-world scenario. Therefore, we mixed four datasets from different source together, making a hybrid dataset with higher variety and larger amount of data than all the other datasets. To keep consistency, we resampled all these data into the same frequency, which is 200Hz.

The aforementioned four datasets are: ECG-ID, You Snooze You Win, Telemetric and Holter ECG Warehouse (THEW), and MIT-BIH Normal Sinus Rhythm Database.

a. **ECG-ID** [8] contains 310 ECG recordings from 90 individuals of 20 seconds. The users are composed of 44 men and 46 women aged from 13 to 75 years old, who were the author's student, colleagues, and friends. The number of records of each person ranges from 2 to 20.
<figure><img src="image_6.png" /><figcaption>**Fig. 5.** The schematic diagram of the hybrid dataset design according to different number of data for each subject. The entire hybrid dataset is separated into A, B, and C categories. In category C, several subjects are preserved to be the testing data of the unseen-subject dataset.</figcaption></figure>

**b. You Snooze You Win** [8] is The PhysioNet Computing in Cardiology Challenge 2018, which aims to detect arousal during sleeping. The dataset includes 994 users in training set and 989 users in testing set, which is the largest publicly available ECG dataset. All the signals are recorded during these users slept, and this dataset also contains other signals such as electroencephalography (EEG), electromyography (EMG), and electrooculography (EOG) to be further investigated.

**c. Telemetric and Holter ECG Warehouse (THEW)** [12] contains three-lead 24 hours' recordings from 202 healthy subjects from the Intercity Digital Electrocardiogram Alliance (IDEAL) database. Among these users, 100 of them are male, another 100 are female, and 2 are undefined.

**d. MIT-BIH Normal Sinus Rhythm Database** [8] includes long-term ECG signals from 18 individuals without significant arrhythmias referred to Beth Israel Deaconess Medical Center. There are 5 men, aged from 26 to 45, and 13 women, aged from 20 to 50, contained in this dataset.

After mixing the aforementioned four datasets, we divided the subjects into 3 sets according to their number of data, which is shown in Fig.5:

A. *Subjects with number of data larger or equal to 20 but less than 66* would be used for training, while those who contain fewer valid data are abandoned due to data insufficiency.

B. *Subjects with number of data larger or equal to 66 but less than 100* would divide their data into two parts evenly, and put them in training set and validation set respectively.

C. *Subjects with number of data larger or equal to 100* would just select 100 of their data, and put them in training, validation, and testing set evenly while testing data are those late in chronological order. Then, we randomly select 200 subjects from C set to serve as the unseen testing set, which is only used for testing the generalization performance.
<table><caption>**Table 2.** The average required signal period for each input data of different methods and their corresponding AUC with number of class is 1500.</caption><thead><tr><td>Method</td><td>Signal period (s)</td><td>AUC Score</td></tr></thead><tbody><tr><td>Deep-ECG</td><td>9.47</td><td>0.984</td></tr><tr><td>SNL-Deep-ECG</td><td>1(-89.45%)</td><td>0.975(-0.009)</td></tr></tbody></table>

To evaluate the performance of verification tasks, area under ROC curve (AUC) and equal error rate (EER) are the two most popularly used metrics [3, 5, 6, 7]. In fact, EER is a point of ROC curve where the false acceptance rate and the false rejection rate are equal. On the other hand, AUC score measures the area under the ROC curve which is meant to be the overall performance of a verification system. Therefore, we select AUC score as our evaluation metric for the following experiment. The proposed SNL-Deep-ECG and its experiment are implemented using pytorch 1.6.0 based on python 3.9.1.

## 4.2 Comparison of the preprocess methods between Deep-ECG and SNL-Deep-ECG

As mentioned in Sec.3.1, Deep-ECG and proposed SNL-Deep-ECG used different period of signals as input data. In Deep-ECG, one preprocessed data containing eight concatenated heartbeats, while SNL-Deep-ECG just used signals of one second period. As a consequence, Deep-ECG requires to wait until collecting enough heartbeats before inferencing, which are time consuming. In table 2, we show the average required signal period of Deep-ECG and SNL-Deep-ECG and their corresponding AUC for unseen-subject test. Comparing to Deep-ECG, SNL-Deep-ECG can reduce 90% of the waiting time during verification with only 0.009 AUC dropped. This experiment result shows that our preprocessing method is located at a better trade-off between the signal collection time and verification performance.

## 4.3 Comparison verification performance between Deep-ECG and SNL-Deep-ECG in terms of Number of Class

In this section, we use different number of class which ranges from 100 to 1500, and observe how this affect the performance of both Deep-ECG and SNL-Deep-ECG. Number of class means the amount of users selected from total training set to train the two models respectively. For example, number of class is 100 means the model is just trained with the data of 100 subjects, and it would be tested by the same 100 subjects during seen test and tested by the 200 subjects during the unseen test.

First, we test the performance of Deep-ECG on the task. We trained the model for 500 epochs with learning rate of 1e-5, batch size of 125 samples, early stop with patience of 5, number of trials is 5, and used Adam as our optimizer. The results are shown in Fig.6, and the blue and orange lines stand for AUC of Deep-ECG for seen-subject test and unseen-subject test respectively. In Fig. 6, we can observe that the performance of unseen-subject test is lower than seen-subject test, since the model was trained with data from the same subjects from the seen-subject test.
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** AUC of Deep-ECG and proposed SNL-Deep-ECG for ECG verification with different number of class</figcaption></figure>

On the other hand, the left part of the two curves in Fig.6, where number of class ranges from 100 to 500, is ascending roughly. However, on the right part where number of class becomes larger and larger, the performance seems to drop. In the beginning, the number of class is small, which also implies training data is scarce. As a consequence, increasing the number of classes improves the data sufficiency and makes the model trained better. Nevertheless, when the performance reaches the peak, keeping adding more classes would enhance the difficulty of the task since classifying from thousands of subjects is of course harder than the same task for hundreds of subjects. By the result, we can come to the conclusion that verification performance of cross entropy drops when number of class becomes larger and larger.

In the next step, we operate the same experiment but instead using our proposed SNL-Deep-ECG. The results are shown in the grey and yellow curves of Fig.6. We trained the model for 500 epochs with learning rate of 1e-4, weight decay of 5e-4, batch size of 500 samples, number of trials is 5, and early stop with patience of 5. We use Adam as our optimizer, and utilize Cosine Similarity to calculate distance as well as LpRegularizer to regularize embedding for NPairLoss [9].

We can observe that SNL-Deep-ECG works well at both small and large class number, and outperforms original Deep-ECG in most cases. The average seen/unseen AUC among different number of class of Deep-ECG are 0.942/0.935, while these of SNL-Deep-ECG are 0.975/0.970, which improves 0.032/0.035. Moreover, the tendency of AUC is ascending with the number of class. How makes SNL-Deep-ECG capable of solving more difficult problem is due to its higher computational complexity comparing to Deep-ECG. We found that SNL-Deep-ECG took 1.5 longer time to train than Deep-ECG per epoch.
# 5 Conclusions

In this work, we propose SNL-Deep-ECG for the ECG verification task. To test the model with high-variability ECG data, we propose a hybrid dataset by mixing four open ECG datasets. Moreover, to improve the usability of the ECG verification system, we simplified the preprocessing procedure, which saves 90% of the collection time. In addition, we propose to apply NPairLoss to train the model and SNL-Deep-ECG outperforms Deep-ECG by 3.5% AUC score on the hybrid dataset. The final performance of SNL-Deep-ECG is 0.975/0.970 AUC score on the seen/unseen-subject task.

# References

[1] S. Hong, Y. Zhou, J. Shang, C. Xiao and J. Sun, *Opportunities and Challenges of Deep Learning Methods for Electrocardiogram Data: A Systematic Review*, 2020.

[2] C.-Y. Chou, Y.-W. Pua, T.-W. Sun and A.-Y. (Wu, "Compressed-Domain ECG-Based Biometric User Identification Using Compressive Analysis," *Sensors*, vol. 20, 2020).

[3] R. Donida Labati, E. Muñoz, V. Piuri, R. Sassi and F. Scotti, "Deep-ECG: Convolutional Neural Networks for ECG biometric recognition," *Pattern Recognition Letters*, vol. 126, p. 78-85, 2019.

[4] I. Odinaka, P. Lai, A. D. Kaplan, J. A. O'Sullivan, E. J. Sirevaag and J. W. Rohrbaugh, "ECG Biometric Recognition: A Comparative Analysis," *IEEE Transactions on Information Forensics and Security*, vol. 7, pp. 1812-1824, 12 2012.

[5] D. Pereira Coutinho, H. Silva, H. Gamboa, A. Fred and M. Figueiredo, "Novel fiducial and non-fiducial approaches to electrocardiogram-based biometric systems," *IET Biometrics*, vol. 2, pp. 64-75, 2013.

[6] R. D. Labati, R. Sassi and F. Scotti, "ECG biometric recognition: Permanence analysis of QRS signals for 24 hours continuous authentication," in *2013 IEEE International Workshop on Information Forensics and Security (WIFS)*, 2013.

[7] I. B. Ciocoiu, "Comparative analysis of bag-of-words models for ECG-based biometrics," *IET Biometrics*, vol. 6, pp. 495-502, 2017.

[8] L. Goldberger Ary, N. Amaral Luis A., G. Leon, M. Hausdorff Jeffrey, I. P. Ch., G. Mark Roger, E. Mietus Joseph, B. Moody George, P. Chung-Kang and S. H. Eugene, "PhysioBank, PhysioToolkit, and PhysioNet," *Circulation*, vol. 101, p. e215-e220, 6 2000.

[9] K. Sohn, "Improved Deep Metric Learning with Multi-class N-pair Loss Objective," in *Advances in Neural Information Processing Systems*, 2016.

[10] X. Wang, X. Han, W. Huang, D. Dong and M. R. Scott, *Multi-Similarity Loss with General Pair Weighting for Deep Metric Learning*, 2020.

[11] K. Musgrave, S. Belongie and S.-N. Lim, *A Metric Learning Reality Check*, 2020.

[12] J.-P. Couderc, X. Xiaojuan, W. Zareba and A. J. Moss, "Assessment of the Stability of the Individual-Based Correction of QT Interval for Heart Rate," *Annals of Noninvasive Electrocardiology*, vol. 10, pp. 25-34, 2005.