203 International Conference on Communication Systems and Network Technologies Patient-Specific Epileptic Seizure Onset Detection Algorithm Based on Spectral Features and IPSONN Classifier Saadat Nasehi Department of Electrical Engineering Najafabad Branch, Islamic Azad University Isfahan, Iran st_nasehi@sel.iaun.ac.ir Abstract This paper proposes a patient-specific epileptic seizure onset detection algorithm. In this algorithm, spectral features in five frequency bands (,,, and ) is extracted from small frames of seizure and non-seizure EEG signals by applying Discrete Wavelet Transform (DWT) and Discrete Fourier Transform (DFT). These features can create the maximum distinction between two classes. Then a neural network (NN) classifier based on improved particle swarm optimization (IPSO) is used to determine an optimal nonlinear decision boundary. This classifier allows adjusting the parameter of the NN classifier, efficiently. Finally, the performance of algorithm is evaluated based on three measures, sensitivity, specificity and latency. The results indicate that the proposed algorithm obtain a higher sensitivity and smaller latency than other common algorithms. The proposed algorithm can be used as a seizure onset detector to initiate the just-in time therapy methods. Keywords epilepsy, seizure detection, Discrete Wavelet Transform, IPSONN classifier, Discrete Fourier Transform I. INTRODUCTION Seizures are abnormalities of transient in the brain's activity that happen at unforeseeable times and usually without notification. Recurrent seizures increase the risk of physical damages for people whit epilepsy. Epileptic seizure detector devices can be used to promptly reacting to a seizure onset that can help to initiate the just-in time therapy methods such as Trigeminal Nerve Stimulation (TNS) [] and Vagus Nerve stimulation (VNS) [2]. This devices can be established as a portable [3], wearable [4] or implantable [5] system that recording and analyse the microvolt-sized signals of brain (EEG) in order to recognize a seizure with the shortest possible delay. So the analysis of EEG signals have key role to improve of such systems. There are different algorithms to detect the seizure onset based on analysis of EEG signals [6, 7]. These algorithms can be patient non-specific [8] or patient-specific [9], but since the cerebral origin, spread of seizures and the spectral content of rhythmic activities vary across individuals, so the patient-specific (PS) algorithms have a better performance [0]. To design a PS seizure onset detector, the features are extracted from the seizure and non-seizure EEG signals of patient and are classified at two classes. The spectral and spatial features can be obtained from spectrum energy of Hossein Pourghassem Department of Electrical Engineering Najafabad Branch, Islamic Azad University Isfahan, Iran h_pourghasem@iaun.ac.ir each EEG channel in five frequency bands,,,, and that are derived by discrete Fourier transform (DFT) []. But the extracted features from a wavelet decomposition of signals can be best chose to select the effective features in order to creating the maximum distinction between seizure and non-seizure signals, because DWT is a powerful mathematical tool to analysis of non-stationary signals such as EEG [2]. The accurate classification of the features within two classes is also an important factor to improve the performance of detector. The selected classifier must be capable to set a nonlinear decision boundary between the seizure and non-seizure feature vectors. Furthermore, it must recognize the class of test sample with minimum latency and maximum sensitivity. The various algorithms with the mentioned structure are presented in articles. For example, Shoeb establish a PS seizure onset detection algorithm [3]. It extracts the eight features from 0-25HZ frequency band by means of a 3 HZ bandwidth filter and a support vector machine (SVM) classifier is used to classify the feature vectors. But the latency was large for some patients that can be arise from large similarity of seizure and non-seizure signals. This issue can be solved by a suitable classifier that set an accurate curve decision boundary. In this paper, we propose a PS seizure onset detection algorithm that DWT is used to select the effective features and a neural classifier based on improved particle swarm optimization (IPSO) learning algorithm is applied to create a nonlinear decision boundary. The extracted features based on DWT allow making the maximum distinction between samples of two classes and IPSONN classifier help to search for a better solution of the weights in a NN instead of the BP in order to obtain a better classification. This paper is organized as follows. In section II, we briefly explain the characteristics of seizure within EEG signals. We describe the algorithm, including the feature extraction and the classification in section III. In section IV, we introduce the performance measures and detail the result of algorithm on CHB-MIT dataset. We present the conclusions in section V. II. SEIZURES CHARACTERISTICS WITHIN EEG SIGNALS The rhythmic activity of the seizure onset is often comprised of multiple frequency components which are different from components of non-seizure EEG signals. 978-0-7695-4958-3/3 $26.00 203 IEEE DOI 0.09/CSNT.203.48 86
Furthermore, the involved EEG channel and the structure of the rhythmic activity differ across individuals. For example, two seizures within the EEG of a patient are shown in Fig.. The both seizures are appeared on same channel and have the similar rhythmic activity. Fig. 2 shows the seizure within EEG for another patient. The seizure occur on different channels and have dissimilar rhythmic in comparison with first patient. Three important points is outlined from above discussion that can help to deign a seizure onset detector with high performance. The frequency components of seizure are different from non-seizure signals, so spectrum energy of signals can be used to extract the effective features. The seizures within EEG of a patient have the similar characteristics, so the classifier can only use two or three seizure for training. The seizures characteristics within EEG of a patient are different with other patients, so the detector must be individually designed for each patient in order to achieve the maximum performance (patient-specific detector). III. PATIENT-SPECIFIC SEIZURE ONSET DETECTION ALGORITHM The general scheme of the proposed PS seizure onset detection algorithm is shown in Fig.3. In this algorithm, the EEG of each channel is divided to Q-second frames. Then DWT is applied on each frame and the spectrum energy of sub-bands is calculated by DFT as spatial and spectral features. Finally, a three-layer MLP neural network with IPSO learning algorithm is used as a classifier to train on the extracted features from seizure and non-seizure EEG signals of each patient for determination of optimal nonlinear decision boundary. A. The feature extraction The frequency components of EEG signals can be involved at five frequency bands, delta (2-4HZ), alpha (4-8HZ), beta (8-5HZ), theta (5-30HZ) and gamma (30-90HZ). In traditional approach, Discrete Fourier Transform (DFT) is used to calculate the spectrum energy of each band for an EEG frame [4]. Since the EEG signals have the nature of non-stationary, so DFT can not be a powerful tool to decompose the signals because it just provides the frequency resolution. Discrete Wavelet Transform (DWT) can be used as a strong mathematical tool to disintegrate the EEG with time-frequency resolution. In this approach, the signal is decomposed into several new signals by correlation between frequency components of signal and mother wavelet function at different scales. These signals belong to a frequency band (sub-band) and are specified with its coefficients. In this paper, we use the both DWT and DFT to extract the features from the seizure and non-seizure EEG for each patient. In this strategy, Q-second frames is decomposed into five sub-bands by DWT and sym6 mother wavelet. Then spectrum energy of five frequency bands (,,,, ) is respectively calculated for five sub-bands (d 5, d 4, d 3, d 2, d ). This process is repeated for whole of channels (N) and frames (E) which is shown in Fig.4. A. The seizure start at 723 second and involve the F3-C3 and C3-P3 channels B. The seizure start at 620 second and involve the F3-C3 and C3-P3 channels Fig. A and B are two example of seizures within the EEG of a patient Fig. 2 The example of seizures within the EEG of another patient. The seizure starts at 633 second and involve the F7-T7 and T7-P7 channels Seizure EEG Non-seizure EEG Feature extraction by apply the DWT and DFT Classification by an IPSONN classifier Fig. 3 the structure of PS seizure onset detection algorithm B. The IPSONN classifier The nonlinear decision boundary (NDB) is best chose to classify the feature vectors as representative of seizure or non-seizure activity because the features corresponding with seizure onset have near similarity to the non-seizure features. Thus a nonlinear classifier can be used to determine a NDB for each patient in order to increase the sensitivity of detector. Furthermore, a MLP neural network can help to decrease the latency of detector. In this paper, we used a MLP classifier based on improved particle swarm optimization (IPSO) [5] learning algorithm in order to adjust the parameter of the NN, efficiently. The IPSO method can search for a better solution of the weights in a NN instead of other methods such as BP. It is including of the traditional particle swarm optimization (PSO) [6] algorithm and the modified evolutionary direction operator (MEDO). The PSO algorithm is based on the schooling of fish or flocking of birds and can quickly obtain the global solution. The MEDO increase the capability of the PSO to find the optimal solution. The procedure of IPSO is shown in Fig. 5. This 87
method has two advantages: prevent the premature convergence and accelerate the global search capacity using the MEDO. These can be useful for determining of the optimal NDB between the seizure and non seizure features. The used MLP consisted of one input layer, one hidden layer and one output layer as shown in Fig.6. The normalized (between 0 and ) feature vectors (5N dimension) are applied to the input layer and whole of them are distributed to each unit in the hidden layer. Each unit sums these inputs and generates a value that is transformed by nonlinear sigmoid function. The output layer uses the vectors of hidden layer and purelin function to represent the each class by unit vector (seizure = [ 0], non-seizure =[0 ]). Get the Q-second frame from all channels Frame of channel Input 5N IW, 5N 5N b Hidden layer LW 2, 2 2 5N + + 5N b 2 2 Output layer Fig. 6 The used MLP neural network TABLE : THE VALUES OF PARAMETERS TO TRAIN THE DETECTOR Parameters Name Value H Number of hours for training the non-seizure for 2-35 hours each patient N Number of EEG channels 8-23 channel M Number of the seizures to training for each 2-4 seizure patient Q Length of EEG frame for feature extraction.5 second G Number of the used seconds for training the seizure for each patient 8 second 2 2 Decompose into five sub-bands by DWT and sym6 mother wavelet j / 2 j d ( k) f ( x)2 (2 x k) dx j IV. EXPERIMENTED RESULTS Band d 5 Band d 4 Band d 3 Band d 2 Band d Apply the DFT on each sub-band, separately F k k n 0 f e j2 n / k n A. EEG dataset We used the dataset provided at Children's Hospital Boston (CHB-MIT) [7] to evaluate our detector algorithm. This dataset consists of 96 hours of continuous EEG sampled at 256 HZ that is recorded from 23 patients by N channels. During the record, 6 seizures were event for patients that were specified by experts. The data was distributed into one hour long records. Table shows the values of parameters that we use to train and test of our detector. if channel N Fig. 4 The process of feature extraction based on DWT and DFT Primary swarm Take out global best Calculate the RMSE ntr nout RMSE ( t i j yi, j ntr Yes Store the features into initial vector Form the final feature vector NO End? i j 2, ) Update velocity and position if channel = N Fig. 5 The process of IPSO Measure the performance of NN fitness RMSE MEDO Update local best and global best B. Performance measures We evaluated the performance of our detector based on three measures: Sensitivity: the number of the identified seizure from each patient. Latency: the delay between the expert-marked seizure onsets within the EEG detector declaration of seizure activity. Specificity: the number of false detections per 24 hours for each patient. To calculate the detector's specificity, sensitivity and latency, the detector is trained on H hours non-seizure (average H=29) and on M seizure (average M=3) from a patient. Then it is run on the recorded EEG of the patient and the number of false detections during 24 hours is measured as specificity. This work is repeated for all patients and number of the identified seizure is specified as sensitivity and the detection delay is measured as latency. 88
C. Results and comparison In this section, we describe the obtained results by our detector algorithm and compare them with Shoeb's algorithm [3]. Our detector use DWT and DFT to extract the spectrum energy features in five bands (,,,, ) and apply the IPSONN classifier to classify the seizure and nonseizure signals. While the Shoeb's algorithm use DFT to extract the spatial and spectral features and apply the SVM for classification. The number of test seizures available and the number of the recognized seizures by two detectors for each patient is shown in Fig.7. Our detector could distinguish the 58 seizure from 6 seizures and achieve to average efficiency 98% as sensitivity. While the Shoeb's algorithm reach to sensitivity 96%. The high sensitivity increases the capability of detector to recognize the seizures in order to initiate the just-in time therapy methods. Fig. 7 sensitivity of our detector comparison with Shoeb's algorithm TABLE 2: PRECENTAGE OF THE DETECTED SEIZURES WITHIN A SPECIFIED LATENCY FOR TWO DETECTORS Latency (second) Shoeb's algorithm [3] Our algorithm 0-3 50 % 55 % 3 5 2 % 20 % 5-0 2 % 9 % More of 0 4 % 4 % Table 2 illustrates the percentage of the detected seizures with in a specified latency for two detectors. Our detector could detect the 55% of 6 seizures within 3 seconds delay. The smaller latency equals to the fast seizure detection that can be used as a seizure onset detector. The false detection rate (specificity) was 3 false per 24 hours for our detector that is larger than Shoeb's algorithm (2 false). i.e. our detector can not decrease the number of false detection and it is designed to detect the seizure onset with minimum latency and maximum sensitivity. V. CONCLUSIONS In this paper, we present a patient-specific seizure onset detection algorithm. This algorithm apply the DWT and DFT to extract the spectral features in five frequency bands (,,,, ) form seizure and non-seizure EEG signals. These features extraction approaches allow selecting the effective features from signals for creating the maximum distinction between two classes. Then an IPSONN classifier is used to determine an optimal NDB. The IPSO learning algorithm adjusts the parameter of NN, efficiently and prevents the premature convergence which can increase the sensitivity of seizure onset detector. The obtained results by the proposed algorithm on CHB-MIT dataset show that it can recognize the class of test sample with minimum latency. This capacity is an important factor for effectiveness of the just-in time therapy methods. REFERENCES [] Chung-Ping Young Sheng-Fu Liang Da-Wei Chang Yi-Cheng Liao Fu-Zen Shaw Chao-Hsien Hsieh, "A Portable Wireless Online Closed-Loop Seizure Controller in Freely Moving Rats," IEEE Trans. on Instrumentation and Measurement, Vol. 60, Issue 2, pp. 53, Feb. 20. [2] C. Zhaoyang, H.L. Hongwei, "Wavelet Transform for Rabbit EEG with Vagus Nerve Electric Stimulation," 28th Annual Int. Conf. IEEE.Eng. Medic. Biol. Soc., New York. USA, PP. 75-78, Sept. 2006. [3] A.J. Casson, D.C. Yates, S. Patel, E. Rodriguez-Villegas, "Algorithm for AEEG data selection leading to wireless and long term epilepsy monitoring," 29th Annual Inter. Conf. IEEE Eng. in Medicine and Biology Society, EMBS, Lyon, pp. 2456, Aug. 2007. [4] A. Casson, D. Yates, S. Smith, J. Duncan, E. Rodriguez-Villegas, "Wearable Electroencephalography," IEEE Engineering in Medicine and Biology Magazine, vol. 29, Issue 3, pp. 44, May-June 200. [5] N. Verma, A. Shoeb, J. Bohorquez, J. Dawson, J. Guttag, A.P. Chandrakasan, "A Micro-Power EEG Acquisition SoC With Integrated Feature Extraction Processor for a Chronic Seizure Detection System," IEEE Journal of Solid-State Circuits, vol. 45, no. 4, pp. 804-86, April 200. [6] H. Adeli, S. Ghosh-Dastidar, N. Dadmehr, "A Wavelet-Chaos Methodology for Analysis of EEGs and EEG Subbands to Detect Seizure and Epilepsy," IEEE Trans. on Biomedical Eng., vol. 54, no.2, pp. 205-2, Feb. 2007. [7] A. Mirzaei, A. Ayatollahi, P. Gifani, L. Salehi, "EEG analysis based on wavelet-spectral entropy for epileptic seizures detection," 3rd Int. Conference on Biomedical Eng. and Informatics, Yantai, China, vol. 2, pp. 878-882, Oct. 200. [8] A. Yazdani, T. Ebrahimi, U. Hoffmann, "Classification of EEG signals using Dempster Shafer theory and a k-nearest neighbor classifier," 4th Int. IEEE/EMBS Conference Neural Eng., Antalya, pp. 327-330, May. 2009. [9] W. A. Chaovalitwongse, R. S. Pottenger, S. Wang, "Pattern- and Network-Based Classification Techniques for Multichannel Medical Data Signals to Improve Brain Diagnosis," IEEE Trans. on Systems, Man and Cybernetics, Part A: Systems and Humans, Issue 99, pp., March 20. [0] W. A. Shouyi Wang, S. Wong, "A novel reinforcement learning framework for online adaptive seizure prediction," IEEE Inter. Conf. on Bioinformatics and Biomedicine (BIBM), pp. 499, Dec. 200. [] A. Klein, T. Sauer, A. Jedynak, W. Skrandies, "Conventional and wavelet coherence applied to sensory-evoked electrical brain activity," IEEE Trans. on Biomedical Eng., vol. 53, no. 2, pp. 266-272, Feb. 2006. [2] A.S. Zandi, M. Javidan, G.A Dumont, R. Tafreshi, "Automated Real- Time Epileptic Seizure Detection in Scalp EEG Recordings Using an Algorithm Based on Wavelet Packet Transform," IEEE Trans. on Biomedical Eng., vol. 57, no.7, pp. 639-65, July. 200. 89
[3] A. H. Shoeb, "Application of machine learning to epileptic seizure onset detection and treatment," Ph.D. dissertation, Dept. Electrical Eng., MIT. USA, September.2009. [4] J.R. Millan, J. Mourino, M. Franze, F. Cincotti, M. Varsta, J. Heikkonen, F. Babiloni, "A local neural classifier for the recognition of EEG patterns associated to mental tasks," IEEE Trans. Neural Networks, vol. 3, Issue 3, 2002. [5] Cheng-Jian Lin, Ming-Hua Hsieh, "Classification of mental task from EEG data using neural networks based on particle swarm optimization," Neurocomputing, vol 72, Issues 4-6, pp. 2-30, Jan. 2009. [6] D.W. Boeringer, D.H. Werner, "Particle swarm optimization versus genetic algorithms for phased array synthesis," IEEE Trans. Anten, vol. 52, pp. 77 779, 2004. [7] EEG Database, http://www.physionet.org/pn6/chbmit. 90