Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network
Abstract
:1. Introduction
2. Dataset
3. Hardware Description
4. Implementation
4.1. Dataset Preparation
4.2. Data Structuring
4.3. CNN Architecture
4.4. CNN Hardware Implementation
4.5. Transferability of the CNN Based Classifier
4.6. Seizure Prediction Based on Pre-Ictal Data
5. Measurements and Results
5.1. Evaluation Metrics
- Sensitivity, also called true positive rate (TPR): A measure for the proportion of ictal sequences (positives) that are correctly classified by the model as a seizure.
- Specificity, also called true negative rate (TNR): Ratio of inter-ictal sequences correctly classified by the model as a non-seizure.As the specificity of the classifier is very high with values of of 0.998 and higher, the specificity is measured in units of false positive rate for better comparability with other works.
- False positive rate (FPR) per hour (fp/h): Number of inter-ictal sequences (with a length of 1 s) wrongly classified by the model as a seizure per hour. The relation between these measures is given by:
- AUC-score: Area under receiver operating characteristic (ROC) Curve—Measure of the model’s ability to distinguish between the seizure and non-seizure classes.
5.2. MATLAB Classification Results
5.3. Classification Results for Hardware-Optimized CNN
5.4. Power Consumption
5.5. Verification with EEG Recordings in a Rodent Model
5.6. Seizure Prediction
6. Comparison with State-of-the-Art
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
Appendix A.1. Dataset
Appendix A.2. Hardware Implementation
Appendix A.2.1. Dataset Preparation
Appendix A.2.2. CNN Architecture
Appendix A.2.3. CNN Hardware Implementation
Layer | Name | Dimension | Number of Filters |
---|---|---|---|
Input | - | ||
1 | Conv2D | 20 | |
MaxPool2D | |||
Dropout (0.2) | |||
2 | Conv2D | 10 | |
MaxPool2D | |||
Dropout (0.2) | |||
3 | Conv2D | 10 | |
MaxPool2D | |||
Dropout (0.2) | |||
4 | Conv2D | 10 | |
Dropout (0.2) | |||
5 | Conv2D | 1 | |
6 | Sigmoid | - | - |
Appendix A.2.4. CNN Implementation in Tensorflow
n-Layer | Operation | Output | Size |
---|---|---|---|
1 | Input (23 × 256) | 23 × 256 | 5888 |
2 | 10 × Convolution (5 × 5) | 19 × 252 × 10 | 260 |
3 | MaxPooling (2 × 2) | 9 × 126 × 20 | - |
4 | Dropout (0.2) | - | - |
5 | 20 × Convolution (5 × 5) | 5 × 122 × 20 | 5020 |
6 | MaxPooling (2 × 2) | 2 × 61 × 20 | - |
7 | Dropout (0.2) | - | - |
8 | FullyConnected (2440 × 2) | 2 | 4880 |
9 | Softmax (2) | 2 | 2 |
Total Number of trainable parameters | = | 10,162 | |
Input (23 × 256) | = | 5888 | |
Needed memory for 32-bit floats | = | ≈62.7 kB |
Appendix A.3. Measurements and Results
Power Consumption
References
- World Health Organization. Epilepsy: Key Facts. 2019. Available online: https://www.who.int/news-room/fact-sheets/detail/epilepsy (accessed on 21 June 2021).
- Bishop, P.; Allen, C. The impact of epilepsy on quality of life: A qualitative analysis. Epilepsy Behav. 2003, 4, 226–233. [Google Scholar] [CrossRef]
- Sperling, M.R. The Consequences of Uncontrolled Epilepsy. CNS Spectrums 2004, 9, 98–109. [Google Scholar] [CrossRef] [PubMed]
- National Institute of Neurological Disorders and Stroke. Epilepsy: Hope Through Research; NIH Publication: Bethesda, MD, USA, 2015; Volume 15. [Google Scholar]
- Löscher, W.; Potschka, H.; Sisodiya, S.M.; Vezzani, A. Drug Resistance in Epilepsy: Clinical Impact, Potential Mechanisms, and New Innovative Treatment Options. Pharmacol. Rev. 2020, 72, 606–638. [Google Scholar] [CrossRef]
- Chen, Z.; Brodie, M.J.; Liew, D.; Kwan, P. Treatment Outcomes in Patients With Newly Diagnosed Epilepsy Treated With Established and New Antiepileptic Drugs: A 30-Year Longitudinal Cohort Study. JAMA Neurol. 2018, 75, 279–286. [Google Scholar] [CrossRef] [PubMed]
- Gernert, M.; Feja, M. Bypassing the Blood–Brain Barrier: Direct Intracranial Drug Delivery in Epilepsies. Pharmaceutics 2020, 12, 1134. [Google Scholar] [CrossRef]
- Trinka, E.; Boon, P.; Mertens, C. Neurostimulation for drug-resistant epilepsy: A systematic review of clinical evidence for efficacy, safety, contraindications and predictors for response. Curr. Opin. Neurol. 2018, 31, 198–210. [Google Scholar]
- Astrakas, L.; Konitsiotis, S.; Tzaphlidou, M. Automated Epileptic Seizure Detection Methods: A Review Study. In Epilepsy—Histological, Electroencephalographic and Psychological Aspects; Stevanovic, D., Ed.; InTech: London, UK, 2012. [Google Scholar] [CrossRef] [Green Version]
- Baldassano, S.N.; Brinkmann, B.H.; Ung, H.; Blevins, T.; Conrad, E.C.; Leyde, K.; Cook, M.J.; Khambhati, A.N.; Wagenaar, J.B.; Worrell, G.A.; et al. Crowdsourcing seizure detection: Algorithm development and validation on human implanted device recordings. Brain A J. Neurol. 2017, 140, 1680–1691. [Google Scholar] [CrossRef] [PubMed]
- Lawhern, V.J.; Solon, A.J.; Waytowich, N.R.; Gordon, S.M.; Hung, C.P.; Lance, B.J. EEGNet: A Compact Convolutional Network for EEG-based Brain-Computer Interfaces. J. Neural Eng. 2016, 15, 056013.1–056013.17. [Google Scholar] [CrossRef] [Green Version]
- Hügle, M.; Heller, S.; Watter, M.; Blum, M.; Manzouri, F.; Dümpelmann, M.; Schulze-Bonhage, A.; Woias, P.; Boedecker, J. Early Seizure Detection with an Energy-Efficient Convolutional Neural Network on an Implantable Microcontroller. arXiv 2018, arXiv:1806.04549. [Google Scholar]
- Daoud, H.; Bayoumi, M.A. Efficient Epileptic Seizure Prediction Based on Deep Learning. IEEE Trans. Biomed. Circuits Syst. 2019, 13, 804–813. [Google Scholar] [CrossRef]
- Roy, Y.; Banville, H.; Albuquerque, I.; Gramfort, A.; Falk, T.H.; Faubert, J. Deep learning-based electroencephalography analysis: A systematic review. J. Neural Eng. 2019, 16, 051001. [Google Scholar] [CrossRef] [PubMed]
- Bahr, A.; Saleh, L.A.; Hinsch, R.; Schroeder, D.; Isbrandt, D.; Krautschneider, W.H. Small area, low power neural recording integrated circuit in 130 nm CMOS technology for small mammalians. In Proceedings of the 2016 28th International Conference on Microelectronics (ICM), Giza, Egypt, 17–20 December 2016; pp. 349–352. [Google Scholar]
- Bahr, A. Aufnahme Von Hirnsignalen Mit Extrem Miniaturisierten Elektronischen Systemen Zur Untersuchung Von Lokalen Neuronalen Vernetzungen; Logos Verlag Berlin: Berlin, Germany, 2017; ISBN 3832545255. [Google Scholar]
- Thomas, S.J.; Harrison, R.R.; Leonardo, A.; Reynolds, M.S. A Battery-Free Multichannel Digital Neural/EMG Telemetry System for Flying Insects. IEEE Trans. Biomed. Circuits Syst. 2012, 6, 424–436. [Google Scholar] [CrossRef] [PubMed]
- Laiwalla, F.; Lee, J.; Lee, A.; Mok, E.; Leung, V.; Shellhammer, S.; Song, Y.; Larson, L.; Nurmikko, A. A Distributed Wireless Network of Implantable Sub-mm Cortical Microstimulators for Brain-Computer Interfaces. In Proceedings of the 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Berlin, Germany, 23–27 July 2019; pp. 6876–6879. [Google Scholar]
- Benabid, A.L.; Costecalde, T.; Eliseyev, A.; Charvet, G.; Verney, A.; Karakas, S.; Foerster, M.; Lambert, A.; Morinière, B.; Abroug, N.; et al. An exoskeleton controlled by an epidural wireless brain–machine interface in a tetraplegic patient: A proof-of-concept demonstration. Lancet Neurol. 2019, 18, 1112–1122. [Google Scholar] [CrossRef]
- Shoeb, A. Application of Machine Learning to Epileptic Seizure Onset Detection and Treatment. Ph.D. Thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2009. Available online: http://hdl.handle.net/1721.1/54669 (accessed on 21 June 2021).
- Shoeb, A.; Guttag, J. Application of Machine Learning to Epileptic Seizure Detection. In Proceedings of the 27th International Conference on International Conference on Machine Learning, ICML’10, Haifa, Israel, 21–25 June 2010; pp. 975–982. [Google Scholar]
- Dataport, I. EEG of Genetic Absence Epilepsy Rats (GAERS). 2020. Available online: https://ieee-dataport.org/open-access/eeg-genetic-absence-epilepsy-rats-gaers (accessed on 21 June 2021).
- Greenwaves Technologies. GAP8 Manual. 2018. Available online: https://greenwaves-technologies.com/manuals/BUILD/HOME/html/index.html (accessed on 21 June 2021).
- Flamand, E.; Rossi, D.; Conti, F.; Loi, I.; Pullini, A.; Rotenberg, F.; Benini, L. GAP-8: A RISC-V SoC for AI at the Edge of the IoT. In Proceedings of the 2018 IEEE 29th International Conference on Application-specific Systems, Architectures and Processors (ASAP), Milan, Italy, 10–12 July 2018; pp. 1–4. [Google Scholar] [CrossRef]
- SEMICO Research Corporation. RISC-V Market Analysis: The New Kid on the Block; Study No. CC315-19; November 2019; Available online: https://semico.com/sites/default/files/TOC_CC315-19.pdf (accessed on 21 June 2021).
- Branco, P.; Torgo, L.; Ribeiro, R.P. A Survey of Predictive Modeling on Imbalanced Domains. ACM Comput. Surv. 2016, 49, 31:1–31:50. [Google Scholar] [CrossRef]
- Truong, N.D.; Nguyen, A.D.; Kuhlmann, L.; Bonyadi, M.R.; Yang, J.; Ippolito, S.; Kavehei, O. Integer Convolutional Neural Network for Seizure Detection. IEEE J. Emerg. Sel. Top. Circuits Syst. 2018, 8, 849–857. [Google Scholar] [CrossRef]
- Github. Matlab Source Code. 2020. Available online: https://github.com/cau-etit-sse/cnn-chb-mit (accessed on 21 June 2021).
- Cook, M.J. Advancing seizure forecasting from cyclical activity data. Lancet Neurol. 2021, 20, 86–87. [Google Scholar] [CrossRef]
- Eberlein, M.; Hildebrand, R.; Tetzlaff, R.; Hoffmann, N.; Kuhlmann, L.; Brinkmann, B.; Muller, J. Convolutional Neural Networks for Epileptic Seizure Prediction. In Proceedings of the 2018 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), Madrid, Spain, 3–6 December 2018; pp. 2577–2582. [Google Scholar] [CrossRef] [Green Version]
- Gagliano, L.; Bou Assi, E.; Nguyen, D.K.; Sawan, M. Bispectrum and Recurrent Neural Networks: Improved Classification of Interictal and Preictal States. Sci. Rep. 2019, 9, 15649. [Google Scholar] [CrossRef] [Green Version]
- Ozcan, A.R.; Erturk, S. Seizure Prediction in Scalp EEG Using 3D Convolutional Neural Networks With an Image-Based Approach. IEEE Trans. Neural Syst. Rehabil. Eng. 2019, 27, 2284–2293. [Google Scholar] [CrossRef] [PubMed]
- Baumgartner, C.; Koren, J.P. Seizure detection using scalp-EEG. Epilepsia 2018, 59, 14–22. [Google Scholar] [CrossRef]
- Gabor, A.; Leach, R.; Dowla, F. Automated seizure detection using a self-organizing neural network. Electroencephalogr. Clin. Neurophysiol. 1996, 99, 257–266. [Google Scholar] [CrossRef]
- Kelly, K.; Shiau, D.; Kern, R.; Chien, J.; Yang, M.; Yandora, K.; Valeriano, J.; Halford, J.; Sackellares, J. Assessment of a scalp EEG-based automated seizure detection system. Clin. Neurophysiol. 2010, 121, 1832–1843. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hopfengärtner, R.; Kerling, F.; Bauer, V.; Stefan, H. An efficient, robust and fast method for the offline detection of epileptic seizures in long-term scalp EEG recordings. Clin. Neurophysiol. 2007, 118, 2332–2343. [Google Scholar] [CrossRef] [PubMed]
SeizureNet [12] | IntegerNet [27] | This Work | |
---|---|---|---|
Database | iEEG dataset | CHB-MIT | CHB-MIT |
Median sensitivity | 96% | unspecified | 90% |
Median False positives per hour | 10 fp/h | unspecified | 6.8 fp/h |
AUC-score | 93% | 94% | 98% |
SeizureNet [12] | IntegerNet [27] | This Work | |
---|---|---|---|
Chip | unspecified | Microcontroller in 45 nm, 0.9 V CMOS process | GAP8 (8 core, RISC-V) |
Power | unspecified | ||
Energy | unspecified | 34–90 /classification | 4.9 /classification |
Gabor [34] | Kelly [35] | Hopfengärtner [36] | This Work | |
---|---|---|---|---|
Algorithm | Neural networks, CNET | Pattern- match regularity statistics, local max. frequency, amplitude variation | Power spectral analytical techniques, Short time Fourier transform | Convolutional Neural Network |
EEG Sample [h] | 528 | 1200 | 3248 | 865 |
Patients | 22 | 55 | 19 | 20 |
Seizures | 62 | 146 | 148 | 198 |
Sensitivity | 90.3 | 79.5 | 90.9 | 90 |
Specificity [fp/h] | 0.71 | 0.08 | 0.29 | 6.8 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bahr, A.; Schneider, M.; Francis, M.A.; Lehmann, H.M.; Barg, I.; Buschhoff, A.-S.; Wulff, P.; Strunskus, T.; Faupel, F. Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network. Biosensors 2021, 11, 203. https://doi.org/10.3390/bios11070203
Bahr A, Schneider M, Francis MA, Lehmann HM, Barg I, Buschhoff A-S, Wulff P, Strunskus T, Faupel F. Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network. Biosensors. 2021; 11(7):203. https://doi.org/10.3390/bios11070203
Chicago/Turabian StyleBahr, Andreas, Matthias Schneider, Maria Avitha Francis, Hendrik M. Lehmann, Igor Barg, Anna-Sophia Buschhoff, Peer Wulff, Thomas Strunskus, and Franz Faupel. 2021. "Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network" Biosensors 11, no. 7: 203. https://doi.org/10.3390/bios11070203
APA StyleBahr, A., Schneider, M., Francis, M. A., Lehmann, H. M., Barg, I., Buschhoff, A. -S., Wulff, P., Strunskus, T., & Faupel, F. (2021). Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network. Biosensors, 11(7), 203. https://doi.org/10.3390/bios11070203