This U.S. patent application claims priority under 35 U.S.C. § 119 to: Indian Patent Application No. 202221068002, filed on Nov. 25, 2022. The entire contents of the aforementioned application are incorporated herein by reference.
The disclosure herein generally relates to spiking neural networks, and, more particularly, to method and system for spiking neural network-based ECG classifier for wearable edge devices.
Electrocardiogram (ECG) is one of the most extensively employed signals used to diagnose and predict cardiovascular diseases (CVDs) which provides opportunities for earlier prevention and intervention. In recent years, personal wearable devices have been introduced as cost-effective solutions for continuous ECG monitoring in daily life. ECG signal recorded by wearable electronic devices is with low-frequency and low-amplitude and is inevitably contaminated by a variety of noises and artifacts. Classical algorithms are mainly based on morphological features, such as the QRS complex and signal processing techniques such as Fourier transform, and wavelet transform. Visual inspection of recorded ECG signals during a visit to the cardiologist is the traditional form of arrhythmia detection. However, due to their intermittent occurrence specially in early stages of the problem, arrhythmias are difficult to detect from a short time window of the ECG signal. Therefore, continuous ECG monitoring is crucial in early detection of potential problems.
Neural network algorithms automatically extract the features from ECG signals and hence, provide higher accuracy. This is because neural network based feature extraction is inherently more resilient to variations among different ECG waveforms However, employing deep neural networks have high computational intensity and large power consumption. In last few years, several deep learning based ECG classification models have been developed that can classify ECG signals with higher accuracy based on features like heart rhythms. However, these deep learning based ECG classification models have computational complexity, memory, and power requirement. Existing deep learning based classification models lack in executing low-power, low-memory, and battery driven devices. In an effort to continuously monitor and detect abnormalities in patients ECG signals on portable devices, ECG heartbeat classification method based on a spiking neural network (SNN) is required. Spiking neural networks (SNN) are the third generation of neural networks and provide the opportunity for ultra-low power operation. In this type of neural networks, the information is processed based on propagation of spike signals through the network and the timing of the spikes. Every neuron consumes energy only when it sends or receives spikes.
Embodiments of the present disclosure present technological improvements as solutions to one or more of the above-mentioned technical problems recognized by the inventors in conventional systems. For example, in one embodiment, a method for spiking neural network based ECG classifier for wearable edge devices is provided. The system includes a spiking neural network which receives a training dataset comprising a plurality of ECG time-series data from a plurality of sensors. The spiking neural network comprise at least one of a first spiking neural network and a second spiking neural network. The first spiking neural network comprise a reservoir-based spiking neural network and a feed forward based spiking neural network. Each of the spiking neural network comprise a logistic regression-based ECG classifier which is being trained to classify one or more class labels. The peak-based spike encoder of each spiking neural network obtains a plurality of encoded spike trains based on one or more peaks detected from each ECG time-series data. Further, the plurality of encoded spike trains are provided into at least one of the spiking neural network. Further, a reservoir of the first spiking neural network obtains neuronal trace values of a plurality of recurrently connected excitatory neurons for the plurality of encoded spike trains. Then, a spiking neural network layer (SNN) layer of the second spiking neural network obtains neuronal trace values of a plurality of neurons connected in a feed forward pattern. Further, a first set of spatio-temporal features are extracted for each ECG time-series data from the first spiking neural network based on the neuronal trace values of the plurality of excitatory neurons. Then, a second set of spatio-temporal features are extracted from the second spiking neural network based on the neuronal trace values of the plurality of feed forward neurons. The logistic regression-based ECG classifier of each of the spiking neural network are trained with the neuronal trace values of the plurality of recurrently connected excitatory neurons and the neuronal trace values of the plurality of neurons connected in the feed forward pattern to classify one or more class labels. Furthermore, a plurality of test dataset are received as input into at least one of the spiking neural network to obtain associated class label from the logistic regression-based ECG classifier.
In another aspect, a method for spiking neural network based ECG classifier for wearable edge devices is provided. The method includes a spiking neural network which receives a training dataset comprising a plurality of ECG time-series data from a plurality of sensors. The spiking neural network comprise at least one of a first spiking neural network and a second spiking neural network. The spiking neural network comprise a reservoir-based spiking neural network and a feed forward based spiking neural network. Each of the spiking neural network comprise a logistic regression-based ECG classifier which is being trained to classify one or more class labels. The peak-based spike encoder of each spiking neural network obtains a plurality of encoded spike trains based on one or more peaks detected from each ECG time-series data. Further, the plurality of encoded spike trains are provided into at least one of the spiking neural network. Further, a reservoir of the first spiking neural network obtains neuronal trace values of a plurality of recurrently connected excitatory neurons for the plurality of encoded spike trains. Then, a spiking neural network layer (SNN) layer of the second spiking neural network obtains neuronal trace values of a plurality of neurons connected in a feed forward pattern. Further, a first set of spatio-temporal features are extracted for each ECG time-series data from the first spiking neural network based on the neuronal trace values of the plurality of excitatory neurons. Then, a second set of spatio-temporal features are extracted from the second spiking neural network based on the neuronal trace values of the plurality of feed forward neurons. The logistic regression-based ECG classifier of each of the spiking neural network are trained with the neuronal trace values of the plurality of recurrently connected excitatory neurons and the neuronal trace values of the plurality of neurons connected in the feed forward pattern to classify one or more class labels. Furthermore, a plurality of test dataset are received as input into at least one of the spiking neural network to obtain associated class label from the logistic regression-based ECG classifier.
In yet another aspect, a non-transitory computer readable medium for the system includes a spiking neural network which receives a training dataset comprising a plurality of ECG time-series data from a plurality of sensors. The spiking neural network comprise at least one of a first spiking neural network and a second spiking neural network. The spiking neural network comprise a reservoir-based spiking neural network and a feed forward based spiking neural network. Each of the spiking neural network comprise a logistic regression-based ECG classifier which is being trained to classify one or more class labels. The peak-based spike encoder of each spiking neural network obtains a plurality of encoded spike trains based on one or more peaks detected from each ECG time-series data. Further, the plurality of encoded spike trains are provided into at least one of the spiking neural network. Further, a reservoir of the first spiking neural network obtains neuronal trace values of a plurality of recurrently connected excitatory neurons for the plurality of encoded spike trains. Then, a spiking neural network layer (SNN) layer of the second spiking neural network obtains neuronal trace values of a plurality of neurons connected in a feed forward pattern. Further, a first set of spatio-temporal features are extracted for each ECG time-series data from the first spiking neural network based on the neuronal trace values of the plurality of excitatory neurons. Then, a second set of spatio-temporal features are extracted from the second spiking neural network based on the neuronal trace values of the plurality of feed forward neurons. The logistic regression-based ECG classifier of each of the spiking neural network are trained with the neuronal trace values of the plurality of recurrently connected excitatory neurons and the neuronal trace values of the plurality of neurons connected in the feed forward pattern to classify one or more class labels. Furthermore, a plurality of test dataset are received as input into at least one of the spiking neural network to obtain associated class label from the logistic regression-based ECG classifier.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate exemplary embodiments and, together with the description, serve to explain the disclosed principles:
Exemplary embodiments are described with reference to the accompanying drawings. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. Wherever convenient, the same reference numbers are used throughout the drawings to refer to the same or like parts. While examples and features of disclosed principles are described herein, modifications, adaptations, and other implementations are possible without departing from the scope of the disclosed embodiments.
Referring now to the drawings, and more particularly to
Embodiments herein provide a method and system for spiking neural network based ECG classifier for wearable edge devices. The system may be alternatively referred as ECG time-series data classifier system 100. Real-time monitoring of ECG signal at wearable and implantable devices for example smart watch, pacemaker and the like are crucial for early clinical intervention of cardio-vascular diseases. In view of the foregoing challenges spiking neural network coupled with non-von Neumann Neuromorphic Computing (NC) platforms provides ECG time-series data classification at edge. The input ECG time-series data is first segmented into heartbeats. The heartbeat is split into a small number of windows, which are then encoded into spikes. The patterns in the generated spikes are automatically extracted by using one or more spiking neural network (SNN) architectures. The method of the present disclosure is implemented with two spiking neural network (SNN) architectures, where a first spiking neural network comprise a reservoir-based spiking neural network and a second spiking neural network comprise a feed-forward based spiking neural network. The SNNs are created using a Leaky-Integrate and Fire (LIF) neuron model as it is computationally easier to simulate. The first spiking neural network and the second spiking neural network comprise a peak-based spike encoder which improves performance with least computational effort and minimized power consumption. The disclosed system is further explained with the method as described in conjunction with
Referring to the components of the system 100, in an embodiment, the processor (s) 104 can be one or more hardware processors 104. In an embodiment, the one or more hardware processors 104 can be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the processor(s) 104 is configured to fetch and execute computer-readable instructions stored in the memory. In an embodiment, the system 100 can be implemented in a variety of computing systems, such as laptop computers, notebooks, hand-held devices, workstations, mainframe computers, servers, a network cloud, and the like.
The I/O interface(s) 106 can include a variety of software and hardware interfaces, for example, a web interface, a graphical user interface, and the like and can facilitate multiple communications within a wide variety of networks N/W and protocol types, including wired networks, for example, LAN, cable, etc., and wireless networks, such as WLAN, cellular, or satellite. In an embodiment, the I/O interface (s) 106 can include one or more ports for connecting a number of devices (nodes) of the system 100 to one another or to another server.
The memory 102 may include any computer-readable medium known in the art including, for example, volatile memory, such as static random-access memory (SRAM) and dynamic random-access memory (DRAM), and/or non-volatile memory, such as read only memory (ROM), erasable programmable ROM, flash memories, hard disks, optical disks, and magnetic tapes. The memory 102 may comprise information pertaining to input(s)/output(s) of each step performed by the processor(s) 104 of the system 100 and methods of the present disclosure. Functions of the components of system 100, for predicting batch processes, are explained in conjunction with
In one example a wearable ECG device communicates for example by Bluetooth to a mobile device (e.g., a mobile phone) carrying an application that buffers and uploads the data to a server through mobile or Wi-Fi networks. The reservoir-based spiking neural network 200 processes the training data comprising a plurality of ECG time-series data.
The peak-based spike encoder 202 generates a plurality of encoded spike trains for the plurality of ECG time-series data.
The reservoir 204 processes the plurality of encoded spike trains to obtain the neuronal trace values. The one or more connections between the peak-based spike encoder 202 and the reservoir is sparse. The reservoir 204 is a recurrently connected population of excitatory and inhibitory neurons. The connectivity between neurons are sparse, probabilistic and remain within the same population so that dynamical stability of the network is ensured. This neuronal population is very efficient in extracting one or more spatio-temporal features from ECG time-series data. Recurrent weights with directed cycles act as a non-linear random projection of the sparse input feature space to a higher dimensional spatio-temporal embedding, thereby generating explicit temporal features. These embeddings are captured in the form of neuronal traces of the reservoir neurons.
The logistic regression based ECG classifier 206 of the system 200 is trained to determine corresponding class label by passing neuronal trace values of a plurality of recurrently connected excitatory neurons.
The peak-based spike encoder 302 generates the plurality of encoded spike trains for the plurality of ECG time-series data.
The spiking neural network (SNN) layer 304 processes the plurality of encoded spike trains to obtain neuronal trace values. The SNN layer is a simple network topology where the neurons are connected across consecutive layers but not within same layer where full connectivity is used.
The logistic regression-based ECG classifier 306 is trained to determine corresponding class label for the neuronal trace values of a plurality of feed forward neurons.
Referring now to the steps of the method 400, at step 402, the one or more hardware processors 104 obtain by a spiking neural network a training dataset comprising a plurality of ECG time-series data from a plurality of sensors, wherein the spiking neural network comprise at least one of a first spiking neural network and a second spiking neural network. Spiking neural network is a third generation of neural networks, referred to as SNNs, provides a low-power operation. In this type of network, the information is processed based on the propagation of spike signals through the network and the timing of the spikes. Dense network of neurons are interconnected which generates spikes from one neuron to other interconnected neuron. The first spiking neural network may be for example a reservoir-based spiking neural network 200 and a second spiking neural network may be for example a feed-forward spiking neural network 300. It is to be noted that the spiking neural networks are not limited to the reservoir-based spiking neural network and the feed-forward spiking neural network. In specific, neurons communicate through electrical signals called spikes. For example, a neuron i fires at time t which generates a spike on its output at time t, only when its membrane potential reaches a specific threshold value. The information is encoded in the timing of the spikes, not in their amplitude.
The training dataset comprise the plurality of ECG time-series data is the input to the reservoir-based spiking neural network 200. The training dataset may include for example ECG Atrial Fibrillation datasets with different attributes and university of California riverside (UCR) datasets namely ECG200, ECG5000 and the like. The plurality of ECG time-series data is represented as {F(1), F(2), . . . F(n)}. Here, at time t, where F(t) is being one sample value in the time series and is further fetched by the peak-based spike encoder 202. The plurality of ECG time-series data are processed to obtains the neuronal trace values of a plurality of recurrently connected excitatory neurons. The peak-based spike encoder 202 processes the plurality of ECG time-series data to obtain a plurality of encoded spike trains based on one or more peaks.
The reservoir 204 obtains the plurality of encoded spike trains from the peak-based spike encoder 202 and obtains neuronal trace values of a plurality of recurrently connected excitatory neurons. Further, a first set of spatio-temporal features are extracted for each ECG time-series data based on the neuronal trace values of the plurality of excitatory neurons.
The logistic regression-based ECG classifier 206 of the reservoir-based spiking neural network 200 is trained by passing the neuronal trace values of the plurality of recurrently connected excitatory neurons to learn one or more class labels.
Similarly, the feed-forward spiking neural network 300 also fetches the training dataset as input. Here, the training dataset comprise the plurality of ECG time-series data is represented as {F(1), F(2), . . . F(n)} at time F(t). Here, at time t, where F(t) is being one sample value in the time series and is further fetched by the peak-based spike encoder 302. The plurality of ECG time-series data are processed to obtain neuronal trace values of a plurality of feed forward neurons. The peak-based spike encoder 302 processes the plurality of ECG time-series data to obtain a plurality of encoded spike trains based on one or more peaks detected.
The SNN layer 304 obtains neuronal trace values of a plurality of feed forward neurons from the plurality of encoded spike trains. Further, a second set of spatio-temporal features are extracted based on the neuronal trace values of the plurality of feed forward neurons for each ECG time-series data from each feed-forward neuron.
The logistic regression-based ECG classifier 306 is trained by a plurality of encoded spike trains based on one or more peaks detected from each ECG time-series data.
Referring now to the steps of the method 400, at step 404, the one or more hardware processors 104 train a logistic regression-based ECG classifier associated of at least one of the first spiking neural network and the second spiking neural network with the plurality of ECG time-series data. The peak-based spike encoder 202 of the reservoir-based spiking neural network 200 and the peak-based spike encoder 302 of the feed-forward spiking neural network 300 process the plurality of ECG time-series data to obtain the plurality of encoded spike trains by initially filtering the plurality of ECG time-series data by using a low pass filter.
Further, the plurality of ECG time-series data are passed through an integrate and fire (IF) neuron model having an initial membrane threshold value. Further, the method detects one or more spike trains of the plurality of ECG time-series data which occurred above a first threshold timestep and discards one or more spike trains that precede below the first threshold timestep. The first threshold timestep may be a value 200. Such example of threshold timestep shall not be construed as limiting the scope of the present disclosure. The one or more spike trains of each ECG time-series data comprising a positive slope and a negative slope are identified.
Further, the one or more spike trains of each ECG time-series data are classified as a first wave if the occurrence of each spike train is within a second threshold timestep and if maximum derivative of each ECG time-series data is lesser than half the maximum derivative of each spike train occurred at the time of previous instance. The first wave may be for example a T-wave. The second threshold timestep may be a value 360.
Further, the one or more spike trains of each ECG time-series data are classified as a second wave if the occurrence of each spike train is above the second threshold timestep and if maximum derivative of each ECG time-series data is greater than half the maximum derivative of each spike train occurred at the time of previous instance and if one or more spiking activities of each spike train exceeds a third threshold and otherwise classified as noise Further, the initial membrane threshold value of the IF neuron model are adjusted based on the change occurred in the plurality of ECG time-series data and a previous spiking activity. The second wave may be for example a QRS-complex. The peaks, onsets, and offsets of ECG components (for example, QRS complex and T-wave) are detected and their precise timings are taken as spike event times. For each of these components separate spike trains are obtained but the temporal correlation is maintained in the spike domain.
Referring now to the steps of the method 400, at step 406 process a plurality of test dataset received as input into at least one of the spiking neural network to obtain associated class label from the logistic regression-based ECG classifier. The plurality of test dataset are first encoded into one or more spike trains. Then each spike train is passed into at least one of the spiking neural network for feature extraction and learning. Neuronal activities are then presented to a simple linear classifier for final classification.
The stability and performance (referring to Table 1) of each spiking neural network depend heavily on careful tuning of different network parameters. For the reservoir-based spiking neural network 200 the major parameters are tuned with number of excitatory and inhibitory neurons (Nex and Ninhi respectively), Number of recurrent connections Nrec various connectivity parameters like input encoder outdegree (Inputoutdegree) which controls the connection between the spike encoder and the reservoir.
Moreover, a 5-tuple of weight scalar values of, (input-to-excitatory, excitatory-to-input, inhibitory-to-excitatory, inihibitory-to-inihibitory) are tuned and fixed for the inter-population network connections having
The feed-forward based spiking neural network 300 has number of neurons in the SNN layer. For both the spiking? neural network architectures, the threshold voltage=−55.0 and resting potential=−65.0 for IF neuron model. The membrane time constant (m) of LIF controls the decay of the neuronal membrane 291 potential and has been set to different values for different cases.
In one embodiment, the system 100 is validated with ECG Atrial Fibrillation datasets with different attributes and complexity. The method of the present disclosure was initially validated with UCR datasets such as ECG200, ECG5000, and the like. Each of the datasets contained ECG time-series data of people from different age group, gender recorded over different time period and having distinctive features. It is noted that repository of freely available medical research data (PhysioNet) dataset provides ECG recording (between 30 sec and 60 sec in length), where the recording shows 4 classes for example normal sinus rhythm, atrial fibrillation (AF), an alternative rhythm, or is too noisy to be classified. The last one is widely known Massachusetts Institute of Technology arrhythmia database(MIT-BIH) having 48 half hour long two-channel ECG recordings of 47 participants.
In one embodiment, the method of the present disclosure is implemented using a graphical processing unit (GPU) based SNN simulator. Here, for each of the datasets, both the spiking neural networks are tuned with parameters such as number of neurons and its associated connections, and neuronal model parameters obtains the best performance. The details of the SNN hyper-parameters are discussed in later embodiments.
The reservoir-based spiking neural network 200 understands the
dynamics of temporal varying ECG time-series data. However, the classification accuracy of the reservoir 204 is observed to be lower than that of existing deep learning as referred in Table 2. Gaussian encoder magnifies the whole ECG time-series data in temporal spike domain when focused on specific ECG wave signatures.
As a result, one or more spikes enters into the first spiking neural network 200 and the neuronal activities of the reservoir 204 starts overlapping different classes thereby reducing the accuracy. The Delta modulator encoder improves the accuracy of the reservoir 204 on-demand encoding and resulting sparsity in spikes. However, when the method of the present disclosure the peak-based spike encoder 202 when coupled with the reservoir-based spiking neural network 200 achieves better accuracy when compared to other two existing encoders.
Upon replacing the reservoir 204 with a computationally light feed-forward spiking network 300 (with peak-based spike encoder), the accuracy does not degrade much and improves the performance. It is observed that the peak-based spike encoder 202 achieves highest accuracy across all five datasets having variety in terms of size of training dataset and testing dataset, data complexity, length of each sample ECG time series and number of classes. Also, it has been experimentally noted that if the feed-forward based spiking neural network 300 is evaluated on PhysioNet data classifies normal and abnormal AF classes only, then it has achieved with 92% accuracy. Performance of peak based spike encoder is superlative because of efficient ECG morphology specific spike encoding.
Further, usually the number of synaptic operations is considered as the average number of spikes per timestep for the entire training and inference. Here, for all the network encoder combinations and for all the five datasets, the synaptic operations per timestep indicates an estimated energy consumption on NC platforms. Table 3 shows the best estimates for number of synaptic operations per timestep.
As expected, owing to large spike activity, Gaussian encoder with reservoir is computationally most expensive whereas peak-based spike encoder with the feed forward based spiking neural network has sparse spikes encoded and a smaller number of neurons in network.
The written description describes the subject matter herein to enable any person skilled in the art to make and use the embodiments. The scope of the subject matter embodiments is defined by the claims and may include other modifications that occur to those skilled in the art. Such other modifications are intended to be within the scope of the claims if they have similar elements that do not differ from the literal language of the claims or if they include equivalent elements with insubstantial differences from the literal language of the claims.
The embodiments of present disclosure herein address unresolved problem of spiking neural networks. The embodiment, thus provides method and system for spiking neural network based ECG classifier for wearable edge devices. Moreover, the embodiments herein further provide the peak-based spike encoder helps achieving highest performance for classifying labels. However, the real benefit comes when computational cost and energy consumption is looked into. Energy requirement of an SNN is directly proportional to total number of synaptic operations (SOP) executed during runtime. Encoding performance of peak-based spike encoder can be improved by removing the noise peaks in ECG time-series data by correlating the signal from another auxiliary low energy sensor and the like.
It is to be understood that the scope of the protection is extended to such a program and in addition to a computer-readable means having a message therein such computer-readable storage means contain program-code means for implementation of one or more steps of the method, when the program runs on a server or mobile device or any suitable programmable device. The hardware device can be any kind of device which can be programmed including e.g., any kind of computer like a server or a personal computer, or the like, or any combination thereof. The device may also include means which could be e.g., hardware means like e.g., an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a combination of hardware and software means, e.g., an ASIC and an FPGA, or at least one microprocessor and at least one memory with software processing components located therein. Thus, the means can include both hardware means, and software means. The method embodiments described herein could be implemented in hardware and software. The device may also include software means. Alternatively, the embodiments may be implemented on different hardware devices, e.g., using a plurality of CPUs.
The embodiments herein can comprise hardware and software elements. The embodiments that are implemented in software include but are not limited to, firmware, resident software, microcode, etc. The functions performed by various components described herein may be implemented in other components or combinations of other components. For the purposes of this description, a computer-usable or computer readable medium can be any apparatus that can comprise, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The illustrated steps are set out to explain the exemplary embodiments shown, and it should be anticipated that ongoing technological development will change the manner in which particular functions are performed. These examples are presented herein for purposes of illustration, and not limitation. Further, the boundaries of the functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternative boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed. Alternatives (including equivalents, extensions, variations, deviations, etc., of those described herein) will be apparent to persons skilled in the relevant art(s) based on the teachings contained herein. Such alternatives fall within the scope of the disclosed embodiments. Also, the words “comprising,” “having,” “containing,” and “including,” and other similar forms are intended to be equivalent in meaning and be open ended in that an item or items following any one of these words is not meant to be an exhaustive listing of such item or items or meant to be limited to only the listed item or items. It must also be noted that as used herein and in the appended claims, the singular forms “a,” “an,” and “the” include plural references unless the context clearly dictates otherwise.
Furthermore, one or more computer-readable storage media may be utilized in implementing embodiments consistent with the present disclosure. A computer-readable storage medium refers to any type of physical memory on which information or data readable by a processor may be stored. Thus, a computer-readable storage medium may store instructions for execution by one or more processors, including instructions for causing the processor(s) to perform steps or stages consistent with the embodiments described herein. The term “computer-readable medium” should be understood to include tangible items and exclude carrier waves and transient signals, i.e., be non-transitory. Examples include random access memory (RAM), read-only memory (ROM), volatile memory, nonvolatile memory, hard drives, CD ROMs, DVDs, flash drives, disks, and any other known physical storage media.
It is intended that the disclosure and examples be considered as exemplary only, with a true scope of disclosed embodiments being indicated by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
202221068002 | Nov 2022 | IN | national |