Using Deep Learning to Classify Arrhythmias

AI Artificial intelligence machine learning
A growing body of research highlights the potential value of deep learning-based CIE.

Efforts to automate the analysis of electrocardiograms (ECGs) date back to the 1950s when researchers first converted ECG signals from analog to digital form, enabling the subsequent creation of algorithms that could be used in computer-interpreted ECG (CIE).1,2 With continued technological advances, the use of CIE has become so common that more than 100 million ECGS are interpreted by computer each year in the United States.2

However, conventional CIE models require over-reading by a physician, and despite these checks, certain ECG features may be missed. A growing body of research highlights the potential value of deep learning-based CIE, which could detect features that may be overlooked or undetectable by a physician reader.3,4

“Deep learning is a subfield of machine learning which tends to solve a problem end to end to eliminate the need for domain expertise and to fully explore ECG features from raw ECG data,” according to an article co-authored by Shijie Zhou, PhD, assistant research scientist in the department of biomedical engineering and the Alliance for Cardiovascular Diagnostic and Treatment Innovation (ADVANCE) Institute at Johns Hopkins University in Baltimore.5 “Deep-learning models use neural networks to capture only the most important features from the input data and disregard redundant input features by means of network pruningto maintain model accuracy.”

Following a range of studies showing promise for the classification of arrhythmias using deep-learning algorithms based on single-lead ECG data, researchers are exploring the use of such models trained with input from 12-lead ECGs.4,6 In a study published in January 2021 in the Canadian Journal of Cardiology, investigators examined the accuracy of a deep learning-based CIE model in classifying cardiac arrhythmias using 12-lead ECG data.6

Researchers used a long short-term memory (LSTM) model to classify 12 common heart rhythms based on 65,932 digital 12-lead ECG signals obtained from 38,899 patients. The criterion standard was based on annotations agreed upon by consensus between 3 board-certified electrophysiologists.

The LSTM model had an accuracy ≥ 0.982 (range, 0.982-1.0) for classifying the 12 heart rhythms, with an area under the receiver operating characteristic curve ≥ 0.987 (range, 0.987-1.0). The precision of the model ranged from 0.692 to 1, and recall ranged from 0.625 to 1, with an F1 score ≥ 0.777 (range, 0.777-1.0).

In addition, the model showed superior interpretive accuracy compared with that of internists (0.55), emergency physicians (0.73), and cardiologists (0.83). The LSTM model was also found to have higher accuracy in classifying heart rhythms compared with the LSTM model developed by Mostayed et al.5 Taken together, these findings support the feasibility and effectiveness of the LSTM model for heart rhythm classification based on 12-lead ECG data.6

Among several potential limitations of using 12-lead ECG input, this approach may result in overfitting “because it could increase the capacity of a deep-learning model to memorize the training data as well as increase model complexity unnecessarily,” wrote Zhou et al.5 “This approach could result in better generalization if it could learn an optimal ECG-lead subset from the 12-lead ECGs that focuses on the relevant features in the training data.”

Additionally, while CIE based on conventional machine-learning has consistently demonstrated greater accuracy than cardiologists in the interpretation of some common conditions, arrhythmias represent one of the top diagnostic categories associated with interpretation errors in CIE models. As deep learning-based models continue to evolve, they may ultimately facilitate more effective protocols in ECG analysis in which CIE could “filter out or interpret most common heart rhythms, and then domain experts could focus on interpreting the remaining complex arrhythmias, increasing diagnostic efficiency,” Zhou et al concluded.5

We checked in with Dr Zhou to learn more about advances in deep learning approaches for arrhythmia analysis.

What is the current state of deep learning-based CIE for the detection and classification of arrhythmias, and what are some of the most recent developments in this area?

While developments in recent years have made deep learning-based CIE increasingly attractive, its use in clinical settings remains in its infancy.

Deep learning-based CIE for the detection and classification of arrhythmias has been well-developed with respect to algorithm performance. Additionally, this technology has enabled ECG to be applied in healthcare scenarios for various purposes. For example, deep learning has enabled mortality prediction, detecting hypoglycemic events in healthy individuals, and predicting the need for urgent revascularization.7-9 We could gain more value from deep learning-based CIE by applying it to new scenarios.

What are the potential benefits and drawbacks of this approach?

One major benefit is that this approach provides an end-to-end solution, avoiding the main difficulty – extracting ECG morphological features to delineate ECG signals. Another benefit is its ability to utilize big data.

One major drawback is the low explainability of deep learning because of its “black box” nature. [Editor’s note: As Zhou and his co-authors explained in their paper, this means it is unclear how the input variables interact to produce a particular rhythm classification. “It would be useful to turn the black box into a glass box, where an input is entered and an output is delivered with clearer insight into the reasoning process to clearly reveal the relative contribution of specific features to the predictive algorithm,” they noted.5]

What are some of the remaining challenges and needs in this area?

One challenging part is how to make the deep learning model transparent. I think clinicians should be required to understand a deep learning-based model because they need to be able to explain its analysis to patients.

An important need is to connect all available databases in the word to create a larger standardized database for ECG.

How long will it likely be until this approach can be routinely used in clinical practice?

I previously thought it would be a long journey to the clinical application of this technology, but the Food and Drug Administration recently issued the “Artificial Intelligence and Machine Learning (AI/ML) Software as a Medical Device Action Plan,” which could accelerate its progress for use in clinical practice.10


  1. Taback L, Marden E, Mason HL, Pipberger HV. Digital recording of electrocardiographic data for analysis by a digital computer. IRE Transactions on Medical Electronics. 1959;ME-6(3):167-171. doi:10.1109/IRET-ME.1959.5007946
  2. Smulyan H. The computerized ECG: friend and foe. Am J Med. 2019;132(2):153-160. doi:10.1016/j.amjmed.2018.08.025
  3. Siontis KC, Yao X, Pirruccello JP, Philippakis AA, Noseworthy PA. How will machine learning inform the clinical care of atrial fibrillation? Circ Res. 2020;127(1):155-169. doi:10.1161/CIRCRESAHA.120.316401
  4. Hannun AY, Rajpurkar P, Haghpanahi M, et al. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nat Med. 2019;25(1):65-69. doi:10.1038/s41591-018-0268-3
  5. Zhou S, Sapp JL, AbdelWahab A, Trayanova N. Deep learning applied to electrocardiogram interpretation. Can J Cardiol. 2021;37(1):17-18. doi:10.1016/j.cjca.2020.03.035
  6. Chang KC, Hsieh PH, Wu MY, et al. Usefulness of machine learning-based detection and classification of cardiac arrhythmias with 12-lead electrocardiograms. Can J Cardiol. 2021;37(1):94-104. doi:10.1016/j.cjca.2020.02.096
  7. Raghunath S, Ulloa Cerna AE, Jing L, et al. Prediction of mortality from 12-lead electrocardiogram voltage data using a deep neural network. Nat Med. 2020;26(6):886-891. doi:10.1038/s41591-020-0870-z
  8. Porumb M, Stranges S, Pescapè A, Pecchia L. Precision medicine and artificial intelligence: a pilot study on deep learning for hypoglycemic events detection based on ECG. Sci Rep. 2020;10(1):170. doi:10.1038/s41598-019-56927-5
  9. Goto S, Kimura M, Katsumata Y, et al. Artificial intelligence to predict needs for urgent revascularization from 12-leads electrocardiography in emergency patientsPLoS One. 2019;14(1):e0210103. doi:10.1371/journal.pone.0210103
  10. US Food and Drug Administration. Artificial intelligence and machine learning in software as a medical device. Accessed on February 3, 2021.