- Top of page
- Supporting Information
Purpose: We propose a patient-specific algorithm for seizure prediction using multiple features of spectral power from electroencephalogram (EEG) and support vector machine (SVM) classification.
Methods: The proposed patient-specific algorithm consists of preprocessing, feature extraction, SVM classification, and postprocessing. Preprocessing removes artifacts of intracranial EEG recordings and they are further preprocessed in bipolar and/or time-differential methods. Features of spectral power of raw, or bipolar and/or time-differential intracranial EEG (iEEG) recordings in nine bands are extracted from a sliding 20-s–long and half-overlapped window. Nine bands are selected based on standard EEG frequency bands, but the wide gamma bands are split into four. Cost-sensitive SVMs are used for classification of preictal and interictal samples, and double cross-validation is used to achieve in-sample optimization and out-of-sample testing. We postprocess SVM classification outputs using the Kalman Filter and it removes sporadic and isolated false alarms. The algorithm has been tested on iEEG of 18 patients of 20 available in the Freiburg EEG database who had three or more seizure events. To investigate the discriminability of the features between preictal and interictal, we use the Kernel Fisher Discriminant analysis.
Key findings: The proposed patient-specific algorithm for seizure prediction has achieved high sensitivity of 97.5% with total 80 seizure events and a low false alarm rate of 0.27 per hour and total false prediction times of 13.0% over a total of 433.2 interictal hours by bipolar preprocessing (92.5% sensitivity, a false positive rate of 0.20 per hour, and false prediction times of 9.5% by time-differential preprocessing). This high prediction rate demonstrates that seizures can be predicted by the patient-specific approach using linear features of spectral power and nonlinear classifiers. Bipolar and/or time-differential preprocessing significantly improves sensitivity and specificity. Spectral powers in high gamma bands are the most discriminating features between preictal and interictal.
Significance: High sensitivity and specificity are achieved by nonlinear classification of linear features of spectral power. Power changes in certain frequency bands already demonstrated their possibilities for seizure prediction indicators, but we have demonstrated that combining those spectral power features and classifying them in a multivariate approach led to much higher prediction rates. Employing only linear features is advantageous, especially when it comes to an implantable device, because they can be computed rapidly with low power consumption.
Recently, there has been great progress in seizure suppression methods. Deep brain stimulation therapy has been demonstrated to abate seizures in clinical trials (Fisher et al., 2010). More experimental approaches have been used to suppress seizures by optically uncaging inhibitory neurotransmitters (Yang et al., 2009) or by focal cooling of the cortex (Rothman et al., 2005). The efficacy of these methods may be improved by a closed-loop therapy, where a seizure prediction device monitors and triggers the seizure abatement. However, no seizure prediction algorithm has yet been developed that has sufficient sensitivity and specificity and can be implemented in an implantable device (Mormann et al., 2007).
Seizure prediction using electroencephalogram (EEG) with high sensitivity and specificity has been elusive, despite numerous claims that a proposed algorithm or measure has provided significant predictive power. For example, nonlinear measures taken from chaos theory and applied to intracranial EEG (iEEG) demonstrated promising predictive power (Martinerie et al., 1998). However, when compared to linear features, the nonlinear features were not significantly better (Mormann et al., 2005) and their computational intensiveness made them prohibitive to be calculated in real-time. Furthermore, promising nonlinear features were not predictive at all when tested on long time series (Harrison et al., 2005).
Seizure prediction based on EEG/iEEG is complicated by two factors. The first is that preictal and interictal EEG/iEEG patterns across patients vary substantially. There may be no single generic algorithm that can be applied to all patients and can achieve high sensitivity and specificity (Osorio et al., 1998; Shoeb et al., 2009). The second is that EEG/iEEG is highly complex and varies over time, and no single measure of EEG/iEEG has yet been predictive on its own (Mormann et al., 2005, 2007; Feldwisch-Drentrup et al., 2010). Therefore, we hypothesize that a patient-specific classification method based on multiple features extracted from EEG/iEEG will achieve high sensitivity and specificity.
Our patient-specific approach to seizure prediction is based on binary classification of iEEG using a machine learning algorithm. A machine learning algorithm classifies samples of iEEG as either preictal (immediately prior to a seizure) or interictal (between seizures) based on their multivariate features (see Fig. 1). When an epoch of iEEG is classified as preictal, the device can trigger an alarm or a seizure prevention device. In our study, the algorithm is trained by providing it with iEEG labeled by a clinician as preictal and interictal, and tested in iEEG data that have not been touched in training. We hypothesize that machine learning approaches will work well for seizure prediction in patients who have stereotypical recurrent seizures.
Figure 1. Electrode positions and iEEG recorded on them with a seizure event. (A) Three electrodes placed near focal (red, close to the seizure origination) and the other three near afocal (blue, away from focal areas). The figures are provided along with Patient 17’s iEEG in the Freiburg database. (B) iEEG with a seizure event. Ictal (seizure, indicated by solid red box) is immediately preceded by a window we define as “preictal” (indicated by dashed blue box). Windows at least an hour prior to or after a seizure are defined as “interictal” (indicated by dotted green box) and are assumed to represent ordinary iEEG activity.
Download figure to PowerPoint
Of the available classifiers we have chosen support vector machines (SVMs) (Vapnik, 2000; Cherkassky & Mulier, 2007). The SVM is a margin-based classifier that maps input data onto a high-dimensional space and classifies them with a linear approximation (see Fig. S1). The SVM is considered the most powerful and favorable classifier in the statistical learning community (Alpaydin, 2004; Bishop, 2006; Cherkassky & Mulier, 2007). We use a cost-sensitive SVM (CSVM) that has an option of different misclassification costs for different groups, because preictal data are scarcer than the interictal data and more important to identify.
In many previous studies the optimization of the classifier is done with the “test set,” which may result in an unintended influence of the test data on the classifier thus higher sensitivity and specificity than those that may actually be experienced in real-world conditions (Mormann et al., 2007). To provide more actual estimates of sensitivity and specificity, the test data must not influence the training of the algorithm. Therefore, we employ a double cross-validation method, where data are divided into a training set and a test set, and the training set is further subdivided into a learning set and a validation set (Friedman, 1994; Cherkassky & Mulier, 2007). The SVM-classification model is trained on learning and validation datasets and tested on a dataset that is not touched in training. Because the test dataset is left completely out of training, the results with this experimental design can more accurately reflect the expected prediction rate in real-world conditions.
Our ultimate goal is to develop algorithms and architectures for an implantable device that can reliably provide seizure prediction with sufficient time to trigger an antiepileptic therapy. The specific task in this study is to investigate the feasibility of a patient-specific classification approach with the CSVM to distinguish between preictal and interictal iEEG using only linear features. Linear features are advantageous for an implantable device, where seizure prediction must be done in real time with constraints of power consumption. The algorithm has been tested on data from the Freiburg EEG database, which has been made available for comparing the results of different algorithms on the same datasets. Sensitivity and false positive rates are reported for 18 patients selected from the database. Patients who had fewer than three seizures (the minimum necessary for double cross-validation) or had no available interictal recordings were excluded from this study.
- Top of page
- Supporting Information
We have tested our patient-specific binary classification algorithm for seizure prediction on iEEG of 18 patients with 80 seizure events and 433.2 h of interictal recordings in the Freiburg EEG database. To evaluate the algorithm we have measured sensitivity, the false alarm rate per hour, and the percentage of interictal recordings incorrectly classified as FPs. Sensitivity measures the proportion of the preictal events in a patient classified correctly by our algorithm. The false alarm rate per hour and the percentage of interictal data that is incorrectly classified as FPs demonstrate how many false alarms the proposed algorithm would generate.
Summary results for all the patients and all the four preprocessing methods are shown in Table 1. As a baseline, prediction using spectral power features calculated from raw iEEG had total sensitivity of 93.8% (classifies 75 preictal events correctly of 80) and 0.29 false positives per hour (125 false alarm events in 433.2 h of interictal recordings), resulting in a false prediction alarm for a total of 59.2 h across all patients. Bipolar preprocessing produced a higher sensitivity of 97.5% (78 of 80) and also an improvement on the false positive rate of 0.27 per hour (118 false alarm events in 433.2 interictal hours). Time-differential preprocessing led to a significant improvement on the false positive rate of 0.20 per hour (86 false alarm events in 433.2 h), but did not improve sensitivity (a sensitivity of 92.5%, 74 of 80). Prediction based on the combined two preprocessing methods (bipolar/time-differential) demonstrated some improvement on the false positive rate to 0.23 per hour (100 false alarm events in 433.2 interictal hours) but did not improve sensitivity (93.8%, 75 of 80).
Table 1. Results from seizure prediction analysis by the proposed algorithm
|Pat. No.||No. of Sz||Interictal hours||Raw||Bipolar||Time-differential||Bipolar/time-differential|
|Total||80||433.2||93.8||0.29||13.67|| ||97.5||0.27||13.01|| ||92.5||0.20||9.45|| ||93.8||0.23||10.69|| |
We have additionally tested other postprocessing strategies, including the 4-of-7 analysis (Netoff et al., 2009; Park et al., 2010) and 9-tap medial filtering, and the Kalman filter produced the best performance among them (4-of-7 analysis resulted in 95% sensitivity and 0.41 FP/h, and 9-tap median filtering did in 95% sensitivity and 0.34 FP/h).
We have tested our results against the null hypothesis that our results could be attributed to chance (Andrzejak et al., 2003, 2009; Snyder et al., 2008). We have estimated the one-sided p-values that demonstrate how superior the sensitivity of our algorithm is to chance (Snyder et al., 2008): , for , where a proposed predictor correctly identifies n of N preictal events and Snc is the sensitivity of the corresponding chance predictor. Prediction rates using bipolar preprocessing are significantly better than chance in 18 patients (Patient 19 excluded) at a significance cutoff of α = 0.05 (Moore & McCabe, 2005) (See Table 1).
Two of our proposed preprocessing methods significantly enhanced the prediction rate: Bipolar preprocessing improved sensitivity and time-differential preprocessing reduced the false positive rate. Prediction by the bipolar preprocessing correctly predicted seizures in 16 patients of 18 with 100% sensitivity using a 30-min prediction window, and furthermore it missed only two seizures total (one from each of Patients 11 and 19). Time-differential preprocessing produced a significant improvement in the false positive rate. It led to a significant decrease in false alarm events to 86 from 125 in 433.2 interictal hours. Furthermore, we could perfectly predict all the preictal events generating no false alarms at all, by time-differential preprocessing, in nine patients (a total of 218.1 interictal hours), and generating only one false alarm in each of three of the other patients (in a total of 71.5 interictal hours in Patients 9, 15, and 21).
To investigate which features the SVM may be using for prediction, we have used the KFD analysis and have measured the discriminability (the F criterion) of raw or time-differential features between preictal and interictal. Discriminability of the raw features had an average F criterion of 4.58 × 10−3 over the 13 patients for whom preictal and interictal were classified well (see Table 2). Of those 13 patients, four of the patients’ top discriminating features were in the gamma frequency band. Discriminability of the time-differential features was much higher (19.6 × 10−3). Remarkably, gamma frequency bands were the most discriminating in eight patients, indicating that the time-differential preprocessing may reveal spectral changes more indicative of a preictal event.
Table 2. Top two discriminating raw or time-differential features
|Pat. No||Top two features (F/103)|
|1||β (4.58)||γ1 (3.34)||γ4 (12.25)||γ4 (10.39)|
|3||γ1 (3.01)||α (2.26)||γ4 (4.88)||θ (3.80)|
|4||β (6.22)||γ1 (5.85)||θ (25.85)||γ3 (24.32)|
|6||δ (6.40)||γ1 (5.02)||θ (7.59)||γ2 (5.98)|
|7||γ2 (10.00)||γ3 (8.68)||γ2 (87.28)||γ3 (57.05)|
|9||δ (1.55)||θ (1.54)||γ4 (8.37)||γ4 (5.96)|
|10||β (2.04)||β (1.90)||δ (2.43)||θ (1.84)|
|11||θ (2.80)||γ1 (2.29)||γ4 (6.35)||γ4 (5.66)|
|12||θ (11.47)||α (8.19)||γ2 (80.60)||γ3 (42.39)|
|15||γ1 (4.20)||β (2.67)||γ1 (6.38)||γ2 (3.74)|
|17||θ (2.28)||γ1 (2.18)||θ (7.06)||γ1 (2.52)|
|18||γ1 (1.34)||γ4 (1.30)||γ4 (2.97)||γ4 (2.89)|
|21||δ (3.64)||α (3.64)||α (2.41)||δ (2.40)|
- Top of page
- Supporting Information
High sensitivity of 97.5% and the low false positive trigger rate of 0.27 per hour in bipolar iEEG in 18 patients demonstrate that seizures may be predicted using the patient-specific approach of SVM classification of spectral power features. We expect this patient-specific methodology to be more successful for some patients than others; patients with repeatable and stereotypical seizures are the easiest to predict with this algorithm. By contrast, our machine learning approach may not succeed in patients whose seizures evolve rapidly over time or in patients who express several different types of seizures.
Our results may be compared directly to several other studies that have tested prediction algorithms using the same Freiburg EEG database (Aschenbrenner-Scheibe et al., 2003; Winterhalder et al., 2003; Maiwald et al., 2004; Mormann et al., 2007). We demonstrate high sensitivity and specificity for this database yet reported. Furthermore, we have used in-sample optimization and assessed the results with out-of-sample testing (a test set is never involved in training) through the use of double cross-validation experimental design. Although some studies may present higher sensitivity and/or specificity than ours (Mormann et al., 2007), their algorithms were trained and tested on the exact same datasets; therefore, the results are not directly comparable.
Another seizure prediction algorithm has been introduced recently using autoregressive coefficients and SVM classification and demonstrated a high prediction rate (Chisci et al., 2010); our algorithm is the first to be tested using double cross-validation, in that all the datasets were resampled and tested and using the prediction horizon as defined by the International Seizure Prediction Workshop (IWSP4, http://www.iwsp4.org/). The standard of the IWSP4 for prediction horizon is that once a seizure prediction has been issued it is required to be left on for the entire duration of the prediction horizon.
An important feature of our algorithm is that it analyzes linear features with a nonlinear classifier. With respect to implementing it in an implantable device, the use of linear features is attractive because they can be calculated rapidly and with low power consumption when compared to nonlinear features. For classification, we used SVMs with the nonlinear kernel that may require high power consumption (Shoeb et al., 2009), but the nonlinear SVMs may be replaced by linear SVMs that consume much less power (Shoeb et al., 2009) with only a small degradation of performance (see Fig. 6).
Figure 6. Histograms of decision function values generated from linear SVM classification. The distributions result from classification by linear SVMs (A) in a training set and (B) in the corresponding test set of Patient 17’s bipolar iEEG. Blue points and red crosses represent the actual state of preictal and interictal, respectively. Positive and negative decision values represent that a sample is classified as preictal and interictal, respectively. The similar distributions of classification in training and testing by linear SVMs demonstrate that the linear SVM may classify preictal and interictal as well as the nonlinear SVM.
Download figure to PowerPoint
In this study we trained and tested the algorithm after removal of artifacts. Artifacts in iEEG may negatively affect our seizure prediction algorithm and may decrease sensitivity and specificity in a real device. An additional but simple algorithm may be necessary in practice to identify the artifacts such as out-of-measurement-range or electrode disconnect in real-time.
KFD analysis of the features suggests that the SVM may predict seizures by detecting changes in gamma band power with respect to the total power. Although it has already been shown that power changes in gamma bands occur prior to a seizure and can be used for prediction (Mormann et al., 2005), our results demonstrate that using those power changes in a multivariate approach may lead to higher sensitivity and specificity. It is noted that the increase in gamma band power may be due to spontaneous iEEG spike bursts occurring more frequently rather than the emergence of intermittent rhythmic gamma waveforms (See Fig. 7). We expect that seizure prediction may improve if iEEG sampling rates are increased to detect changes in even higher frequency ranges.
The use of bipolar and/or time-differential preprocessing increased sensitivity and decreased false positive rates when compared to results from raw iEEG. Bipolar preprocessing reduces noise through common mode rejection. Time-differential preprocessing acts as a high filter and flattens the spectrum, thereby reducing the dominance of the low frequency power on the total power. The use of both bipolar and time-differential methods provided low false-positive rate without decreasing sensitivity.
Seizure prediction may be further improved by optimal selection of preictal data for training the SVM algorithm. In this study, we have operationally defined preictal as any data that occurred 30 min prior to a seizure. Our algorithm successfully distinguished iEEG in 30 min prior to the seizures from interictal recordings. This indicates that a heightened seizure state could be detected but it could not be determined if that change of states occurs at a certain finite time prior to the seizures. When our classifier was applied to the iEEG recordings that contain ones immediately preceding 30-min preictal, it could distinguish 30-min preictal periods only in some cases (10.3%, 8 of 78). In the strict sense, our seizure prediction algorithm “anticipated” seizures (Mormann et al., 2007), where an algorithm can successfully identify a seizure occurrence in advance but may not be able to specify a time when the event will occur. It is possible that many of the patients might have actual preictal periods longer than 30 min or that seizure states might change prior to the onset of the recordings. Better prediction may be achieved by selecting correct preictal periods for each patient. It is noted that interictal iEEG recordings in the Freiburg database were separated from seizure events generally by several days and therefore it cannot be ruled out that our classifier might only be detecting changes in the iEEG due to withdrawal of antiepileptic drugs.
Prediction may be also improved by adding and testing more features, including other univariate features such as autoregressive coefficients (Chisci et al., 2010) or bivariate features such as cross-correlation or wavelet synchrony (Mirowski et al., 2009). Selecting discriminating features may also enhance the classification rate (Guyon & Elisseeff, 2003; Saeys et al., 2007) and furthermore improve power consumption when it comes to a real device. To reduce false positive time, a criterion may be established to turn off (false) alarms, as new windows of data are analyzed: for example, a Kalman-filtered output is marked as an (false) alarm but it goes off immediately. Under this criterion, which may be against the IWSP4’s standard, we could have achieved a total of 24.8 h false positives (5.72%) in 433.2 h bipolar interictal recordings. Support Vector Data Description that is modified one-class SVM with cost-sensitive learning may provide higher sensitivity and specificity in seizure prediction than cost-sensitive SVMs (Tax & Duin, 2004). Lastly, establishing a continuous variable that indicates the likelihood of an impending seizure in the near future can be an alternative approach to seizure prediction.