=Paper=
{{Paper
|id=Vol-3041/450-454-paper-83
|storemode=property
|title=NARX Neuromorphic Software for ECG Wave Prediction
|pdfUrl=https://ceur-ws.org/Vol-3041/450-454-paper-83.pdf
|volume=Vol-3041
|authors=Mihai-Tiberiu Dima,Svetlana Pitina
}}
==NARX Neuromorphic Software for ECG Wave Prediction==
Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and Education" (GRID'2021), Dubna, Russia, July 5-9, 2021 NARX NEUROMORPHIC SOFTWARE FOR ECG WAVE PREDICTION T. Dima1,a, S. Pitina2 1 Univ. of Bucharest, Bucharest, Romania 2 Privolzhsky Research Medical Univ., Nizhny-Novgorod, Russia E-mail: a ttdragonel@yahoo.com ECG wave prediction with non-linear autoregressive exogenous neuromorphic (NARX) software is a novel method aimed at Holter monitoring and early warning. Such predictions are important in comparing the underlying QRS complex of the ECG-wave with the slowly deteriorating waves (or arrythmia) in cardiac patients. A deep Q-wave for instance (such as 1/4 of the R-wave) is a typical sign of (inferior wall) myocardial necrosis - associated in most cases with vascular dysfunction. It is important to have a rolling predictor - slow ECG wave degradation being normal. A real-time predictor takes into account a suite of influencing parameters (body temperature, effort, current medication, sugar levels, stress, etc), being much better suited in making a call for "normal" vs. "anomalous" ECG waves, rather than some outdated reference waves. Although this research is in its begining, it shows encouraging results, which clinical studies can conclude as to how effective the approach may be. Keywords: ECG, NARX neuromorphic software Mihai-Tiberiu Dima, Svetlana Pitina Copyright © 2021 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). 450 Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and Education" (GRID'2021), Dubna, Russia, July 5-9, 2021 1. Introduction Increasingly, over the past two decades, new electronics [1] and neuromorphic data processing solutions [2] have become part of standard ECG signal processing. This was made possible by the portation of ECG wave databases – such as [3, 4], in digital format. The introduction of artificial intelligence in clinical practice makes it possible to automate analysis and reveal, hidden or non-obvious patterns [5]. Whereas cardiologists can only build up experience on waveform printout, neural networks can make correlations in high dimensionality spaces and can measure features that are beyond the resolution of the human eye. Currently, methods are being developed using artificial intelligence for the diagnosis of arrhythmias (using Holter monitoring data), myocardial infarction and left ventricular systolic dysfunction [6, 7, 8]. As a result of fast and accurate diagnosis and choice of therapy, treatment will become in the years to come more effective, convenient and personalized. Neuromorphic software is a learning algorithm inspired from biological neurons, consisting of a set of connected S-threshold units, or artificial neurons. A neuron receives a set of signals from previous neurons, takes the sum and enters it into a threshold function (such as arctan). This is essentially the McCulloch-Pitts neuron [9] of 1943. Versions thereof fine tune the slope of the threshold function and the offset. The biggest improvements thereafter were two fold: on one hand higher computational speeds owing to hardware progress and on the other more performant optimiser algorithms which determine the weights of the inter-neuron links - a well performing example thereof being the Nelder-Mead optimiser [10]. Present day neural software, with layered neuron design, was first investigated by Ivakhnenko and Grigorevich [11] at CCM Information Corporation. A good review on the subject is by Schmidhuber [12] and developments on the training of neural software is given in [13]. Nonlinear autoregressive exogenous [14] models are a class of artificial neural networks graphed along a temporal sequence, allowing them to exhibit temporal dynamic behavior. They derive from feed-forward neural networks and use internal buffers to predict the outcome desired. The networks come as finite impulse recurrent networks (as directed acyclic graphs unfoldable into a traditional feed-forward neural network) and infinite impulse networks (in which the graph cannot be unfolded). The weights of the network increase or decrease during the training of the network and neurons have a threshold such that a signal is sent only if the sum of signals crosses the threshold. Typically, neurons are aggregated into layers, with different layers performing different classes of transformations on the inputs. Signals travel from the first layer (the input layer), to the final layer (the output layer). Figure 1. Exemplificative schematic of a NARX cell’s unfolding into a time sequence 451 Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and Education" (GRID'2021), Dubna, Russia, July 5-9, 2021 A schematic example of a NARX cell is shown in figure 1, the network trained to learn a repetitive sequence (such as the Fibonacci numbers for instance), but also to learn to respond to non- endogenous stimuli, that change in time (such as the case of ECG waveforms). 2. Savitzky-Golay filter To overcome unwanted artefacts in the ECG waveform, we need first a smooth, analytical version of the waveform – impossible in general, but achievable locally, piece-wise connected with smooth boundary conditions. Further more, we can relax to a small extent the smooth boundary conditions and replace this with an almost-smooth function that we obtain from a Savitzky-Golay filter on k bins around the current bin. For this we used a OIII spline function with coefficients C, A, D, Y to optimise the position of the current bin: where xi are the time bins and yi the ECG waveform amplitude at bin-i. We take the derivatives with respect to the 4 parameters and find the solution. The coefficient Y will give the position of the current bin. The number of bins we determined such as to keep waveform flexibility, while at the same time eliminate noise – k = 5. The result of the filter on a section of ECG wave is shown in figure 2. Figure 2. Performance of our Savitzky-Golay spline filter (with k = 5) for a section of the ECG- waveform. The value k = 5 was determined such as to keep waveform flexibility, while at the same time eliminate noise 452 Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and Education" (GRID'2021), Dubna, Russia, July 5-9, 2021 3. Performance of the NARX software We used the NARXsim package [16] from them Facultat d’Informàtica de Barcelona - Universitat Polytecnica de Catalunya. The learning patterns were offseted a time elapse t = -5 s, the amount of time in advance that we want to predict the ECG-waveform. The exogenous parameters are the 4 coefficients of the Savitzky-Golay filter, plus the residual noise difference Y-yi. We trained the network on a wave 300 s long from CARDIODAT [5]. Figure 3 shows the t = -5 s predicting ability of our NARX-network. Our excellent preliminary result is encouraging from a cardiological point of view, as this software can be incorporated in Holter devices. Figure 3. NARX-software predicted (t = -5 s) ECG wave. Notice that the software has a latency in the prediction upon encountering a rise in signal a matter we are currently investigating. The QRS complex of the ECG-wave is for the rest well recovered, which is marked interest for Q-wave parameter-integrity, an important aspect in cardiology. It can be noticed still that the software has a latency in the prediction upon encountering a rise in signal. We are currently investigating to what cause this is due, and how to address this issue. The QRS complex of the ECG-wave is for the rest well recovered, which is marked interest for Q-wave parameter-integrity. The reconstruction of the Q-wave is very important, because the appearance of a deep Q-wave (such as 1/4 of the R-wave) is a typical sign of myocardial necrosis – associated in most cases with vascular dysfunction. Our ability to predict “steady-state” ECG wave can be compared by the Holter with actual measurement and signal “unexpected wave degradation”. This is valuable in classifying myocardial infarction and early warning. Clear signal expression, in the case of multi-lead ECG recordings, allows the localization [15] of the necrosis focus. 453 Proceedings of the 9th International Conference "Distributed Computing and Grid Technologies in Science and Education" (GRID'2021), Dubna, Russia, July 5-9, 2021 Concluding, our NARX-software shows very promising prospects in variable aforetime prediction of ECG waves. This is particularly valuable for Holter devices, in comparing “steady state” predicted rhythm to actual measurement and signaling “unexpected wave degradation”. This impacts patient management tactics, offering precious advance warning. In this respect our NARX-software performance - and subsequent improvements expected, is an important contribution. References [1] S.K. Jain, B. Bhaumik, An Energy efficient application specific integrated circuit for electrocardiogram feature detection and its potential for ambulatory cardiovascular disease detection, Healthcare Technology Letters 3, pp. 77–84 (2016). [2] A.H. Ribeiro et al., Automatic diagnosis of the 12-lead ECG using a deep neural network, Nature Communications 11, article #1760 (2020). [3] H. Moeinzadeh, G. Gargiulo, Wilson Central Terminal ECG Database (v1.0.1), PhysioNet (2019): https://doi.org/10.13026/f73z-an96. [4] R. Bousseljot, D. Kreiseler, A. Schnabel, Nutzung der EKG-Signaldatenbank CARDIODAT der PTB über das Internet, Biomedizinische Technik, Band 40, Ergänzungsband 1, S 317 (1995). [5] K.W. Johnson, J. Torres Soto, B.S. Glicksberg, K. Shameer, R. Miotto, M. Ali, E. Ashley, J.T. Dudley, Artificial Intelligence in Cardiology, J Am Coll Cardiol. 71(23), 2668-2679 (2018). [6] H. Taniguchi, T. Takata, M. Takechi, A. Furukawa, J. Iwasawa, A. Kawamura, T. Taniguchi, Y. Tamura, Explainable Artificial Intelligence Model for Diagnosis of Atrial Fibrillation Using Holter Electrocardiogram Waveforms, Int Heart J. 62(3), 534-539 (2021). [7] Y. Cho, et al., Artificial intelligence algorithm for detecting myocardial infarction using six-lead electrocardiography. Sci. Rep. 10, 20495 (2020). [8] D. Adedinsewo, R.E. Carter, Z. Attia, P. Johnson, A.H. Kashou, J.L. Dugan, M. Albus, J.M. Sheele, F. Bellolio, P.A. Friedman, F. Lopez-Jimenez, P.A. Noseworthy, Artificial Intelligence- Enabled ECG Algorithm to Identify Patients With Left Ventricular Systolic Dysfunction Presenting to the Emergency Department With Dyspnea, Circ Arrhythm Electrophysiol. 13 (2020). [9] W. McCulloch, W. Pitts, A Logical Calculus of Ideas Immanent in Nervous Activity, Bulletin of Mathematical Biophysics 5, 115-133 (1943). [10] J.A. Nelder, R. Mead, A simplex method for function minimization, Computer Journal 7, 308-313 (1965). [11] A.G. Ivakhnenko, L.V. Grigorevich, Cybernetics and forecasting techniques, American Elsevier (1967); A.G. Ivakhnenko, Cybernetic Predicting Devices, CCM Information Corporation (1973). [12] J. Schmidhuber, Deep Learning in Neural Networks: An Overview, Neural Networks 61, 85-117 (2015). [13] J. Lee, L. Xiao, S. Schoenholz, Y. Bahri, R. Novak, J. Sohl-Dickstein, J. Pennington, Wide neural networks of any depth evolve as linear models under gradient descent, J. Stat. Mech. Theor. and Experiment. 12, 124002 (2020). [14] H.T. Siegelmann, B.G. Horne, C.L. Giles, Computational Capabilities of Recurrent NARX Neural Networks, IEEE Transactions on Systems, Man and Cybernetics, Part B (Cybernetics) 27, 208- 15 (1995). [15] R.K. Tripathy, et al., Localization of Myocardial Infarction From Multi-Lead ECG Signals Using Multiscale Analysis and Convolutional Neural Network, IEEE Sensors Journal 19, 11437 - 11448 (2019). [16] NARXSim neuromorphic package, Facultat d’Informàtica de Barcelona - Universitat Polytecnica de Catalunya, 2019. 454