Hybrid Spike-Encoded Spiking Neural Networks for Real-Time EEG Seizure Detection: A Comparative Benchmark
Abstract
1. Introduction
- (i)
- A hybrid spike encoding strategy that combines Delta–Sigma and rate coding to generate sparse, event-driven EEG representations.
- (ii)
- Two neuromorphic spiking architectures for seizure detection: a lightweight Hybrid SNN and a higher-capacity ConvSNN integrating convolutional and attention-based temporal modeling.
- (iii)
- A fully causal, real-time EEG processing pipeline based on short overlapping windows, together with standardized preprocessing and labeling.
- (iv)
- A matched comparative evaluation against a 1D-CNN baseline using the same patient-wise data partitions, highlighting trade-offs between detection performance, computational complexity, and suitability for real-time deployment.
2. Background
2.1. Signal Processing Methods
2.2. Machine Learning Methods
2.3. Deep Learning Methods
2.4. Neuromorphic and Spiking Neural Network Methods
2.5. Hybrid and Heuristic Approaches
2.6. Comparative Analysis and Gaps
3. Real-Time Seizure Detection
3.1. Dataset, Preprocessing, and Labeling
3.1.1. Patient-Wise Grouping and Window Provenance
3.1.2. Class Imbalance Handling
3.2. Train/Validation Separation
3.3. Hybrid Spike Encoding: Delta–Sigma + Rate
- (i)
- Delta–Sigma () Modulation:A change-based encoding that emits a spike whenever the instantaneous EEG sample exceeds a dynamic reference signal by a fixed step . With , the encoding rule isHere, denotes the normalized EEG amplitude at time step t, is an adaptive reference tracking recent signal levels, and is the binary output spike indicating an upward excursion of beyond . This representation produces sparse, event-driven spike trains that emphasize rapid waveform excursions such as sharp transients, epileptiform spikes, and onset ramps.
- (ii)
- Stochastic Rate Coding: A probabilistic amplitude-based encoding that transforms the normalized EEG signal into a spike train whose firing probability reflects instantaneous signal magnitude [26,27]. Each sample is mapped to a firing probability:where is the logistic activation. A binary spike is then generated by sampling from a Bernoulli process,so that with probability and otherwise. This stochastic process produces a sequence of independent binary events whose average firing rate approximates the input amplitude. Consequently, sustained or high-amplitude EEG activity yields denser spike trains, preserving signal energy and rhythmic oscillations while maintaining compatibility with event-driven neuromorphic computation.
3.4. Models
3.4.1. Training Methodology
3.4.2. One-Dimensional-CNN Baseline
3.4.3. Hybrid SNN (Feed-Forward, Dual-Encoded Input)
3.4.4. ConvSNN (Residual Temporal Convolutions + MHSA + Spiking Head)
4. Results
4.1. Performance Overview
4.2. Confusion Matrix Analysis
4.3. Discussion of Real-Time Viability
4.3.1. Measured Inference Latency
4.3.2. Model Comparison
- HybridSNN: Accuracy , F1-score ; confusion matrix demonstrates balanced sensitivity and specificity.
- ConvSNN: Accuracy F1-score ; with post hoc selected thresholds –.
4.3.3. Clinical Relevance and False-Alarm Analysis Under Streaming Evaluation
4.3.4. Operational Interpretation of Window-Level Results
4.3.5. Ablation: Effect of Hybrid Encoding
4.3.6. Training Dynamics and Generalization
4.3.7. Computational Complexity and Spike-Activity Analysis
5. Discussion
5.1. Rationale for Hybrid Signal-to-Spike Conversion
5.2. Architectural Rationale: Hybrid SNN vs. ConvSNN
5.3. Accuracy–Efficiency Trade-Offs
5.4. Limitations and Future Work
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Fisher, R.S.; Acevedo, C.; Arzimanoglou, A.; Bogacz, A.; Cross, J.H.; Elger, C.E.; Engel, J., Jr.; Forsgren, L.; French, J.A.; Glynn, M.; et al. ILAE official report: A practical clinical definition of epilepsy. Epilepsia 2014, 55, 475–482. [Google Scholar] [CrossRef]
- Mormann, F.; Andrzejak, R.G.; Elger, C.E.; Lehnertz, K. Seizure prediction: The long and winding road. Brain 2006, 130, 314–333. [Google Scholar] [CrossRef]
- Carvajal-Dossman, J.P.; Guio, L.; García-Orjuela, D.; Guzmán-Porras, J.J.; Garces, K.; Naranjo, A.; Maradei-Anaya, S.J.; Duitama, J. Retraining and evaluation of machine learning and deep learning models for seizure classification from EEG data. Sci. Rep. 2025, 15, 15345. [Google Scholar] [CrossRef] [PubMed]
- Samantaray, A.K.; Rahulkar, A.D. A Novel Method for Epileptic Seizure Detection Using Separable Gabor Wavelets. IEEE Access 2025, 13, 116158–116169. [Google Scholar] [CrossRef]
- Yogarajan, G.; Alsubaie, N.; Rajasekaran, G.; Revathi, T.; Alqahtani, M.S.; Abbas, M.; Alshahrani, M.M.; Soufiene, B.O. EEG-based epileptic seizure detection using binary dragonfly algorithm and deep neural network. Sci. Rep. 2023, 13, 17710. [Google Scholar] [CrossRef]
- Li, J.W.; Feng, G.Y.; Lv, J.J.; Chen, R.J.; Wang, L.J.; Zeng, X.X.; Yuan, J.; Hu, X.L.; Zhao, H.M.; Lu, X. A rhythmic encoding approach based on EEG time-frequency image for epileptic seizure detection. Biomed. Signal Process. Control 2025, 99, 106824. [Google Scholar] [CrossRef]
- Zhao, W.; Wang, W.F.; Patnaik, L.M.; Zhang, B.C.; Weng, S.J.; Xiao, S.X.; Wei, D.Z.; Zhou, H.F. Residual and bidirectional LSTM for epileptic seizure detection. Front. Comput. Neurosci. 2024, 18, 1415967. [Google Scholar] [CrossRef]
- Torkey, H.; Hashish, S.; Souissi, S.; Hemdan, E.E.D.; Sayed, A. Seizure Detection in Medical IoT: Hybrid CNN-LSTM-GRU Model with Data Balancing and XAI Integration. Algorithms 2025, 18, 77. [Google Scholar] [CrossRef]
- Jia, G.; Lam, H.K.; Althoefer, K. Variable weight algorithm for convolutional neural networks and its applications to classification of seizure phases and types. Pattern Recognit. 2022, 121, 108226. [Google Scholar] [CrossRef]
- Neftci, E.O.; Mostafa, H.; Zenke, F. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient-based optimization to spiking neural networks. IEEE Signal Process. Mag. 2019, 36, 51–63. [Google Scholar] [CrossRef]
- Tavanaei, A.; Ghodrati, M.; Kheradpisheh, S.R.; Masquelier, T.; Maida, A.S. Deep learning in spiking neural networks. Neural Netw. 2019, 111, 47–63. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Z.; Xiao, M.; Ji, T.; Jiang, Y.; Lin, T.; Zhou, X.; Lin, Z. Efficient and generalizable cross-patient epileptic seizure detection through a spiking neural network. Front. Neurosci. 2024, 17, 1303564. [Google Scholar] [CrossRef] [PubMed]
- Yang, Y.; Eshraghian, J.K.; Truong, N.D.; Nikpour, A.; Kavehei, O. Neuromorphic deep spiking neural networks for seizure detection. Neuromorphic Comput. Eng. 2023, 3, 014010. [Google Scholar] [CrossRef]
- Bellamkonda, N.L.; Goru, H.K.; Solasuttu, B.; Gangu, V.R. A Hybrid Residual CNN and Multi-Head Self-Attention Network for Denoising Muscle Artifacts in EEG Signals. In Proceedings of the 2025 6th International Conference on Data Intelligence and Cognitive Informatics (ICDICI), Tirunelveli, India, 9–11 July 2025; pp. 21–27. [Google Scholar] [CrossRef]
- Huang, J.; Chen, W.; Zhang, T. A linear-attention-combined convolutional neural network for EEG-based visual stimulus recognition. Biocybern. Biomed. Eng. 2024, 44, 369–379. [Google Scholar] [CrossRef]
- Alalayah, K.M.; Senan, E.M.; Atlam, H.F.; Ahmed, I.A.; Shatnawi, H.S.A. Effective early detection of epileptic seizures through EEG signals using classification algorithms based on t-distributed stochastic neighbor embedding and K-means. Diagnostics 2023, 13, 1957. [Google Scholar] [CrossRef]
- Wang, B.; Yang, X.; Li, S.; Wang, W.; Ouyang, Y.; Zhou, J.; Wang, C. Automatic epileptic seizure detection based on EEG using a moth-flame optimization of one-dimensional convolutional neural networks. Front. Neurosci. 2023, 17, 1291608. [Google Scholar] [CrossRef]
- Guttag, J.V. CHB-MIT Scalp EEG Database (Version 1.0.0), 2010. RRID:SCR_007345. Available online: https://physionet.org/content/chbmit/1.0.0/ (accessed on 30 December 2025).
- Ren, W.; Han, M.; Wang, J.; Wang, D.; Li, T. Efficient feature extraction framework for EEG signals classification. In Proceedings of the 2016 Seventh International Conference on Intelligent Control and Information Processing (ICICIP), Siem Reap, Cambodia, 1–4 December 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 167–172. [Google Scholar]
- Sreenivasan, N.; Gargiulo, G.D.; Gunawardana, U.; Naik, G.; Nikpour, A. Seizure detection: A low computational effective approach without classification methods. Sensors 2022, 22, 8444. [Google Scholar] [CrossRef]
- Berrich, Y.; Guennoun, Z. EEG-based epilepsy detection using CNN-SVM and DNN-SVM with feature dimensionality reduction by PCA. Sci. Rep. 2025, 15, 14313. [Google Scholar] [CrossRef]
- Zhang, T.; He, L.; Zhang, D.; Li, M.; Chang, Z. DAFF-SNN: Dual Attention-driven and Feature Fusion-based Spiking Neural Network for Epilepsy Detection based on Electroencephalogram. IEEE J. Biomed. Health Inform. 2026, 30, 315–327. [Google Scholar] [CrossRef]
- Shoeb, A.H.; Guttag, J. Application of machine learning to epileptic seizure detection. In Proceedings of the 31st Annual International Conference of the IEEE EMBS, Minneapolis, MN, USA, 3–6 September 2009; pp. 115–122. [Google Scholar]
- Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adeli, H.; Subha, D.P. Automated EEG-based screening of depression using deep convolutional neural network. Comput. Methods Programs Biomed. 2018, 161, 103–113. [Google Scholar] [CrossRef]
- Shah, V.; von Weltin, E.; Lopez, S.; McHugh, J.R.; Veloso, L.; Golmohammadi, M.; Obeid, I.; Picone, J. The Temple University Hospital Seizure Detection Corpus. Front. Neuroinform. 2018, 12, 83. [Google Scholar] [CrossRef] [PubMed]
- Tabbal, J. Dynamics of Electrophysiological (Dys)Functional Brain Networks. Ph.D. Thesis, Université de Rennes and Université Libanaise, Rennes, France, 2021. [Google Scholar]
- He, B.; Astolfi, L.; Valdés-Sosa, P.A.; Marinazzo, D.; Palva, S.O.; Bénar, C.G.; Michel, C.M.; Koenig, T. Electrophysiological Brain Connectivity: Theory and Implementation. IEEE Trans. Biomed. Eng. 2019, 66, 2115–2137. [Google Scholar] [CrossRef] [PubMed]
- Eshraghian, J.K.; Ward, M.; Neftci, E.O.; Wang, X.; Lenz, G.; Dwivedi, G.; Bennamoun, M.; Jeong, D.S.; Lu, W.D. Training spiking neural networks using lessons from deep learning. Proc. IEEE 2023, 111, 1016–1054. [Google Scholar] [CrossRef]
- Mehrabi, A. “EEG Seizure Detection—Hybrid Spiking Neural Network Code Repository,” GitHub Repository, 2025. Available online: https://github.com/ali-mehrabi/EEG_Seizure_detection (accessed on 30 December 2025).




| Reference | Method | Dataset(s) | Key Reported Metrics |
|---|---|---|---|
| Samantaray [4] | Gabor wavelets + LDA + SVM | Benchmark (reported) | Acc 99.10%; Sens 99.02%; Spec 99.18% |
| Yogarajan et al. [5] | Stationary wavelet + meta-heuristic selection + DNN | Benchmark (reported) | Acc 100% |
| Li et al. [6] | High-resolution time–frequency rhythmic encoding | 94 patients (authors’ dataset) | Acc 98.9% (93/94 seizures detected) |
| Alalayah et al. [16] | DWT + PCA/t-SNE + RF/MLP | Public benchmarks | RF 97.96%; MLP 98.98% |
| Wang et al. [17] | 1D-CNN + meta-heuristic feature selection | Public benchmarks | Acc 96.7% |
| Zhao et al. [7] | ResNet + BiLSTM (ResBiLSTM) | Bonn, TUSZ | Bonn 98.9–100%; TUSZ 95.0% |
| Torkey et al. [8] | CNN–LSTM–GRU with explainability | Balanced test sets | Acc 99.13% |
| Jia et al. [9] | Multiscale CNN variants | Bonn, CHB–MIT | ∼99% (Bonn); >95% (CHB–MIT) |
| Zhang et al. [12] | Event-driven convolutional/ recurrent SNN (EESNN) | CHB–MIT, others | ANN-comparable accuracy with orders-of-magnitude energy reduction |
| Yang et al. [13] | ANN→SNN conversion on neuromorphic hardware | CHB–MIT (reported) | ∼98–99% accuracy with substantial energy savings |
| Sreenivasan et al. [20] | Channel-averaged mask heuristic | Public benchmarks | Acc 94.8% |
| Carvajal-Dossman et al. [3] | Systematic ML/DL re-evaluation study | Multiple datasets | Significant performance drops on local EEG |
| Berrich et al. [21] | CNN–SVM/DNN–SVM with PCA | Benchmark (reported) | High accuracies (reported) |
| Zhang et al. [22] | Attention-fusion SNN (DAFF-SNN) | Benchmark (reported) | High accuracies (reported) |
| Layer (Type) | Output Shape | Parameters |
|---|---|---|
| Conv1D (32 filters, kernel = 3) | (None, 2556, 32) | 192 |
| MaxPooling1D (pool = 2) | (None, 1278, 32) | 0 |
| Conv1D (64 filters, kernel = 5) | (None, 1274, 64) | 10,304 |
| MaxPooling1D (pool = 2) | (None, 637, 64) | 0 |
| Conv1D (128 filters, kernel = 3) | (None, 635, 128) | 24,704 |
| GlobalAveragePooling1D | (None, 128) | 0 |
| Dense (64 units, ReLU) | (None, 64) | 8256 |
| Dense (1 unit, Sigmoid) | (None, 1) | 65 |
| Total parameters | 43,521 |
| Layer (Type) | Output Shape | Parameters |
|---|---|---|
| Hybrid SNN | ||
| Linear (46 → 192) + LayerNorm + LIF + Dropout(0.20) | (None, 192) | 9792 |
| Linear (192 → 2) + LIF (output) | (None, 2) | 196 |
| Total parameters (Hybrid SNN) | 9988 | |
| ConvSNN (ResDS + MHSA) | ||
| Conv1D (46 → 96, k = 3) + BN + GELU (Stem) | (None, 96, T) | 13,440 |
| Residual DS-Conv Block 1 (96 → 96, k = 9) + BN + Dropout | (None, 96, T) | 10,464 |
| Temporal Multi-Head Self-Attention (96, 4 heads) + LN | (None, 96, T) | 37,440 |
| FC (96 → 192) + LN + LIF + Dropout(0.20) | (None, 192) | 19,200 |
| FC (192 → 2) + LIF (output) | (None, 2) | 388 |
| Total parameters (ConvSNN) | 80,932 | |
| Model | Accuracy | Error Rate | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| 1D–CNN (offline) | 0.9932 | 0.0068 | 0.9800 | 0.9980 | 0.9850 |
| SNN | 0.9177 | 0.0823 | 0.8321 | 0.8345 | 0.8333 |
| ConvSNN | 0.9470 | 0.0530 | 0.8975 | 0.8895 | 0.8934 |
| Model | Encoding | Accuracy | F1-Score |
|---|---|---|---|
| SNN | Delta–Sigma only | 0.748 | 0.671 |
| SNN | Rate only | 0.780 | 0.694 |
| HybridSNN | Delta–Sigma + Rate | 0.918 | 0.834 |
| ConvSNN | Delta–Sigma only | 0.823 | 0.701 |
| ConvSNN | Rate only | 0.866 | 0.747 |
| ConvSNN | Delta–Sigma + Rate | 0.947 | 0.893 |
| Encoding Stream | Spike Density | Firing Rate (Spikes/s/Channel) |
|---|---|---|
| Delta–Sigma (change-based) | 0.0589 | 15.1 |
| Rate-coded | 0.0538 | 13.8 |
| Hybrid (Delta–Sigma + rate) | 0.0564 | 14.4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Mehrabi, A.; Sreenivasan, N.; Gunawardana, U.; Gargiulo, G. Hybrid Spike-Encoded Spiking Neural Networks for Real-Time EEG Seizure Detection: A Comparative Benchmark. Biomimetics 2026, 11, 75. https://doi.org/10.3390/biomimetics11010075
Mehrabi A, Sreenivasan N, Gunawardana U, Gargiulo G. Hybrid Spike-Encoded Spiking Neural Networks for Real-Time EEG Seizure Detection: A Comparative Benchmark. Biomimetics. 2026; 11(1):75. https://doi.org/10.3390/biomimetics11010075
Chicago/Turabian StyleMehrabi, Ali, Neethu Sreenivasan, Upul Gunawardana, and Gaetano Gargiulo. 2026. "Hybrid Spike-Encoded Spiking Neural Networks for Real-Time EEG Seizure Detection: A Comparative Benchmark" Biomimetics 11, no. 1: 75. https://doi.org/10.3390/biomimetics11010075
APA StyleMehrabi, A., Sreenivasan, N., Gunawardana, U., & Gargiulo, G. (2026). Hybrid Spike-Encoded Spiking Neural Networks for Real-Time EEG Seizure Detection: A Comparative Benchmark. Biomimetics, 11(1), 75. https://doi.org/10.3390/biomimetics11010075

