`
`www.advintellsyst.com
`
`Hardware-Mappable Cellular Neural Networks for
`Distributed Wavefront Detection in Next-Generation
`Cardiac Implants
`
`Zhuolin Yang, Lei Zhang, Kedar Aras, Igor R. Efimov, and Gina C. Adam*
`
`Artificial intelligence algorithms are being adopted to analyze medical data,
`promising faster interpretation to support doctors’ diagnostics. The next frontier
`is to bring these powerful algorithms to implantable medical devices. Herein, a
`closed-loop solution is proposed, where a cellular neural network is used to
`detect abnormal wavefronts and wavebrakes in cardiac signals recorded in
`human tissue is trained to achieve >96% accuracy, >92% precision, >99%
`specificity, and >93% sensitivity, when floating point precision weights are
`assumed. Unfortunately, the current hardware technologies for floating point
`precision are too bulky or energy intensive for compact standalone applications in
`medical implants. Emerging device technologies, such as memristors, can
`provide the compact and energy-efficient hardware fabric to support these efforts
`and can be reliably embedded with existing sensor and actuator platforms in
`implantable devices. A distributed design that considers the hardware limitations
`in terms of overhead and limited bit precision is also discussed. The proposed
`distributed solution can be easily adapted to other medical technologies that
`require compact and efficient computing, like wearable devices and lab-on-chip
`platforms.
`
`1. Introduction
`
`Machine learning (ML) algorithms are being adopted to analyze
`medical data in specialties like radiology, oncology, and cardiol-
`ogy, promising faster interpretation with accuracy close to
`doctors’ diagnostics.[1] The next
`frontier
`in computing
`
`Z. Yang, L. Zhang, G. C. Adam
`Department of Electrical and Computer Engineering
`The George Washington University
`Washington, DC 20052, USA
`E-mail: ginaadam@email.gwu.edu
`
`K. Aras, I. R. Efimov
`Department of Biomedical Engineering
`The George Washington University
`Washington, DC 20052, USA
`
`The ORCID identification number(s) for the author(s) of this article
`can be found under https://doi.org/10.1002/aisy.202200032.
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-
`VCH GmbH. This is an open access article under the terms of the
`Creative Commons Attribution License, which permits use, distribution
`and reproduction in any medium, provided the original work is
`properly cited.
`
`DOI: 10.1002/aisy.202200032
`
`technology is to bring these powerful
`algorithms to implantable medical devices,
`which requires automation of real-time
`life-saving therapeutic decisions without
`the physician's presence. An example is
`the need for improved medical solutions
`for life-saving cardiac defibrillation thera-
`pies, that can detect bioelectric anomalies
`(e.g., cardiac arrhythmias) and act on this
`data locally for real-time therapy delivered
`within tens of seconds or minutes since
`the onset of
`life-threatening ventricular
`fibrillation (VF). The statistics put this chal-
`lenging technological need in perspective:
`ventricular arrhythmias such as VF are
`responsible
`for over 700 000 sudden
`cardiac deaths a year in the USA and
`Europe.[2] VF is a common, life-threatening
`arrhythmia
`characterized
`by
`chaotic
`asynchronous electrical activity of
`the
`cardiac muscle, which results in death
`within 10 minutes.
`Individual differences in physiological
`mechanisms, anatomic and genetic deter-
`minants, and etiologies of various arrhythmias impact the course
`of treatment. Ablation therapy, while promising, remains a work
`in progress. Therefore, on average, defibrillation therapy deliv-
`ered by implantable cardioverter defibrillators (ICDs) remains
`the most effective treatment as antiarrhythmic drugs have lim-
`ited efficacy and can be associated with adverse side effects.
`Implants have to be biocompatible, organ conformal, and small
`enough to minimize the tissue damage and be capable of inde-
`pendent autonomous operation without external intervention.
`Low power is an essential characteristic to avoid the heat damage
`to the tissue and prolong the lifetime of the embedded battery for
`many years without recharging.[3] Currently, most volume of the
`ICD has been occupied by batteries, which has limited the
`volume reduction and the computing capacity. ICD has local
`computing based on a microprocessor to detect and differentiate
`arrhythmia to offer different
`treatments, but
`the resolution
`provided by ICD is really low typically limited to only one or a
`couple of sensors; as such, the ability to detect arrhythmia
`wavefronts is non-existent. The data can be read wirelessly by
`the physician during periodic checkups. Increasing the sensing
`resolution is desired but the local computing capacity has to also
`be increased which is difficult due to power constraints. Wireless
`data transmission for processing of data outside of the body is
`not a viable solution either, as real-time data transfer between
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (1 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`1
`
`APPLE 1065
`Apple v. AliveCor
`IPR2021-00971
`
`
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`the implant and the external world requires a significant amount
`of power, even increasing the volume of the implant while intro-
`ducing delays and additional security risks. That is why these sys-
`tems have focused mostly on local real-time signal processing.
`However, due to the low resolution for sensing and therapy,
`high-energy biphasic shocks are needed to effectively terminate
`life-threatening high-frequency arrhythmias. These high-energy
`shocks can lead to myocardial damage and associated comorbid-
`ities and it is a painful and traumatic experience for patients,
`especially when delivered inappropriately when arrhythmia is
`not present due to poor sensing. On the other hand, multipulse
`therapy (MPT) utilizes well-timed trains of low-energy electric
`pulses. Experiments on animal and human heart tissue showed
`that when appropriately timed, MPT significantly decreases the
`high-energy defibrillation threshold by almost an order of mag-
`nitude. Moreover, recent first-in-human clinical trial demon-
`strated safety and efficacy of MPT in patients with atrial
`fibrillation,[4] which is not possible with current high-energy
`ICDs due to pain and discomfort caused by high-energy shocks.
`However, as it is administered also through transvenous leads,
`the issue of low resolution remains.
`To study the mechanisms of arrhythmias and develop suitable
`MPT for clinical use, high-definition electrically or optically
`mapped electrocardiograms (ECG) data must be used, which
`requires a large number of sensors to map the cardiac tissue sur-
`face. High-definition ventricular arrhythmia sensing integrated
`with electrotherapy is an emerging concept enabled by organ-
`conformal electronics platforms. Prototype organ-conformal
`electronic platforms have been developed with noncontact
`sensors and actuators and tested in vivo[5] but have limited
`resolution. Increasing the density of sensors and actuators is
`underway,[6] promising a personalized electrotherapy solution
`to terminate life-threatening tachycardias with two orders of
`magnitude less energy than a typical shock.[7] Such platforms
`could be used to predict fibrillatory wavefronts and enable their
`prevention using high-definition sensing and ultralow-energy
`electrotherapy that does not cause pain and discomfort.
`The high definition is a critical requirement as multiple rotors
`can be simultaneously present in the myocardium[8] during an
`arrhythmia event and generate the seemingly chaotic pattern
`on the electrocardiogram that is the hallmark of atrial and
`ventricular fibrillation. The ventricular fibrillation rotors can
`be identified based on individual wavefronts, and wavebreaks
`are represented by phase singularities. The wavefront is defined
`as isolines of the phase that terminate either at boundaries or at
`singular points with the phase field (phase singularities[9]).
`Although the exact data resolution needed to extract these chaotic
`wavefronts is still under investigation, we estimated that >10 000
`sensors, sampled at 500 Hz with 12-bit digitization, can pro-
`duce an accurate map for the entire human heart. Such a system
`would produce >60 MB s 1 of data which must be processed in
`milliseconds, an insurmountable task for serial computation,
`especially on microprocessors of miniature implantable devices
`with limited energy resources. Real-time smart and energy-
`efficient computation is needed to process the data and trigger
`the local activation of actuators. To our knowledge, no organ
`conformal electronics platform has embedded computing
`for local data interpretation and millisecond decision-making,
`
`as needed for real-time life-saving therapy such as arrhythmia
`electrotherapy.
`In this work, we propose the use of distributed computing
`neural network algorithms which are hardware mappable, to pro-
`vide high classification sensitivity, specificity, accuracy, and pre-
`cision in determining the challenging spatiotemporal dynamics
`of cardiac electrical signals. Artificial neural networks can pro-
`cess a large amount of data in a parallel fashion and “learn”
`its patterns. As their name suggests, artificial neural networks
`are inspired by biological brain and can provide intelligent
`computing solutions. Deep learning techniques, such as
`convolutional neural networks, have been demonstrated to
`perform with >93% accuracy for the classification of ECG
`heartbeats.[10–12] These complex networks can be used for clas-
`sification of heartbeat by heartbeat of data obtained from bedside
`ECG recording equipment, but they have yet to be applied in cur-
`rent low-resolution ICDs that shock the entire heart due to
`computational complexities and limited microprocessor capabil-
`ities.[13] However,
`for new types of high-definition organ-
`conformal platforms, they are impractical to physically realize
`due to their complexity for a large number of recording channels
`and also unsuitably centralized for the spatiotemporal tracking of
`wavefronts and wavebreaks as needed for precise therapy by dis-
`tributed electric field. To our knowledge, no neural network algo-
`rithm has been proposed for the identification of wavefronts.
`This work describes a distributed computing algorithm based
`on cellular neural networks that is readily mappable to memristor-
`based hardware circuitry and could enable a closed-loop solution
`
`Figure 1. Distributed computing for electrical wavefront determination:
`Proposed technology using integrated network of sensors, computing
`chiplets distributed in a cellular neural network architecture, and actuators
`that will allow high-definition mapping, interpretation, and therapeutic
`response in a closed-loop fashion.
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (2 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`2
`
`
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`2. Experimental Section
`
`2.1. Data Gathering and Preprocessing
`
`This study utilized representative data obtained from a deiden-
`tified donor human heart
`from the Washington Regional
`Transplant Community (Church Falls, VA). The study was
`approved by the Institutional Review Board at
`the George
`Washington University.
`The experimental apparatus and procedures are explained in
`detail in the study by Aras et al.[23] Briefly, the ventricular tissue
`was prepared as a wedge with average dimension of 7 cm 3.5 cm
`(Figure 2a). The tissue was then mounted in a temperature-
`controlled, pressure-controlled,
`and an oxygenated optical
`mapping setup (Figure 2a). Optical action potentials were
`mapped from 7 cm 7 cm field of view using a MiCAM05
`(SciMedia, CA) CMOS camera (100 100 pixels) and sampled
`at 1 KHz sampling rate.
`The dataset consisted of 1000 optical mapping images of the
`epicardium tissue recorded at 1 kHz sampling rate with a size of
`100 50 pixels. 800 images were used for training and 200 for
`testing. The dataset included complete recordings of several
`fibrillation events, enabling the analysis of various wavefront pat-
`terns during fibrillation as part of this work. Optical recordings
`were used because they provide higher-resolution mapping than
`flexible electrode arrays. However, these results were directly
`applicable to electrically recorded data, as shown in Figure 2b,c.[24]
`Studies into the resolution required to extract any possible chaotic
`rotors in human tissue are still under investigation and higher-
`resolution setups are being developed.
`Analysis in the phase domain was typically done for such stud-
`ies, as the wavefront propagation and the singularities could be
`easily detected in the phase domain. The time domain optical raw
`data recorded by the cameras was preprocessed to transform it
`into the phase domain with a scale between π and π through the
`Hilbert transform.[25] The Hilbert transform is an efficient signal
`analysis method for nonstationary time series, especially in deter-
`mining the instantaneous frequency of time-varying signals,
`such as ventricular arrhythmias. Detection of these subtle fre-
`quency changes and potentially recognizing the initiation and/
`or termination of VT/VF is very important in understanding
`the mechanisms of arrhythmia. Given a real-time function
`x(t), its Hilbert transform was defined as[26]
`
`(1)
`
`xðτÞ
`t τ
`
`dτ
`
`Z þ∞
`
` ∞
`
`1 π
`
`¼
`
`1 π
`
`t
`
`bxðtÞ ¼ H½xðtÞ ¼ xðtÞ
`
`Figure 3a shows a raw optical signal and Figure 3b shows its
`phase-domain equivalent that was further preprocessed before
`looking at
`the wavefront. More details are presented in
`prior work.[23] A wavefront was located at the edge of phase
`∅ðtÞ ¼ π (red) and phase ∅ðtÞ ¼ π (blue) on the blue side.
`The wavefronts were labeled manually because the noise and
`the undesirable artifacts of the pacing electrode might affect
`the precision of
`the labels and affect
`the training results
`afterwards. For each data sample, a corresponding phase map
`3b and its wavefront mapping 3c served as input and desired
`output, respectively, for the neural network core.
`
`that includes spatially distributed sensing, data processing, and
`any required actuation for therapy (Figure 1). The cellular neural
`network maps well to a spatiotemporally distributed architecture
`and would enable a high-speed high-data-throughput computing
`solution. Any other type of neural network, for example, a multi-
`layer perceptron or a convolutional neural network, would require
`hardware implementation in a single chip which would have to be
`connected to a multitude of sensors and actuators, with density
`limitations due to the interconnects. This proposed cellular neural
`network architecture was chosen as most suitable because it takes
`advantage of its natural tiled organization to easily map it to a dis-
`tributed network of identical computing chiplets, as shown in
`Figure 1. We consider a chiplet to be a small integrated circuit
`(IC) of submillimeter dimensions that contains a well-defined
`subset of functionality and is designed to be combined with
`other chiplets in the organ-conformal platform. Each chiplet
`implements a cell unit of the cellular neural network, processing
`only local sensor information from itself and its neighbors and
`providing an output only to its local actuator.
`The size, area, and power constraints are particularly impor-
`tant for this application. Emerging computing technologies, like
`memristor crossbars,[14] have significant potential in the More-
`than-Moore era, promising orders of magnitude better energy
`efficiency and compact implementation[15,16] of use in novel com-
`puting systems for implantable devices. A memristor commonly
`uses metal/insulator/metal sandwich structures, which include
`two layers of electrodes and an intermediate layer of memristive
`functional material, which is called the insulator.[17,18] Memristor
`devices can be fabricated as small as 2 nm, and[19] their resistance
`transition characteristics are closely associated with their electro-
`des and the switching materials. The device needs “forming” to
`create filamentary path(s) in the insulator and then reversibly set
`and reset to program the device to a desired conductance state
`between low (OFF) and high (ON) states. Thanks to its ionic
`transport, the programmed state is retained without static power
`dissipation. Memristor devices can be integrated with comple-
`mentary metal–oxide–semiconductor (CMOS) control circuitry
`as dense matrices (crossbars) of artificial synapses to implement
`vector matrix multiplication using Ohm's law,[14,20–22] which is a
`fundamental operation in neural networks. This behavior ena-
`bles a natural solution for the implementation of templates
`for the proposed cellular neural network computing,
`to be
`integrated directly with sensors and actuators. This approach allows
`for flexibility, requiring the design of only one chiplet and its tape-out
`in as many samples as needed for the size of the network at hand.
`The proposed solution can be used to develop the next-generation
`implantable devices that can provide low-energy therapy, thanks to
`high-resolution sensing, local computing, and precise actuation.
`The remainder of the article is organized as follows. Section 2
`describes the methodological details, the data obtained from
`human cardiac tissue, as well as the algorithm and the perfor-
`mance metrics used. Section 3 introduces the evaluation of
`the proposed methodology on the dataset, considering the opti-
`mization of hyperparameters such as the learning rate, weight
`initialization, binarization, as well as the impact of noise and
`quantization in the input and templates on the inference results.
`Section 4 concludes with a discussion of the algorithmic results
`and their potential mapping to a memristor-based hardware
`implementation.
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (3 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`3
`
`
`
`(b)
`
`(a)
`
`(c)
`
`Figure 2. Data gathering. a) Human left ventricular tissue wedge and experimental setup. b) Simultaneous optical and electrical cardiac mapping.
`c) Corresponding representative electrical and optical signals. Figure 2b,c are reproduced with permission.[24] Copyright 2022, American Heart Association.
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`(a)
`
`(b)
`
`(c)
`
`(d)
`
`Figure 3. Data preprocessing. a) Example of raw optical phase map (100 50 pixels) recorded during VF in the human heart preparation showing the
`influence of the pacing electrode on the obtained signal. b) Example of Hilbert-transformed optical phase map. A subset (70 35 pixels) was selected to
`avoid network confusion due to pacing electrode effects. c) Example of input data used for training and its labeling. d) Example of input data used for
`testing and its labeling.
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (4 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`4
`
`
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`inner states of any dynamic process.[30] Genetic algorithms have
`been shown to train the network with desirable accuracy and
`robustness, but
`the evaluation of
`the fitness functions is
`computationally very expensive.[29]
`We have defined a training algorithm based on backpropaga-
`tion and batch updates robust
`to template nonidealities.
`Following initialization, the network will calculate the corre-
`sponding error for each image in the batch. The templates A,
`B, and bias I will be updated after each batch calculation. The
`process was repeated for all images in the training dataset to min-
`imize the error between the obtained wavefront map output and
`the desired output. The network took several epochs to converge
`and several performance metrics, as shown in the next section,
`could be used to track the convergence.
`For the case of the typical adapted stochastic gradient descent
`backpropagation training algorithm, the error was calculated
`based on
`
`(4)
`
`ðdij y
`ij½kÞ
`
`1 2
`
`eij½k ¼
`
`where y
`ij½k is the output calculated by the algorithm at iteration k
`and dij is the desired cell output according to the image label. The
`templates A, B, and bias I are updated based on
`
`(5)
`
`(6)
`
`(7)
`
`(8)
`
`(9)
`
`(10)
`
`Due to the unavoidable interrupts during the hour-long
`experiments and the underlying condition of
`the available
`human heart tissue, noise was an inevitable occurrence in the
`dataset. Noise is regarded as the irregular small section of pixels
`rapidly changing in the range from π to π, as well as the value of
`pixel remaining constant throughout the measurement. The pac-
`ing electrode could also introduce significant artifacts due to its
`large size, needed to provide mechanical robustness during
`insertion into the rather stiff human cardiac muscle tissue. To
`avoid these unwanted effects, the data was cropped to 70 35
`pixels and the pixels containing the pacing electrode were
`removed, as shown in 3b vs. 3c.
`
`2.2. Cellular Neural Networks
`
`Given the tight requirements for high speed and low-power
`hardware, the cellular neural network is a promising topology
`for distributed computing, based on a fixed number of intercon-
`nected processing units called “cells.” Each unit, for example,
`unit ij at row i and column j, could be implemented by a
`computing chiplet, processing only local information from itself
`and its neighbors, with small size and energy requirements. The
`inputs uijðtÞ at time t were fed into the network and outputs yijðtÞ
`were obtained. The output of a processing cell ij was determined
`by the state of the cell xijðtÞ according to Equation (2).
`
`yijðtÞ ¼ ðjxijðtÞ þ 1j jxijðtÞ 1jÞ
`
`(2)
`
`The state of cell ij at time t was calculated using the differential
`equation (3) taking into consideration all the cells in the neigh-
`borhood of size M N. This work included only the nearest
`neighbors (neighborhood size ¼ 3 3) to keep the results map-
`pable to a potential
`compact hardware implementation.
`However, the neighborhood could include further away neigh-
`bors, for example, a neighborhood of size 7 7 included one
`central cell and 48 neighbors.
`
`amn½k þ 1 ¼ amn½k þ ηΔamn½k
`
`bmn½k þ 1 ¼ bmn½k þ ηΔbmn½k
`
`I½k þ 1 ¼ I½k þ ηΔI½k
`
`with the updates of Δ weights
`
`eij½ky
`iþm 2,jþn 2½k
`
`eij½kuiþm 2,jþn 2½k
`
`N X1 ≤ i ≤ M
`
`1 M
`
`1 ≤ j ≤ N
`
`N X1 ≤ i ≤ M
`
`1 M
`
`1 ≤ j ≤ N
`
`Δamn½k ¼
`
`dxijðtÞ
`dt
`
`
`
`¼ xijðtÞþ X1 ≤ i ≤ MamnymnðtÞþ X1 ≤ i ≤ M
`
`1 ≤ j ≤ N
`
`1 ≤ j ≤ N
`
`bmnumnðtÞ þ I
`
`Δbmn½k ¼
`
`(3)
`
`eij½k
`
`N X1 ≤ i ≤ M
`
`1 M
`
`1 ≤ j ≤ N
`
`ΔI½k ¼
`
`where m and n are the row and column indices, respectively, of
`the templates A and B. η is the learning rate, typically a small
`number always >0, that defines the range of weight updates
`in each iteration. As seen in Equation (8), the update Δamn½k
`for the feedback template A was calculated via the weighted
`sum of the error and the desired output for each cell. A similar
`update Δbmn½k was calculated for control template B based on the
`error and the respective input. The bias I was also updated
`accordingly based on the average error of each cell to increase
`the performance of the network.
`To improve the wall-clock time, we used batch training as
`defined by
`
`In Equation (3), the inputs umn and outputs ymn of its cell and
`neighboring cells were weighted via the matrix elements amn and
`bmn of two matrices A and B of size M and N. The matrix A linked
`the outputs ymn to the state x via its elements amn, while template
`B similarly linked the inputs umn to the state x, respectively.
`These matrices were called templates and were used repeatedly
`for each cell. Training the network means determining the values
`of templates A and B and of bias I.
`Several algorithms were used for training these networks,
`including, random weights change,[27] Kalman filters,[28] genetic
`algorithms,[29] and backpropagation.[30] The random weight
`change[27] is a hardware-friendly algorithm for on-chip training
`on a wide range of tasks, but it involves large number of training
`epochs to obtain accurate templates. Kalman filters have been
`used to obtain accurate output from the inaccurate input infor-
`mation, minimizing the mean of squared error by estimating the
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (5 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`5
`
`
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`Table 1. Performance matrix.
`
`(11)
`
`Desired output pixel
`
`ON
`
`OFF
`
`ON
`
`OFF
`
`True Positive (TP)
`
`False Positive (FP)
`
`False Negative (FN)
`
`True Negative (TN)
`
`(12)
`
`Obtained
`output pixel
`
`(13)
`
`accuracy ¼
`
`TP þ TN
`TP þ TN þ FP þ FN
`
`(15)
`
`Precision measures the performance of correctly identifying
`positive (wavefront) pixels. For the targeted application, it is
`highly important to have very high TP and low FP (high preci-
`sion) to avoid applying unneeded pulses.
`
`precision ¼
`
`TP
`TP þ FP
`
`(16)
`
`XB
`XB
`XB
`
`Δamn½k
`
`Δbmn½k
`
`1 B
`
`1 B
`
`ΔAmn½k ¼
`
`ΔBmn½k ¼
`
`ΔI½k
`
`1 B
`
`ΔIbatch½k ¼
`
`where B is the batch size for which the Δ template updates were
`averaged.
`The error could be calculated on the obtained output as proc-
`essed by the network, which took grayscale values between [ 1,1]
`or on a binarized version of the output which could be either
`wavefront ( 1) or nonwavefront (1). The obtained output could
`be binarized, either during training or after the training was com-
`plete by applying a threshold as defined by the following equation
`
`yb
`ijin ¼
`
`
`
`1if yij ≥ threshold
` 1else
`
`(14)
`
`Sensitivity measured how many of the positive (wavefront) pix-
`els were identified as such.
`
`As we targeted hardware mappability, we also explored the
`impact of neighborhood size as well as limited bit precision
`weights. Limited precision templates were also considered using
`traditional routing-to-nearest method versus stochastic round-
`ing. Stochastic rounding can be particularly useful
`in deep
`network training with low bit precision arithmetic.[31,32] A real
`template value a which lies between a lower weight level (A1)
`and upper weight level (A2) was stochastically rounded up to
`A2 with probability (a–A1)/(A2
`–A1) and down to A1 with proba-
`bility (A2
`–a)/(A2
`–A1). The algorithm details are included in the
`supplemental materials.
`
`2.3. Performance Metrics
`
`To provide a comprehensive assessment of the potential perfor-
`mance of the algorithm to human tachyarrhythmia events, sev-
`eral performance metrics were used in accordance with medical
`practice for binary classification tests. The desired output was a
`binary map with pixels on the wavefront(s) labeled as “positive”
`(or “ON” or black) totaling P pixels and all other pixels, not on the
`wavefront labeled as “negative” (or “OFF” or white) totaling N
`pixels. The obtained output after the image was classified by
`the network was a similar binary map. Some of the pixels on
`the wavefront were identified correctly (true positives), totaling
`TP pixels, while others were misclassified as negative (false neg-
`atives), totaling FN pixels. Similarly, some of the pixels outside
`the wavefront were identified correctly (true negatives), totaling
`TN pixels, while others were misclassified as positive (false
`positives), totaling FP pixels. These could be arranged in a typical
`2 2 contingency table or a confusion matrix (Table 1).
`Based on this classification, four important performance
`metrics, accuracy, precision, sensitivity, and specificity, are
`defined as follows. Accuracy provides a quantitative metrics of
`the overall performance of the algorithm, showing the percent-
`age of the total number of pixels correctly identified.
`
`sensitivity ¼
`
`TP
`TP þ FN
`
`(17)
`
`Specificity measures how many of the negative (nonwave-
`front) pixels were identified.
`
`specificity ¼
`
`TN
`TN þ FP
`
`(18)
`
`The goal was to optimize the algorithm to achieve high values
`for all four performance metrics, accuracy, precision, sensitivity,
`and specificity simultaneously.
`
`3. Results
`
`3.1. Training Optimization
`
`3.1.1. Hyperparameter Optimization on Single-Image Training
`
`Single-image training was used to do a comprehensive search in
`the hyperparameter space for learning rate, initialization, and
`binarization and understand the impacts and trade-offs on per-
`formance. The optimal learning rate was identified for different
`initializations by exploring a broad range from 10 4 to 104 in log-
`arithmic scale. The initializations are 1) zero-template matrices;
`2) randomly generated values between 1 and 1; and 3)
`pre-defined templates for edge detection; details are described
`in Table 2.
`As shown in Figure 4, an optimal learning rate window is vis-
`ible, where all the four performance metrics are optimized.
`Outside of this learning rate window, the performance drops par-
`ticularly for precision and sensitivity. All these metrics need to be
`optimized simultaneously, with precision being the most impor-
`tant metric to avoid false positives that would inadvertently apply
`unwanted pulses to the heart tissue. The highest precision is
`92.16% on learning rate ¼ 500 with all initial templates A, B
`and bias I set to 0 shown in Figure 4d. The maximum value
`
`Adv. Intell. Syst. 2022, 2200032
`
`2200032 (6 of 16)
`
`© 2022 The Authors. Advanced Intelligent Systems published by Wiley-VCH GmbH
`
`6
`
`
`
`www.advancedsciencenews.com
`
`www.advintellsyst.com
`
`Table 2. Initialization templates used for a system with eight neighbors.
`
`Zero template
`
`Example of
`random template
`
`Edge detection
`template
`
`0
`
`0
`
`0
`
`0
`
`0
`
`0
`
`Template A
`
`Template B
`
`Bias I
`
`(a)
`
`(e)
`
`0
`
`0
`
`0
`
`0
`
`0
`
`0
`
`0
`
`(b)
`
`(f)
`
`0
`
`0
`
`0
`
`0
`
`0
`
`0
`
` 0.6849
`
` 0.1537
`
` 0.1185
`
` 0.4339
`
` 0.9216
`
` 0.8378
`
`0.3077
`
`0.5972
`
` 0.3394
`
` 0.4386
`
` 0.6144
`
`0.014
`
`0.777
`
`0.189
`
`0.5028
`
` 0.3372
`
` 0.0429
`
` 0.7459
`
` 0.2083
`
`0
`
`0
`
`0
`
` 1
`
` 1
`
` 1
`
`0
`
`0
`
`0
`
` 1
`
`8
`
` 1
`
`1
`
`0
`
`0
`
`0
`
` 1
`
` 1
`
` 1
`
`(c)
`
`(g)
`
`(d)
`
`(h)
`
`Figure 4. Impact of learning rate optimization and initialization optimization on training and testing performance. a,b,c,d) Evolution of sensitivity,
`specificity, accuracy, and precision for training and e,f,g,h) for testing, respectively, using different learning rates and different initializations. The
`representative image from Figure 3b and its label were used for training. Number of neighbors ¼ 8.
`
`for specificity is 99.82% at the same learning rate. The maximum
`value for sensitivity is 98.44% on learning rate ¼ 0.05 with edge
`detection template and for accuracy is 99.38% on learning
`rate ¼ 1000 with zero templates. However, it is important to note
`that large precision is obtained for different initializations and
`over a broad range of learning rates, from 0.5 to 500. As a learn-
`ing rate that is too fast will result in large weight updates that can
`induce oscillatory behavior in the training between suboptimal
`local solutions, the best lower learning rate was investigated.
`Testing was used test the performance of these results on nine
`inputs. The averaged results are shown in Figure 4e-h. The
`highest precision is 73.08% on learning rate ¼ 0.1 with random
`template initialization, while the other performance metrics at
`the same hyperparameters are accuracy 97.85%, specificity
`99.26%, and sensitivity 42.00%.
`After evaluating the training results and testing results,
`within the optimal learning rate window, a learning rate of
`0.1 with the random initialization of templates has shown
`the highest precision especially in testing results. The results
`in Figure 5a show the convergence curves for the different per-
`formance metrics and the obtained templates. The poor sensi-
`tivity and precision are due to the fact that 41 pixels are stuck
`with in-between values, as shown in Figure 5b. A test image, as
`shown in Figure 3c, was used for validation. The challenge with
`these “gray” pixels also seems to translate to the test image, as
`
`shown in Figure 5c. This method of training where the output is
`allowed to take “grayscale” values has a difficult time differen-
`tiating true versus false positive pixels,
`leading to a large
`number of pixels in the grayscale regime and precision of only
`around 70%.
`These results prompt the need for a binarization approach by
`imposing the desired output of the network to be binary, either
`ON or OFF. The two methods, binarization during training and
`binarization after training, have been explored in Figure 6. In
`binarization during training approach, the output is forced to
`be binary after each weight update (Figure 6a). In the binariza-
`tion after training approach, the network is trained by itself with
`output in grayscale and the output is forced to be binary once the
`training is complete (Figure 6b). Figure 6c vs. d shows compara-
`tively the convergence curves for the two approaches. The
`binarization during training converges quickly but experiences
`oscillations in the metrics as the true-positive and false-negative
`pixels flip values and do not stay