Author: Máté Seidl

Supervisor: Shahrooz Faghihroohi



Abstract

Epilepsy remains a significant global health concern, impacting millions worldwide with its recurrent seizures and heightened mortality risk. This blog post delves into the critical domain of epileptic seizure detection and prediction using Electroencephalography (EEG) signals alongside Deep Learning methodologies. Beginning with an introduction to epilepsy and the role of EEG in seizure prediction, the blog post introduces three state-of-the-art papers employing Deep Learning for seizure prediction purpose. Two of these papers emphasize the necessity of low computational complexity and energy consuption for wearable devices in seizure prediction: one utilizing an Adder Network with additive convolutions, and the other introducing a lightweight Graph Convolutional Network (GCN) that additionally helps to identify the seizure focus location. The third paper proposes an innovative data augmentation technique employing a Generative Diffusion Model. By presenting these state-of-the-art methodologies and offering critical feedback, this blog post sheds light on the advancements, challenges, and future directions in achieving accurate and efficient epileptic seizure prediction utilizing Deep Learning methods on EEG signals.



Table of contets



1. Introduction

Epilepsy is a prevalent neurological disease affecting approximately 50 million people worldwide (WHO 2023). It is characterised by recurrent seizures, stemming from abnormal electrical discharges in a group of brain cells. These seizures entail brief, involuntary movements that can impact specific body parts (partial) or the entire body (generalized) and may be accompanied by a loss of consciousness. According to the World Health Organisation, if properly diagnosed and treated, up to 70% of epilepsy patients could live seizure-free (WHO 2023). However, people with drug-resistant epilepsy have to deal with frequent or intermittent seizures throughout their everyday lives. In addition to the physical risks, such as possible injuries during epileptic seizures, people with epilepsy often suffer from psychological problems such as anxiety and depression. The complications associated with this disease lead to an up to three times higher risk of premature death for epilepsy patients compared to the general population.

There are various methods available for detecting epileptic seizures by measuring different biomedical signals (Brinkmann et al. 2021). These methods include measuring blood oxygenation and heart rate using Photoplethysmogram (PPG), assessing the heart's electrical activity via Electrocardiogram (ECG), or monitoring Electrodermal Activity (EDA), which measures the skin's electrical characteristics. Thanks to its accuracy, the clinical standard for epilepsy detection is Electroencephalography (EEG). EEG signals are generated by recording brain discharges using electrodes at different brain locations. EEG measurements have two main types: non-invasive (scalp EEG or sEEG), as shown in Figure 1, or invasive (intracranial EEG or iEEG), where electrodes are surgically implanted on the brain's surface inside the skull.


The standard 10-20 setup of EEG electrodes is illustrated in Figure 2, where "10" and "20" refer to specific distances between adjacent electrodes. Figure 3 displays a signal recorded during an epileptic seizure. This signal is notably complex, posing a challenge even for clinical experts in identifying the signal changes before an oncoming seizure. An epileptic EEG signal comprises four distinguishable phases as shown in Figure 4. The phase where the seizure occurs is termed as the ictal phase. Preceding the ictal phase is the preictal phase, exhibiting signs of an impending seizure. Following the ictal phase is the postictal phase. Between the postictal and preictal phases, where the brain activity returns to normal called interictal phase. Public EEG databases serve as valuable resources for developing new prediction methods. Among these, the MIT Boston Children’s Hospital (CHB-MIT) dataset is one of the most widely used, including data from 23 patients with 844 hours of sEEG recording at 256Hz sampling rate and 163 seizure episodes (Shu et al. 2023). In the CHB-MIT dataset, all seizure events are annotated by clinical experts.




2. Motivation and challenges

The pursuit of seizure prediction methods encapsulates a profound motivation rooted in the aspiration to prognosticate impending seizures at the earliest juncture. This early detection could enable timely intervention and treatments such as administering fast-acting drugs, ultimately mitigating the inherent risks of injury for the patients. Many of the current research focuses on creating prediction models that are computationally simply and have less energy consumption. These models aim to operate seamlessly on wearable devices, ensuring prolonged monitoring capabilities, a pivotal objective in achieving long-term surveillance and continuous seizure prediction ability.

However, there are significant challenges in the pursuit of creating reliable prediction models. Patient EEG data is complex and unique for every patients, making it challenging to create generalizable models. Furthermore, one major problem for deep learning-based prediction models is the difference in the recorded length of different seizure phases, where interictal periods usually significantly surpass preictal and ictal durations within EEG datasets, constitutes a substantial data imbalance problem. Moreover, achieving accurate predictions while avoiding false alerts is challenging. Striking a balance between sensitivity and minimizing false alarms is essential for the success of the prediction models. Additionally, the size of available datasets to train prediction models is limited.



3. From statistical methods to Deep Learning

The active research on epileptic seizure prediction began in the 1980s. For many years, seizure prediction relied on statistically evaluating various parameters of the EEG signal and monitoring changes in brain activity. With the emergence of machine learning, the focus has shifted to classifying extracted features using methods such as Support Vector Machines (SVMs). However, due to the complexity of the EEG signal, extracting these features requires clinical expertise. With the development of deep learning techniques, such as Convolutional Neural Networks (CNNs), automatic feature extraction has became possible, and nowadays, these methods are the major focus of active research. Figure 5 illustrates a timeline with selected state-of-the-art papers on epileptic seizure prediction from the 1980s to recent years.




4. State-of-the-art methods for seizure prediction

4.1. Seizure Prediction via Adder Network and Supervised Contrastive Learning

In the first state-of-the-art paper introduced in this blog post, Zhao et al. 2022 tackled the challenge of creating low-energy consumption models specifically designed for wearable devices. Their approach is to use a CNN for seizure prediction, however mostly with additive convolution, instead of a typical CNN with multiplicative convolution. The output of these additive convolutional layers is a results of addition operations between the input and the kernel. Figure 6 showcases a comparison between a convolutional operation using multiplicative convolution (left) and additive convolution (right). Notably, addition operations offer computational advantages as they are less complex, and demand lower computational energy compared to multiplicative convolutions. To illustrate the energy consumption differences between addition and multiplication operations involving integer and floating point numbers, Table 1 provides insights based on CPU energy consumption measurements.


Besides the use of additive convolutions, Zhao et al. 2022 innovative approach introduce Supervised Contrastive Learning (SCL), a technique used for the first time in epileptic seizure prediction. SCL assists in defining the boundaries between different classes and especially useful for linear classifiers in case of hard distinguishable boundaries. This technique employs a supervised contrastive loss (Equation 1) that effectively pushes samples from different classes apart from each other while grouping samples from the same class together. Figure 7 depicts the difference between classification with cross-entropy loss only and pretraining using SCL.

Equation 1:


, where Nyi reflects the samples that have the same label as yi in a batch, zi (i ∈ {1,2,..., N}) is the embedding vector of input xi in the projection space  (Zhao et al. 2022).


The proposed Adder Network and Supervised Contrastive Learning (AddNet-SCL) architecture, illustrated in Figure 8, builds upon a CNN backbone with added residual connections. Using raw EEG data image as input, the network predominantly employs additive convolutions instead of using only traditional multiplicative convolutions, resulting in the creation of AddNet. They applied a hybrid cross-entropy – supervised contrastive loss (Equation 2) on the 64-dimensional feature vector for classification after the third convolutional layer.

Equation 2:

, where Lsup and Lcross are the supervised contrastive loss and the cross-entropy loss, respectively, and α is a hyperparameter (Zhao et al. 2022).


To demonstrate the superiority of the AddNet-SCL network, Zhao et al. 2022 compared its results with two other models using the same input data. Figure 9 presents the false positive rates per hour for the three different networks. The red color represents a CNN named ResCNN, utilizing only multiplicative convolutions. The blue color signifies a CNN utilizing additive convolutions, AddNet, and solely employing cross-entropy loss. Meanwhile, the proposed AddNet-SCL network, utilizing additive convolutions along with a combined cross-entropy loss and supervised contrastive loss, is depicted by the green color. The results show the superiority of the proposed AddNet-SCL method over the other two models.



4.2. Graph Convolutional Network for seizure prediction

In the second paper, Jia et al. 2022 introduce a prediction model also focusing on minimizing computational complexity for wearable devices while offering insights into the localization of seizure focus within the brain. The cornerstone of their approach is a Graph Convolutional Network (GCN), which operates in a non-Euclidean space, allowing better representation of structural connections within the dataset compared to a CNN, which operates in Euclidean space. The graphs in a GCN consists of node features and edge features connecting the nodes. Figure 10 illustrate the difference between CNN with grid structured data and GCN.

Their study strategically delves into optimizing the network’s performance while maintaining low complexity by exploring various combinations of node features. Ultimately, the band energy and Hjorth parameters emerged as the most effective pair. Band energy serves as an indicator of the cerebral cortex activity, while Hjorth parameters encapsulates temporal shape features – activity (Equation 3) measures signal amplitude deviation, mobility (Equation 4) reflects signal slope changes, and complexity (Equation 5) assesses the number of standard slope instances within a signal amplitude (Jia et al. 2022). For edge features, geodesic distance (Equation 6) and spectral coherence (Equation 7) were chosen, representing spatial relationships among scalp electrodes and energy correlation between electrodes, respectively (Jia et al. 2022).

Equation 3:


,where μs is the mean value of signal s(n) (Jia et al. 2022).



Equation 4:


,where s'(n) is the first derivative of signal s(n), and var refletcs the variance of signal s(n) (Jia et al. 2022).



Equation 5:


(Jia et al. 2022).



Equation 6:


,where r denotes the sphere radius, (xi, yi, zi) and (xj, yj, zj) are two points on the surface of the sphere (Jia et al. 2022).


Equation 7:


, where Sij is the cross-spectral density of lead i and lead j, Sii and Sjj are the power spectral density of lead i and lead j (Jia et al. 2022).


The convolution process in GCNs involve a series of operations, commencing with Graph Fourier Transformation (GFT) to shift the graph from the spatial to the time domain. Subsequent convolution operations occurred in the spectral domain, followed by an inverse Graph Fourier Transformation, returning the graph from spectral to spatial domain. The individual steps of the convolution process for GCNs are shown in Figure 11.

,where θ is the corresponding spectral domain convolution kernel, obtained by the spatial domain filter g through the Fourier transform of graphs, 
U is an orthogonalized eigenvector matrix of Laplacian Matrix L of an undirected graph G and gθ is a diagonal matrix whose diagonal components are θ (Jia et al. 2022).

The proposed GCN architecture is shown in Figure 12. It comprises three GCN convolution layers, a global average pooling layer, followed by three fully connected (FC) layers. The FC layers process the information, leading to label probability and class predictions, which are generated through the Sigmoid activation function.


Additionally, the model provides insights into the seizure focus location. As shown in Figure 13, visualization through chord diagrams displays relationships between electrodes for each patient (sub01, sub02, ...). Leveraging edge features representing the spatial location of the scalp electrodes, these diagrams offer crucial information in determining seizure focus location. This insight holds significant potential in defining appropriate medication or potential surgical interventions.




4.3. Data augmentation for seizure prediction using Generative Diffusion Model

Various methods exist addressing the issue of unbalanced EEG data, where there is more recorded interictal periods compared to preictal and ictal ones. Dealing with this problem, some papers use data augmentation or downsampling of the interictal data. However, these methods do not generate new data or might lead to the loss of important information. An innovative solution from the third paper by Shu et al. 2023 introduces a data augmentation method using a generative diffusional model. The diffusion process is illustrated in Figure 14. First, in the forward/diffusion process, random noise is added to the data, followed by the reverse/denoised process to rebuild brand-new samples with the same distribution as the original data. Equation 8  and Equation 9-10 express the diffusion and reverse diffusion processes, respectively.

Equation 8:


, where xT is the latent variable (Shu et al. 2023 ).



Equation 9-10:



(Shu et al. 2023).



Figure 15 shows the proposed diffusional model, DiffEEG. This architecture comprises a stack of N residual layers with skip connections. As input, the network uses EEG signals segmented into 30-second intervals, and as conditioners, Short-Time Fourier transform spectrograms of these segments. In order to get the same form in the time domain as the EEG inputs, the STFT spectrogram is upsampled using two layers of transposed 2-D convolution. In each residual layer, the conditioner is introduced as a bias term for the dilated convolution before the gated-tanh nonlinearities. Before being fed into two convolutional layers, the skip connections from every residual layer are summed together.

In Figure 16, a comparison of data augmentation techniques and downsampling with the proposed method illustrates the strengths of the DiffEEG. Downsampling of interictal data, as seen on the left side, might result in losing valuable information and may limit the dataset size, which can negatively affect the model performance due to overfitting. In the sliding window method, an overlapping window is applied through the signal of each seizure period. In the recombination method, each seizure period is split into segments and the segments form the same seizure periods are recombined randomly to create new artificial samples. Therefore, methods such as sliding windows with overlap or recombination do not generate new samples. However, the proposed diffusion model generates new samples, maintaining the original data distribution, as illustrated on the right.

The flowchart of the proposed method is shown in Figure 17. To validate their diffusion model, Shu et al. 2023 conducted classification using the generated dataset for training. Comparing three classifiers – Multi-layer perceptron, CNN, and Transformer – they found that the CNN demonstrated superior performance in handling the augmented dataset.




5. Performance metrics used to evaluate seizure prediction models

Before diving into the performance evaluation of the three methods presented, here are the key metrics crucial in assessing the performance of seizure prediction models:

  • Sensitivity stands as a pivotal metric, reflecting the proportion of correctly predicted seizures out of the total number of actual seizures. It emphasizes the model’s capability to accurately identify true positive seizure events (Shu et al. 2023).
  • The Area Under ROC Curve (AUC) serves as a critical metric for evaluating binary classification performance. This metric quantifies the discriminative ability of the model across various classification thresholds. A perfect classifier achieves an AUC of 1.0, while random classification results in an AUC of 0.5, assuming equal prior probabilities for each class (Shu et al. 2023).
  • The False Positive Rate per Hour (FPR/h) quantifies the frequency of false alarms generated by the model within a given hourly duration. It delineates the model’s tendency to produce erroneous predictions over time (Shu et al. 2023).



6. Performance overview of the presented and similar methods

In this section, Table 2 provides a comprehensive overview of specific parameters and the performance metrics of the three presented methods. It is crucial to note that conducting a direct performance comparison among these methods may not be viable due to variations in several factors, such as the selection of different patient data as input and the utilization of synthetic data using the presented diffusion model. Despite these distinctions, the obtained performance results showcase similar results across the models.

Table 3 shows a further comparison with other existing epileptic seizure prediction models performances on the MIT-CHB dataset. As it can be seen, there are models with better or worse performance, but it is important to note again, that for instance, the selected patients are different, one method used data from only 7 patients, while another employed the complete MIT-CHB dataset consisting of 23 patients.




7. Discussion and critics

In the second presented paper about the lightweight GCN architecture, Jia et al. 2022 stated that CNN and RNN models used for seizure prediction do "not take into account the structural connectivity characteristics of EEG data, so a large number of model parameters requires more storage and computational consumption when automatically extracting features.”  This statement is a bit confusing and suggests that the GCNs, they also utilized in their method, require less storage and computational consumption. However, later in the paper they present Table 4, where from different models, a GCN model has the largest model size (the unit of the model size is not indicated).

Jia et al. 2022 also presented the chord diagrams (Figure 13) that can be used for seizure focus localization. However, they did not explain the clinical interpretation of the 18 patient's diagram they presented.

In the third paper, Shu et al. 2023 introduced a data augmentation technique dealing with the data imbalance problem. In the medical field, a solution where artificially generated data is used for diagnoses can be critical. Shu et al. did not mention anything about evaluation of the generated data by clinical experts. As they stated: "Visual inspection cannot evaluate the quality of generated data. Therefore, we carry out seizure prediction experiments to test the contributions of synthetic data." Additionally, they showed Figure 18 comparing the generated and the real samples. However, these experiments are unlikely to be sufficient to validate the data generated EEG data from a clinical point of view.



8. References 

Brinkmann, B., Karoly, P., Nurse, E., Dumanis, S., Nasseri, M., Viana, P., Schulze-Bonhage, A., Freestone, D., Worrell, G., Richardson, M. and Cook, M. (2021). Seizure Diaries and Forecasting With Wearables: Epilepsy Monitoring Outside the Clinic. Frontiers in Neurology, 12. https://doi.org/10.3389/fneur.2021.690404

Frey, J., Gervais, R., Lainé, T., Duluc, M., Germain, H., Fleck, S., Lotte, F. and Hachet, M. (2017). Scientific Outreach with Teegi, a Tangible EEG Interface to Talk about Neurotechnologies. https://doi.org/10.1145/3027063.3052971

Horowitz, M. (2014, 9-13 Feb. 2014). 1.1 Computing's energy problem (and what we can do about it). 2014 IEEE International Solid-State Circuits Conference Digest of Technical Papers (ISSCC).  https://ieeexplore.ieee.org/document/6757323

Hussein, R., Ahmed, M. O., Ward, R. K., Wang, Z. J., Kuhlmann, L., & Guo, Y. (2019). Human Intracranial EEG Quantitative Analysis and Automatic Feature Learning for Epileptic Seizure Prediction. ArXiv, abs/1904.03603.  https://doi.org/10.48550/arXiv.1904.03603

Iasemidis, L., Shiau, D.-S., Chaovalitwongse, W., Sackellares, J. C., Pardalos, P., Principe, J., Carney, P., Prasad, A., Veeramani, B. and Tsakalis, K. (2003). Adaptive epileptic seizure prediction system. Biomedical Engineering, IEEE Transactions on, 616-627. http://doi.org/10.1109/TBME.2003.810689

Jia, M., Liu, W., Duan, J., Chen, L., Chen, C., Wang, Q., & Zhou, Z. (2022). Efficient graph convolutional networks for seizure prediction using scalp EEG. Frontiers in Neuroscience, 16, 967116. https://doi.org/10.3389/fnins.2022.967116

Lange, H. H., Lieb, J. P., Engel, J., & Crandall, P. H. (1983). Temporo-spatial patterns of pre-ictal spike activity in human temporal lobe epilepsy. Electroencephalography and Clinical Neurophysiology, 56(6), 543-555. https://doi.org/https://doi.org/10.1016/0013-4694(83)90022-6

Rasekhi, J., Mollaei, M., Bandarabadi, M., Teixeira, C., & Dourado, A. (2015). Epileptic Seizure Prediction based on Ratio and Differential Linear Univariate Features. 5, 1-11. https://doi.org/10.4103/2228-7477.150371

Shu, K., Zhao, Y., Wu, L., Liu, A., Qian, R., & Chen, X. (2023). Data Augmentation for Seizure Prediction with Generative Diffusion Model. ArXiv, abs/2306.08256. https://doi.org/10.48550/arXiv.2306.08256

Usman, S., Khalid, S., & Aslam, M. H. (2020). Epileptic Seizures Prediction Using Deep Learning Techniques. IEEE Access, PP, 1-1. https://doi.org/10.1109/ACCESS.2020.2976866

Usman, S. M., Usman, M., & Fong, S. (2017). Epileptic Seizures Prediction Using Machine Learning Methods. Computational and Mathematical Methods in Medicine, 2017, 9074759. https://doi.org/10.1155/2017/9074759

van Mierlo, P., Papadopoulou, M., Carrette, E., Boon, P., Vandenberghe, S., Vonck, K., & Marinazzo, D. (2014). Functional brain connectivity from EEG in epilepsy: Seizure prediction and epileptogenic focus localization. Progress in Neurobiology, 121, 19-35. https://doi.org/https://doi.org/10.1016/j.pneurobio.2014.06.004

Vázquez, M., Maghsoudi, A., & Mariño, I. (2021). An Interpretable Machine Learning Method for the Detection of Schizophrenia Using EEG Signals. Frontiers in Systems Neuroscience, 15. https://doi.org/10.3389/fnsys.2021.652662

Wei, M., Li, Y., Liang, M., Xi, M., & Tian, H. (2023). Artificial Intelligence Approaches for Early Detection and Diagnosis of Alzheimer's Disease: A Review. Academic Journal of Science and Technology, 5, 215-221. https://doi.org/10.54097/ajst.v5i3.8015

World Health Organization (WHO) (2023). Epilepsy. Retrieved 08.12.2023 from https://www.who.int/news-room/fact-sheets/detail/epilepsy

Yang, S., Liu, F., & Chen, Z. (2022). Feature hallucination in hypersphere space for few‐shot classification. IET Image Processing, 16, n/a-n/a. https://doi.org/10.1049/ipr2.12579

Zhang, P., & Kamel Boulos, M. N. (2023). Generative AI in Medicine and Healthcare: Promises, Opportunities and Challenges. Future Internet, 15(9), 286. https://doi.org/10.3390/fi15090286

Zhao, Y., Li, C., Liu, X., Qian, R., Song, R., & Chen, X. (2022). Patient-Specific Seizure Prediction via Adder Network and Supervised Contrastive Learning. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 30, 1536-1547. https://doi.org/10.1109/TNSRE.2022.3180155 



  • Keine Stichwörter