[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Next Article in Journal
Evaluating Richer Features and Varied Machine Learning Models for Subjectivity Classification of Book Review Sentences in Portuguese
Next Article in Special Issue
Digital Twin of a Magnetic Medical Microrobot with Stochastic Model Predictive Controller Boosted by Machine Learning in Cyber-Physical Healthcare Systems
Previous Article in Journal
Calculated vs. Ad Hoc Publics in the #Brexit Discourse on Twitter and the Role of Business Actors
You seem to have javascript disabled. Please note that many of the page functionalities won't work as expected without javascript enabled.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Atrial Fibrillation Detection Directly from Compressed ECG with the Prior of Measurement Matrix

1
School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
2
College of Electrical and Information Engineering, Southwest Minzu University, Chengdu 610041, China
*
Author to whom correspondence should be addressed.
Information 2020, 11(9), 436; https://doi.org/10.3390/info11090436
Submission received: 24 August 2020 / Revised: 9 September 2020 / Accepted: 9 September 2020 / Published: 10 September 2020
(This article belongs to the Special Issue Deep Learning in Biomedical Informatics)

Abstract

:
In the wearable health monitoring based on compressed sensing, atrial fibrillation detection directly from the compressed ECG can effectively reduce the time cost of data processing rather than classification after reconstruction. However, the existing methods for atrial fibrillation detection from compressed ECG did not fully benefit from the existing prior information, resulting in unsatisfactory classification performance, especially in some applications that require high compression ratio (CR). In this paper, we propose a deep learning method to detect atrial fibrillation directly from compressed ECG without reconstruction. Specifically, we design a deep network model for one-dimensional ECG signals, and the measurement matrix is used to initialize the first layer of the model so that the proposed model can obtain more prior information which benefits improving the classification performance of atrial fibrillation detection from compressed ECG. The experimental results on the MIT-BIH Atrial Fibrillation Database show that when the CR is 10%, the accuracy and F1 score of the proposed method reach 97.52% and 98.02%, respectively. Compared with the atrial fibrillation detection from original ECG, the corresponding accuracy and F1 score are only reduced by 0.88% and 0.69%. Even at a high CR of 90%, the accuracy and F1 score are still only reduced by 6.77% and 5.31%, respectively. All of the experimental results demonstrate that the proposed method is superior to other existing methods for atrial fibrillation detection from compressed ECG. Therefore, the proposed method is promising for atrial fibrillation detection in wearable health monitoring based on compressed sensing.

1. Introduction

Atrial fibrillation (AF) is the most common type of persistent arrhythmia. It is closely related to the occurrence of thrombosis, stroke, and even death, posing an imminent threat to human health [1,2]. Therefore, real-time detection of atrial fibrillation and corresponding intervention is important to prevent the occurrence of related diseases. In recent years, wearable technology-based health monitoring has rapidly developed, and compressed sensing (CS) [3,4,5] is increasingly used in wearable health monitoring due to its low sampling rate and low power consumption [6]. Compressed sensing can collect physiological signals at a much lower sampling rate than Nyquist on wearable devices and accurately reconstruct the original signals at remote devices, thus greatly reducing the power consumption of wearable devices and extending their battery life [7].
Usually, the wearable health monitoring system based on compressed sensing will first accurately reconstruct the original ECG signals after the compressed ECG data are collected and transmitted to the remote devices, and then make a further diagnostic analysis based on the reconstructed ECG signal [8]. However, the time required for signal reconstruction is likely to affect the real-time performance of automatic diagnosis, especially when most of the compressed sensing reconstruction algorithms have high computational complexity [9]. In the automatic AF detection, to obtain a more accurate analysis result, it is usually necessary to analyze a length of ECG signal frame of 5 to tens of seconds, which will bring a certain processing delay [10]. If a lot of time is consumed during signal reconstruction, it is difficult to ensure the real-time performance of AF monitoring.
To solve the problem of real-time performance degradation caused by the signal reconstruction process in the wearable AF monitoring system based on compressed sensing, Da Poian et al. [11] proposed a matched filtering method to extract RR intervals directly from compressed ECG data, so that compressed ECG can be used directly for AF detection without reconstruction. However, the RR intervals extracted by Da Poian’s method at a higher compression ratio is not accurate, resulting in unsatisfactory classification performance for AF detection. In addition, Zhang et al. [12] proposed a deep learning method, which directly inputs the collected compressed ECG into the neural network model, and then outputs the results of AF detection. In fact, if there is no other prior information, the compressed ECG contains much less information than the original ECG, so it is difficult to obtain satisfactory classification performance by only relying on the compressed ECG data.
In this paper, we propose a method to detect atrial fibrillation directly from compressed ECG signals, which makes full use of the existing prior information to improve the classification performance of AF detection. Specifically, we designed a deep neural network model for one-dimensional ECG signals, which directly inputs the compressed ECG signal to the model, and outputs the detection result of atrial fibrillation at the end of the model, thereby eliminating the process of ECG signal reconstruction. To fully benefit from the prior information contained in the measurement matrix, so as to improve the classification performance of atrial fibrillation detection, we designed the first layer of the deep network model as a fully connected layer and initialized the weights of this layer with the pseudo-inverse of the measurement matrix. The experimental results on the MIT-BIH Atrial Fibrillation Database show that our proposed method is superior to the existing algorithms for directly detecting atrial fibrillation from compressed ECG, and the initialization using the measurement matrix effectively improves the classification performance of AF detection from compressed ECG. In summary, the main contributions of this paper are as follows:
  • To address the real-time problem of atrial fibrillation detection based on compressed sensing, a deep learning method to detect atrial fibrillation directly from the compressed ECG is proposed without the need to reconstruct the ECG, thereby ensuring the real-time detection of atrial fibrillation in wearable health monitoring.
  • In order to fully benefit from the existing prior information, we designed the first layer of the deep network model as a fully connected layer, and then used the measurement matrix to initialize the weights of this layer, so that the model can learn the features related to atrial fibrillation more easily. As a result, the classification performance of the model can be effectively improved.
  • Experiments on the MIT-BIH Atrial Fibrillation Database show that the classification performance of the proposed method is superior to the existing methods for detecting atrial fibrillation from compressed ECG. Especially at higher compression ratios, it can effectively reduce the loss of classification performance caused by signal compression.
The remainder of this paper is organized as follows: Section 2 states problem description and motivation; Section 3 presents the proposed method; Section 4 describes datasets, experimental setup, evaluation metrics, and experimental results; conclusions are given in the last section.

2. Problem Description and Motivation

2.1. Importance of Measurement Matrix in Compressed Sensing

Compressed sensing is a framework used for data sampling and compression. It performs sensing and compression at the same time. Compared with the traditional data sampling and compression methods, it costs much less energy [13]. Thus, it is being used more and more in the cases which require low-power data acquisition extending the battery life [14]. The basic mathematical model of compressed sensing can be expressed as
s = Φ α ,
where α R N × 1 is the original signal, Φ R M × N ( M N ) is the measurement matrix, and s R M × 1 is the compressed signal. The original signal is projected from the high-dimensional space to the low-dimensional space through the measurement matrix, so as to realize the compression of the original signal. Therefore, the measurement matrix is an important link between the compressed signal and the original signal. Compressed sensing reconstruction algorithms [15,16,17,18] can use the measurement matrix to accurately reconstruct the original signal from the compressed data. Thus, a lot of important information in the original signal can be obtained by using the measurement matrix. If there is only the compressed signal without knowing the measurement matrix, it is difficult to infer from the low-dimensional space back to the high-dimensional space. This is actually like wavelet-based compression and reconstruction: if there are only wavelet coefficients, but the wavelet basis is unknown, it is also difficult to reconstruct the original signal.
As shown in Figure 1, we take a normal ECG and atrial fibrillation ECG as examples. Figure 1a,b are a normal ECG segment and an atrial fibrillation ECG segment, respectively. In normal ECG, each heartbeat contains a P wave reflecting atrial activity and a QRS complex reflecting ventricular activity, and the R peak (marked by red circles in the figure) is the most prominent peak in each heartbeat. In AF ECG, the P wave disappears and is replaced by a continuous fibrillating wave, and the RR interval (interval between two adjacent R peaks) sequence is absolutely irregular. Usually, atrial fibrillation waves are difficult to extract due to their small amplitude and are easily disturbed by noise. Therefore, the RR interval sequence is more commonly used to automatically diagnose atrial fibrillation [19]. Figure 1c,d are the compressed data of (a) and (b), respectively, and the compression ratio corresponding to the measurement matrix is 60%. From the time domain waveform, the compressed data are not consistent with the dimension of the original ECG segment, and some waveform characteristics of the original ECG are not clearly shown in the compressed data. Thus, it is difficult to obtain some features of the original ECG only from the compressed ECG. Then, we multiplied the pseudo-inverse of the measurement matrix with the compressed data in Figure 1c,d to get the waveform in Figure 1e,f. This simple multiplication can be regarded as a crude reconstruction; of course, the signal is already seriously distorted relative to the original ECG. However, in fact, we can still see all the R peaks (red circles) in the original ECG from Figure 1e,f. This shows that, through a simple operation on the measurement matrix, we have actually recovered the positions of the R peaks in the original ECG. Therefore, it can fully benefit from the prior information of the measurement matrix and obtain the effective features of the original ECG to improve the classification performance of atrial fibrillation detection.

2.2. AF Detection Based on Compressed Sensing

The electrocardiogram is currently the most effective way to detect atrial fibrillation [20]. The main characteristic of atrial fibrillation on the electrocardiogram is that the P wave disappears and is replaced by continuous and irregular tremor waves. In addition, due to the absolute irregularity of the ventricular rate, the RR interval time series is absolutely irregular.
The most commonly used method for the automatic detection of atrial fibrillation is machine learning. These methods first extract the morphological and statistical features of the ECG, and then use these features as input to train a classifier to automatically identify whether the ECG contains atrial fibrillation. In recent years, due to the powerful feature extraction capabilities of deep neural networks, end-to-end AF detection methods based on deep learning have achieved better accuracy [21]. In the deep learning-based AF detection method, there is no need to extract the ECG features in advance, but directly input the original signal into the network model.
In a wearable health monitoring system based on compressed sensing, after the compressed ECG data are collected and transmitted to the remote devices, the original ECG signal is usually reconstructed first, and then the reconstructed signal is used for automatic diagnosis and analysis. The blue arrow in Figure 2 is the basic process of AF detection in a wearable health monitoring system based on compressed sensing. First, the compressed ECG signal needs to be collected on the wearable device using compressed sensing; then, the collected compressed data are transmitted to the remote device through a wireless connection; after receiving the compressed data, the remote device usually uses a compressed sensing reconstruction algorithm to reconstruct the ECG signals, and then uses the reconstructed ECG signals for automatic AF detection [22]. However, most of the compressed sensing reconstruction algorithms have high computational complexity. If the computing performance of remote devices is limited, such as smartphones or smartwatches, the reconstruction process will consume a lot of time. As a result, the real-time performance of AF detection is seriously affected.
Since the original signal can be reconstructed from the compressed data with high precision, it means that the compressed data contain most of the information of the original signal. Therefore, it is possible to directly use the compressed data for AF detection without reconstruction, just as shown by the red arrow in Figure 2. Da Poian et al. [11] proposed a heartbeat detection method called compressed sensing matched filtering (CSMF) [23], which can directly detect the locations of the R peaks from compressed ECG data, thus obtaining the RR intervals. The same method is also used to detect systolic peak from compressed photoplethysmography [24]. Then, based on the RR intervals, a support vector machine (SVM) classifier is used to detect the presence of atrial fibrillation. Although their proposed method alleviates the adverse impact of signal reconstruction on real-time performance, the accuracy of AF detection is significantly lower than that of AF detection on the reconstructed signal at the same compression ratio. In addition, Zhang et al. [12] also eliminated the signal reconstruction process and proposed an end-to-end AF detection method for compressed ECG signals based on deep learning. They directly input the compressed ECG signal segments into the designed convolutional neural network model and output the result of AF detection at the end of the model.
However, Zhang’s method ignored the measurement matrix, which is an important link between the compressed signal and the original signal. Based on a large amount of data and the powerful learning ability of deep neural networks, Zhang’s method has learned the mapping relationship between compressed ECG and AF labels to a certain extent. However, if the prior information of the measurement matrix is used to train the network model at the same time, then the network model may be easier to learn some important features about the original ECG, thereby improving the classification performance of the model.
This paper aims at the problems of insufficient utilization of existing prior information and poor classification performance of AF detection in compressed ECG and makes full use of the available prior information to improve the classification performance of AF detection from compressed ECG.

3. Proposed Method

In order to solve the problem of AF detection of compressed ECG, a deep neural network model for one-dimensional ECG signals is proposed based on deep learning.

3.1. Loss Function

AF detection is to automatically identify whether there is atrial fibrillation in the ECG segment, which is actually a binary classification problem in machine learning. Therefore, we use binary cross-entropy loss for AF detection, which is defined as follows:
L = i = 1 K y i log y ^ i + 1 y i log 1 y ^ i ,
where i is the index of the ECG segment, there are a total of K ECG segments, y i is the label of the i-th ECG segment, and y ^ i is the probability of whether the input ECG segment has atrial fibrillation.

3.2. Model Architecture

In this paper, we design a one-dimensional neural network model using one-dimensional ECG signals for AF detection based on residual network [25] and grouped convolution [26]. The network model we proposed refers to ResNeXT [27] and is simplified and modified for our problem. The high-level architecture of the proposed model is shown in Figure 3a.
The model starts with a fully connected layer, followed by a one-dimensional convolutional layer with a kernel size of 3 and a filter number of 64, and four bottleneck blocks. The four bottleneck blocks are divided into four stages, and each bottleneck block is a stage. The width of the bottleneck block is 4d, where d starts from 1 and increases with each stage. Finally, a global pooling layer, a fully connected layer, and a sigmoid layer produce an output probability value, which is between 0 and 1.
Figure 3b shows the specific structure and parameters of the bottleneck block. The bottleneck block contains three one-dimensional convolutional layers, and the middle convolutional layer is based on grouped convolution. The first and third layers are two one-dimensional convolutional layers. The detailed parameters of the four bottleneck blocks are shown in Table 1. Each convolutional layer is followed by a batch normalization. We use ReLU as the activation function. Since the bottleneck block uses a skip connection to directly pass the input of the bottleneck block to the end of the bottleneck block, the input of the bottleneck block is added to the output of the last layer and then activated by the activation function.

3.3. Initialization Using Measurement Matrix and Training

The first layer of the proposed model is a fully connected layer, and its weight matrix is represented by W. Its input dimension is M which is the length of the input compressed ECG segment, and its output dimension is set to N which is the length of the original ECG segment. Then, the dimension of its weight matrix W is N × M , which is also the dimension of the pseudo-inverse of the measurement matrix. We denote the entire neural network model as f ( · ) , the input is the compressed ECG s, and the output is the label y; then, y = f ( s ) . Then, we define the part of the model except the first layer as g ( · ) , and the output of the model can be expressed as
y = f s = g W s .
In order to make full use of the prior information of the known measurement matrix, we use Φ , which represents the pseudo-inverse of measurement matrix to initialize the first layer of the model. Specifically, Φ is assigned to the weight matrix of the first fully connected layer as the initial value, that is, W i n i = Φ , where W i n i indicates the initial value of W. Thus, the output size of this layer is equal to the length of the original ECG segment. When the initial value of this layer remains constant, the output of the compressed ECG through this layer is equivalent to the matrix-vector multiplication described in Figure 1, which can be regarded as a very rough reconstruction of ECG segment. If so, a lot of potentially useful information will be lost.
Therefore, we only use Φ to initialize the weight matrix W of the first layer, and W will be fine-tuned in the process of supervised training. In the process of training, the atrial fibrillation label is used to mine more potential information from the compressed ECG that can distinguish different types of ECG.
In the training, we use an Adam optimizer with mini-batch to train our network model, and the batch size is set to 256. The epoch is set to 100. Then, we set the learning rate of the model to l r = 0.001, and since we only fine-tune the first fully connected layer, the corresponding learning rate is set to 0.1* l r . The model is implemented based on Python 3.6 and a Pytorch framework [28] of version 1.4.0. The network model is trained on a computer equipped with a CPU of Intel i9-9700k (Intel Corporation Co., Ltd., Santa Clara, CA, USA), 32 GB RAM, and two GPUs of Nvidia RTX 2080Ti (Nvidia Corporation, Santa Clara, CA, USA).

4. Experiments and Results

4.1. MIT-BIH Atrial Fibrillation Database

The data set used in this paper is from the MIT-BIH atrial fibrillation database [29], which is currently the most widely used atrial fibrillation data set. The database contains 25 long-term ECG records of human subjects with atrial fibrillation (mainly paroxysmal). Among them, records 00735 and 03665 only have beat files and unaudited QRS wave annotation files. Therefore, only 23 ECG signals including two channels are used for recording.
The duration of each recording is about 10 hours and contains two channels of ECG signals. All ECG signals are sampled at a sampling rate of 250 Hz with a resolution of 12 bits and an accuracy of ±10 mV. The original analog recording was made using a dynamic electrocardiograph at Beth Israel Hospital in Boston, with a typical recording bandwidth of about 0.1 Hz to 40 Hz. There are four types of rhythm annotations in the dataset: “AFIB” (atrial fibrillation), “AFL” (atrial flutter), “J” (AV nodal rhythm), and ”N” (used to represent all other rhythms).
According to the setting of most research work based on this data set, we divide these four types of rhythms into two categories, of which the three types of rhythms “AFL”, “J”, and “N” are merged into one category, namely “Non-AF”, and “AFIB” is another category, namely ”AF”.

4.2. Experimental Setup

In the experiment, we divided the ECG signals in the MIT-BIH Atrial Fibrillation Database into segments with a duration of 10 s, and, since the sampling rate of the ECG signals was 250 Hz, the number of sampling points for an ECG segment was N = 2500. Then, the ECG segments are annotated according to the rhythm annotations in the data set. When the ECG segment contains AF beats, the ECG segment is labeled “AF”; otherwise, it is labeled “Non-AF”. After these ECG segments are labeled, we randomly divide all ECG segments into 70% training set, 10% validation set, and 20% test set. We use the validation set to adjust the hyperparameters of the model and select the optimal model to test on the test set. Then, all the ECG segments are compressed by a measurement matrix. The compression ratio (CR) was defined as:
C R = N M N .
We used sparse binary matrix [30] as the measurement matrix, and it was generated with dimension M × N , where M = {2250, 2000, …, 500, 250}, N = 2500, and the corresponding compression ratios are 10%, 20%, …, 80%, 90%. At the same compression rate, all ECG segments are compressed using the same measurement matrix. In the experimental results, except for the Gaussian random matrix [31] used in Section 4.4.3 to compare the effects of different measurement matrices on classification performance, the other experiments are all used sparse binary matrices as a measurement matrix, including the two methods compared.

4.3. Evaluation Metrics

In the experiments, we used accuracy (Acc), F1 score, sensitivity (Se), specificity (Sp), and Youden index (YI) to evaluate the classification performance of the proposed method. These evaluation metrics are expressed as follows:
A c c = T P + T N T P + F P + T N + F N ,
F 1 = 2 T P 2 T P + F P + F N ,
S e = T P T P + F N ,
S p = T N T N + F P ,
Y I = S e + S p 1 ,
where T P , T N , F P , and F N indicate true positive, true negative, false positive, and false negative, respectively. In our experiment, we regarded the ECG segment labeled “AF” as positive, while the one labeled “Non-AF” was negative. After the proposed model is trained well, we obtain the values of T P , T N , F P , and F N based on the prediction results of the test set, and calculate the listed evaluation metrics as the experimental results.

4.4. Results

4.4.1. Comparison of AF Detection from Compressed ECG and Reconstructed ECG, Respectively

In order to further demonstrate the advantage of detecting AF directly from compressed ECG, we compare the experimental results of the proposed method with that of AF detection from reconstructed ECG. In the experiment, we used the BSBL-BO algorithm [32,33] to reconstruct the ECG segments, which is an excellent algorithm for physiological signal reconstruction. Then, the reconstructed ECG segments were input into the proposed neural network model without the first fully connected layer. Table 2 shows the results of the experiment. As can be seen from Table 2, when the compression ratio is less than 70%, no matter whether the AF detection is from compressed ECG or reconstructed ECG, the classification performance is very close, and there is no very obvious difference. When the compression ratio is 80% and 90%, the classification performance of AF detection from compressed ECG is significantly better than that from reconstructed ECG. This is because the reconstruction algorithm can easily lose some potential useful information when the compression ratio is high, and our proposed method does not depend on the quality of signal reconstruction, but directly learns useful features from the compressed ECG. Therefore, the loss of information in the signal reconstruction process is avoided.
In addition, in the last two rows of Table 2, we list the average CPU time required by the two methods to detect AF for each ECG segment, where AF detection from the reconstructed ECG includes two stages of reconstruction and classification, while AF detection from the compressed ECG only includes the time required for reconstruction. As can be seen from the results in the table, the time required for AF detection from compressed ECG does not change much at different compression ratios, while the time required for AF detection from reconstructed ECG decreases with the increase of compression ratio. Most of the time consumed by the AF detection from reconstructed ECG comes from the process of ECG reconstruction, while the time required for ECG classification is very little, which leads to a difference of two to three orders of magnitude in the average CPU time required by the two methods. In order to show it more intuitively, the average CPU time of the two methods with different compression ratios is represented by the curve graph shown in Figure 4, and the vertical axis of the CPU time in the figure is represented by a logarithm. It can be clearly seen from the figure that the CPU time of AF detection from compressed ECG is two to three orders of magnitude less than that of reconstructed ECG. In addition, the higher the compression ratio, the smaller the size of the measurement matrix, and the matrix operation during reconstruction will be simpler, resulting in less time for reconstruction. This is why the blue curve in Figure 4 decreases as the compression ratio increases.
Of course, we only take the BSBL-BO algorithm as an example, and there are many compressed sensing reconstruction algorithms with a lower computational complexity that can greatly reduce the time required for the reconstruction process. However, it is difficult to guarantee the quality of signal reconstruction, especially at high compression ratios. For the definite signal reconstruction process, it is difficult to avoid the loss of potential useful information. Our proposed method dynamically adjusts the weights initialized with the measurement matrix according to the information of labels during the supervised training process. Thus, in order to avoid the loss of potentially useful information caused by the signal reconstruction process before the deep network training, it is a better choice to improve real-time performance by eliminating the reconstruction process.

4.4.2. Comparison of Different Methods for AF Detection from Compressed ECG

We compared the classification performance of the proposed method with the existing compressed ECG-based AF detection methods using the evaluation metrics listed in Section 4.2, and Table 3 shows the detailed experimental results. The table lists the comparison of the classification performance of the three methods for the compression ratio from 10% to 90%. In addition, C R = 0% represents the result of AF detection using the original ECG.
The experimental results of the methods proposed by Da Poian and Zhang are directly quoted from their articles. Our proposed method and Zhang’s method are both end-to-end methods based on deep learning, which can directly classify the input ECG, whether it is compressed or not. In particular, our proposed method will remove the fully connected layer initialized with the measurement matrix in the model when classifying the original ECG. Since Da Poian’s method extracted features from compressed ECG through specially designed matching filtering, her method cannot directly classify the original ECG, so this method did not have classification results for original ECG.
As can be seen from this table, when classifying the original signal (CR = 0%), Zhang’s method and our proposed method have very similar classification performance from various evaluation metrics, and Zhang’s method is slightly better. When classifying the compressed ECG, Zhang’s method inputted the compressed ECG directly into the network model and ignored the measurement matrix, while our method added a fully connected layer initialized by the measurement matrix at the front of the network model. Therefore, our method could make full use of the information of compressed ECG and measurement matrix, which are both necessary in compressed sensing reconstruction.
The results in Table 3 show that the proposed method is very close to Zhang’s method in all the evaluation metrics when classifying the original ECG. However, in the classification of compressed ECG, the classification performance of the proposed method is better than that of Zhang’s method at various compression ratios. Taking the F1 score as an example, the F1 scores of the proposed method are 98.02% and 93.40% at a compression rate of 10% and 90%, respectively, which are 0.69% and 5.31% lower than that of the original ECG. Correspondingly, the F1 scores of Zhang’s method are 96.25% and 88.17% respectively, which is 2.18% and 10.26% lower than that of the original ECG. That is to say, when the measurement matrix was ignored, Zhang’s method lost more classification performance than the proposed method at the same compression ratio. Since our proposed method makes full use of compressed ECG and measurement matrix, the classification performance loss caused by signal compression is much smaller.
For a more intuitive comparison, we take the accuracy rate and F1 score as examples, and use the curve graph shown in Figure 5 to compare the classification performance changes of three methods at different compression ratios. It can be seen from the figure that the classification performance of the proposed method is very close to that of Zhang’s method when the ECG is not compressed in terms of accuracy or F1 score. However, after ECG compression, the classification performance of Zhang’s method is much worse than that of the proposed method. Especially at a high compression ratio of 90%, the difference in classification performance between the two methods is more obvious. As for Da Poian’s method, its classification performance is significantly worse.
Regarding the results of Da Poian’s method, we can see that it is far inferior to the other two deep learning methods in most evaluation metrics, especially at high compression ratios. In addition, it only performed better on the specificity. As we know, sensitivity is the probability of no missed diagnosis, while specific is the probability of no misdiagnosis. For AF detection, sensitivity is more important because once the patient misses the diagnosis, the patient may miss the optimal treatment time. Relatively speaking, specificity is not the most important because patients are often further checked after being misdiagnosed, so as to have the opportunity to correct the previous misdiagnosis.

4.4.3. Comparison of Different Measurement Matrices

To verify the effect of different measurement matrices on the classification performance of the proposed method, we compared the two most commonly used measurement matrices: sparse binary matrix (SBM) [30] and Gaussian random matrix (GRM) [31]. Table 4 shows the classification performance of the proposed method when using different measurement matrices to compress the ECG. The results of Zhang’s [12] method on different measurement matrices are also listed in the table for comparison. It can be seen that, when using the same measurement matrix, the classification performance of the proposed method on most evaluation metrics is better than that of Zhang’s method. In addition, at most compression ratios, whether it is the proposed method or Zhang’s method, the classification performance of the sparse binary matrix is slightly better than that of the Gaussian random matrix. However, overall, there is no obvious difference in the classification performance based on these two measurement matrices at the same compression ratio.
Of course, how to choose a suitable measurement matrix does not all depend on the classification performance. When designing algorithms related to compressed sensing, high-speed sampled digital signals are usually used to implement signal compression through numerical simulation. However, in practical applications, it is not possible to sample digital signals at high speed and then compress them numerically. In order to take advantage of the low sampling rate of compressed sensing in practical applications, it is necessary to design a special analog-to-information converter (AIC) [34,35] through a hardware circuit according to the measurement matrix. Because the elements in the Gaussian random matrix are randomly generated floating-point numbers, it is difficult to implement the Gaussian random matrix through a hardware circuit. However, the sparse binary matrix is different. The elements in it are all 0 s and 1 s, which is easy to implement on a hardware circuit. Therefore, the sparse binary matrix is more suitable for practical applications.

5. Discussion

The experimental results in Table 2 show that the proposed method has a huge advantage in real-time performance compared to the method of classification after reconstruction. Therefore, for scenarios with real-time requirements, it is a better solution to detect atrial fibrillation directly from the compressed ECG. The experimental results in Table 3 show that the proposed method has better classification performance than the existing methods for atrial fibrillation detection from compressed ECG. Table 4 compares the classification performance of the proposed method when using different measurement matrices. From the experimental results, there is little difference between the sparse binary matrix and Gaussian random matrix, but, in practical applications, the sparse binary matrix is easier to implement.

6. Conclusions

In this paper, a deep learning method using a measurement matrix for initialization is proposed to improve the classification performance of atrial fibrillation detection from compressed ECG. Different from the existing method that simply used compressed ECG and corresponding labels for supervised training, our proposed method fuses the prior information of the measurement matrix into the deep network model, thus fully benefiting from the existing information (including compressed ECG and measurement matrix) to improve the classification performance of atrial fibrillation detection from compressed ECG.
Compared with the usual compressed ECG processing method (classification after reconstruction), the proposed method eliminates the signal reconstruction stage. Therefore, the time required to process the compressed ECG can be greatly reduced, thereby effectively improving the real-time performance of atrial fibrillation detection. In summary, for compressed sensing-based wearable health monitoring that requires real-time performance, direct atrial fibrillation detection from compressed ECG not only improves the real-time performance of atrial fibrillation detection but also helps to save the energy of the equipment with less computational complexity. Therefore, the proposed method has good application prospects in wearable health monitoring scenarios.

Author Contributions

Conceptualization, Y.C.; Data curation, T.P.; Formal analysis, T.P.; Funding acquisition, Y.Y.; Investigation, Y.H. and W.H.; Methodology, Y.C. and Y.Y.; Project administration, Y.Y.; Resources, M.H.; Software, Y.C.; Supervision, M.H.; Validation, W.H. and T.P.; Visualization, Y.H. and T.P.; Writing—original draft preparation, Y.C.; Writing—review and editing, Y.H. and Y.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by the grants from the National Natural Science Foundation of China (No. 61976047 and No. 61872061), by the grants from Department of Science and Technology of Sichuan Province of China (No. 2019YFG0122, No. 2020YFG0087, and No. 2020YFG0326).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wolf, P.A.; Abbott, R.D.; Kannel, W.B. Atrial fibrillation as an independent risk factor for stroke: The Framingham Study. Stroke 1991, 22, 983–988. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Weng, L.C.; Preis, S.R.; Hulme, O.L.; Larson, M.G.; Choi, S.H.; Wang, B.; Trinquart, L.; McManus, D.D.; Staerk, L.; Lin, H.; et al. Genetic predisposition, clinical risk factor burden, and lifetime risk of atrial fibrillation. Circulation 2018, 137, 1027–1038. [Google Scholar] [CrossRef] [PubMed]
  3. Lustig, M.; Donoho, D.L.; Santos, J.M.; Pauly, J.M. Compressed sensing. IEEE Trans. Inf. Theory 2006, 52, 1289–1306. [Google Scholar] [CrossRef]
  4. Candès, E.J.; Romberg, J.; Tao, T. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inf. Theory 2006, 52, 489–509. [Google Scholar] [CrossRef] [Green Version]
  5. Candes, E.J.; Tao, T. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Trans. Inf. Theory 2006, 52, 5406–5425. [Google Scholar] [CrossRef] [Green Version]
  6. Zhang, Z.; Jung, T.P.; Makeig, S.; Rao, B.D. Compressed sensing for energy-efficient wireless telemonitoring: Challenges and opportunities. In Proceedings of the 2013 Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, USA, 3–6 November 2013; IEEE: Piscataway, NJ, USA, 2013. [Google Scholar]
  7. Nemati, E.; Deen, M.J.; Mondal, T. A wireless wearable ECG sensor for long-term applications. IEEE Commun. Mag. 2012, 50, 36–43. [Google Scholar] [CrossRef]
  8. Mamaghanian, H.; Khaled, N.; Atienza, D.; Vergheynst, P. Compressed sensing for real-time energy-efficient ECG compression on wireless body sensor nodes. IEEE Trans. Biomed. Eng. 2011, 58, 2456–2466. [Google Scholar] [CrossRef] [Green Version]
  9. Cheng, Y.; Ye, Y.; Hou, M.; He, W.; Li, Y.; Deng, X. A fast and robust non-sparse signal recovery algorithm for wearable ECG telemonitoring using ADMM-based block sparse Bayesian learning. Sensors 2018, 18, 2021. [Google Scholar] [CrossRef] [Green Version]
  10. Berkaya, S.K.; Uysal, A.K.; Gunal, E.S.; Ergin, S.; Gunal, S.; Gulmezoglu, M.B. A survey on ECG analysis. Biomed. Signal Process. Control 2018, 43, 216–235. [Google Scholar] [CrossRef]
  11. Da Poian, G.; Liu, C.; Bernardini, R.; Rinaldo, R.; Clifford, G.D. Atrial fibrillation detection on compressed sensed ECG. Physiol. Meas. 2017, 38, 1405. [Google Scholar] [CrossRef]
  12. Zhang, H.; Dong, Z.; Gao, J.; Lu, P.; Wang, Z. Automatic screening method for atrial fibrillation based on lossy compression of the electrocardiogram signal. Physiol. Meas. 2020, 41, 7. [Google Scholar] [CrossRef] [PubMed]
  13. Razzaque, M.A.; Dobson, S. Energy-efficient sensing in wireless sensor networks using compressed sensing. Sensors 2014, 14, 2822–2859. [Google Scholar] [CrossRef] [Green Version]
  14. Dixon, A.M.; Allstot, E.G.; Gangopadhyay, D.; Allstot, D.J. Compressed sensing system considerations for ECG and EMG wireless biosensors. IEEE Trans. Biomed. Circuits Syst. 2012, 6, 156–166. [Google Scholar] [CrossRef]
  15. Needell, D.; Tropp, J.A. CoSaMP: Iterative signal recovery from incomplete and inaccurate samples. Appl. Comput. Harmon. Anal. 2009, 26, 301–321. [Google Scholar] [CrossRef] [Green Version]
  16. Eldar, Y.C.; Kuppinger, P.; Bolcskei, H. Block-sparse signals: Uncertainty relations and efficient recovery. IEEE Trans. Signal Process. 2010, 58, 3042–3054. [Google Scholar] [CrossRef] [Green Version]
  17. Peleg, T.; Eldar, Y.C.; Elad, M. Exploiting statistical dependencies in sparse representations for signal recovery. IEEE Trans. Signal Process. 2012, 60, 2286–2303. [Google Scholar] [CrossRef] [Green Version]
  18. Blumensath, T. Accelerated iterative hard thresholding. Signal Process. 2012, 92, 752–756. [Google Scholar] [CrossRef] [Green Version]
  19. Kennedy, A.; Finlay, D.D.; Guldenring, D.; Bond, R.R.; Moran, K.; McLaughlin, J. Automated detection of atrial fibrillation using RR intervals and multivariate-based classification. J. Electrocardiol. 2016, 49, 871–876. [Google Scholar] [CrossRef] [Green Version]
  20. Hagiwara, Y.; Fujita, H.; Oh, S.L.; Tan, J.H.; Tan, R.S.; Ciaccio, E.J.; Acharya, U.R. Computer-aided diagnosis of atrial fibrillation based on ECG signals: A review. Inf. Sci. 2018, 467, 99–114. [Google Scholar] [CrossRef]
  21. Andersen, R.S.; Peimankar, A.; Puthusserypady, S. A deep learning approach for real-time detection of atrial fibrillation. Expert Syst. Appl. 2019, 115, 465–473. [Google Scholar] [CrossRef]
  22. Nemati, S.; Ghassemi, M.M.; Ambai, V.; Isakadze, N.; Levantsevych, O.; Shah, A.; Clifford, G.D. Monitoring and detecting atrial fibrillation using wearable technology. In Proceedings of the 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 16–20 August 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
  23. Da Poian, G.; Rozell, C.J.; Bernardini, R.; Rinaldo, R.; Clifford, G.D. Matched filtering for heart rate estimation on compressive sensing ECG measurements. IEEE Trans. Biomed. Eng. 2017, 65, 1349–1358. [Google Scholar] [CrossRef] [PubMed]
  24. Da Poian, G.; Letizia, N.A.; Rinaldo, R.; Clifford, G.D. A low-complexity photoplethysmographic systolic peak detector for compressed sensed data. Physiol. Meas. 2019, 40, 065007. [Google Scholar] [CrossRef] [PubMed]
  25. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
  26. Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Adv. Neural Inf. Process. Syst. 2012, 25. [Google Scholar] [CrossRef]
  27. Xie, S.; Girshick, R.; Dollár, P.; Tu, Z.; He, K. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
  28. Ketkar, N. Introduction to pytorch. In Deep Learning With Python; Apress: Berkeley, CA, USA, 2017; pp. 195–208. [Google Scholar]
  29. Moody, G. A new method for detecting atrial fibrillation using RR intervals. Comput. Cardiol. 1983, 227–230. [Google Scholar]
  30. Iwen, M.A. Compressed sensing with sparse binary matrices: Instance optimal error guarantees in near-optimal time. J. Complex. 2014, 30, 1–15. [Google Scholar] [CrossRef]
  31. Li, K.; Cong, S. State of the art and prospects of structured sensing matrices in compressed sensing. Front. Comput. Sci. 2015, 9, 665–677. [Google Scholar] [CrossRef] [Green Version]
  32. Zhang, Z.; Jung, T.P.; Makeig, S.; Rao, B.D. Compressed sensing for energy-efficient wireless telemonitoring of noninvasive fetal ECG via block sparse Bayesian learning. IEEE Trans. Biomed. Eng. 2012, 60, 300–309. [Google Scholar] [CrossRef] [Green Version]
  33. Zhang, Z.; Rao, B.D. Extension of SBL algorithms for the recovery of block sparse signals with intra-block correlation. IEEE Trans. Signal Process. 2013, 61, 2009–2015. [Google Scholar] [CrossRef] [Green Version]
  34. Kirolos, S.; Laska, J.; Wakin, M.; Duarte, M.; Baron, D.; Ragheb, T.; Massoud, Y.; Baraniuk, R. Analog-to-information conversion via random demodulation. In Proceedings of the 2006 IEEE Dallas/CAS Workshop on Design, Applications, Integration and Software, Richardson, TX, USA, 29–30 October 2006; IEEE: Piscataway, NJ, USA, 2006. [Google Scholar]
  35. Laska, J.N.; Kirolos, S.; Duarte, M.F.; Ragheb, T.S.; Baraniuk, R.G.; Massoud, Y. Theory and implementation of an analog-to-information converter using random demodulation. In Proceedings of the 2007 IEEE International Symposium on Circuits and Systems, New Orleans, LA, USA, 27–30 May 2007; IEEE: Piscataway, NJ, USA, 2007. [Google Scholar]
Figure 1. An example of compressed sensing of normal ECG segment and AF ECG segment. (a) is a normal ECG segment and (b) is an ECG segment with AF; (c,d) are the compressed data of (a,b), respectively; (e,f) are the results of multiplying the pseudo-inverse of the measurement matrix with the compressed normal ECG and AF ECG, respectively.
Figure 1. An example of compressed sensing of normal ECG segment and AF ECG segment. (a) is a normal ECG segment and (b) is an ECG segment with AF; (c,d) are the compressed data of (a,b), respectively; (e,f) are the results of multiplying the pseudo-inverse of the measurement matrix with the compressed normal ECG and AF ECG, respectively.
Information 11 00436 g001
Figure 2. AF Detection based on compressed sensing.
Figure 2. AF Detection based on compressed sensing.
Information 11 00436 g002
Figure 3. Proposed model for AF detection from compressed ECG.
Figure 3. Proposed model for AF detection from compressed ECG.
Information 11 00436 g003
Figure 4. Average CPU time of AF detection from compressed ECG and reconstructed ECG.
Figure 4. Average CPU time of AF detection from compressed ECG and reconstructed ECG.
Information 11 00436 g004
Figure 5. Comparison of accuracy and F1 score of three methods at different compression ratios.
Figure 5. Comparison of accuracy and F1 score of three methods at different compression ratios.
Information 11 00436 g005
Table 1. Detail parameters of bottleneck blocks.
Table 1. Detail parameters of bottleneck blocks.
First StageSecond StageThird StageForth Stage
1D convkernel size = 1
number of filters = 64
kernel size = 1
number of filters = 128
kernel size = 1
number of filters = 256
kernel size = 1
number of filters = 512
1D
grouped conv
kernel size = 3
number of filters = 64
group = 16
kernel size = 3
number of filters = 128
group = 16
kernel size = 3
number of filters = 256
group = 16
kernel size = 3
number of filters = 512
group = 16
1D convkernel size = 1
number of filters = 128
kernel size = 1
number of filters = 256
kernel size = 1
number of filters = 512
kernel size = 1
number of filters = 1024
Table 2. Comparison of classification performance of atrial fibrillation detection from compressed ECG and reconstructed ECG, respectively. This table shows that the classification performance of proposed method is not inferior to the classification from reconstructed ECG, and real-time performance of the proposed method is much better. Bold numbers represent the best results between the compared methods.
Table 2. Comparison of classification performance of atrial fibrillation detection from compressed ECG and reconstructed ECG, respectively. This table shows that the classification performance of proposed method is not inferior to the classification from reconstructed ECG, and real-time performance of the proposed method is much better. Bold numbers represent the best results between the compared methods.
Metric CR
10%20%30%40%50%60%70%80%90%
Acc(%)Reconstructed97.6297.2196.6996.1995.4795.2294.2691.1688.46
Compressed97.5297.1796.6596.3295.8195.1694.4693.5591.63
F1(%)Reconstructed98.0897.7797.3696.9596.3996.1895.4492.9690.65
Compressed98.0297.7497.3197.0796.6596.1395.5994.8993.40
Se(%)Reconstructed98.2497.3896.996.7795.6895.8794.4392.1891.56
Compressed97.5997.4997.3396.4896.2995.7094.7093.6191.80
Sp(%)Reconstructed96.5996.9296.3495.2395.1194.1393.9689.3983.61
Compressed97.4096.6595.5396.0595.0194.2494.0493.4391.32
YI(%)Reconstructed94.8494.3193.2492.0090.7990.0188.4081.5775.17
Compressed95.0094.1492.8792.5491.3089.9588.7487.0583.12
CPU time(s)Reconstructed26.47222.62416.89112.3588.2004.8562.9191.8851.056
Compressed0.01270.01260.01300.01270.01280.01250.01290.01240.0130
Table 3. Comparison of classification performance between the proposed method and existing methods for AF detection from compressed ECG. Sensitivity (Se) is the probability of no missed diagnosis, while specific (Sp) is the probability of no misdiagnosis. This table shows that the classification performance of the proposed method is superior than the other methods. Bold numbers represent the best results among the compared methods.
Table 3. Comparison of classification performance between the proposed method and existing methods for AF detection from compressed ECG. Sensitivity (Se) is the probability of no missed diagnosis, while specific (Sp) is the probability of no misdiagnosis. This table shows that the classification performance of the proposed method is superior than the other methods. Bold numbers represent the best results among the compared methods.
MetricMethodB
0%10%20%30%40%50%60%70%80%90%
Acc(%)Da Poian [11]-94.9394.5194.1093.2792.5590.3286.9280.1365.37
Zhang [12]98.4396.2396.0495.9195.4995.1394.8093.8592.6988.08
Proposed98.4097.5297.1796.6596.3295.8195.1694.4693.5591.63
F1(%)Da Poian [11]-93.8893.3492.7891.6890.6987.582.2370.4541.34
Zhang [12]98.4396.2596.0595.9095.5195.1694.8393.9092.7188.17
Proposed98.7198.0297.7497.3197.0796.6596.1395.5994.8993.40
Se(%)Da Poian [11]-90.4789.6388.4786.8585.2479.7972.0057.1029.88
Zhang [12]98.1095.9295.6995.5195.2194.6794.4693.2992.6787.65
Proposed98.6897.5997.4997.3396.4896.2995.7094.7093.6191.80
Sp(%)Da Poian [11]-98.3098.1998.3398.0697.9798.1097.7496.4689.88
Zhang [12]98.7696.5596.3896.2695.7795.6095.1694.4492.7288.52
Proposed97.9497.4096.6596.5396.0595.0194.2494.0493.4391.32
YI(%)Da Poian [11]-88.7787.8286.8084.9183.2177.8969.7453.5619.76
Zhang [12]96.8692.4792.0791.7790.9890.2789.8687.7385.3976.17
Proposed96.6295.0094.1493.8692.5491.3089.9588.7487.0583.12
Table 4. Comparison of classification performance of AF detection from compressed ECG using different measurement matrices. This table shows that the classification performance of the proposed method is better than Zhang’s method [12] when using the same measurement matrix. For the same method, there is no significant difference in classification performance using different measurement matrices. Bold numbers represent the best results among the compared methods.
Table 4. Comparison of classification performance of AF detection from compressed ECG using different measurement matrices. This table shows that the classification performance of the proposed method is better than Zhang’s method [12] when using the same measurement matrix. For the same method, there is no significant difference in classification performance using different measurement matrices. Bold numbers represent the best results among the compared methods.
MetricMethodMeasurment
Matrix
CR
10%20%30%40%50%60%70%80%90%
Acc(%)ProposedSBM97.5297.1796.6596.3295.8195.1694.4693.5591.63
GRM97.3296.8996.5096.0595.6094.9994.3593.3691.75
Zhang [12]SBM96.2396.0495.9195.4995.1394.893.8592.6988.08
GRM95.2995.1694.9694.6994.4693.8892.9891.8987.97
Se(%)ProposedSBM97.5997.4997.3396.4896.2995.7094.7093.6191.80
GRM97.6597.0397.1196.5295.9595.2394.5293.4391.70
Zhang [12]SBM95.9295.6995.5195.2194.6794.4693.2992.6787.65
GRM94.8194.5894.1994.2394.3793.0892.7592.3688.55
Sp(%)ProposedSBM97.4096.6595.5396.0595.0194.2494.0493.4391.32
GRM96.7796.6495.4795.2494.9994.5894.0493.2391.83
Zhang [12]SBM96.5596.3896.2695.7795.6095.1694.4492.7288.52
GRM95.7895.7595.7695.6994.5494.7193.2291.4387.41
YI(%)ProposedSBM95.0094.1492.8792.5491.3089.9588.7487.0583.12
GRM94.4293.6892.5991.7790.9589.8188.5686.6783.54
Zhang [12]SBM92.4792.0791.7790.9890.2789.8687.7385.3976.17
GRM90.690.3389.9689.488.9287.7985.9883.7975.96
F1(%)ProposedSBM98.0297.7497.3197.0796.6596.1395.5994.8993.40
GRM97.8597.5197.1996.8496.4896.0195.5194.7493.51
Zhang [12]SBM96.2596.0595.995.5195.1694.8393.992.7188.17
GRM95.3295.1995.0194.7394.4793.9493.0191.8687.90

Share and Cite

MDPI and ACS Style

Cheng, Y.; Hu, Y.; Hou, M.; Pan, T.; He, W.; Ye, Y. Atrial Fibrillation Detection Directly from Compressed ECG with the Prior of Measurement Matrix. Information 2020, 11, 436. https://doi.org/10.3390/info11090436

AMA Style

Cheng Y, Hu Y, Hou M, Pan T, He W, Ye Y. Atrial Fibrillation Detection Directly from Compressed ECG with the Prior of Measurement Matrix. Information. 2020; 11(9):436. https://doi.org/10.3390/info11090436

Chicago/Turabian Style

Cheng, Yunfei, Ying Hu, Mengshu Hou, Tongjie Pan, Wenwen He, and Yalan Ye. 2020. "Atrial Fibrillation Detection Directly from Compressed ECG with the Prior of Measurement Matrix" Information 11, no. 9: 436. https://doi.org/10.3390/info11090436

APA Style

Cheng, Y., Hu, Y., Hou, M., Pan, T., He, W., & Ye, Y. (2020). Atrial Fibrillation Detection Directly from Compressed ECG with the Prior of Measurement Matrix. Information, 11(9), 436. https://doi.org/10.3390/info11090436

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