1
|
Lv H, Zhang Y, Xiao T, Wang Z, Wang S, Feng H, Zhao X, Zhao Y. Seizure Detection Based on Lightweight Inverted Residual Attention Network. Int J Neural Syst 2024; 34:2450042. [PMID: 38818805 DOI: 10.1142/s0129065724500424] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 06/01/2024]
Abstract
Timely and accurately seizure detection is of great importance for the diagnosis and treatment of epilepsy patients. Existing seizure detection models are often complex and time-consuming, highlighting the urgent need for lightweight seizure detection. Additionally, existing methods often neglect the key characteristic channels and spatial regions of electroencephalography (EEG) signals. To solve these issues, we propose a lightweight EEG-based seizure detection model named lightweight inverted residual attention network (LRAN). Specifically, we employ a four-stage inverted residual mobile block (iRMB) to effectively extract the hierarchical features from EEG. The convolutional block attention module (CBAM) is introduced to make the model focus on important feature channels and spatial information, thereby enhancing the discrimination of the learned features. Finally, convolution operations are used to capture local information and spatial relationships between features. We conduct intra-subject and inter-subject experiments on a publicly available dataset. Intra-subject experiments obtain 99.25% accuracy in segment-based detection and 0.36/h false detection rate (FDR) in event-based detection, respectively. Inter-subject experiments obtain 84.32% accuracy. Both sets of experiments maintain high classification accuracy with a low number of parameters, where the multiply accumulate operations (MACs) are 25.86[Formula: see text]M and the number of parameters is 0.57[Formula: see text]M.
Collapse
Affiliation(s)
- Hongbin Lv
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Yongfeng Zhang
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Tiantian Xiao
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Ziwei Wang
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Shuai Wang
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Hailing Feng
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| | - Xianxun Zhao
- Department of Automotive Engineering, Heze Engineering Technician College, Heze 274000, P. R. China
| | - Yanna Zhao
- School of Information Science and Engineering, Shandong Normal University, Jinan 250358, P. R. China
| |
Collapse
|
2
|
Busia P, Cossettini A, Ingolfsson TM, Benatti S, Burrello A, Jung VJB, Scherer M, Scrugli MA, Bernini A, Ducouret P, Ryvlin P, Meloni P, Benini L. Reducing False Alarms in Wearable Seizure Detection With EEGformer: A Compact Transformer Model for MCUs. IEEE TRANSACTIONS ON BIOMEDICAL CIRCUITS AND SYSTEMS 2024; 18:608-621. [PMID: 38261487 DOI: 10.1109/tbcas.2024.3357509] [Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [MESH Headings] [Track Full Text] [Subscribe] [Scholar Register] [Indexed: 01/25/2024]
Abstract
The long-term, continuous analysis of electroencephalography (EEG) signals on wearable devices to automatically detect seizures in epileptic patients is a high-potential application field for deep neural networks, and specifically for transformers, which are highly suited for end-to-end time series processing without handcrafted feature extraction. In this work, we propose a small-scale transformer detector, the EEGformer, compatible with unobtrusive acquisition setups that use only the temporal channels. EEGformer is the result of a hardware-oriented design exploration, aiming for efficient execution on tiny low-power micro-controller units (MCUs) and low latency and false alarm rate to increase patient and caregiver acceptance.Tests conducted on the CHB-MIT dataset show a 20% reduction of the onset detection latency with respect to the state-of-the-art model for temporal acquisition, with a competitive 73% seizure detection probability and 0.15 false-positive-per-hour (FP/h). Further investigations on a novel and challenging scalp EEG dataset result in the successful detection of 88% of the annotated seizure events, with 0.45 FP/h.We evaluate the deployment of the EEGformer on three commercial low-power computing platforms: the single-core Apollo4 MCU and the GAP8 and GAP9 parallel MCUs. The most efficient implementation (on GAP9) results in as low as 13.7 ms and 0.31 mJ per inference, demonstrating the feasibility of deploying the EEGformer on wearable seizure detection systems with reduced channel count and multi-day battery duration.
Collapse
|
3
|
Constantino AC, Sisterson ND, Zaher N, Urban A, Richardson RM, Kokkinos V. Expert-Level Intracranial Electroencephalogram Ictal Pattern Detection by a Deep Learning Neural Network. Front Neurol 2021; 12:603868. [PMID: 34012415 PMCID: PMC8126697 DOI: 10.3389/fneur.2021.603868] [Citation(s) in RCA: 5] [Impact Index Per Article: 1.7] [Reference Citation Analysis] [Abstract] [Key Words] [Track Full Text] [Download PDF] [Figures] [Journal Information] [Subscribe] [Scholar Register] [Received: 09/08/2020] [Accepted: 04/08/2021] [Indexed: 11/13/2022] Open
Abstract
Background: Decision-making in epilepsy surgery is strongly connected to the interpretation of the intracranial EEG (iEEG). Although deep learning approaches have demonstrated efficiency in processing extracranial EEG, few studies have addressed iEEG seizure detection, in part due to the small number of seizures per patient typically available from intracranial investigations. This study aims to evaluate the efficiency of deep learning methodology in detecting iEEG seizures using a large dataset of ictal patterns collected from epilepsy patients implanted with a responsive neurostimulation system (RNS). Methods: Five thousand two hundred and twenty-six ictal events were collected from 22 patients implanted with RNS. A convolutional neural network (CNN) architecture was created to provide personalized seizure annotations for each patient. Accuracy of seizure identification was tested in two scenarios: patients with seizures occurring following a period of chronic recording (scenario 1) and patients with seizures occurring immediately following implantation (scenario 2). The accuracy of the CNN in identifying RNS-recorded iEEG ictal patterns was evaluated against human neurophysiology expertise. Statistical performance was assessed via the area-under-precision-recall curve (AUPRC). Results: In scenario 1, the CNN achieved a maximum mean binary classification AUPRC of 0.84 ± 0.19 (95%CI, 0.72-0.93) and mean regression accuracy of 6.3 ± 1.0 s (95%CI, 4.3-8.5 s) at 30 seed samples. In scenario 2, maximum mean AUPRC was 0.80 ± 0.19 (95%CI, 0.68-0.91) and mean regression accuracy was 6.3 ± 0.9 s (95%CI, 4.8-8.3 s) at 20 seed samples. We obtained near-maximum accuracies at seed size of 10 in both scenarios. CNN classification failures can be explained by ictal electro-decrements, brief seizures, single-channel ictal patterns, highly concentrated interictal activity, changes in the sleep-wake cycle, and progressive modulation of electrographic ictal features. Conclusions: We developed a deep learning neural network that performs personalized detection of RNS-derived ictal patterns with expert-level accuracy. These results suggest the potential for automated techniques to significantly improve the management of closed-loop brain stimulation, including during the initial period of recording when the device is otherwise naïve to a given patient's seizures.
Collapse
Affiliation(s)
- Alexander C Constantino
- Brain Modulation Lab, Department of Neurological Surgery, University of Pittsburgh School of Medicine, Pittsburgh, PA, United States
| | - Nathaniel D Sisterson
- Department of Neurosurgery, Massachusetts General Hospital, Boston, MA, United States
| | - Naoir Zaher
- Department of Neurology, University of Pittsburgh School of Medicine, Pittsburgh, PA, United States.,University of Pittsburgh Comprehensive Epilepsy Center, Pittsburgh, PA, United States
| | - Alexandra Urban
- Department of Neurology, University of Pittsburgh School of Medicine, Pittsburgh, PA, United States.,University of Pittsburgh Comprehensive Epilepsy Center, Pittsburgh, PA, United States
| | - R Mark Richardson
- Department of Neurosurgery, Massachusetts General Hospital, Boston, MA, United States.,Harvard Medical School, Boston, MA, United States
| | - Vasileios Kokkinos
- Department of Neurosurgery, Massachusetts General Hospital, Boston, MA, United States.,Harvard Medical School, Boston, MA, United States
| |
Collapse
|
4
|
Liu X, Richardson AG. Edge deep learning for neural implants: a case study of seizure detection and prediction. J Neural Eng 2021; 18. [PMID: 33794507 DOI: 10.1088/1741-2552/abf473] [Citation(s) in RCA: 11] [Impact Index Per Article: 3.7] [Reference Citation Analysis] [Abstract] [Key Words] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Received: 12/01/2020] [Accepted: 04/01/2021] [Indexed: 11/12/2022]
Abstract
Objective.Implanted devices providing real-time neural activity classification and control are increasingly used to treat neurological disorders, such as epilepsy and Parkinson's disease. Classification performance is critical to identifying brain states appropriate for the therapeutic action (e.g. neural stimulation). However, advanced algorithms that have shown promise in offline studies, in particular deep learning (DL) methods, have not been deployed on resource-restrained neural implants. Here, we designed and optimized three DL models or edge deployment and evaluated their inference performance in a case study of seizure detection.Approach.A deep neural network (DNN), a convolutional neural network (CNN), and a long short-term memory (LSTM) network were designed and trained with TensorFlow to classify ictal, preictal, and interictal phases from the CHB-MIT scalp EEG database. A sliding window based weighted majority voting algorithm was developed to detect seizure events based on each DL model's classification results. After iterative model compression and coefficient quantization, the algorithms were deployed on a general-purpose, off-the-shelf microcontroller for real-time testing. Inference sensitivity, false positive rate (FPR), execution time, memory size, and power consumption were quantified.Main results.For seizure event detection, the sensitivity and FPR for the DNN, CNN, and LSTM models were 87.36%/0.169 h-1, 96.70%/0.102 h-1, and 97.61%/0.071 h-1, respectively. Predicting seizures for early warnings was also feasible. The LSTM model achieved the best overall performance at the expense of the highest power. The DNN model achieved the shortest execution time. The CNN model showed advantages in balanced performance and power with minimum memory requirement. The implemented model compression and quantization achieved a significant saving of power and memory with an accuracy degradation of less than 0.5%.Significance.Inference with embedded DL models achieved performance comparable to many prior implementations that had no time or computational resource limitations. Generic microcontrollers can provide the required memory and computational resources, while model designs can be migrated to application-specific integrated circuits for further optimization and power saving. The results suggest that edge DL inference is a feasible option for future neural implants to improve classification performance and therapeutic outcomes.
Collapse
Affiliation(s)
- Xilin Liu
- Department of Electrical and Systems Engineering, University of Pennsylvania, Philadelphia, PA, United States of America
| | - Andrew G Richardson
- Department of Neurosurgery, University of Pennsylvania, Philadelphia, PA, United States of America
| |
Collapse
|
5
|
Burrello A, Benatti S, Schindler K, Benini L, Rahimi A. An Ensemble of Hyperdimensional Classifiers: Hardware-Friendly Short-Latency Seizure Detection With Automatic iEEG Electrode Selection. IEEE J Biomed Health Inform 2021; 25:935-946. [PMID: 32894725 DOI: 10.1109/jbhi.2020.3022211] [Citation(s) in RCA: 13] [Impact Index Per Article: 4.3] [Reference Citation Analysis] [Abstract] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 11/08/2022]
Abstract
We propose a new algorithm for detecting epileptic seizures. Our algorithm first extracts three features, namely mean amplitude, line length, and local binary patterns that are fed to an ensemble of classifiers using hyperdimensional (HD) computing. These features are embedded into prototype vectors representing ictal (during seizures) and interictal (between seizures) brain states are constructed. These vectors can be computed at different spatial scales ranging from a single electrode up to many electrodes. This flexibility allows our algorithm to identify the electrodes that discriminate best between ictal and interictal brain states. We assess our algorithm on the SWEC-ETHZ iEEG dataset that includes 99 short-time iEEG seizures recorded with 36 to 100 electrodes from 16 drug-resistant epilepsy patients. Using k-fold cross-validation and all electrodes, our algorithm surpasses state-of-the-art algorithms yielding significantly shorter latency (8.81 s vs. 11.57 s) in seizure onset detection, and higher specificity (97.31% vs. 94.84%) and accuracy (96.85% vs. 95.42%). We can further reduce the latency of our algorithm to 3.74 s by allowing a slightly higher percentage of false alarms (2% specificity loss). Using only the top 10% of the electrodes ranked by our algorithm, we still maintain superior latency, sensitivity, and specificity compared to the other algorithms with all the electrodes. We finally demonstrate the suitability of our algorithm to deployment on low-cost embedded hardware platforms, thanks to its robustness to noise/artifacts affecting the signal, its low computational complexity, and the small memory-footprint on a RISC-V microcontroller.
Collapse
|
6
|
Maidana Capitán M, Cámpora N, Sigvard CS, Kochen S, Samengo I. Time- and frequency-resolved covariance analysis for detection and characterization of seizures from intracraneal EEG recordings. BIOLOGICAL CYBERNETICS 2020; 114:461-471. [PMID: 32656680 DOI: 10.1007/s00422-020-00840-y] [Citation(s) in RCA: 1] [Impact Index Per Article: 0.3] [Reference Citation Analysis] [Abstract] [Key Words] [MESH Headings] [Grants] [Track Full Text] [Subscribe] [Scholar Register] [Received: 10/30/2019] [Accepted: 06/17/2020] [Indexed: 06/11/2023]
Abstract
The amount of power in different frequency bands of the electroencephalogram (EEG) carries information about the behavioral state of a subject. Hence, neurologists treating epileptic patients monitor the temporal evolution of the different bands. We propose a covariance-based method to detect and characterize epileptic seizures operating on the band-filtered EEG signal. The algorithm is unsupervised and performs a principal component analysis of intra-cranial EEG recordings, detecting transient fluctuations of the power in each frequency band. Its simplicity makes it suitable for online implementation. Good sampling of the non-ictal periods is required, while no demands are imposed on the amount of data during ictal activity. We tested the method with 32 seizures registered in 5 patients. The area below the resulting receiver-operating characteristic curves was 87% for the detection of seizures and 91% for the detection of recruited electrodes. To identify the behaviorally relevant correlates of the physiological signal, we identified transient changes in the variance of each band that were correlated with the degree of loss of consciousness, the latter assessed by the so-called Consciousness Seizure Scale, summarizing the performance of the subject in a number of behavioral tests requested during seizures. We concluded that those crisis with maximal impairment of consciousness tended to exhibit an increase in variance approximately 40 s after seizure onset, with predominant power in the theta and alpha bands and reduced delta and beta activity.
Collapse
Affiliation(s)
- Melisa Maidana Capitán
- Instituto Balseiro and Departamento de Física Médica, Centro Atómico Bariloche, San Carlos de Bariloche, Río Negro, Argentina
| | - Nuria Cámpora
- Neurosciences and Complex Systems Unit (ENyS), Consejo Nacional de Investigaciones Científicas y Técnicas, Hospital El Cruce "Néstor Kirchner", Universidad Nacional Arturo Jauretche, Florencio Varela, Argentina
| | - Claudio Sebastián Sigvard
- Instituto Balseiro and Departamento de Física Médica, Centro Atómico Bariloche, San Carlos de Bariloche, Río Negro, Argentina
| | - Silvia Kochen
- Neurosciences and Complex Systems Unit (ENyS), Consejo Nacional de Investigaciones Científicas y Técnicas, Hospital El Cruce "Néstor Kirchner", Universidad Nacional Arturo Jauretche, Florencio Varela, Argentina
| | - Inés Samengo
- Instituto Balseiro and Departamento de Física Médica, Centro Atómico Bariloche, San Carlos de Bariloche, Río Negro, Argentina.
| |
Collapse
|
7
|
Dümpelmann M. Early seizure detection for closed loop direct neurostimulation devices in epilepsy. J Neural Eng 2019; 16:041001. [DOI: 10.1088/1741-2552/ab094a] [Citation(s) in RCA: 17] [Impact Index Per Article: 3.4] [Reference Citation Analysis] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 02/02/2023]
|