Advance Prediction of Ventricular Tachyarrhythmias using Patient Metadata and Multi-Task Networks

11/30/2018 ∙ by Marek Rei, et al. ∙ University of Cambridge Transformative AI Limited 20

We describe a novel neural network architecture for the prediction of ventricular tachyarrhythmias. The model receives input features that capture the change in RR intervals and ectopic beats, along with features based on heart rate variability and frequency analysis. Patient age is also included as a trainable embedding, while the whole network is optimized with multi-task objectives. Each of these modifications provides a consistent improvement to the model performance, achieving 74.02 specificity 60 seconds in advance of the episode.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Numerous patients suffer in-hospital cardiac arrest each year, estimated at 209,000 people in the United States alone, of whom only one-in-four survive

merchant2011incidence ; heartstatistics . Cardiac arrest occurs when the heart ceases to pump blood to the brain and other vital organs. 20.7% of cardiac arrests in hospitalized patients occur due to ventricular fibrillation (VF) or pulseless ventricular tachycardia (VT), collectively referred to as ventricular tachyarrhythmia (VTA), as opposed to asystole or pulseless electrical activity girotra2012trends . Both VT and VF are deadly cardiac rhythms that must be corrected for the patient to survive. In ventricular tachycardia, the ventricles beat so quickly that the heart is not able to effectively fill its chambers and pump blood to the body. In ventricular fibrillation, the ventricles quiver, rather than pump, requiring abortive treatment. If either condition is sustained, the brain dies from the lack of blood flow and oxygen deprivation. In both cases, high-quality CPR can temporarily sustain blood flow to the brain while an electric shock and medications are administered in an attempt to restart a viable cardiac rhythm.

Patients in critical care units, operating rooms, and telemetry-enabled medical wards undergo continuous ECG monitoring. We hypothesize that a predictive monitoring system utilizing an accurate VTA prediction algorithm could analyze this signal and alert healthcare providers when a patient is at imminent risk of developing a ventricular tachyarrhythmia, improving survival by decreasing the time between onset of VTA and initiation of CPR and other treatments. This hypothesis is consistent with research showing that early defibrillation within the first 2 minutes following in-hospital sudden cardiac arrest is strongly associated with improved survival-to-hospital-discharge, compared to patients in whom defibrillation is delayed chan2008delayed . Prevention of sudden cardiac arrest could also be achieved for patients in the pre-ventricular tachyarrhythmia state, as identified by the algorithm, when healthcare providers treat reversible triggers of ventricular arrhythmias gettes1992electrolyte ; wyse2001life .

In this work, we construct a neural architecture for VTA prediction and investigate novel features based on heart rate variability, combined with patient-level metadata and multi-task network optimization. Previous research has largely focused on using ECG signals to detect various cardiac arrhythmias as soon as they occur artis1991detection ; fokkenrood2007ventricular

. The latest work in the area uses deep convolutional neural networks for classifying arrhythmias, achieving performance comparable to human cardiologists

Rajpurkar2017 . The prediction, as opposed to detection, of ventricular tachyarrhythmias has also been investigated. Joo et al. joo2012prediction describe a neural network for predicting VTA 10 seconds in advance, based on heart rate variability features, evaluating on the PhysioNet MVTDB goldberger2000physiobank dataset. Murukesan et al. Murukesan2014 explored the task of predicting sudden cardiac arrest based on heart rate variability and identified 7 useful features. Martinez-Alanis et al. Martinez-Alanis2016 investigated the predictive power of premature ventricular complexes with respect to ventricular tachyarrhythmias. Lee et al. lee2016prediction describe a system for predicting potentially fatal ventricular tachycardias up to an hour in advance. However, their best configuration relies on respiratory features, which can be difficult to obtain, and evaluation is performed only on a private dataset.

Figure 1: Examples of RR interval sequences in the dataset. A control sample (left) and an episode ending in VTA (right). The dashed line indicates the 60 second boundary; for the prediction task the model does not have access to the signal to the right of this boundary. The red and blue areas indicate the consecutive areas used for calculating the windowed feature values.

2 VTA Prediction Model

The VTA prediction system receives a sequence of RR intervals111The time between two consecutive peaks of the QRS complex in an ECG is called the RR interval. as input and learns to predict whether the monitored patient will experience a ventricular tachyarrhythmia 60 seconds after the end of the available sequence. RR intervals are commonly represented through a collection of metrics based on heart rate variability analysis. Previous work joo2012prediction ; lee2016prediction has identified 11 features for this purpose, including metrics from the time domain, the frequency domain and from nonlinear analysis. From this set, we choose to include three features: 1) the mean of RR intervals, 2) signal power in the low frequency range (0.04–0.15 Hz) and 3) signal power in the high frequency range (0.15–0.4 Hz). While previous work calculated these features across a 5-minute window, we instead use the values calculated only over the last 30 beats before the decision boundary. This gives the model information about the most recent heart rate without mixing in information from a larger time period. We also include the minimum and maximum RR interval values over the most recent 30 beats. Following previous work, ectopic beats were removed before caculating these features.

In addition, the model uses novel features based on shifting windows and patient metadata, which we describe in Sections 2.1 and 2.2. The final features are range-standardized and given as input to a multi-layer neural network. The architecture has 3 hidden layers with tanh

activation, containing 150, 100 and 10 neurons. The top of the network has a softmax layer and the model is trained to predict VTA by minimizing cross entropy. Optimization is performed using AdaDelta

Zeiler2012 with the default learning rate . Gradients are clipped to

and training is performed for 1,000 epochs – we found that clipping to a very low value but training for a longer period helped the model converge to a more stable solution. Dropout


was applied to the input layer and all hidden layers during training with 75% probability of keeping the value. The final network, including additional features and multi-task outputs, can be seen in Figure


Figure 2: Neural network architecture for VTA prediction. The architecture takes a set of features and an embedding for the patient as input, shares a hidden layer, and predicts the VTA along with NYHAC and BMI.

2.1 Windowed Features

While the previous features describe the sequence of RR intervals, they do not capture the change or directionality in those statistics. Therefore, we calculate additional feature values across two consecutive windows and use their difference as a new feature for the model, which allows the network to obtain information about the speed and direction in which the values are changing. The model includes two windowed features, representing the change in mean RR intervals and the number of ectopic beats. These are calculated over the last 250 heartbeats before the decision boundary, with the split in the middle. For example, the ectopic beats are counted over the most recent 0 to 124 beats, and again over 125 to 250 beats, with the difference between the two values added as a new feature. Figure 1 illustrates the decision boundary along with the two consecutive windows that are used for calculating these features. As can be seen, the examples of non-tachyarrhythmic recordings (Fig. 1, left) also contain ectopic beats, which makes the task and dataset very challenging. However, the relative increase in ectopic beats is higher for the tachyarrhythmic example (Fig. 1, right).

2.2 Patient Age Embedding

Previous work has only focused on capturing information directly from the recorded RR intervals or other sensors. However, prior knowledge about the patient can also help the algorithm make more accurate and personalized decisions. In this model, we experiment with one patient-level input feature – their age. Particularly, we encode their year of birth and round it to the nearest decade. Each decade is assigned to a trainable embedding of length 10, which is initialized randomly and updated during optimization – we found that this representation gave the model more flexibility and also helped manage instances where the patient birth year was unknown. The correct embedding for each patient is concatenated to the list of other features and used as input to the network. The embeddings are continuously updated during training; during testing, the fixed pre-trained embedding values are used. While it is likely that patient age also correlates with the general probability of experiencing arrhythmias, in this case the model is using the feature for more intricate information – since the positive and negative examples for each age group are balanced, the benefit in performance comes from the model using the age information to better condition the analysis of the other features.

2.3 Multi-Task Optimization

The regular network is only optimized with cross entropy for predicting the correct final label – whether the patient will experience tachyarrhythmia or not. In order to help the model learn better feature detectors in the hidden layers, we can simultaneously optimize it for additional related tasks. While the input layer and the first hidden layer are shared between all objectives, the upper part of the network branches off into three different prediction tasks. In addition to the main label, we train the network to also predict:

  1. The New York Health Association Class (NYHAC), which indicates the severity of a patient’s functional impairment from congestive heart failure, ranging from class I-IV heartfailureclasses .

  2. The Body Mass Index (BMI) of the patient, quantifying the amount of tissue mass and indicating the level of obesity.

While these patent-level values are available in the PhysioNet MVTDB dataset, they might not be available in a practical setting – measuring the patient’s BMI or assigning an NYHAC diagnosis is not always a priority in a critical care setting. By including them as additional objectives, the system uses the labels only during training and at test-time these values are not required. The performance improvement comes from jointly training the feature detectors in the first layer, along with the age embeddings, regularizing the network towards more robust internal representations.

3 Experiments

Experiments were performed on the PhysioNet MVTDB dataset goldberger2000physiobank

, collected from the records of 78 patients with ICDs (63 male and 15 female, aged 20.7 – 75.3). The data contains 106 pre-VT records, 29 pre-VF records, and 126 control records, with 1024 RR intervals in each sequence prior to the corresponding event. Previous work on VTA prediction has reported results using one third of the examples for testing and the rest for training. Since the dataset is relatively small and represents a low-resource scenario, this leaves very few examples for properly training the neural models and reporting reliable test results. Instead, we perform 10-fold cross-validation with stratified sampling over the dataset, which allows all of the datapoints to be used for training and evaluation. We also run each experiment 10 times with different random seeds and report the averaged results in this paper, in order to reduce the effect of possible outliers due to randomized initialization of the network weights.

Table 1 shows results of the different system configurations on the MVTDB dataset, predicting ventricular tachyarrhythmias 60 seconds in advance. The baseline model is a general multilayer network, using the 11 features chosen in previous work joo2012prediction . This model achieves 62% accuracy, which is lower than the previously reported 75% – this is expected, as the prediction time is now extended to 60 seconds instead of 10 seconds ahead of the episode. The next configuration changes the input features to the ones described in Sections 2 and 2.1

, introducing the window-based features and improving performance between 5-15% across all metrics. Some of the features used in previous work have relatively low predictive power for this task and replacing them with metrics that can better capture the trend in the RR sequence proves to be very useful. Next, including the age embedding into the model provides another consistent improvement on all evaluation metrics. By using patient-level metadata, the model is able to make more presonalized decisions about the other features, indicating that the integration of more patient-specific features could be a promising direction for similar models. Finally, training the model in a multi-task setting provides another further improvement on most metrics. By optimizing the network to predict different information about the patient, the system is motivated to learn more robust internal representations, which can be otherwise difficult to achieve with small datasets. The labels for NYHA Class and BMI value for the patient are not required during testing, therefore allowing the network to receive the benefit without any additional restrictions in practical applications.

Accuracy Sensitivity Specificity Precision AUC
Baseline 62.26 63.19 61.27 63.60 68.55
+ windowed features 71.03 68.07 74.21 73.88 78.52
+ age embedding 73.52 70.07 77.22 76.74 79.65
+ multi-task optimization 74.02 71.04 77.22 76.99 78.77
Table 1: System evaluation on the PhysioNet MVTDB dataset.

4 Conclusion

We described a novel neural network architecture for the prediction of ventricular tachyarrhythmias. The model receives as input features that capture the direction and magnitude of the change in RR intervals and ectopic beats, along with several features based on heart rate variability and frequency analysis. Patient age is also included in the architecture as a trainable embedding, while the whole network is trained with multi-task optimization. Each of these modifications provides a consistent improvement, achieving 74.02% prediction accuracy and 77.22% specificity 60 seconds in advance of the episode. The model described in this paper could potentially be a useful component in a predictive monitoring system for improving the survival of patients at risk of imminent VTA.


  • [1] Raina M Merchant, Lin Yang, Lance B Becker, Robert A Berg, Vinay Nadkarni, Graham Nichol, Brendan G Carr, Nandita Mitra, Steven M Bradley, Benjamin S Abella, et al. Incidence of treated cardiac arrest in hospitalized patients in the united states. Critical care medicine, 39(11):2401, 2011.
  • [2] The American Heart Association. Heart disease and stroke statistics.,L,NC%5D, 2016. [Accessed 27-October-2018].
  • [3] Saket Girotra, Brahmajee K Nallamothu, John A Spertus, Yan Li, Harlan M Krumholz, and Paul S Chan. Trends in survival after in-hospital cardiac arrest. New England Journal of Medicine, 367(20):1912–1920, 2012.
  • [4] Paul S Chan, Harlan M Krumholz, Graham Nichol, Brahmajee K Nallamothu, and American Heart Association National Registry of Cardiopulmonary Resuscitation Investigators. Delayed time to defibrillation after in-hospital cardiac arrest. New England Journal of Medicine, 358(1):9–17, 2008.
  • [5] Leonard S Gettes. Electrolyte abnormalities underlying lethal and ventricular arrhythmias. Circulation, 85(1 Suppl):I70–6, 1992.
  • [6] D George Wyse, Peter L Friedman, Michael A Brodsky, Karen J Beckman, Mark D Carlson, Anne B Curtis, Alfred P Hallstrom, Merritt H Raitt, Bruce L Wilkoff, H Leon Greene, et al. Life-threatening ventricular arrhythmias due to transient or correctable causes: high risk for death in follow-up. Journal of the American College of Cardiology, 38(6):1718–1724, 2001.
  • [7] Shane G Artis, RG Mark, and GB Moody. Detection of atrial fibrillation using artificial neural networks. In Computers in Cardiology 1991, Proceedings., pages 173–176. IEEE, 1991.
  • [8] Steven Fokkenrood, Peter Leijdekkers, and Valerie Gay. Ventricular tachycardia/fibrillation detection algorithm for 24/7 personal wireless heart monitoring. In International Conference on Smart Homes and Health Telematics, pages 110–120. Springer, 2007.
  • [9] Pranav Rajpurkar, Awni Y. Hannun, Masoumeh Haghpanahi, Codie Bourn, and Andrew Y. Ng. Cardiologist-Level Arrhythmia Detection with Convolutional Neural Networks. 2017.
  • [10] Segyeong Joo, Kee-Joon Choi, and Soo-Jin Huh. Prediction of spontaneous ventricular tachyarrhythmia by an artificial neural network using parameters gleaned from short-term heart rate variability. Expert Systems with Applications, 39(3):3862–3866, 2012.
  • [11] Ary L Goldberger, Luis AN Amaral, Leon Glass, Jeffrey M Hausdorff, Plamen Ch Ivanov, Roger G Mark, Joseph E Mietus, George B Moody, Chung-Kang Peng, and H Eugene Stanley. Physiobank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals. Circulation, 101(23):e215–e220, 2000.
  • [12] L. Murukesan, M. Murugappan, M. Iqbal, and K. Saravanan. Machine Learning Approach for Sudden Cardiac Arrest Prediction Based on Optimal Heart Rate Variability Features. Journal of Medical Imaging and Health Informatics, 4(4):521–532, 2014.
  • [13] Marisol Martinez-Alanis, Silvia Ruiz-Velasco, and Claudia Lerma. Quantitative analysis of ventricular ectopic beats in short-term RR interval recordings to predict imminent ventricular tachyarrhythmia. International Journal of Cardiology, 2016.
  • [14] Hyojeong Lee, Soo-Yong Shin, Myeongsook Seo, Gi-Byoung Nam, and Segyeong Joo. Prediction of ventricular tachycardia one hour before occurrence using artificial neural networks. Scientific Reports, 6:32390, 2016.
  • [15] Matthew D. Zeiler. ADADELTA: An Adaptive Learning Rate Method. arXiv preprint arXiv:1212.5701, 2012.
  • [16] Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout : A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research (JMLR), 15, 2014.
  • [17] The American Heart Association. Classes of heart failure., 2017. [Accessed 27-October-2018].