Neuromorphic Heart Rate Monitors: Neural State Machines for Monotonic Change Detection
Alessio Carpegna Chiara De Luca Federico Emanuele Pozzi Alessandro Savino Stefano Di Carlo Giacomo Indiveri Elisa Donati




Neuromorphic Heart Rate Monitors: Neural State Machines for Monotonic Change Detection
    
Alessio Carpegna1, 
Chiara De Luca23, 
Federico Emanuele Pozzi4, 
Alessandro Savino1,
Stefano Di Carlo1,

Giacomo Indiveri2, 
Elisa Donati2




1Department of Control and Computer Engineering, Politecnico di Torino, Torino, Italy

2Institute of Neuroinformatics, University of Zurich and ETH Zurich, Zurich, Switzerland
 

3Digital Society Initiative, University of Zurich, Zurich, Switzerland


4Neurology Department, Fondazione IRCCS San Gerardo Dei Tintori, Monza, Italy






This paper has received funding from: The NEUROPULS project in the European Union’s Horizon Europe research and innovation programme under grant agreement No. 101070238; Bridge Fellowship founded by the Digital Society Initiative at University of Zurich (grant no.G-95017-01-12).  We also thank the University of Zurich for supporting this project.

    July 2024
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================




§ ABSTRACT 
Detecting monotonic changes in heart rate (HR) is crucial for early identification of cardiac conditions and health management. This is particularly important for dementia patients, where HR trends can signal stress or agitation. Developing wearable technologies that can perform always-on monitoring of HRs is essential to effectively detect slow changes over extended periods of time. 
However, designing compact electronic circuits that can monitor and process bio-signals continuously, and that can operate in a low-power regime to ensure long-lasting performance, is still an open challenge.
Neuromorphic technology offers an energy-efficient solution for real-time health monitoring. We propose a neuromorphic implementation of a Neural State Machine (NSM) network to encode different health states and switch between them based on the input stimuli. Our focus is on detecting monotonic state switches in electrocardiogram data to identify progressive HR increases. This innovative approach promises significant advancements in continuous health monitoring and management.








§ INTRODUCTION


Detecting and quantifying HR has emerged as a critical tool for identifying potential pathologies and providing valuable insights into cardiovascular health <cit.>. Among variable behaviors, monotonic HR changes indicate unidirectional trends, either increasing or decreasing, in average HR over time.
In non-clinical settings, such as general well-being and athletic training, tracking monotonic changes in HR is essential for evaluating physical fitness and recovery rates <cit.>. 

In clinical settings, monitoring monotonic changes in HR is crucial for medical diagnosis and patient monitoring. A consistent monotonic increase or decrease in heart rate can be an early indicator of cardiac conditions such as arrhythmia, bradycardia, or tachycardia. 
Early detection of these trends enables timely medical intervention, preventing more severe complications and improving patient outcomes <cit.>.


Understanding monotonic increases in HR is also particularly important in patients with dementia, as it can help detect physiological stress or discomfort that could precede or accompany agitation states <cit.>. By monitoring trends in dementia care and detecting early signs of agitation, healthcare providers and caregivers can intervene more promptly and effectively. This may potentially reduce the severity and frequency of agitation episodes, thereby improving the quality of care and the quality of life for dementia patients and reducing the burden on caregivers <cit.>.

Due to the importance and, at the same time, the difficulty of detecting these changes for human interpreters, an always-on system capable of continuously monitoring and detecting changes in average HR can be extremely impactful. Always-on devices for health monitoring must meet stringent requirements, including low power consumption and real-time processing. For patients with dementia, these devices must operate for extended periods without frequent recharging, as subjects might not remember to charge the device regularly. Therefore, a low-power device that can be used as a “wear and forget” system is essential to ensure effective health management. 

To this end, neuromorphic technology offers a compelling solution, providing energy-efficient and reliable processing capabilities <cit.>. Sensory-processing systems built using mixed-signal neuromorphic circuits are well-suited to the demands of continuous health monitoring <cit.>. Example solutions have already been successfully applied in a wide range of wearable applications, such as ECG anomaly detection <cit.>, HFO detection <cit.>, and EMG decoding <cit.>.



In this paper, we present for the first time a neuromorphic implementation of an on-line signal processing system to specifically detect monotonic changes in average HR over a long period of time. We deploy computational primitives of analog neuron circuits, such as recurrent neural network models of finite state machines (i.e., NSM) <cit.> that can switch between states, each encoding different average HR conditions, independent of the time elapsed between state changes. Here, we focus on a monotonic state switch, tested on ECG, to detect a progressive HR increase. We validate our model's ability to track HR changes during activities (i.e., walking, cycling) by testing it on a dataset with varying patterns. We demonstrate how the model accurately follows monotonic changes (steady increase or decrease) while remaining inactive for non-monotonic signals. We further show how the robust computational properties of NSM allow the mixed-signal neuromorphic processor to produce accurate and reliable results. The low power consumption, 90 μ W, and real-time processing features of these neuromorphic circuits make them ideal candidates for building continuous, long-term health monitoring devices in both clinical and non-clinical settings.



§ MATERIALS AND METHODS





 §.§ Neuromorphic Hardware


The neuromorphic processor used in this study is the DYNAP-SE chip <cit.>. It is a custom-designed asynchronous mixed-signal processor that features analog spiking neurons and synapses that mimic the biophysical properties of their biological counterparts in real-time. The chip comprises four cores, each containing 256 AdEx InF neurons. Each synapse can be configured as one of four types: slow/fast and inhibitory/excitatory. Each neuron includes a CAM block with 64 addresses, representing the pre-synaptic neurons to which it is connected. Digital peripheral asynchronous input/output logic circuits receive and transmit spikes via the AER communication protocol <cit.>. In this system, each neuron is assigned a unique address encoded as a digital word, which is transmitted using asynchronous digital circuits as soon as an event is generated. The chip features a fully asynchronous inter-core and inter-chip routing architecture, allowing flexible connectivity with microsecond precision even under heavy system loads.





 §.§ Dataset and signal processing


To test our model, we selected an available dataset that includes left wrist PPG and chest ECG recordings taken while participants used an indoor treadmill and exercise bike, accompanied by simultaneous motion data from accelerometers and gyroscopes <cit.>. Participants performed various exercises, such as walking, light jogging/running on a treadmill, and pedaling at low and high resistance, each for up to 10 minutes. The dataset includes records from 8 participants, with most participants spending 4 to 6 minutes per activity. The signals were sampled at 256 Hz, and the ECG records were processed with a 50 Hz notch filter to remove mains interference.

An energy-based approach was devised for signal-to-spike conversion <cit.>. The proposed method comprises two stages: bandpass filtering and LIF neurons <cit.>.
Each input channel was processed through a series of bandpass filters. We used four bands: 60-82 (#0), 82-105 (#1), 105-128 (#2), and 128-150 (#3) bpm, employing fourth-order Butterworth filters. This covers a reasonable range of HR variation, spanning from a relaxed state to a tachycardiac one. Afterward, the signal was full-wave rectified and injected as a time-varying current into a simple LIF neuron. 




 §.§ Network on chip



    

Figure <ref> shows the designed NSM. The architecture is based on EI-balanced populations of AdEx InF neurons. These populations can maintain sustained activity for extended periods, much larger than the time constants of the neurons themselves. This allows the network to implement a working memory capable of processing signals that change slowly compared to the time scales used within the chip.

The core of the network is a set of four EI-balanced populations, organized in a WTA architecture. The shared inhibition population (red) encodes the state of the network by sustaining the activity of a specific population while silencing all the others. This guarantees that when receiving the input signal, such as an ECG recording, only the population corresponding to the most active frequency range is activated. 

A second set of EI-balanced populations, named Gating EI-balanced populations, is used to control the transition between different states. The goal is to target a progressive increase in HR, making the system robust to short fluctuations or temporary bpm decreases, following only the average trend of the input. 
The mechanism of dis-inhibition <cit.> is exploited to ensure the network switches only to increasing states. The gating populations continuously inhibit the inactive elements of the WTA network, making them insensitive to any input stimulus. When a state is activated, it turns off (inhibits) the gating population of the subsequent state. This leads to the dis-inhibition of the next state, which makes it sensitive to the input. At the same time, it activates all the gating populations of previous states and the states following the next. This guarantees that the network follows only monotonic transitions between states and does not require precise tuning of the populations and connection synapses to make the system work. What matters is (i) that populations are sufficiently stable to maintain a sustained activity and (ii) that the inhibition between the gating populations and the WTA states is strong enough to silence any spiking activity completely. Finally, state 0 has no gating populations connected to it. This allows it to be used as a reset state: if the monotonic increase is only partial, and the HR returns to the relaxation range before reaching the alarming threshold, the network restarts, waiting for a new ramp-up in the input.




§ EXPERIMENTAL RESULTS



To obtain reliable computation in the NSM while minimizing the overall network size, we used 16 neurons per population, with a total requirement of 176 neurons. Table <ref> shows the average connection probabilities for different populations. The resulting network is compact, fitting well within a single core of  the target chip <cit.>. Each population exhibits an average firing rate of approximately 50Hz. The total power consumption can be estimated by integrating the various contributions required for spike generation and communication <cit.>. The obtained average power consumption is around 90 μ W, indicating that our network successfully balances stable, sustained activity with low power consumption.



        


    

The behavior of the hardware system was first tested using control stimuli produced as 50Hz Poisson input spike trains. Figure <ref> shows the sustained activity of one EI-balanced population stimulated for one second. As shown, the network can keep a stable activity even when the input is removed. 




 §.§ WTA network: non-monotonic state transitions


As a second test, we evaluated the dynamics of the WTA network. Figure <ref>(a) shows the response of the network when stimulated with Poisson spike trains through a protocol covering all the possible transitions. In this case, each state is activated when receiving the corresponding input, regardless of the order of arrival. Once stimulated, the population becomes active, it suppresses the activity of all other populations, and stays active until a new input is provided to a different population.



 §.§ NSM network: monotonic state transitions


When adding the gating connections, the response of the network becomes the one shown in Fig. <ref>(b). The stimulation protocol is the same as in Section <ref>. In this case, however, the network switches state only (i) towards  a higher state, following the expected monotonic behavior, or (ii) towards state 0, which behaves as a reset state for the network, as mentioned in Section <ref> 



 §.§ Network dynamics on real ECG signal


Finally, we evaluated the network performance using real ECG signals. Here, we demonstrate its robust and coherent ability to monitor and detect monotonic increases in HR. To achieve this, we fed the network pre-processed ECG recordings from the dataset described in Section <ref>. Specifically, we tested the network under two different conditions: during an intense physical activity, namely cycling, lasting approximately 10 minutes (Fig. <ref>(a)), and during a walking session of around 6 minutes (Fig. <ref>(b)). The first scenario correctly detects a complete ramp-up of the HR, leading to the activation of the alarming state. These results show how the network is robust to spurious transitions: at time zero, the stimulation on input 3, caused by noise in the recording upper band, is ignored since state 3 is completely inhibited by its gating population. The same effect can be observed between 300 and 400 seconds with the network ignoring noisy stimuli from input 1. Note that also the weak stimuli coming from input 0 are ignored both in state 1 and 2, despite the absence of a gating population in this case. This shows that the WTA dynamics by themselves are robust to spurious transitions and a complete relaxation is required to reset the network, thus restarting the monotonic increase. This is even more evident in the walking session: in this case, the ramp-up is only partial, given the lower effort required. The network remains stable in state 1, waiting for a further increase in the HR and ignoring the noise on input 0. 














§ CONCLUSION


Our results show that a small and simple network, implemented with mixed-signal analog/digital neuromorphic circuits, can reliably monitor a monotonic HR trends over extended periods, paving the way for always-on health monitoring systems that are both efficient and long-lasting. The low power consumption of the neuromorphic circuits enables continuous operation for extended amounts of time, making it ideal for wearable devices for health monitoring. Future research will focus on replacing ECG with PPG signals measured at the wrist and addressing the challenges of noise and movement artifacts. Additionally, we will transition from healthy subjects to patients affected by neuropathologies, such as dementia, which impact HR over long periods, despite the absence of cardiac pathology.

This technology promises significant improvements in patient care and health management, especially in scenarios requiring constant monitoring and rapid response, thus enhancing overall quality of life.



