Source-linked AI summary

Hardware-Matched Spiking Neural Networks for Real-Time Purkinje Cell Spike Classification

Arooba Farhan, Afsah Syed, Muhammad Fahd Ibrahim Bhatti, Muhammad Areeb Khalid Kidwai, Muhammad Ahsan Salar Khan, Vincenzo Romano, Muhammad Ali Siddiqi

arXiv:2610.37104v1cs.ARcs.AI

TL;DR

Wired headstages restrict natural movement, while untethered devices face raw-data transmission limits that motivate on-headstage classification. The paper develops two hardware-matched SNNs and evaluates them on cells unseen during training; the models achieve distinct accuracy and hardware outcomes, with efficiency depending on platform.

  • Problem

    Wired headstages restrict movement, while untethered recordings face costly raw-data transmission and constrained embedded methods for spike sorting.

    Source: §I · p. 1
  • Method

    The paper develops ConvSNN and StreamSNN, compact classifiers matched to microcontroller acceleration and dedicated digital hardware, respectively.

    Source: §I · p. 1
  • Results

    0.873 CS F1 for ConvSNN and 0.837 for StreamSNN on unseen cells; MVP acceleration reduces ConvSNN latency by 62.3% and raises estimated 50 mAh battery life to 33.73 hours.

    Source: §IV · p. 4
  • Takeaways & Limitations

    SNN efficiency depends on the platform: the MVP benefits from dense acceleration, while StreamSNN is implemented as a compact SKY130 circuit.

    Source: §IV · p. 4

Abstract

from arXiv · show

Distinguishing Purkinje cell (PC) simple spikes (SSs) from complex spikes (CSs) is key to studying cerebellar function. PC recordings commonly rely on wired headstages, whose tethers restrict natural movement in freely behaving animals. Untethered headstages remove this constraint, but cannot continuously transmit raw recordings within their power budgets, making on-headstage spike classification an attractive form of compression, provided it runs accurately in real time on constrained hardware. This work presents two compact spiking neural networks (SNNs) matched to their target hardware: ConvSNN, which maps to the Matrix Vector Processor (MVP) of an EFM32PG28 microcontroller, and StreamSNN, which processes one waveform value per timestep using learned time constants and fixed synaptic delays for a dedicated SKY130 circuit. Evaluated on cells unseen during training, ConvSNN achieves a CS F1 of 0.873 with 1,018 parameters and StreamSNN 0.837 with 527 parameters, both with eight-bit weights. On the microcontroller, MVP acceleration reduces ConvSNN latency by 62.3\% and extends estimated battery life to 33.73~hours on a 50~mAh battery. In SKY130, StreamSNN occupies 0.173~mm$^2$ and consumes 0.46~$\mu$J per event, with 0.2~ms of computation within an 8.3~ms end-to-end latency.

I. INTRODUCTION

Wired headstages restrict movement, while untethered devices face bandwidth and power limits that make on-device spike classification attractive. The work develops two hardware-matched SNN classifiers and evaluates them on cells unseen during training.

I. INTRODUCTION

  • One channel sampled at 24.414 kHz and 16-bit resolution produces approximately 390 kb/s, making continuous raw-data transmission costly for battery-powered devices.Wired headstage tethers also restrict natural movement in freely behaving animals.Source: §I · p. 1
  • Spike sorting compresses each event to a spike type and sample index, but existing PC methods can exceed embedded resources or require both LFPs and APs.The system overview depicts on-device detection and classification followed by storage of sample index and spike type.Source: §I · p. 1, Figure 1 · p. 2
  • Prior embedded PC classifiers established feasibility but did not evaluate generalization to unseen PCs or explore SNNs.SNN efficiency depends on network design, firing frequency, and mapping to target hardware; fewer spikes do not always mean lower hardware cost.Source: §I · p. 1
  • The work develops ConvSNN for the EFM32PG28 MVP and StreamSNN for a dedicated SKY130 circuit, evaluating both on cells unseen during training.ConvSNN processes a full event window with shared convolutional filters; StreamSNN processes one sample per timestep using learned time constants and fixed delays.Source: §I · p. 1, Figure 1 · p. 2
  • 0.873 CS F1 for ConvSNN and 0.837 for StreamSNN are reported with 1,018 and 527 parameters, respectively, and eight-bit weights.The work also implements both models on their target hardware and reports latency, energy, and area.Source: §I · p. 1

II. SYSTEM DESIGN AND IMPLEMENTATION

The system uses causal normalization and NEO detection to identify candidate spikes, then aligns and classifies each waveform window.

II. SYSTEM DESIGN AND IMPLEMENTATION

  • The nonlinear energy operator detects candidate spikes in recordings normalized using only past samples.Each detection is aligned to its trough and defines a fixed waveform window for classification as SS, CS, or FP.Source: §II · p. 2
  • Each detected event is aligned to its trough before its waveform window is classified as SS, CS, or FP.The pipeline uses ConvSNN or StreamSNN for classification.Source: §II · p. 2
  • The system stores detected events as classified spike types rather than transmitting raw recordings.The event window is defined after detection and trough alignment.Source: §II · p. 2

A. Recorded Data and Preprocessing

Recordings are normalized from past samples to accommodate large noise-level differences, and NEO detection yields aligned, labeled waveform windows for classification.

A. Recorded Data and Preprocessing

  • Noise levels vary by more than 70× across the 64 recordings, so each trace is normalized from a sliding 2 s window updated every 0.5 s using past samples.The baseline and noise estimate use the median and median absolute deviation, which are largely unaffected by spikes.Source: A. Recorded Data and Preprocessing · p. 2

B. NEO Detection and Waveform Extraction

  • NEO emphasizes sharp, high-amplitude spikes over slower background activity, and a candidate is detected when its smoothed energy exceeds a fixed multiple of its recent average.A short dead time prevents repeated detections of the same spike.Source: B. NEO Detection and Waveform Extraction · p. 2
  • Each event uses a trough-aligned 57-value window spanning 30 samples before and 197 after the trough, and is labeled SS, CS, or FP by annotation matching within ±0.5 ms.When an SS and CS both match, the CS label is used; unmatched detections are FPs.Source: B. NEO Detection and Waveform Extraction · p. 2

C. SNN Architectures and Training

ConvSNN processes a fixed waveform window using shared convolutions, while StreamSNN processes waveform samples sequentially with learned time constants and delayed spikes.

1) ConvSNN:

  • ConvSNN reuses convolutional features from a fixed 57-value input across eight timesteps, then classifies through hidden LIF neurons and three non-spiking outputs.Its binary hidden-layer inputs allow synaptic operations to reduce to additions that can be skipped for inactive inputs.Source: 1) ConvSNN · p. 2

2) StreamSNN:

  • StreamSNN processes one waveform value per timestep, using learned input-neuron decay rates and fixed 0–30-timestep delays to deliver spikes to hidden LIF neurons.Adaptive thresholds and timestep-dependent output weights make the decision depend on spike timing as well as spike count.Source: 2) StreamSNN · p. 2

3) Training and Evaluation:

The networks are trained with surrogate-gradient backpropagation and class-weighted loss, then assessed chiefly through cell-held-out folds, with random event splits used for prior-work comparisons.

3) Training and Evaluation:

  • Both networks use backpropagation through time with an arctangent surrogate gradient, AdamW, a OneCycle schedule, and class-weighted cross-entropy.The learning-rate schedule peaks at 3 × 10^-3, with batch size 512.Source: 3) Training and Evaluation · p. 2
  • Eight-bit weights are applied after training without retraining; ConvSNN and StreamSNN train for 20 and 16 epochs, respectively.The retained checkpoint maximizes validation macro-F1 minus validation loss.Source: 3) Training and Evaluation · p. 2
  • Five-fold cell-held-out evaluation tests each of 64 recordings once, without using that cell for training or model selection in its fold.Each fold tests on 12 or 13 recordings, validates on eight, and trains on the remaining 43–44.Source: 3) Training and Evaluation · p. 3
  • Random event-level 80/10/10 and 40/20/40 splits are reported only for comparison with prior work, where events from one cell can span train and test sets.Per-class F1 uses pooled precision and recall over detected test events; macro-F1 averages SS, CS, and FP F1, excluding annotated spikes missed by the detector.Source: 3) Training and Evaluation · p. 3

D. Hardware Implementation

ConvSNN divides inference between the EFM32PG28 MVP and Cortex-M33, while StreamSNN uses a fixed-point implementation with buffered sequential event processing.

1) Microcontroller:

  • ConvSNN maps its convolution to the FP16 MVP, while the Cortex-M33 performs LIF updates and accumulates outputs across eight timesteps.Eight-bit weights are expanded to FP16 at startup; each inference uses 17 MVP calls.Source: 1) Microcontroller · p. 3

2) ASIC:

  • StreamSNN uses fixed-point weights, decay factors, and neuron states; shift registers implement its fixed synaptic delays.A histogram-based front end estimates running median and noise scale over two seconds, while a ring buffer retains samples for detected event windows.Source: 2) ASIC · p. 3

III. RESULTS

Cell-held-out results favor ConvSNN on aggregate CS F1, while StreamSNN uses fewer parameters; random-split comparisons and quantization results provide additional performance context.

A. SNN Classification Performance

  • 0.873 vs 0.837 CS F1 under cell-held-out evaluation for ConvSNN and StreamSNN; StreamSNN uses 48% fewer parameters.The comparison is over all held-out events.Source: Table I · p. 3, A. SNN Classification Performance · p. 3
  • 0.906 vs 0.867 CS F1 under 40/20/40 for ConvSNN and SNet-4; under 80/10/10, ConvSNN and StreamSNN score 0.910 and 0.874 versus ResNet-18.These are random-split comparisons using the same detector and split ratios as the published classifiers.Source: Table I · p. 3, A. SNN Classification Performance · p. 3
  • CS F1 is 0.918 for ConvSNN and 0.876 for StreamSNN; their lowest scores, 0.037 and 0.046, respectively, occur on the same recording, containing only 25 CS events (Fig. 3).Fig. 3 shows per-recording F1 across 64 PCs under cell-held-out evaluation.Source: A. SNN Classification Performance · p. 3, Figure 3 · p. 3
  • Eight-bit post-training quantization changes held-out CS F1 from 0.8737 to 0.8729 for ConvSNN and from 0.8384 to 0.8371 for StreamSNN.Float and int8 decisions agree on 99.31% of ConvSNN events and 98.59% of StreamSNN events.Source: A. SNN Classification Performance · p. 3

B. MCU Implementation

MVP assistance accelerates ConvSNN enough to meet the inference deadline at a lower clock, while extending estimated battery life. Waveform acquisition remains a substantial part of end-to-end latency.

B. MCU Implementation

  • At 80 MHz, the MVP reduces classifier latency from 2.465 ms to 0.929 ms (62.3%), and meets the 2.5 ms deadline at 32 MHz with 2.283 ms latency.The CPU-only implementation runs at 80 MHz to meet the deadline.Source: B. MCU Implementation · p. 4
  • Waveform acquisition takes approximately 8.1 ms, in addition to classifier computation time.The NEO detector takes approximately 9 µs at 80 MHz and 23 µs at 32 MHz.Source: B. MCU Implementation · p. 4
  • For a 50 mAh battery, estimated operating time is 33.73 hours with the MVP versus 17.04 hours CPU-only.The estimate includes classification, detection, ADC, and STT-RAM workloads.Source: B. MCU Implementation · p. 4

C. ASIC Implementation

The SKY130 ASIC implementation combines a fixed-point StreamSNN datapath with a histogram-based noise estimator. Its reported end-to-end latency is dominated by waiting for waveform samples rather than network computation.

C. ASIC Implementation

  • The bit-exact fixed-point reference achieves SS/CS/FP F1 of 0.959/0.872/0.911 and agrees with floating-point decisions on 98.76% of 160,274 test events.The F1 scores are from an 80/10/10 random split and are within 0.002 of the eight-bit model in Table I.Source: C. ASIC Implementation · p. 4
  • The histogram-based noise estimator preserves 99.74% of decisions relative to the exact median on the same events.Source: C. ASIC Implementation · p. 4
  • StreamSNN uses approximately 5,800 small integer multiplications for input filtering and neuron updates, while hidden synapses use approximately 5,300 spike-driven operations versus 19,300 dense multiply-accumulates.Source: C. ASIC Implementation · p. 4
  • 8.3 ms end-to-end latency is dominated by the 8.1 ms wait for 197 posttrough samples; network computation adds 0.2 ms.The four-stage detector pipeline takes 0.16 ms and overlaps with the wait.Source: C. ASIC Implementation · p. 4

IV. CONCLUSION

The conclusion reports unseen-cell classification results for both hardware-matched SNNs and summarizes their platform-specific efficiency. It also identifies validation in freely behaving animals as future work.

IV. CONCLUSION

  • On unseen cells, ConvSNN achieves 0.873 CS F1 with 1,018 parameters and StreamSNN achieves 0.837 CS F1 with 527 parameters, both with eight-bit weights.Source: §IV · p. 4
  • On the EFM32PG28, MVP acceleration reduces ConvSNN latency by 62.3% and extends estimated battery life from 17.04 hours to 33.73 hours.Source: §IV · p. 4
  • In SKY130, StreamSNN occupies 0.173 mm^2 and consumes 0.46 µJ per event, with latency dominated by waveform acquisition.Source: §IV · p. 4
  • The work identifies validation in freely behaving animals as future work.Source: §IV · p. 4
Loading 2610.37104v1…