Arrhythmia detection model using modified DenseNet for comprehensible Grad-CAM visualization

https://doi.org/10.1016/j.bspc.2021.103408Get rights and content

Highlights

  • Deep Learning was used to generate a model that detects arrhythmia using ECG.

  • The basis for judgement was difficult to understand in the basic model structure.

  • This study improve the visualization of Grad-CAM without compromising classification accuracy.

  • This study allows us to visualize irregular intervals or shapes of electrocardiogram.

  • An interpretable model will enable doctors to gain trust in medical deep learning.

Abstract

Diagnosing arrhythmia is difficult, requires significant efforts. Because arrhythmia can be associated with serious diseases, it is important to classify arrhythmia patients with high accuracy, and the basis for the classification model's judgment should be properly demonstrated. Traditional algorithm methods are less accurate, and simply using a high-accuracy image classification deep learning model yields incomprehensible results when the model is visualized with gradient-weighted class activation mapping (Grad-CAM). We want to achieve high-performance deep learning models can also comprehensible visualization. To obtain this, two hypotheses about Grad-CAM were established and the experiment was conducted. As a result, a method that could clearly visualize the response area using Grad-CAM with a higher classification performance of 0.98 accuracy is created.

Introduction

We propose a model structure that can generate a better visualization of arrhythmia classification using the electrocardiogram (ECG) data collected from actual patients (see Table 1).

Electrocardiogram (ECG) is data that record the electrical activity of the heart. By measuring the length of each section of the ECG, it is possible to verify that the electrical signals are transmitted at normal speeds from each part of the heart to the other part. Therefore, ECG data can be used to determine when and how the heart's muscles are activated. An arrhythmia means that the heartbeat of the heart is out of normal. Therefore, arrhythmia can be diagnosed using ECG [1], [2].

An accurate diagnosis of arrhythmia is crucial because it is most likely associated with a disease that can cause major problems in the body. An ECG is a record of the electrical activity in the heart. It is particularly important for diagnosing cardiac dysrhythmia and heart arrhythmia [1], [2].

A Holter's monitoring system is used to measure an ECG for at least 24 h. However, as the ECG data collected through this system increase with time, the amount of data becomes considerably large. Therefore, It takes a great deal of medical staff effort and time resources to read an one person’s electrocardiogram record [1], [2]. Furthermore, even for patients with actual arrhythmias, most of the collected ECG data are normal signals (sinus rhythm). As a result, a judgment error is likely to occur when attempting to detect arrhythmia between normal signals. Therefore, even an experienced specialist requires considerable time to analyze signals, and the accuracy is not high [3].

In this study, a densely connected convolutional network (DenseNet) [4] structure, which is a deep learning structure that shows excellent performance in image classification, is used to create a model for arrhythmia detection. This structure provided efficient arrhythmia detection and classification and minimized human intervention, unlike existing studies that require the assistance of experts in the field at the intermediate stages for characterization and extraction. A experiments is performed to observe the changes in classification performance of the model according to the filter size of DenseNet and found an optimal hyperparameter (see Table 2).

A Gradient-weighted class activation mapping (Grad-CAM) [5], which was developed for the visual interpretation of a convolutional neural network (CNN) model, is used to visualize the basis of model judgment for human confirmation. Because In the medical field, judgment errors are directly related to patients’ health. Therefore, it is difficult for medical staff to trust the deep learning model only because accuracy is high without knowing about the basis of judgment. This decreases the utilization of deep learning in actual clinical practice. To use deep learning models for detecting arrhythmia, it is necessary to inform decision makers about the decision basis of the models and which features of the data entered into the models influence results [6].

When attempting to classify ECG data using the image classification model, visualizations of the Grad-CAM highlighted areas are extremely ambiguous for humans to identify. In order to solve these problems, this study produced a hypothesis for the visualization of an effective Grad-CAM. A model comparison was performed to confirm the hypothesis, which led to a structure that can show higher performance and better visualization for ECG data. Based on this, the fact that the proposed model can be more helpful in actual clinical settings compared to the existing model is turned out. In related work, attention or general CAM is used. This requires major changes to the structure of the deep learning model. Or, to use the existing 2D network as it is, the image of the ECG is used as the input of the model. The contribution of our research is to create an ECG classification deep learning model that can best classify the ECG data acquired by researchers, and to improve the ability to interpret the basis of the judgments performed by the model without changing the main structure of the model.

The rest of this paper is organized as follows: Chapter 2 introduces previous studies on arrhythmia detection and classification and states our goal. Chapter 3 introduces the models and techniques used in this study. Chapter 4 presents datasets and preprocessing. Chapter 5 describes the learning process and its evaluation. Chapter 6 describes the experimental results, and Chapter 7 provides the conclusion and the direction of future work.

Section snippets

Literature review and goal

Various commercial programs with rule-based algorithms have been developed to help detect and diagnose arrhythmia. However, these programs are not reliable for use by practitioners because of their low judgment accuracy. There have been attempts to solve this problem by utilizing various machine learning techniques. However, the performance of these techniques is insufficient for practical use. Recently developed models based on deep learning have shown higher accuracy compared to even

Classifier model

We developed an ECG classification model using the DenseNet architecture. As DenseNet has a skip-connection structure, the information entered into the model can be passed to the end without loss. In addition, even when performing the back-propagation operation, the operation at the end of the model is transmitted to the front part without the gradient vanishing problem, unlike the other models. This model shows excellent performance by mitigating the problems of gradient vanishing. We found

Dataset

The data used in this study were the ECGs of approximately 52,000 patients collected from university hospitals in South Korea. The ECG data were obtained and labeled by Cardiologist of the university hospitals. ECGs are measured by attaching electrodes to various parts of the body, and various types of ECGs can be obtained according to the positions of the electrodes. Lead II ECG data collected from the university hospitals were used. The data consisted of 12 categories: normal (sinus), atrial

Training & evaluation metrics

For model training and verification, 20% of 52,043 data samples were separated into test data; further, 80% of the remaining samples were used as training data and 20% as verification data. Therefore, 64% of the total data were used as the training data, 16% as the verification data, and the remaining 20% as the test data. The number of training, verification, and test data samples was 33,308, 8,327, and 10,408, respectively. Each data sample was randomly selected. For a fair model comparison,

Comparison of classification performance

Table 3 compares the performance of each classification model for test data. The actual classification of test data for each model can be found in the confusion matrix in Table 4. In Table 3, AlexNet for ECG [23] had a relatively low accuracy (Eq. (3)) value, while all other models had a high accuracy of 0.98 or higher and did not show much difference. The sensitivity (Eq. (2)) of Table 3 is the result of how abnormal the abnormalities of the arrhythmia were classified and is a particularly

Conclusion and discussion

ECG data were used to generate a high-performance model for determining the presence of heart arrhythmia. In the medical field, when diagnosing mistakes are made, the severity and cost required to rectify these mistakes are high [2]. In order to solve this problem, we collected about 52,000 ECG data from university hospitals in Korea and created a model to classify the ECG. The proposed model is highly accurate, and it may contribute to reducing the risk of decision making [3]. This study used

CRediT authorship contribution statement

Jin-Kook Kim: Conceptualization, Investigation, Methodology, Writing - original draft. Sunghoon Jung: Conceptualization. Jinwon Park: Visualization. Sung Won Han: Conceptualization, Supervision.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

This work was supported by Korea University Grant (K1915041, K1920081). This research was also supported by National Research Foundation of Korea (NRF-2019R1F1A1060250).

References (23)

  • A. Holzinger, C. Biemann, C.S. Pattichis, D.B. Kell, What do we need to build explainable AI systems for the medical...
  • Cited by (22)

    • A deep learning refinement strategy based on efficient channel attention for atrial fibrillation and atrial flutter signals identification

      2022, Applied Soft Computing
      Citation Excerpt :

      Arrhythmia is currently considered as an essential group of cardiovascular diseases, which has endangered human health and received considerable attention [1]. Clinically, atrial fibrillation (AF) and atrial flutter (AFL) are the most frequent arrhythmias with an estimated prevalence of 1.5% to 2% and 0.09% in the individual worldwide [2–5]. More than half of AFL patients often have AF, both have similar physiological features and are also closely associated with various cardiovascular diseases such as stroke and myocardial infarction [6,7].

    • A novel myocardial infarction localization method using multi-branch DenseNet and spatial matching-based active semi-supervised learning

      2022, Information Sciences
      Citation Excerpt :

      The proposed multi-branch densely connected convolutional network (MB-DenseNet) can automatically extract ECG heartbeat features from different leads. Although there are several deep network architectures, we apply DenseNet to the multi-branch architecture since its efficiency in detection and recognition of features has been shown in different recent works [12,27–29]. Moreover, to solve the individual differences, we propose a novel active semi-supervised learning (ASSL) strategy to update the model.

    View all citing articles on Scopus
    View full text