Abstract
Background
Serial electrocardiography aims to contribute to electrocardiogram (ECG) diagnosis by comparing the ECG under consideration with a previously made ECG in the same individual. Here, we present a novel algorithm to construct dedicated deep-learning neural networks (NNs) that are specialized in detecting newly emerging or aggravating existing cardiac pathology in serial ECGs.
Methods
We developed a novel deep-learning method for serial ECG analysis and tested its performance in detection of heart failure in post-infarction patients, and in the detection of ischemia in patients who underwent elective percutaneous coronary intervention. Core of the method is the repeated structuring and learning procedure that, when fed with 13 serial ECG difference features (intra-individual differences in: QRS duration; QT interval; QRS maximum; T-wave maximum; QRS integral; T-wave integral; QRS complexity; T-wave complexity; ventricular gradient; QRS-T spatial angle; heart rate; J-point amplitude; and T-wave symmetry), dynamically creates a NN of at most three hidden layers. An optimization process reduces the possibility of obtaining an inefficient NN due to adverse initialization.
Results
Application of our method to the two clinical ECG databases yielded 3-layer NN architectures, both showing high testing performances (areas under the receiver operating curves were 84% and 83%, respectively).
Conclusions
Our method was successful in two different clinical serial ECG applications. Further studies will investigate if other problem-specific NNs can successfully be constructed, and even if it will be possible to construct a universal NN to detect any pathologic ECG change.
Electronic supplementary material
The online version of this article (10.1186/s12938-019-0630-9) contains supplementary material, which is available to authorized users.
Keywords: Serial electrocardiography, Vectorcardiography, Deep learning, Neural networks, Constructive algorithm
Background
The standard 10-s 12-lead electrocardiogram (ECG) is a diagnostic cornerstone of medicine. Serial electrocardiography is defined as the comparison of a newly made ECG with a previously made one, to look for possible changes. These changes are either used to detect new pathology or to verify the efficacy of a specific therapy or intervention. Serial ECG comparison is common clinical practice; usually, clinicians do this by visual assessment of the differences between two ECGs. Time distance between the two ECGs depends on their availability. Sometimes, serial ECGs are made in the setting of certain protocols (clinical research or check-up), other without any specific objective to perform a serial electrocardiographic analysis. An example of two serial ECGs is depicted in Fig. 1, that represents two standard 10-s 12-lead ECGs of a patient, made at baseline (panel a) and during follow-up (panel b). The two ECGs show impressive differences that clearly highlight the aggravation of the patient’s clinical condition (additional details on this case are provided in the "Results" section of this paper). Although visual comparison of two ECGs is normally performed by cardiologists in order to evaluate the aggravation of a cardiac pathology, studies reporting systematic application of approaches specifically developed for serial ECG analysis are still quite sporadic. To our knowledge, systematic serial ECG analysis has been previously applied to reveal pulmonary valve dysfunction in Fallot patients [1, 2] and to support the diagnosis of patients with suspected acute coronary syndrome [3].
As described before, serial electrocardiography aims at demonstrating a change in the clinical cardiac status of the patient. However, besides a clinical change, intra-subject ECG differences may also have a physiological or technical origin. Indeed, the ECG of a person changes with blood pressure, mental stress, body position, respiration rate, age and weight; additionally, irreproducible electrode positioning, specifically of the six precordial electrodes, is a major source of ECG variability. Together, ECG changes due to both physiological and technical causes constitute the “noise” of serial electrocardiography [4], whereas clinically relevant ECG changes represent the “data of interest”, the detection and the interpretation of which are limited by the signal-to-noise ratio, no matter whether serial ECG analysis is done by visual inspection or by computer analysis.
Some current commercial programs for automated computerized ECG analysis support serial electrocardiography interpretation. For example, the Glasgow program [5] compares an ECG with the previous ECG of the same patient when present in its database and produces a statement whether relevant changes occurred. Performance of this and other algorithms for serial ECG analysis have never been scrutinized. Automated serial ECG analysis has not reached the level of sophistication and validated performance that the algorithms for automated analysis of single ECG have achieved. Additionally, current algorithms for serial ECG analysis are rule-based and rigid. Typically based on threshold definitions, they consider only changes over threshold of a single feature, without considering single feature variations in time or the relative variations of several features for the identification of emerging or aggravating cardiac pathology. Because at present little can be said about which ECG changes are relevant in a specific clinical setting, a more flexible algorithm with learning abilities is needed.
Recently, several studies have demonstrated the potentiality of using machine learning for the prediction of cardiac pathology [6–10]. Aim of the present work is to present a novel approach that merges deep-learning classification methodology with serial electrocardiography. One important issue nowadays investigated in deep-learning is the design of algorithms for automated neural networks (NNs) construction [11, 12]. Our approach generates problem-specific NNs to diagnose newly emerging or aggravating cardiac pathology. We validated this approach by establishing its performance in the detection of newly emerging heart failure in post-infarction patients and acute ischemia in patients with a sudden short-lasting complete coronary occlusion. In order to confirm the superiority of flexible over rigid algorithms with learning ability, we analyzed the same populations with standard logistic regression, and compared the results obtained with our specifically-developed NN against those obtained by application of the logistic regression.
Methods
Method to construct a deep-learning neural network for serial electrocardiography
Feature selection
We compared two digital standard 10-s 12-lead resting ECGs of each patient: an initial baseline ECG (BLECG) and a follow-up ECG (FUECG). Each 12-lead ECG was converted into a vectorcardiogram (VCG), a coherently averaged beat was computed, after which 13 VCG features were computed that together represent the major cardiac electrical properties: QRS duration, QT interval, QRS maximum amplitude, T-wave maximum amplitude, QRS-integral vector magnitude, T-wave integral vector magnitude, QRS complexity, T-wave complexity, ventricular gradient vector, QRS-T spatial angle, heart rate, J-point vector and T-wave symmetry (computed as the ratio of the area between T-wave apex and end to the area between the J point and T-wave end) [13–15].
The VCG features are based on electrophysiological considerations: QRS duration is linked to intraventricular conduction; the QT interval is linked to intraventricular conduction and action potential duration; the maximum QRS amplitude is linked to ventricular mass; the maximum T-wave amplitude is sensitive to, e.g. ischemia and electrolyte abnormalities; the QRS and T-wave integrals are indexes of depolarization and repolarization dispersion, respectively; the QRS- and T-wave complexity measure the depolarization and repolarization processes complexity, respectively; the ventricular gradient measures heterogeneity of the action potential morphology distribution; the QRS-T spatial angle characterizes ECG concordance/discordance; heart rate partly expresses autonomic nervous system activity; and the J-point amplitude and T-wave symmetry also alter with ventricular ischemia. Together these VCG features cover that much aspects of electrical heart function that is difficult to imagine that electrical heart function could change without manifesting itself in a change in one or more of the 13 VCG features. Consequently, by subtracting the 13 BLECG VCG features from the corresponding 13 FUECG VCG features, the 13 difference features listed in Table 1 were obtained.
Table 1.
#Feature | Abbreviation | Units | Description |
---|---|---|---|
1 | ms | QRS-duration difference | |
2 | ms | QT-interval difference | |
3 | μV | Difference in maximal QRS-vector magnitude | |
4 | μV | Difference in maximal T-vector magnitude | |
5 | mV·ms | QRS-integral vector magnitude difference | |
6 | mV·ms | T-integral vector magnitude difference | |
7 | % | QRS-complexity difference | |
8 | % | T-wave complexity difference | |
9 | mV·ms | Magnitude of the ventricular-gradient difference vector | |
10 | ° | Magnitude of the QRS-T spatial-angle difference | |
11 | bpm | Heart-rate difference | |
12 | μV | Magnitude of J-vector difference vector | |
13 | % | T-wave symmetry difference |
These 13 features are obtained from the subtraction of the 13 VCG features computed using the BLECG from the corresponding 13 VCG features computed using the FUECG
The difference features were chosen in such a way that, in variables where pseudo-normalization can occur (ventricular gradient, QRS-T spatial angle, J vector), the absolute value of the difference is considered [16]. All 13 difference features as defined above serve as input of our novel deep-learning classification method described below.
Repeated structuring and learning procedure for neural-network construction
To discriminate patients with altered clinical status from stable patients by serial ECG analysis, we developed a new method that automatically constructs NNs with a problem-specific architecture. For the purpose of learning and testing, we used ECG databases of patients with known clinically stable status, denominated controls, plus patients with a known pathological development during follow-up, denominated cases. Details about the ECG databases are described later in the "Methods" section. Databases were equally randomly divided into learning and testing datasets, containing data of both controls and cases. The learning datasets were further divided into a training dataset (in this study, 80% of the learning dataset) and a validation dataset (in this study, 20% of the learning dataset).
Our deep-learning classification algorithm consists of a supervised NN with 13 inputs (one for each difference feature) and 1 output. Output values range from 0 to 1, with 0 representing a control classification and 1 a case classification. Intermediate values indicate an uncertain classification, to be further processed using a case/control decision threshold. The NN consists of neurons with weights and biases between − 1 and + 1 and sigmoid activation functions. Its architecture is dynamically formed using the new repeated structuring and learning procedure (RS&LP), that we developed in order to handle this specific type of classification problems and that we describe here for the first time. The algorithm starts from an initial configuration of one hidden layer with 1 neuron (the minimal number of neurons per layer), which is initialized with random weights and bias. The maximal number of hidden layers is set at 3, while no maximal number of neurons per layer is set. The NN architecture is notated as horizontal vector in which the number of elements represents the number of layers, and the numerical value in each element represents the number of neurons in the corresponding layer.
Conventionally, for a given NN architecture, the learning algorithm adjusts neuron weights and biases according to the scaled-conjugate-gradients algorithm [17], to optimize the training set classification by minimizing a training-error function, computed as the normalized sum of the squared differences between estimated outputs and true classification values. Similarly, a validation-error function is computed for the validation dataset; it is expected to decrease monotonously during learning. In our learning algorithm, both the training-error and validation-error functions contain weights to compensate for the disproportion between the number of cases and controls [18]; in our algorithm, we assigned the inverse of the prevalence of the cases and controls in the dataset as their weights. The learning phase ends when the validation-error function starts to increase [19].
This conventional learning algorithm is integrated in our RS&LP, a supervised procedure that we designed to build a NN by alternating phases of structuring with phases of learning (Fig. 2). The RS&LP assumes that each new architecture contains the previous architecture plus one new neuron, and recursively applies the following 3 steps:
Step1: determination of all possible new architectures;
Step2: initialization of new neurons and learning of possible new architectures;
Step3: selection of the new NN.
After Step3 is concluded, the procedure starts again from Step1; it ends only when a stopping criterion (see below) is met.
Step1: Determination of the possible new architectures. In each structuring cycle (see Fig. 3), possible new architectures are strategically built by adding one neuron to the existing NN. This can be done either by adding the neuron to an existing hidden layer or by creating an additional hidden layer consisting of the new neuron with the following constraints:
The maximal number of hidden layers is three;
The number of neurons in a given hidden layer may not be larger than the number of neurons in the previous hidden layer.
Step2: Initialization of new neurons and learning of possible new architectures. All possible new architectures keep the weights and biases of the neurons of the existing NN; only the new neuron is initialized with random weights and bias. A possible new architecture is acceptable only if new neurons increase training performance (decrease training error) after one iteration. If not, it undergoes a new neuron initialization or is rejected after 500 initializations. All accepted possible new architectures undergo the conventional learning process, at the end of which their validation error is either larger than the validation error of the existing NN (failure) or smaller/equal (success). In case of failure, the possible new NN is either re-initialized (at most 10 times) or rejected. Might all possible new architectures be rejected, the existing NN is kept as the final one and the RS&LP is stopped (first stopping criterion).
Step3: selection of the new NN. In case of success of one or more of the possible new NNs generated in step 2, the one with the lowest validation error is upgraded and becomes the new existing NN. Once a new existing NN has been selected, the RS&LP starts anew or stops if no misclassifications occurred in either the training or the validation dataset (second stopping criterion). This stopping criterion was incorporated to prevent the loss of generalization through overfitting [19].
Neural-network optimization
If the RS&LP is run two times on the same learning dataset, the resulting NNs will be different due to the random neuron initialization. In our implementation, 100 alternative NNs are constructed. For each of the 100 alternative NNs, the receiver operating characteristic (ROC) is obtained by varying the case/control decision threshold on the learning dataset, and the area under the curve (AUC) is computed. Finally, the NN with the largest learning AUC is selected.
Clinical testing of neural network
We tested our RS&LP by constructing NNs for two different ECGs databases, a heart-failure database (HFDB) and an ischemia database (IDB).
The HFDB [16, 20] is composed of ECGs of patients who had experienced a myocardial infarction. An ECG, routinely made at least 6 months after the infarction and when the patients were clinically stable without any sign of heart failure, was selected as BLECG. Patients who remained stable were selected as controls, and a routinely made ECG recorded about 1 year after the BLECG was selected as FUECG. Patients who developed chronic heart failure were selected as cases; the ECG that was made when they presented themselves at the hospital for the first time with this newly arisen pathology was selected as FUECG. Overall, the HFDB contains 128 ECG pairs (47 cases and 81 controls). All ECGs were retrospectively selected from the digital ECG database of the Leiden University Medical Center. The HFDB was randomly equally split into a learning dataset (64 ECG pairs; 24 cases and 40 controls) and a testing dataset (65 ECG pairs; 24 cases and 41 controls). The learning dataset further split into a training dataset (54 ECG pairs; 20 cases and 34 controls) and a validation dataset (10 ECG pairs; 4 cases and 6 controls).
The IDB is composed of ECGs retrospectively selected from the digital ECG database of the Leiden University Medical Center (controls) and from the STAFF III ECG database [20–23] (cases). Control patients were outpatients of the cardiology department, selected on the availability of two digital ECG recordings made about one year apart (BLECG and FUECG, respectively). Cases had stable angina and underwent elective coronary angioplasty. In the STAFF III Study, balloon inflations, intended to widen the lumen of the stenotic vessel, were intentionally long, thus causing acute ischemia in the tissue distal from the occlusion. The BLECG and FUECG were taken immediately before and after 3 min of balloon occlusion, respectively. Overall, the IDB contains 482 ECG pairs (84 cases and 398 controls). For the purpose of our study, it was randomly equally split into a learning dataset (241 ECG pairs; 42 cases and 199 controls) and a testing dataset (241 ECG pairs; 42 cases and 199 controls). The learning dataset was further split into a training dataset (202 ECG pairs; 35 cases and 167 controls) and a validation dataset (39 ECG pairs; 7 cases and 32 controls).
All ECGs of both databases were analyzed by the Leiden ECG Analysis and Decomposition Software [13], that converts a 12-lead ECG into a VCG, computes the coherently averaged beat and determines QRS onset and offset (J point) and T-wave offset. Two independent ECG analysts reviewed the automatically-detected ECG landmarks and edited these when necessary. Using these landmarks, the 13 difference features were computed.
The present retrospective study on both HFDB and IDB is undertaken in compliance with the ethical principles of Helsinki Declaration and approved by the Leiden University Medical Center Medical Ethics Committee.
Comparison of neural network with other methods
The NNs computed with the RS&LP () are computed after a many learning steps, alternating with structuring steps. Usually, the standard method to train a NN () with a fixed structure is to apply only one single training phase, according with the learning algorithm. In order to compare the RS&LP with the fixed-structure NN learning method, we trained that had the same architecture as the final in the conventional way, initializing the parameters of the and applying the learning phase only one single time while using the same data division and learning algorithm (scaled-conjugate-gradients algorithm [17]).
In the absence of data from literature, in order to confirm superiority of flexible over rigid algorithms with learning ability in serial ECG analysis, we compared the performance of the final with that of a standard logistic regression (LR) [18, 19, 24–26]. LR for case/control classification was constructed using the HFDB and IDB learning datasets. Cases and controls were weighted inversely to their prevalence [18]. When fed with the 13 difference features, LR computes a discriminating function (an exponential combination of the difference features) the value of which represents the classification value ranging from 0 (representing a control patient) to 1 (representing a case patient). As for the construction of the NNs, the discriminating function of LR was computed with the learning dataset.
Statistics
The ECG and ROC feature distributions were described in terms of 50th [25th;75th] percentiles and compared using the Wilcoxon ranksum and DeLong’s tests [27]. , and LR performances were quantified from the ROC curves of the learning and testing datasets in terms of AUC, 95 confidence intervals (CI) and the diagnostic accuracies (ACC; computed at the point of equal sensitivity and specificity), computing the ROC curves of the testing datasets. Statistical significance was set at 0.05.
Implementation
Programming was done in Matlab R2017a (The MathWorks, Natick, MA, USA). The flow-chart of the RS&LP has been represented in Fig. 2, showing the conceptual sequence of decisions needed to reach the final NN. Moreover, in order to better describe all steps of the procedure, Fig. 4 depicts the pseudocode of its implementation (Fig. 4, left column) with associated explanatory comments (Fig. 4, right column).
Results
An example of two serial ECGs of a case patient from the HFDB is given in Fig. 1. The BLECG (panel a) of this patient was made six months after acute myocardial infarction. It has various pathological aspects, among which a long QRS duration (122 ms) and a negative T wave in various leads. Also the QRS-T spatial angle, which is the planar angle between the QRS- and T-wave axes, is pathological (144°) [28]. The FUECG (panel b) was made when the patient presented at the hospital for the first time with signs of heart failure. Also, this ECG is pathological and impressive differences with the BLECG can be seen; for example, the QRS width increased to 176 ms.
The quantitative characterization of the difference features distributions of both HFDB and IDB is reported in Table 2. The number of difference features that were statistically different between cases and controls was 9 in the HFDB (QRSdur, , , , , , , and ), and 8 in the IDB (QRSdur, , , , , , and ).
Table 2.
HFDB | IDB | |||||
---|---|---|---|---|---|---|
Total | Controls | Cases | Total | Controls | Cases | |
(N = 129) | (N = 81) | (N = 48) | (N = 482) | (N = 398) | (N = 84) | |
(ms) | 0.0 [− 4.0;8.0] |
0.0 [− 4.0;4.5] |
4.0* [− 4.0;17.0] |
0.0 [− 2.0;16.0] |
0.0 [− 4.0;4.0] |
8.0** [0.0;17.0] |
(ms) | 1.0 [− 13.3;20.3] |
− 1.0 [− 13.0;− 13.8] |
7.5 [− 15.5;34.0] |
2.0 [− 14.0;16.0] |
2.5 [− 14.0;15.0] |
0.0 [− 17.0;19.0] |
(μV) | − 26.0 [− 149.0;86.6] |
− 34.2 [− 144.9;57.3] |
− 11.9 [− 196.4;175.7] |
− 21.1 [− 131.3;79.8] |
− 12.1 [− 127.9;96.1] |
− 38.9* [− 144.0;16.0] |
(μV) | − 15.5 [− 65.7;39.7] |
− 4.6 [− 42.0;40.0] |
− 48.2* [− 133.9;33.2] |
− 9.5 [− 68.1;53.5] |
− 11.4 [− 68.0;45.4] |
3.0 [− 70.4;87.8] |
(mV·ms) | 0.4 [− 3.9;5.3] |
− 0.76 [− 3.9;3.0] |
3.5* [− 2.7;10.8] |
− 0.0 [− 2.9;3.4] |
− 0.3 [− 3.3;2.8] |
1.7*** [− 1.5;9.1] |
(mV·ms) | − 2.7 [− 13.3;7.1] |
0.0 [− 10.6;7.1] |
− 7.4 [− 19.2;8.1] |
− 0.6 [− 10.6;8.9] |
− 0.9 [− 10.7;7.5] |
6.6** [− 10.4;30.1] |
(%) | 0.3 [− 1.2;1.6] |
− 0.0 [− 1.2;1.0] |
1.3** [− 0.7;3.4] |
0.1 [− 0.8;1.1] |
0.0 [− 1.0;0.9] |
0.6*** [− 0.3;2.8] |
(%) | 0.4 [− 1.0;1.5] |
0.0 [− 1.2;1.0] |
1.6*** [0.2;4.1] |
0.1 [− 1.2;1.4] |
0.0 [− 1.1;1.1] |
0.4 [− 3.6;4.4] |
(mV·ms) | 27.5 [16.1;41.8] |
25.0 [14.6;36.2] |
32.7* [18.1;50.0] |
50.0 [37.5;65.2] |
49.6 [38.0;63.0] |
56.0 [33.4;86.6] |
(°) | 13.3 [5.3;27.0] |
9.1 [3.6;14.8] |
31.7*** [14.9;56.0] |
9.3 [4.0;17.2] |
8.3 [3.7;15.1] |
15.1*** [7.1;45.5] |
(bpm) | 0.4 [− 5.2;6.1] |
− 0.7 [− 5.3;4.6] |
2.9* [− 2.2;10.0] |
1.4 [− 4.3;6.5] |
0.5 [− 4.9;5.8] |
4.9*** [− 0.2;10.1] |
(μV) | 24.6 [14.9;40.3] |
21.5 [13.1;35.3] |
32.7** [18.8;47.4] |
25.7 [17.1;43.5] |
22.8 [15.1;35.2] |
68.6*** [41.5;122.7] |
(%) | − 0.1 [− 3.1;2.5] |
− 0.2 [− 2.8;1.5] |
0.0 [− 5.1;4.1] |
0.2 [− 2.8;2.5] |
0.2 [− 2.4;2.1] |
0.8 [− 4.3;5.4] |
Values are reported as percentiles 50th [25th;75th] percentiles
*,**,***: reflects P-value , , , respectively, when comparing corresponding features computed for cases vs controls
As an example, Fig. 5 shows the dynamic construction of one alternative NN (not the final one) for the IDB by the RS&LP, from the initial architecture ([1]) to the final one ([19 9 9]).
The characteristics for the two databases obtained by our deep-learning method are reported in Table 3. Both efficiently discriminated patients with altered clinical status (; ). The number of layers in the architectures was 3; the total number of neurons for the HFDB was 41, larger than the total number of neurons for the IDB, which was 21. Additionally, regarding the HFDB and the IDB the AUCs (84% and 83%, respectively) and the ACCs (75% and 76%, respectively) were comparable.
Table 3.
Architecture | HFDB | IDB | ||
---|---|---|---|---|
[16 13 12] | [11 9 1] | |||
Learning | AUC (%) | 99 | 98 | |
Testing | AUC (%) | 84 | 83 | |
CI (%) | [73–95] | [75–91] | ||
ACC (%) | 75 | 76 | ||
Learning | AUC (%) | 86 | 77 | |
Testing | AUC (%) | 83 | 73 | |
CI (%) | [72–94] | [60–87] | ||
ACC (%) | 75 | 67 | ||
LR | Learning | AUC (%) | 89 | 88 |
Testing | AUC (%) | 61 | 77 | |
CI (%) | [46–75] | [68–86] | ||
ACC (%) | 54 | 71 |
Table 3 also shows the and LR results. performance (; ) and LR performance (; ) was inferior to performance for both databases. This finding is visualized in Fig. 6, where ROCs regarding were generally above ROCs regarding and LR. Superiority of NN over LR was statistically significant only in the IDB ().
Discussion
The present work presents a novel application of deep-learning NN classification to serial electrocardiography. Differently from current rule-based serial electrocardiography algorithms, our deep-learning approach considers several input features that likely vary (independently or in a relative fashion) during emerging or aggravating of any cardiac pathology.
Core of the here presented deep-learning NN approach is the new RS&LP, which dynamically creates a specific NN for a specific problem by iterative alternation of structuring and learning, while retaining the learning effect of the previous iteration in each new structure. This allows for reaching an efficient NN configuration without losing its generalization properties. RS&LP overcomes the problem that the standard learning procedures are only training NNs with fixed, user-defined architectures, since it consists of a systematic and controlled NN construction method that, additionally, integrates a weight-correction algorithm to adjust for disproportion between classes. The latter is likely occurring in clinical applications in which the number of controls is typically higher than the number of cases, which is also the case in our databases. Although originally designed for serial electrocardiography, RS&LP is a potentially useful tool in several other (not further specified to avoid speculation) classification problems, in medicine and other fields.
AUCs were chosen as performance index for all algorithms; indications of diagnostic ACC were computed at the points on the ROC where sensitivity equals specificity. Indeed, in clinical practice, the choice of an operating point on a ROC is a tradeoff between false-positive and false-negative decisions and associated costs. RS&LP yielded 3-layer NN architectures with high learning and testing performances (Table 3). Due to the limited sizes of testing datasets (65 and 241 ECG pairs for the HFDB and the IDB, respectively), CI remained relatively wide (22% and 16% for HFDB and IDB, respectively; Table 3). Neuron weight and bias values are available in Additional file 1 (NeuronWeightAndBias.mat).
For performance assessment of the RS&LP, we compared the results obtained with the against those obtained with the standard method to learn the NN () and against conventional LR, constructed on the same databases. In all cases, classification was superior to and to LR classification (Table 3, Fig. 6). The RS&LP provides better classification performances than standard NN learning; moreover, its property to construct the NN architecture during learning overcomes one of the challenges of NNs: the definition of the architecture. Future studies will evaluate the robustness of the chosen criteria, such as the maximal number of hidden layers or the number of iterations.
In an earlier study of our group on heart failure [16], ROCs were constructed by applying a variable threshold to signed and unsigned QSR-T spatial-angle differences; resulting AUCs were 72% and 78%, respectively. Another study on ischemia [20] compared performances of absolute differences of VG and ST-elevation, obtaining AUCs of 88% and 91%, respectively. Both studies [16, 20] were transversal analyses, performed on entire databases not split into learning and testing datasets; hence, no predictions can be made based on those results. AUCs of these studies have to be compared to our learning AUCs and not to our testing AUCs, which rather represent predictions. Our learning AUCs were all close to one (Table 3), thus higher than those in [16, 20]. Moreover, our testing AUC in the HFDB is 84%, which means that NN-based prediction outperforms the transversal classification in [16]. Similarly, our testing AUC in the IDB was 83%, very close to the transversal classification in [20].
Based on our results, we can conclude that our RS&LP yielded high-performing NNs readily applicable to serial ECGs to recognize emerging heart failure in post-infarction patients and acute ischemia in patients with a sudden short-lasting complete coronary occlusion. Still, other clinical applications in heart failure and ischemia require additional research. In emerging heart failure, serial ECG changes might already occur in the subclinical stage; if confirmed, serial ECG analysis could be used as a screening method in post-infarction patients. Ischemia detection by serial ECG analysis is of paramount importance in the real-world ambulance scenario, when patients are transported because of chest pain possibly related to acute coronary ischemia, possibly leading to a myocardial infarction. In this application, the FUECG is recorded in the ambulance, whereas the BLECG is to be found in ECG databases of hospitals and may be several years old. Compared to our case patients, case ambulance patients mostly suffer from acute coronary syndrome, which can manifest in various forms. For example, occlusions may be dynamic and may have been present much longer than the duration of the balloon inflations in the STAFF III database. The classification problem is further complicated because the control ambulance patients (those with no ischemia) may have other acute ECG-affecting pathologies, like pulmonary embolism or pericarditis. Thus, ECG changes measured in ambulance patients will be different from those observed in our IDB patients, and a specific NN needs to be constructed on the basis of serial ECGs that represent the specific mix of patients with ischemia (cases) and patients without ischemia, but often with other pathology (controls), as they present themselves to the emergence medical services.
Conclusion
In conclusion, although we cannot claim that our method is universally suited for the construction of problem-specific NNs for serial ECG comparison, we consider it as a strength that it was successful in two very different clinical applications: the detection of newly emerging heart failure in post-infarction patients, and the detection of acute ischemia. Further exploration of our method has to reveal if other problem-specific NNs can successfully be constructed, and even if it will be possible to construct a universal NN to detect any pathologic change in the ECG.
Additional file
Authors' contributions
AS and CAS designed the study, developed the conceptual method, implemented the algorithm, interpreted the results and drafted the manuscript. MCdJ, CCtH, RWT and SM composed the ECG databases and interactively processed the ECGs. LB supervised the technical aspects of the work (feature computing, algorithm implementation, statistical analysis) and critically revised the manuscript. All authors read and approved the final manuscript.
Acknowledgements
We thank Dr. Nicolas Davidenko, University of California, Santa Cruz, CA, USA, for critically reading our manuscript.
Competing interests
The authors declare that they have no competing interests.
Availability of data and materials
The STAFF III ECG database is available on Physionet. (https://www.physionet.org/physiobank/database/staffiii/).
Consent for publication
Not applicable.
Ethics approval and consent to participate
Our retrospective study was performed on two different ECGs databases, a heart-failure database (HFDB) and an ischemia database (IDB). The HFDB is composed of ECGs retrospectively selected from the digital ECG database of the Leiden University Medical Center. The IDB is composed of ECGs retrospectively selected from the digital ECG database of the Leiden University Medical Center and from the STAFF III ECG database. Several studies on both databases have already been published. The present retrospective study on both HFDB and IDB is undertaken in compliance with the ethical principles of Helsinki Declaration and approved by Local Leiden University Medical Center Medical Ethics Committee.
Funding
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Abbreviations
magnitude of J vectors difference
magnitude of ventricular-gradient difference vector
- ACC
accuracy
- AUC
area under the curve
- BLECG
baseline electrocardiogram
- CI
95% confidence interval
- ECG
electrocardiogram
- FUECG
follow-up electrocardiogram
- HFDB
heart-failure database
- IDB
ischemia database
- LR
logistic regression
- NN
neural network
neural network obtained with the repeated structuring and learning procedure
neural network obtained with the standard method
- ROC
receiver-operating characteristic
- RS&LP
repeated structuring and learning procedure
- VCG
vectorcardiogram
heart-rate difference
QRS-complexity difference
QRS-duration difference
QRS-integral vector magnitude difference
maximal QRS-vector magnitude difference
QT-interval difference
T-wave complexity difference
T-integral vector magnitude difference
maximal T-vector magnitude difference
T-wave symmetry difference
spatial-angle absolute difference
Contributor Information
Agnese Sbrollini, Email: a.sbrollini@pm.univpm.it.
Marjolein C. De Jongh, Email: marjolein_dejongh@hotmail.com
C. Cato Ter Haar, Email: c.c.ter_Haar@lumc.nl.
Roderick W. Treskes, Email: r.w.treskes@lumc.nl
Sumche Man, Email: s.man@lumc.nl.
Laura Burattini, Email: l.burattini@univpm.it.
Cees A. Swenne, Email: c.a.swenne@lumc.nl
References
- 1.Luijnenburg SE, Helbing WA, Moelker A, Kroft LJM, Groenink M, Roos-Hesselink JW, De Rijke YB, Hazekamp MG, Bogers AJJC, Vliegen HW, Mulder BJM. 5-year serial follow-up of clinical condition and ventricular function in patients after repair of tetralogy of fallot. Int J Cardiol. 2013;169(6):439–444. doi: 10.1016/j.ijcard.2013.10.013. [DOI] [PubMed] [Google Scholar]
- 2.Waien SA, Liu PP, Ross BL, Williams WG, Webb GD, Mclaughlin PR. Serial follow-up of adults with repaired tetralogy of fallot. J Am Coll Cardiol. 1992;20(2):295–300. doi: 10.1016/0735-1097(92)90093-3. [DOI] [PubMed] [Google Scholar]
- 3.Ibanez B, James S, Agewall S, Antunes MJ, Bucciarelli-Ducci C, Bueno H, Caforio ALP, Crea F, Goudevenos JA, Halvorsen S, Hindricks G, Kastrati A, Lenzen MJ, Prescott E, Roffi M, Valgimigli M, Varenhorst C, Vranckx P, Widimský P, Baumbach A, Bugiardini R, Coman IM, Delgado V, Fitzsimons D, Gaemperli O, Gershlick AH, Gielen S, Harjola V-P, Katus HA, Knuuti J, Kolh P, Leclercq C, Lip GYH, Morais J, Neskovic AN, Neumann F-J, Niessner A, Piepoli MF, Richter DJ, Shlyakhto E, Simpson IA, Steg PG, Terkelsen CJ, Thygesen K, Windecker S, Zamorano JL, Zeymer U, Chettibi M, Hayrapetyan HC, Metzler B, Ibrahimov F, Sujayeva V, Beauloye C, Dizdarevic-Hudic L, Karamfiloff K, Skoric B, Antoniades L, Tousek P, Terkelsen CJ, Shaheen SM, Marandi T, Niemel M, Kedev S, Gilard M, Aladashvili A, Elsaesser A, Kanakakis IG, Merkely B, Gudnason T, Iakobishvili Z, Bolognese L, Berkinbayev S, Bajraktari G, Beishenkulov M, Zake I, Lamin HB, Gustiene O, Pereira B, Xuereb RG, Ztot S, Juliebø V, Legutko J, Timoteo AT, Tatu-Chiţoiu G, Yakovlev A, Bertelli L, Nedeljkovic M, Studencan M, Bunc M, de Castro AMG, Petursson P, Jeger R, Mourali MS, Yildirir A, Parkhomenko A, Gale CP. 2017 ESC guidelines for the management of acute myocardial infarction in patients presenting with st-segment elevation. Eur Heart J. 2018;39(2):119–177. doi: 10.1093/eurheartj/ehx393. [DOI] [PubMed] [Google Scholar]
- 4.Schijvenaars BJA, van Herpen G, Kors JA. Intraindividual variability in electrocardiograms. J Electrocardiol. 2008;41(3):190–196. doi: 10.1016/j.jelectrocard.2008.01.012. [DOI] [PubMed] [Google Scholar]
- 5.Macfarlane PW, Devine B, Latif S, McLaughlin S, Shoat DB, Watts MB. Methodology of ECG interpretation in the glasgow program. Methods Inf Med. 1990;29(4):354–361. doi: 10.1055/s-0038-1634799. [DOI] [PubMed] [Google Scholar]
- 6.Gogna A, Majumdar A, Ward R. Semi-supervised stacked label consistent autoencoder for reconstruction and analysis of biomedical signals. IEEE Trans Biomed Eng. 2017;64(9):2196–2205. doi: 10.1109/TBME.2016.2631620. [DOI] [PubMed] [Google Scholar]
- 7.Gao Z, Xiong H, Liu X, Zhang H, Ghista D, Wu W, Li S. Robust estimation of carotid artery wall motion using the elasticity-based state-space approach. Med Image Anal. 2017;37:1–21. doi: 10.1016/j.media.2017.01.004. [DOI] [PubMed] [Google Scholar]
- 8.Gao Z, Li Y, Sun Y, Yang J, Xiong H, Zhang H, Liu X, Wu W, Liang D, Li S. Motion tracking of the carotid artery wall from ultrasound image sequences: a nonlinear state-space approach. IEEE Trans Med Imaging. 2018;37(1):273–283. doi: 10.1109/TMI.2017.2746879. [DOI] [PubMed] [Google Scholar]
- 9.Xia Y, Zhang H, Xu L, Gao Z, Zhang H, Liu H, Li S. An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE Access. 2018;6:16529–16538. doi: 10.1109/ACCESS.2018.2807700. [DOI] [Google Scholar]
- 10.Li W, Li J. Local deep field for electrocardiogram beat classification. IEEE Sens J. 2017;18(4):8103019. [Google Scholar]
- 11.Parekh R, Yang J, Honavar V. Constructive neural-network learning algorithms for pattern classification. IEEE Trans Neural Netw. 2000;11(2):436–451. doi: 10.1109/72.839013. [DOI] [PubMed] [Google Scholar]
- 12.Kapanova KG, Dimov I, Sellier JM. A genetic approach to automatic neural network architecture optimization. Neural Comput Appl. 2018;29(5):1481–1492. doi: 10.1007/s00521-016-2510-6. [DOI] [Google Scholar]
- 13.Draisma HHM, Swenne CA, Van De Vooren H, Maan AC, Van Huysduynen BH, Van Der Wall EE, Schalij MJ. Leads: an interactive research oriented ECG/VCG analysis system. Comput Cardiol. 2005;32:515–518. [Google Scholar]
- 14.Draisma HHM, Schalij MJ, van der Wall EE, Swenne CA. Elucidation of the spatial ventricular gradient and its link with dispersion of repolarization. Heart Rhythm. 2006;3(9):1092–1099. doi: 10.1016/j.hrthm.2006.05.025. [DOI] [PubMed] [Google Scholar]
- 15.Man S, Maan AC, Schalij MJ, Swenne CA. Vectorcardiographic diagnostic & prognostic information derived from the 12-lead electrocardiogram: Historical review and clinical perspective. J Electrocardiol. 2015;48(4):463–475. doi: 10.1016/j.jelectrocard.2015.05.002. [DOI] [PubMed] [Google Scholar]
- 16.De Jongh MC, Sbrollini A, Maan AC, Van Der Velde ET, Schalij MJ, Swenne CA. Progression towards heart failure after myocardial infarction is accompanied by a change in the spatial QRS-T angle. Comput Cardiol. 2017;44:1–4. [Google Scholar]
- 17.Møller MF. A scaled conjugate gradient algorithm for fast supervised learning. Neural Netw. 1993;6(4):525–533. doi: 10.1016/S0893-6080(05)80056-5. [DOI] [Google Scholar]
- 18.King G, Zeng L. Logistic regression in rare events data. J Prod Anal. 2001;9:137–163. [Google Scholar]
- 19.Goodfellow I, Bengio ACY. Deep learning. Cambridge: MIT Press; 2016. [Google Scholar]
- 20.Treskes RW, Ter Haar CC, Man S, De Jongh MC, Maan AC, Wolterbeek R, Schalij MJ, Wagner GS, Swenne CA. Performance of st and ventricular gradient difference vectors in electrocardiographic detection of acute myocardial ischemia. J Electrocardiol. 2015;48(4):498–504. doi: 10.1016/j.jelectrocard.2015.04.016. [DOI] [PubMed] [Google Scholar]
- 21.Warren SG, Wagner GS. The STAFF studies of the first 5 minutes of percutaneous coronary angioplasty balloon occlusion in man. J Electrocardiol. 2014;47(4):402–407. doi: 10.1016/j.jelectrocard.2014.04.011. [DOI] [PubMed] [Google Scholar]
- 22.Ter Haar CC, Maan AC, Schalij MJ, Swenne CA. Directionality and proportionality of the ST and ventricular gradient difference vectors during acute ischemia. J Electrocardiol. 2014;47(4):500–504. doi: 10.1016/j.jelectrocard.2014.03.008. [DOI] [PubMed] [Google Scholar]
- 23.Ter Haar CC, Maan AC, Warren SG, Ringborn M, Horáček BM, Schalij MJ, Swenne CA. Difference vectors to describe dynamics of the ST segment and the ventricular gradient in acute ischemia. J Electrocardiol. 2013;46(4):302–311. doi: 10.1016/j.jelectrocard.2013.04.004. [DOI] [PubMed] [Google Scholar]
- 24.Jahandideh S, Abdolmaleki P, Movahedi MM. Comparing performances of logistic regression and neural networks for predicting melatonin excretion patterns in the rat exposed to elf magnetic fields. Bioelectromagnetics. 2010;31(2):164–171. doi: 10.1002/bem.20541. [DOI] [PubMed] [Google Scholar]
- 25.Eftekhar B, Mohammad K, Ardebili HE, Ghodsi M, Ketabchi E. Comparison of artificial neural network and logistic regression models for prediction of mortality in head trauma based on initial clinical data. BMC Med Inform Decis Mak. 2005;5:3. doi: 10.1186/1472-6947-5-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Green M, Björk J, Forberg J, Ekelund U, Edenbrandt L, Ohlsson M. Comparison between neural networks and multiple logistic regression to predict acute coronary syndrome in the emergency room. Artif Intell Med. 2006;38(3):305–318. doi: 10.1016/j.artmed.2006.07.006. [DOI] [PubMed] [Google Scholar]
- 27.DeLong ER, DeLong DM, Clarke-Pearson DL. Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach. Biometrics. 1988;44(3):837–845. doi: 10.2307/2531595. [DOI] [PubMed] [Google Scholar]
- 28.Scherptong RWC, Henkens IR, Man SC, Le Cessie S, Vliegen HW, Draisma HHM, Maan AC, Schalij MJ, Swenne CA. Normal limits of the spatial QRS-T angle and ventricular gradient in 12-lead electrocardiograms of young adults: dependence on sex and heart rate. J Electrocardiol. 2008;41(6):648–655. doi: 10.1016/j.jelectrocard.2008.07.006. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The STAFF III ECG database is available on Physionet. (https://www.physionet.org/physiobank/database/staffiii/).