Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Jun 23;11(7):203.
doi: 10.3390/bios11070203.

Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network

Affiliations

Epileptic Seizure Detection on an Ultra-Low-Power Embedded RISC-V Processor Using a Convolutional Neural Network

Andreas Bahr et al. Biosensors (Basel). .

Abstract

The treatment of refractory epilepsy via closed-loop implantable devices that act on seizures either by drug release or electrostimulation is a highly attractive option. For such implantable medical devices, efficient and low energy consumption, small size, and efficient processing architectures are essential. To meet these requirements, epileptic seizure detection by analysis and classification of brain signals with a convolutional neural network (CNN) is an attractive approach. This work presents a CNN for epileptic seizure detection capable of running on an ultra-low-power microprocessor. The CNN is implemented and optimized in MATLAB. In addition, the CNN is also implemented on a GAP8 microprocessor with RISC-V architecture. The training, optimization, and evaluation of the proposed CNN are based on the CHB-MIT dataset. The CNN reaches a median sensitivity of 90% and a very high specificity over 99% corresponding to a median false positive rate of 6.8 s per hour. After implementation of the CNN on the microcontroller, a sensitivity of 85% is reached. The classification of 1 s of EEG data takes t=35 ms and consumes an average power of P≈140 μW. The proposed detector outperforms related approaches in terms of power consumption by a factor of 6. The universal applicability of the proposed CNN based detector is verified with recording of epileptic rats. This results enable the design of future medical devices for epilepsy treatment.

Keywords: EEG; RISC-V; convolutional neural network; epileptic seizure detection; ultra-low-power.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure A1
Figure A1
Measurement setup for power consumption showing a R=1Ω shunt resistor at the bottom of the of the GAPuino evaluation [23] board with two measurement points (TP5 and TP6).
Figure 1
Figure 1
Sliding window technique [27]: A window with a length of 256 samples/1 s is sliding over seizure data with a step size of S=1 sample to generate extra seizures for a balanced training set.
Figure 2
Figure 2
Schematic depiction of the CNN architecture showing the convolutional layers with their respective input matrix (blue rectangles) and kernels (red rectangles). Input is a 23×256 matrix. Between each convolutional layer, a dropout layer and max pooling layer is placed. Output are the two classes ictal and inter-ictal.
Figure 3
Figure 3
Single channel EEG data (gray) from a seizure record file of patient 1 showing 101 s of diagnosed seizure (red) with the output probability of the classification (blue).
Figure 4
Figure 4
Single channel EEG data (gray) from a seizure record file of patient 8 showing 264 s of diagnosed seizure (red) and the output probability of the classification (blue).
Figure 5
Figure 5
Boxplot (median value (red), lower and upper quartile (blue), min. and max. value (black), outlier (red cross)) of the evaluation measures sensitivity and AUC score for 20 patients. The median sensitivity is 0.90, 75 percentile: 0.94, 25 percentile: 0.81. The median AUC score is 0.98, 75 percentile: 0.99, 25 percentile: 0.98.
Figure 6
Figure 6
Illustration of the specificity of the classification showing a boxplot (median value (red), lower and upper quartile (blue), min. and max. value (black), outlier (red cross)) of the fp/h for 20 patients. The median fp/h is 6.8, 75 percentile: 19.8, 25 percentile: 1.75. The analysis is done on time signals with a length of 1 s. A false positive rate of 6.8 fp/h corresponds to a specificity of 0.998, this means that 99.8% of inter-ictal time frames of 1 s are classified correctly.
Figure 7
Figure 7
Sensitivity and Specificity boxplot (median value (red), lower and upper quartile (blue), min. and max. value (black), outlier (red cross)) for 10 EEG recordings classified in Python with a median sensitivity and specificity of 88.8% and 97.7%, respectively.
Figure 8
Figure 8
Sensitivity and Specificity boxplot (median value (red), lower and upper quartile (blue), min. and max. value (black), outlier (red cross)) for 21 EEG recordings classified in MATLAB with a median of 83.3% and 99.8%, respectively.
Figure 9
Figure 9
Measured voltage between TP5 and TP6 to measure the power consumption of GAP8 while classifying 1 s of EEG data (blue), trigger signal indicating the start and the end of the processing of 1 s of EEG data.
Figure 10
Figure 10
Single-channel recordings from a GAERS rat (gray) with a duration of 470 s showing a seizure event (red), as diagnosed by an expert, and the output probability of the classification (blue).
Figure 11
Figure 11
Seizure prediction based on pre-ictal data. Boxplot (median value (red), lower and upper quartile (blue), min. and max. value (black), outlier (red cross)) of the classification results in fp/h for 19 patients. The time period defined as “pre-ictal” varies from 30, 20, 10 to 5 min. The classification results show a median false positive rate of 2.15 fp/h for a pre-ictal time period of 30 min, of 1.8 fp/h for 20 min, 3.0 fp/h for 10 min and 3.9 fp/h for 5 min.

Similar articles

Cited by

References

    1. World Health Organization Epilepsy: Key Facts. [(accessed on 21 June 2021)];2019 Available online: https://www.who.int/news-room/fact-sheets/detail/epilepsy.
    1. Bishop P., Allen C. The impact of epilepsy on quality of life: A qualitative analysis. Epilepsy Behav. 2003;4:226–233. doi: 10.1016/S1525-5050(03)00111-2. - DOI - PubMed
    1. Sperling M.R. The Consequences of Uncontrolled Epilepsy. CNS Spectrums. 2004;9:98–109. doi: 10.1017/S1092852900008464. - DOI - PubMed
    1. National Institute of Neurological Disorders and Stroke . Epilepsy: Hope Through Research. Volume 15 NIH Publication; Bethesda, MD, USA: 2015.
    1. 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. doi: 10.1124/pr.120.019539. - DOI - PMC - PubMed