A Cascaded Quantized Spiking Neural Network for Real-Time ECG Arrhythmia Detection on Edge Hardware
Abstract
analysis with limited on-device support for multi-class arrhythmia detection. Spiking
neural networks (SNNs) are promising for low-power edge inference, yet it remains unclear
how class-imbalance loss design interacts with RR-interval features in directly trained
quantized SNNs, and FPGA validation in this setting is largely unexplored. We propose
a quantized convolutional spiking neural network (QCSNN) for real-time arrhythmia
detection on resource-constrained hardware. The model uses a dual-head architecture that
jointly trains binary and four-class classifiers, subsequently reorganized into a cascaded
pipeline that routes only abnormal beats to the second stage. At inference, beats classified
as Normal exit at Stage 1; only beats classified as Abnormal are routed to the four-class
head, so the bulk of the inference cost is absorbed by Stage 1. We evaluate two loss functions,
Cross-Entropy and Focal Loss, under four RR-feature routing strategies. Without RR
features, Focal Loss improves macro F1 by 2.3–2.5% over Cross-Entropy (mean Δ = +0.013
in Stage-2 macro F1; Wilcoxon two-sided p = 0.031). With RR features, this advantage
largely disappears (Wilcoxon two-sided p ≥ 0.219 at all RR routings); meanwhile, RR
features at the strongest routing improve Stage-2 macro F1 by +0.028 to +0.034 depending
on loss function—a gain that exceeds the entire Focal-Loss-over-Cross-Entropy advantage,
suggesting that RR features provide discriminative information that compensates for class
imbalance at the input level. Based on clinically prioritized sensitivity, the CE:RR→Both
configuration was deployed on a PYNQ-Z2 FPGA, achieving 99.02% cascaded accuracy,
11.54 ms per-beat latency, and 0.33Waccelerator power—a 31.66× power reduction and
4.01× energy reduction versus GPU inference, within 1% macro F1. These results demonstrate
quantized SNNs as a practical solution for real-time edge arrhythmia monitoring
that operates independently of cloud connectivity—removing the network-dependent
latency, connectivity-dropout failure modes, and continuous-transmission energy burden
that constrain current wearable monitors and, to our knowledge, represent one of the first
systematic studies of loss-function/RR-feature interactions in directly trained SNN arrhythmia
classification and one of the first FPGA deployments of a fully quantized, directly
trained SNN for multi-class ECG arrhythmia detection. All code generated and used in
this study has been made publicly available.
Share and Cite
Banjo, O.; Ghoraani, B. A Cascaded Quantized Spiking Neural Network for Real-Time ECG Arrhythmia Detection on Edge Hardware. Sensors 2026, 26, 3723. https://doi.org/10.3390/s26123723
Banjo O, Ghoraani B. A Cascaded Quantized Spiking Neural Network for Real-Time ECG Arrhythmia Detection on Edge Hardware. Sensors. 2026; 26(12):3723. https://doi.org/10.3390/s26123723
Chicago/Turabian StyleBanjo, Olamilekan, and Behnaz Ghoraani. 2026. "A Cascaded Quantized Spiking Neural Network for Real-Time ECG Arrhythmia Detection on Edge Hardware" Sensors 26, no. 12: 3723. https://doi.org/10.3390/s26123723
APA StyleBanjo, O., & Ghoraani, B. (2026). A Cascaded Quantized Spiking Neural Network for Real-Time ECG Arrhythmia Detection on Edge Hardware. Sensors, 26(12), 3723. https://doi.org/10.3390/s26123723

