Source-linked AI summary

Ultra Low-Power and Real-time ECG Classification Based on STDP and R-STDP Neural Networks for Wearable Devices

Alireza Amirshahi, Matin Hashemi

arXiv:1905.02954v4eess.SPcs.LGcs.NE

TL;DR

Intermittent arrhythmias can be difficult to detect from short ECG recordings, while continuous wearable monitoring is constrained by computational and energy costs. This paper uses STDP and R-STDP in an on-device SNN classifier; it reports comparable accuracy to previous methods and significantly lower energy consumption.

  • Problem

    Intermittent arrhythmias may be missed in short ECG recordings, while continuous wearable monitoring makes computational cost and energy consumption important constraints.

    Source: §I · p. 1
  • Method

    The paper uses an SNN to extract ECG patterns with STDP and classify them with reward-modulated STDP (R-STDP).

    Source: §I · pp. 1–2
  • Results

    Accuracy is comparable to previous methods, and energy consumption is 1.78 µJ per beat, significantly smaller than previous neural-network-based solutions.

    Source: §V · p. 7, B. Real-time Operation and Energy… · p. 7
  • Takeaways & Limitations

    The authors conclude that the method is suitable for ultra-low-power wearable ECG monitoring and real-time operation.

    Source: §V · p. 7, B. Real-time Operation and Energy… · p. 7

Abstract

from arXiv · show

This paper presents a novel ECG classification algorithm for real-time cardiac monitoring on ultra low-power wearable devices. The proposed solution is based on spiking neural networks which are the third generation of neural networks. In specific, we employ spike-timing dependent plasticity (STDP), and reward-modulated STDP (R-STDP), in which the model weights are trained according to the timings of spike signals, and reward or punishment signals. Experiments show that the proposed solution is suitable for real-time operation, achieves comparable accuracy with respect to previous methods, and more importantly, its energy consumption is significantly smaller than previous neural network based solutions.

I. INTRODUCTION

Intermittent arrhythmias can be missed in short ECG recordings, motivating continuous monitoring. The paper proposes on-device SNN-based ECG classification for real-time, low-power wearable use.

I. INTRODUCTION

  • Continuous ECG monitoring is crucial because arrhythmias may occur intermittently and be difficult to detect from short recordings.The paper identifies early detection as important for controlling cardiovascular disease progression.Source: §I · p. 1
  • Existing wearable approaches either extract limited ECG features, rely on remote computation, or analyze recordings offline.Remote classification also depends on wireless-connection availability, speed, and energy.Source: §I · p. 1
  • The proposed SNN algorithm performs ECG classification in real time on the wearable device itself.Its approach is intended to avoid connection to or assistance from other systems.Source: §I · p. 1
  • The method uses STDP for spike-pattern extraction and R-STDP for classification, with all layers operating in the spike domain.The learning rules in the STDP and inhibitory layers are optimized for ECG classification.Source: §I · p. 2

II. NEURON MODEL

The paper describes SNNs as processing information through spike signals and their timing, and uses a Leaky Integrate-and-Fire neuron model. In that model, incoming spikes and a leaky current change membrane potential, which influences subsequent firing.

II. NEURON MODEL

  • SNNs encode information in spike timing, and a neuron fires when its membrane potential reaches a threshold.The illustrated example has nine incoming spikes raising the receiving neuron's potential to threshold twice, producing two output spikes.Source: §II · p. 2, Figure 2 · p. 3
  • Because SNN neurons do not fire continuously, the paper notes that their energy consumption is significantly smaller than that of other neural-network types.Source: §II · p. 2
  • A synapse connects a pre-synaptic neuron to a post-synaptic neuron and carries a weight that affects spike propagation.A larger synaptic weight makes the receiving neuron more likely to fire and increases its firing rate.Source: §II · pp. 2–3
  • The Leaky Integrate-and-Fire model describes membrane-potential change through incoming spikes and a leaky current that tends toward the resting value.The spike contribution is zero when no input spike arrives; otherwise it affects the rate of potential change.Source: §II · pp. 2–3

III. PROPOSED SNN-BASED ECG CLASSIFICATION

The method segments each heartbeat into overlapping windows and encodes each window as spikes. STDP extracts spike patterns with Gaussian and inhibitory layers, and R-STDP classifies the extracted features.

III. PROPOSED SNN-BASED ECG CLASSIFICATION

  • The pipeline extracts spike patterns with STDP, assisted by Gaussian and inhibitory layers, then classifies the features with R-STDP.The STDP and inhibitory-layer formulations are optimized for ECG classification.Source: §III · p. 3

A. Segmentation

  • Heartbeat segments span 0.25 seconds before and 0.45 seconds after an R peak.The R peak can dominate STDP pattern extraction, so each heartbeat is divided into overlapping windows that are processed separately.Source: A. Segmentation · p. 3

B. Spike Encoding

  • Each window sample is encoded as Poisson-process spikes at a rate proportional to its amplitude, using separate encoder cells for positive and negative values.The positive and negative encoder cells connect to odd and even windows, respectively, producing 2Q windows in the next layers.Source: B. Spike Encoding · p. 3

C. Gaussian Layer

The Gaussian layer adjusts spike counts to support STDP pattern extraction, using window-specific weights and a Gaussian kernel to reduce the influence of side peaks in overlapping windows.

C. Gaussian Layer

  • The Gaussian layer adjusts spike counts to support the later STDP-based pattern extraction.Each window is processed separately, with its input synapse weight adjusting the neuron's spike firing rate.Source: C. Gaussian Layer · p. 3
  • A Gaussian kernel reduces the influence of side peaks, which can appear at a window's edge and in the middle of a neighboring window.The kernel's mean centers it in the window, while its variance reduces—but does not eliminate—the effect of side peaks.Source: C. Gaussian Layer · pp. 3–4
  • The trainable β_q is updated so windows produce the same target average number of output spikes.β_q is initialized to 1 and iteratively updated using training data because neuron behavior is nonlinear.Source: C. Gaussian Layer · p. 4

D. STDP-Based Pattern Extraction

STDP extracts ECG patterns by adjusting synaptic weights according to the relative timing of pre- and post-synaptic spikes. The section analyzes weight divergence under the usual rule and motivates an optimized rule for ECG patterns with varying amplitudes.

D. STDP-Based Pattern Extraction

  • STDP increases a synaptic weight when the presynaptic spike precedes the postsynaptic spike and decreases it when their order is reversed.The magnitude of change is greatest when the timing difference is zero and decreases exponentially as its absolute value grows.Source: D. STDP-Based Pattern Extraction · p. 4
  • The usual STDP rule creates positive feedback that pushes weights toward positive or negative infinity.Increasing a weight makes a presynaptic spike more likely to trigger a postsynaptic spike, which can further increase that weight.Source: D. STDP-Based Pattern Extraction · p. 4
  • For ECG classification, clipping weights alone is insufficient, motivating an optimized STDP learning rule.The section contrasts this need with computer-vision practice, where negative weights are clipped to zero and positive weights to w_max.Source: D. STDP-Based Pattern Extraction · pp. 4–5
  • The optimized rule addresses the risk that usual STDP trains weights for intermediate-amplitude inputs randomly to either 0 or w_max, reducing capacity to capture complex arrhythmia patterns.In the toy example, the proposed rule amplifies LTD as a weight grows, allowing an intermediate weight rather than forcing it toward an endpoint.Source: D. STDP-Based Pattern Extraction · p. 5, Figure 4 · p. 5
  • The proposed rule makes LTD stronger than LTP as a weight increases, while its steep initial γ(w) slope helps suppress minor input variations.After a real pattern is captured, γ(w) changes little, so the difficulty of further increasing the weight stays nearly the same.Source: D. STDP-Based Pattern Extraction · p. 5

E. Inhibitory Layer

The inhibitory layer discourages neurons in the same window from capturing similar patterns, while its asymmetric structure and modified learning rule limit overly strong inhibition.

  • Inhibitory neurons suppress competing neurons in the same window, helping the STDP layer capture different patterns.Source: E. Inhibitory Layer · p. 5
  • When patterns diverge little, inhibition can become too strong and incapacitate STDP training, so the modified rule limits growth of negative weights.The rule makes the weight change less negative as the weight becomes more negative.Source: E. Inhibitory Layer · p. 6
  • Randomly inactivating some inhibitory neurons each training epoch distributes authority among STDP neurons; inhibitory neurons are inactive during inference.Source: E. Inhibitory Layer · p. 6

F. Classification via R-STDP

The final R-STDP layer classifies features extracted by the STDP layer using supervised learning. Correct predictions receive reward signals and incorrect predictions receive punishment signals.

G. Training Method

The four trainable layers are trained successively: the Gaussian layer first, the STDP and inhibitory layers together, and the R-STDP layer last.

  • Training proceeds from the Gaussian layer to simultaneous STDP and inhibitory-layer training, then to the R-STDP layer.Source: G. Training Method · p. 6
  • Negative weights are clipped to zero throughout the network, except inhibitory backward synapses, where positive weights are clipped to zero.Source: G. Training Method · p. 6

A. Classification Performance

The evaluation uses the MIT-BIH ECG arrhythmia database and compares accuracy and network type with previous works. The described test protocol uses DS2 patients and combines DS1 samples with each patient's initial ECG segment for training.

  • The proposed solution is implemented using Brian2, a Python package for evaluating spiking neural networks.Source: A. Classification Performance · p. 6
  • Table I compares the proposed solution with previous works in terms of accuracy and network type.Source: Table I · p. 7
  • The test data comprise 24 specified patients from DS2, while training combines representative DS1 heartbeats with each patient's first five minutes of ECG.The first five minutes are skipped in the test data; the passage states this training setup complies with AAMI standards.Source: A. Classification Performance · p. 7

B. Real-time Operation and Energy Consumption

The proposed network supports real-time ECG classification and uses 1.78 µJ per beat, with accuracy comparable to previous methods and significantly lower energy consumption. Its reported timing configuration supports up to 300 beats per minute.

B. Real-time Operation and Energy Consumption

V. CONCLUSION

  • Both pattern extraction and classification are implemented using spiking neural networks, with learning rules optimized for ECG classification.Source: §V · p. 7
  • 1.78 µJ per beat, with accuracy comparable to previous methods and significantly lower energy consumption than previous neural-network solutions.Source: §V · p. 7, B. Real-time Operation and Energy… · p. 7
Loading 1905.02954v4…