Machine learning applications for electroencephalograph signals in epilepsy: a quick review

Machine learning (ML) is a fundamental concept in the field of state-of-the-art artificial intelligence (AI). Over the past two decades, it has evolved rapidly and been employed wildly in many fields. In medicine the widespread usage of ML has been observed in recent years. The present review examines various ML approaches for electroencephalograph (EEG) signal procession in epilepsy research, highlighting applications in the aspect of automated seizure detection, prediction and orientation. The present review also presents advantage, challenge and future direction of ML techniques in the analysis of EEG signals in epilepsy.


Background and concept
Machine learning (ML), a foundation in the domain of artificial intelligence (AI), has evolved greatly over the last 20 years. ML leverages statistical and computer science principles and systematically uses algorithms to unveil the hidden characterize and intrinsic connection of data [1]. Widespread use of ML is observed in many fields (e.g. speech recognition, image pattern recognition, web search, spam mail filtering, autopilot). In medicine, ML increases accuracy of prediction and detection of a certain disease as well as evaluation of the prognosis. For biomedical data ML renders principled, automatic and objective algorithms for high-dimensioned and complicated data [2]. For example ML shows its advantages in gene selection compared to application of classical feature selection method.
The destination of ML is to recognize uncharted areas, and make predictions for some upcoming events. The computational feature of ML is to output a hypothesis through the training experience (or examples) by mathematical algorisms [1]. ML tasks may broadly be organized in two main branches: supervised or unsupervised [3]. The former receives prelabeled inputs and aims to converge to the most optimized classifier via an algorithm which is "trained" for the classification of unlabeled data [4]. Compared to the supervised method, the unsupervised algorithms (e.g. clustering and dimensionality reduction algorithms) are referred to the process of establishing mathematical models after analyzing the similarities among unlabeled inputs to uncover trends, subgroups, or outliers [5]. Semi-supervised learning operates between the concepts of supervised and unsupervised learning, learning a small number of labeled datasets with combination of a large number of unlabeled datasets, to generate a classifier (or model function). To some degree, it produces substantial improvement in learning accuracy [6]. Reinforcement learning is one of the cutting-edge techniques in dynamical systems (e.g. evolving, time varying system, power system), by automatically learning of optimal control strategies [7]. "Reinforcement" denotes that good actions are positively reinforced while bad ones are degraded, so as to approaching optimal strategy. Deep learning, as one category of ML methods, is built on representation learning, the system of which is to automatically learn and discover patterns for a classifier from multiple layers of input data [8]. Ensemble learning integrates several learning models (such as neural networks, support vector machines and Bayesian techniques), and trains independently or collaboratively on the input data [9]. Figure 1 illustrates some popular ML algorithms.
Electroencephalograph (EEG) as a primary tool for brainwave recording plays a fundamental role of epilepsy research. EEG mainly includes scalp EEG and intracranial EEG (IEEG), depending on where the electrodes place. Scalp EEG shows oscillations at a variety of frequencies, focusing on the frequency range 0.5-25 Hz in clinical visual inspection. By contrast the IEEG carries higher frequencies, indicating more relevant information for analysis. EEG is characterized by high-dimensional spatio-temporal features, which sometimes cannot be well processed with conventional statistical methods. In this context, state-of-the-art ML methods are feasible to handle high-dimensional EEG signals which later aggregate into patterns for classification. Figure 2 illustrates some steps of ML in EEG procession.

ML application for EEG signals in epilepsy
Automated seizure recognition Seizure detection refers to the identification of seizures shortly before or after the actual onset. Traditionally, direct visual inspection is employed by neurologists to identify and classify EEG abnormities. However manual labeling of EEG signals is time-consuming and some mistakes are not avoidable. Research on seizure recognition began in the 1970s and considerable effort has been made for that in EEG recordings. Reliable automated seizure detection poses challenges due to numerous reasons. For example, EEG pattern of seizure varies greatly across patients or even within one patient when seizure arises from different brain areas. Given the automatic detection process is for the purpose of preventive measures for seizure occurrence, shorten the latency of detection is pivot, which requires rapid effective processing on dynamic evolution of multiple EEG channels. Most of early studies demonstrate suboptimal results, such as false alarm rates and high latencies. Among various methods addressing the problem, it is believed that AI techniques can rival expertise level in EEG reading.
Kharbouch et al. developed a real-time seizure detection system on intracranial electrodes by using ML methods [10]. Shoeb et al. used spectral energy (< 37 Hz) of intracranial IEEG to detect the seizure onset by training support vector machine (SVM, linear and nonlinear) to differentiate between a patient's seizure and non-seizure activity [11]. In that study patient-specific detector (SVM) detected 60/61 seizures, which outperforms patient non-specific algorithm (Osorio-Frei seizure detector), with 55/61. Shoeb et al. also developed SVM using spatial and spectral properties of a scalp EEG epoch for detecting the termination of seizure activity [12]. Temko et al. assessed existing metrics and proposed SVM-based seizure detection system for EEG-based neonatal seizures [13]. Fergus et al. used kclass nearest neighbor classifier to seizure detection using scalp EEG, with a sensitivity of 93% and specificity of 94% [14]. Hassan and Subasi decomposed single-channel EEG signal by using complete ensemble empirical mode decomposition with adaptive noise, and then implemented an ensemble learning (linear programming boosting) to perform good classification of epileptic seizures [15]. Ansari et al. introduced an improved neonatal seizure detector using a SVM method with radial basis kernel function, which is suggested applicable for other neonatal seizure detectors [16]. Jaiswal et al. proposed two effective approaches for EEG feature extraction involving subpattern based PCA and cross-subpattern correlation-based PCA, incorporated with SVM for automated seizure detection [17]. By extracting varying features based on time and frequency domain features, Hussain compared several ML methods (SVM, K-nearest neighbor classification [KNN], decision tree, ensemble) to detect the epileptic seizure, and showed that overall highest accuracy was found in SVM, KNN [18]. Sendi et al. presented a Sparkbased ML approach (SVM based) for solving the seizure detection problem by using linear dimensionality reduction and classification. They achieved an average accuracy of 99.32%, sensitivity of 99.41%, specificity of 95.25% across all patients (N = 24). The mean latency of their seizure detection method was about 0.38 ms [19]. Recently more advanced ML methods have been reported. Wei et al. applied 3D convolutional neural networks (CNN) framework in detecting seizures from EEG with an accuracy of over 90%, a sensitivity of 88.9% and a specificity of 93.8%, which show superiority to 2D CNN and traditional methods [20]. Also without the need of feature extraction, Akut introduced a wavelet based deep learning approach which performed well on small datasets [21].
Besides seizure detection, epileptic EEG signal and seizure classification can also be resolved by using ML methods. For example, Muthanantha Murugave proposed a novel multiclassification scheme for epileptic EEG signal classification by combining both the hierarchical multi-class SVM and extreme learning machine (ELM) framework, indicating its efficiency in terms of higher classification accuracy at a shorter execution time [22]. Acharya et al. firstly employed the CNN(13-layer) analysis of EEG signals to achieve high accuracy, specificity, and sensitivity of seizure detection and classification [23]. Jiang et al. integrated transductive transfer learning, Takagi-sugeno-kang (TSK) fuzzy system and semisupervised learning for outstanding performance of seizure classification [24]. Two novelty in their study included: 1) Transfer learning, which was used for reduce Fig. 1 Common ML algorithms. a Support vector machine (SVM), a widely used supervised learning method, generates a hyperplane in higherdimensional feature space to maximize the largest minimum distance between the separate labeled support vectors. b K-nearest neighbor classification (KNN), a instance-based learning (lazy learning), classifies objects on the based of closet training data in feature space by assigning a label based on the most dominant class of its k nearest neighbors (here, k = 3). c The random forest algorithm, an ensemble classifier, generates classifiers that are known as decision trees, which utilizes input traits as branch nodes to resemble a tree structure, to differentiate the training data into "leaves" referring to the class that terminates a series of nodes and branches. It yields reliable predictions for new input by voting from an ensemble of decision trees. d Artificial neural networks (ANN), the input (far left) is linked to "artificial neuron" by means of weighted connections, after a process of the summation, the bias, and the activation function, the input propagates to the output node (far right) for classification the data distribution mismatch between the training and testing data; 2) Semi-supervised learning which took advantage of unlabeled testing data. Sairamya et al. found local neighbor gradient pattern and symmetrically weighted local neighbor gradient pattern attained higher classification accuracy using artificial neural network (ANN) for real-time epileptic EEG [25].

Epileptogenic zone detection
The epileptogenic zone or seizure onset zone (SOZ), defined as the brain region where an excessive synchronization of epileptic discharge at seizure onset arises [26]. SOZ detection performance can be calculated as the percentage of electrodes identified as the SOZ inside the resected area in patients who achieve seizure freedom, or the percentage of electrodes identified as the SOZ outside the resected area in patients who fail the seizure freedom. Reliable methods of accurate identification of SOZs in preparation for epilepsy surgery are of critical importance.
Locating the primary epileptogenic zone is difficult, since electric activity of seizure may outburst abruptly and simultaneously propagating over a wide range of cortical areas. Signals collected by intracranial electrodes with high resolution are regarded as the optimum to investigate the SOZ. Among them, high frequency oscillation (HFO) carries information distincting from low-frequency discharges, which is highlighted as SOZ correlated biomarkers in epilepsy. In the previous studies, several common features or components (fast activity, signal flattening, slow potential shift, etc.) have been explored using intracranial electrodes (including stereotactically-implanted intracranial EEG [SEEG], subdural electrocorticography [ECoG], etc.).
Given seizure onset is a complex phenomenon which is composed by multiple spatio-temporal elements, concentrating on single feature cannot be appraised in isolation. Thus we surmised ML techniques could address those concerns. Grinenko et al. developed a SVM-based learning model to discover a "fingerprint", which effectively differentiated time-frequency patterns of the SOZ from areas of propagation [27]. Dian et al. employed IEEG from 6 patients undergoing resection surgery to train a classification system for identification of the SOZ. The proposed system leverages ML method (SVM classifier), extracted features (e.g. high frequency and low frequency oscillations) for seizure detection and correctly identified zones for resection from a patient [28]. Elahian et al. applied ML techniques based on phase locking value between high gamma activity (80-150 Hz) and the phase of lower frequency rhythms (4-30 Hz), to effectively identify SOZ from ECoG [29]. Ahmedt-Aristizabal et al. investigated anatomoelectroclinical correlation to anatomical localization of the epileptogenic network by jointly deep learning semiological, brain electrical, and anatomical features [30]. Baud et al. applied unsupervised learning for interictal epileptiform discharges (IED) detection and localization [31]. The proposed algorithm based on non-negative matrix factorization, leveraged spatiotemporal characteristics across all channels along with all-time points for analysis of structural (functional connectivity) and recurrent patterns. The research offered a powerful approach towards automated IED identification and localization. Liu et al. put forward a novel tool for the interpretation of pathological HFO to localizing SOZs from functionally important brain areas [32]. In their research, a pipeline Fig. 2 General steps for EEG processing. "Feature extraction" is referred to a straightforward data procession to draw hidden information of raw EEG signals from the available channels (frequency contents or spatial connectivity). Feature is divided into univariate features (e.g. spectral power) and bivariate feature (e.g. cross-correlation) of unsupervised ML techniques was employed to learn the waveform patterns of HFO from intracranial EEG.

Seizure prediction
Seizure prediction is defined as the automatic recognition of upcoming seizures where the prediction window can be as long as several minutes [33]. Success in predicting epileptic seizures would do myriad benefits such as avoidance of injuries, relieving anxiety, emergency help and early intervention (e.g. early medication, electric stimulation of vagus nerve, deep brain stimulation). Four fundamental phases are critical to study of seizure prediction. They are: 1) "interictal", indicating the "normal" brain state which is far from seizures; 2) "preictal", referring to the time interval immediately before the seizure; 3) "ictal", as the time period in which seizure occurs; 4) "postictal", pertaining to the period following a seizure and before a "normal" brain state. The preictal period, characterized by dynamic evolution of EEG signals prior to seizures is the research focus for the seizure prediction. Due to the dynamic nature of preictal EEG, it is reported that the theory of chaotic dynamics demonstrates better predictable ability than linear measurements [33]. The advantages of bivariate and multivariate measures over univariate (e.g. spectral power) have been indicated [34].
KNN classifier has been employed for seizure prediction in Wang's study, providing a prediction performance with sensitivity of 73% and specificity of 67% [35]. Cho et al. extracted features by calculating phase locking values between scalp EEG signals and then used SVM to classify short EEG segments as interictal or preictal [36]. Zhang Parhi used spectral analysis to extract features of scalp EEG signals, which were then fed into an SVM classifier to determine preictal state from interictal EEG [37]. Williamson et al. proposed the application of EEG spatiotemporal correlation structure (multivariate EEG features) procedure combined with SVM to classify the preictal or interictal state (71 of 83 seizures were predicted) [38]. Mirowski et al. computed bivariate features of EEG synchronization by using ML methods (SVM, logistic regression and CNN), which outperformed previous seizure prediction methods. In their study, CNN combined with wavelet coherence performed best pattern recognition [39]. Rasekhi et al. used a SVM classifier to learn feature space. Twenty-two linear univariate features were selected to discriminate the preictal or non-preictal states (34 out of 46 seizures were predicted) [40]. Rasekhi's study strongly indicated scale multiplechannel EEG recordings for making predictions to some extent better than that of intracranial EEG recordings, which was inadequate to reflect the general brain state. Chiang et al. proposed an on-line retraining method using linear super SVM Classifier from learning the preictal and interictal patterns [41]. In Chiang's study, super SVM looked more suitable for online learning mode (74.2% sensitivity on ECoG database and 52.2% sensitivity on scalp EEG database) than neural network classifiers, which may gradually lose the capability to recognize preictal patterns after learning a long series of interictal patterns. Advance seizure prediction via preictal relabeling (ASPPR) is a system consisting of a preprocessing module and a learning module, which facilitates recognizing patterns in preictal EEG activity. ASPPR exploits advanced ML (multiclass SVM) in learning module and extracts EEG feature in pre-processing module, displaying more than 94.2% for prediction between 1 and 25 min in advance [42]. Another study for prediction using multiclass SVM combining multichannel high-dimensional feature sets (22 features were extracted) were presented by Direito et al. [43]. The study carried out prospective analysis of a large heterogeneous, multicentric datasets, demonstrating 38.47% sensitivity and a false positive rate (per hour) of 0.20. Usman et al. applied empirical mode decomposition (EMD) to preprocess EEG signal and then compared the performance of seizure prediction of three classifiers (KNN, SVM and Naïve Bayes). In their study, SVM performs better in terms of sensitivity [44]. Jacobs el al. used crossfrequency coupling index as feature and a multistage state classifier based on random forest algorithms for seizure prediction from scalp EEG. The method proposed exhibited 87.9% for sensitivity, 82.4% for specificity, and 93.4% for area-under-the-ROC (AUC) [45]. ANN along with 72 parameters in frequency domain was proposed for the prediction of seizures in Sharma's study with an accuracy of 92.3%, sensitivity of 100% and specificity of 83.3% [46]. Truong et al. used the short-time Fourier transform to extract data feature, and CNN for seizure prediction [47]. The method showed its good generalization both intracranial EEG and scalp EEG data. Mirowski et al. used bivariate features which measured EEG synchronization in intracranial EEG combined with 5-layer CNN. It predicted all testing seizures with no false alarms in 15 out of 21 patients [39]. In Tsiouris's study long short-term memory networks were introduced for seizure prediction in EEG signals [48]. In that study the use of deep learning algorithms with CNN provided high sensitivity rates of seizure prediction and low false prediction rates (FPR) of 0.11-0.02 false alarms per hour. Most recently, Wei et al. used long-term recurrent CNN to predict epileptic seizures, offering approximately 5-9% increased sensitivity and specificity compared to deep learning and traditional ML methods [49]. Wei used the convolutional network block to automatically extract deep features from the EEG data.
Despite the rapid application of ML in medical field, several challenges should be notified. Some researches highlighted several potential barriers and problems to generalization of ML, including training dataset size, confounding clinical variables, and variability in data collection and interpretation. Additionally, smaller and homogeneous datasets as well as excessively complex model may increase the risk of overfitting.
Conclusion and future perspective ML as an emerging technique renders principled, automatic and objective algorithms for high-dimensioned and complicated data, which shows its advantage in EEG signal analysis compared to traditional methods. Despite the merits of ML (e.g. small biasness and high sensitivity to patterns recognition), reliable classifiers, specific feature extraction, well-selected data and computation cost should all be taken into consideration. For example, channel selection on certain conditions can reduce computation loading of both feature extraction and pattern recognition, which is feasible for the on-line computation especially for some wearable or implantable devices in real application. Another probable alternative is to take advantage of cloud computing bridged by 5G technology to realize real-time exchange of EEG recording. With respect to ML methods, deep learning as a hot technique in image processing, yet it is only starting to emerge in EEG processing, which show its superiority in EEG pattern recognition.