32nd Annual International Conference of the IEEE EMBS Buenos Aires, Argentina, August 31 - September 4, 2010
Wavelet Transform and Cross-Correlation as Tools for Seizure Prediction Claudia C. Botero Suárez, Erich Talamoni Fonoff, Mario Alonso Munoz G, Antonio Carlos Godoi, Gerson Ballester, Francisco Javier Ramírez-Fernández.
Abstract— This paper describes the detection of preictal bursting using wavelet transform application and crosscorrelation analysis. The wavelet transform is applied to data reduction and signal pre-processing. The extracted features provide simplified signals to process by means of the crosscorrelation technique. The algorithm has been tested with a set of preictal data, interictal data and spontaneous crises, to determinate its sensitivity and its specificity (False Prediction Rate). The seizure occurrence period and the seizure prediction horizon are also calculated. The algorithm’s merits are: 1) high sensitivity and 2) easy implementation.
I. INTRODUCTION
C
HANGES present in EEG signals can be quantify by a variety of methods. Some of those methods evaluate complex epileptic activity waveforms studying burst’s patterns on seizure precursors and disruption of normal background waveforms, and include techniques for detecting and quantifying the number of subclinical seizure-like burst and methods for detecting seizure onset [1],[2]. The Fast Fourier Transform (FFT) is a classical analysis method applied to signals in time domain, including EEG signals. When the FFT is applied to successive segments of an EEG signal, the frequency spectrum varies over the time as the Fourier coefficients fluctuate, indicating that the EEG signal is a non-stationary signal [3]. However, it is possible using a short enough data analysis window to assume quasistationary EEG segment. For example in intracranial EEG (IEEG), a segment of tens of seconds can be considered quasi-stationary [4]. The wavelet transform could be thought as an extension of the classic Fourier transform; it works on a multi-scale basis instead of a single scale (time or frequency), allowing signal decomposition in different scales or resolution levels. A general signal like EEG could be considered as a superposition of different structures happening on different time scales at different times (or spatial scales at different locations). For example, the classic understanding of EEG signals, considers them as composed by a number of underlying oscillating frequency components: alpha
frequency, beta frequency, etc. Therefore, in case of EEG signals, wavelet transform essentially ranges the signal from low frequency to high frequency components progressively. Thus, it makes possible to identify present patterns in each frequency band. With available methods to detect seizure precursors, the question still remains: which one should be applied for a specific patient. Esteller [2] has demonstrated that for a given patient, multiple complementary quantitative features allow to detect epileptic seizures more successfully than algorithms that rely on single quantitative features. Finally, when the best performing combination is found for a given patient, the resultant feature vector is used to configure the algorithm for evaluating the test data and potential online implementation. The structure of this paper is as follows: In the next section, we will briefly describe the method for computing the wavelet coefficients and their interpretation in a given signal. Then, we will use the wavelet coefficients as features for the cross-correlation analysis to identify preictal activity. These results are evaluated to determinate algorithm’s sensitivity, false prediction rate and prediction time. II. MATERIALS AND METHODS A. EEG Data The EEG data were obtained from adult Wistar rats with eight bipolar Ni-Cr electrodes implanted over the frontal and parietal lobes. The rats are submitted to status epilepticus after injection of Pilocarpine, following the well known animal model of chronic epilepsy [5],[6]. After seven days, continuous recordings were made using 256 Hz sampling frequency. Half of the data was used to train the algorithm and the other half was used to test it. B. Wavelet Transform Continuous wavelet transform (CWT) of an analog signal f (t) is expressed as [7]: -½
Manuscript received April 1, 2010. This work is supported by funding from PNM of Conselho Nacional de Desenvolvimento Cientifico e Tecnológico –CNPq–. C.C. Botero, A.C. Godoi and F.J. RamírezFernández are with Laboratório de Microeletrônica, Escola Politécnica / Universidade de São Paulo, Brasil; e-mail:
[email protected]. E.T. Fonoff and G. Ballester are with Laboratório de Neurocirurgia Funcional, Universidade de São Paulo, Brasil.
978-1-4244-4124-2/10/$25.00 ©2010 IEEE
Cb,a ≡ Wψf (b,a) ≡ │a│
∫-∞∞ f(t) ψ [(t-b)/a] dt
(1)
Function ψ [(t-b)/a] is obtained by the translation b and the dilation a (the scale factor) of the “basic wavelet” (or “mother wavelet”) ψ(t). The results of the CWT are many wavelet coefficients Cb,a. In order to construct efficient
4020
algorithms for calculating the wavelet transform Wψf (b,a), dyadic values b=m/2n and a=1/2n are usually chosen. This way of the wavelet transform is called the Dyadic Wavelet Transform or the Discrete Wavelet Transform (DWT). In DWT, the mother wavelet is then expressed as: ψnm(t) = 2m/2 ψ(2m t - n)
(2)
And the wavelet coefficients in equation (1) are given as: Cn,m ≡ Wψf (n,m) =2m/2 ∫-∞∞ f(t) ψ(2m t - n) dt
compromise between the requirement of been long enough (0.25 seconds at least) to compute specific EEG features [10] and short enough (45 seconds max.) to be assumed as stationary data [11]. A processing window was created collecting 2564 samples, representing approximately 10 seconds of data for each channel. The pre-processing with the wavelet transform is applied to the raw EEG signals inside the window to determinate the coefficients that will be used as features that describe the signal.
(3)
In equations (2) and (3), n is now the translation factor and m the scale factor. The larger m values, the slower frequency components. Different mother wavelets increase different wavelets classes and hence the behavior of the decomposed signal could be quite different. The mother wavelet should be chosen carefully, such that it exhibits good localization properties in both the frequency and spatial domains. The Biorthogonal is a mother wavelet that has presented good results in classification of EEG signals [8],[9]. In particular, using a five-level decomposition DWT on raw EEG signal sampled at 256 Hz per channel, the frequencies ranges of the wavelet levels are located close to the clinically defined standard frequencies bands of interest: super-gamma (64– 128 Hz), gamma (32–64 Hz), beta (16–32 Hz), alpha (8–16 Hz), theta (4–8 Hz) and delta (2–4 Hz). This is clearly seen in Fig. 1 that shows the results by DWT with Biorthogonal order five wavelet for the epileptic EEG signal from a cortical electrode.
C. Processing using cross-correlation The coefficients obtained with the wavelet transform, are separated in six arrays that represent the frequencies bands and contain the wavelet coefficients of the M channels in time domain (Fig. 2). This separation in frequencies bands allows finding more manifest features in some frequencies than others.
Fig. 2. Wavelet Coefficients clustered by frequencies bands: A5 (delta), D5 (theta) and D4 (alpha) levels for all channels in a time interval. Some particular activity can be observed before the 16th second, but just in D5 (theta) and D4 (alpha) bands of frequencies.
Fig. 1. Wavelet transform with the decomposition of the EEG signal f(t) in several frequencies bands: D1 = super-gamma (64–128 Hz), D2 = gamma (32-64 Hz), D3 = beta (16–32 Hz), D4 = alpha (8–16 Hz), D5 = theta (4–8 Hz) and A5 = delta (2–4 Hz). Original signal f(t) can be reconstructed by adding all the components.
A5 gives the lower frequency component or approximation, while detailed parts (Dl-D5) show the higher frequencies components at each decomposition level. Original signal f(t) is reconstructed by adding all the components. The processing window selected must to achieve a
In every array, the M channels were pair cross-correlated to create M cross-correlation vectors. The M crosscorrelation vectors were averaged and the standard deviation was used as a measured of synchrony: while lower standard deviation higher synchrony, meaning that a seizure is close to happen. The cross-correlation was recomputed for each new 250 ms of acquired EEG data, and the measured synchrony in each frequency band was used to determinate if a seizure was about to occur. With the training data, a critical value for the synchrony measure was chosen to get 100% of the seizures having in its previous period a standard deviation less than this critical value. Some of the non-seizure signals may have a standard deviation less than the critical value, and it is considered false alarm.
4021
D. Algorithm Assessment The current methods of prediction are still far from the perfection, thus the uncertainty to indicate the exact point in time when a seizure is to occur was considered in this work as suggested by Winterhalder [12]. That uncertainty may be considered with the seizure occurrence period (SOP), which is defined as the period during which the seizure is to be expected. In addition, is denoted the seizure prediction horizon (SPH) like the minimum window of time between the alarm activation by the prediction method and the beginning of SOP. These two periods have to be taking care to judge a correct prediction or not. For a correct prediction, a seizure must not occur during the seizure prediction horizon, but during the seizure occurrence period. Moreover, a minimum seizure prediction horizon and a maximum seizure occurrence period must be defined by the intervention system chosen. Whereas implanted devices may need only a few second to control an upcoming seizure, a warning system has to predict the seizure at least tens of seconds before onset, providing enough time to prevent risky situations. Similarly, occurrence period must be limited for the risk of additional side effects produced by a prolonged intervention, either stimulation or delivery of anticonvulsive drugs. In case of warning system, the patient’s anxiety must be considered. III. RESULTS The wavelet coefficients allow a faster analysis and represent a support to confirm more certainly events happening that sometimes are not clearly identified in the raw data. The figure 2 shows that almost all frequencies bands identify significant changes in some channels between 15.5 and 16 seconds, implying an epileptic seizure. But the purpose goes ahead the crisis detection, trying to anticipate the epileptic seizures. The cross-correlation processing is then necessary for this goal. As described above, when the correlation analysis is done linking the coefficients of all channels in every frequency band is obtained a synchrony value with the lowest standard deviation. Figure 3 presents the synchrony obtained in delta band (wavelet D5) that represents the frequencies between 4 and 8 Hz. This example shows that greater synchrony values are obtained in pos-ictal period, anticipated by a maximum positive inclination during the crisis. But there are some minimum values that are less than 0.6 in this band of frequencies. Those values are obtained in the pre-ictal period (green circumferences in the Fig. 3), and they permit activate an alarm indicating that a seizure is close to happen.
Fig. 3. Synchrony analyze obtained from the standard deviation of the cross-correlation among all the channels at the frequency band D5 (delta) . The green circles indicate that a minimal level can be detected some seconds before a seizure episode.
IV. DISCUSSION The Sensitivity (S) of a prediction method is calculated as the fraction of correct predictions to all seizures, while the False Prediction Rate (FPR) quantify the number of false predictions in a given time interval. The pre-ictal spike detection algorithm was evaluated on an independent set of EEG data from that used in the training set. The algorithm identified 91 out of 95 spikes identified by any expert and missed 4 spikes, representing a sensitivity of 96% as indicated in Table I. TABLE I RESULTS FOR BOTH TRAINING AND TESTING SETS FOR SPIKE PREDICTION Set NS TP Sensitivity (S) FP Training 43 43 100 % 0 Testing 52 48 92 % 1 Both 95 91 96 % 1 NS= Total number of seizures identified by experts. TP= True positive seizures identified by algorithm. FP= Non-seizures falsely identify like seizures.
Due the clinical considerations have not jet pointed out, Winterhalder [12] proposed acceptable values for FPRmax SPHmin and SOPmax to compare with the minimal conditions that a statistical method can offer, using some “reasonable” suppositions independently of any particular clinical application. For example, the average seizure incidence may indicate a reasonable range for FPRmax: Under normal conditions, patients with pharmacorefractory focal epilepsy have a mean seizure frequency of about three seizures per month, meaning 0.0042 seizures per hour [9]. Afterward, reasonable values of FPRmax must be minors than seizure frequency representing the worst case with a maximum of 50% of false alarms. In this study with rats having Pilocarpine applied, the recordings are made during the chronicle period (similar to normal conditions in humans), and may represent approximately 0.0042 FP/h. The algorithm of prediction
4022
falsely identified 1 spike that had not been spotted by experts during 18 hours of recordings, representing a FPR = 0.055 FP/h. These values are not according with the maximum value expected in normal epileptic conditions. That results because are necessary even longer continuous recordings to get a FPR minor than 1 FP per day. By other way, Winterhalder explained that statistical methods yield a sensitivity between 57% and 83%, using SOP=50 minutes and FPRmax=1FP/h, which are high values with respect to possible clinical applications. Then, a specific method of prediction is expected to be better than unspecific one. In our study, a SOP = 19 s and a SPH = 5 s were obtained, corresponding to the minimum seizure prediction horizon of a very fast intervention system. With those values fixed, was obtained a total sensitivity of 96% and a total FPR of 0.055 FP/h improving the statistical methods and some prediction methods that are more complex and just get sensitivity inferior to 80% and FPR superior to 0.2 FP/h. V. CONCLUSION The availability of reliable methods of seizure prediction could enhance the quality and safety of patients with epilepsy, providing a window of time during which automated warning or a therapeutic intervention could be applied to minimize risk of injury and perhaps abort the seizure. The secondary effects of long-term pharmacological treatment could be also diminished. A prediction method oriented to clinical applications, have to own a high sensitivity to reduce the uncertainty of the patient about the imminent occurrence of a seizure, or better jet activate an intervention system to avoid the seizure happening. Simultaneously, have to be calculated the false predictions of the system because in case of high values, may cause patients to ignore a warning system or lead to possible side effects of unnecessary interventions. The minimum seizure prediction horizon and maximum seizure occurrence period have to be also based in clinical considerations because a longer Seizure Occurrence Period would increase the patient’s psychological stress, while a short Seizure Prediction Horizon would not provide enough time to avoid the patient’s danger. We evaluated the characteristics of an algorithm to automated pre-ictal activity detection using the wavelet transform and the cross-correlation techniques. The study demonstrated the feasibility of using these techniques for epilepsy prediction for its high sensitivity and low complexity. The algorithm needs to be further developed and tested for on-line implementation using prolonged recordings on ambulatory subjects where state-related EEG changes and artifacts remain a continuing challenge for prediction systems.
REFERENCES [1]
. J. Niederhauser, R. Esteller, J. Echauz, G. Vachtsevanos, B. Litt, “Detection of Seizure Precursors From Depth-EEG Using a Sign Periodogram Transform”, IEEE Trans. on Biom. Eng., vol. 51, No. 4, pp. 449-458, April 2003. [2] R. Esteller, J. Echauz, M. D'Alessandro, G. Vachtsevanos, B. Litt, “Feature parameter optimization for seizure detection / prediction”, Proceedings of the 23rd Annual EMBS International Conference, pp. 1711-1714, October 25-28, 2001. [3] S. Janjarasjitt, K.A. Loparo, “Wavelet-based fractal analysis of the epileptic EEG signal”, Intelligent Signal Processing and Communication Systems, pp.127 – 130, 2009. [4] R. Esteller, J. Echauz, A. D'alessandro, G. Vachtsevanos, B. Litt, “Feature Parameter Optimization for Seizure Detection/Prediction”, Proc. of the 23rd Annual Int. Conf. of the IEEE Eng. in Med. and Biol. Soc., Vol. 2, pp. 1711 – 1714, 25-28 Oct. 2001. [5] Wu Hongyi, Xia Yang, Lai Yongxiu, Liu Yansu, Yao Dezhong, “Study of epileptic rat's EEG using bispectrum analysis”, Proceedings of the First International Conference on Neural Interface and Control, pp. 119 – 122, 2005. [6] Guo Hua, Xia Yang, Liu Fei, Liu Xiaoqin, Dai Shengjun, Lei Lei, Wang Yuqing, “Based on the Time-Frequency Analysis to Distinguish Different Epileptiform EEG Signals”, 3rd International Conference on Bioinformatics and Biomedical Engineering, pp.1 – 3, 2009. [7] N. V. Thakor, S. Tong, “Advances in Quantitative Electroencephalogram Analysis Methods”, Annu. Rev. Biomed. Eng., v. 6, pp 453–95, April 2004. [8] C. Yamaguchi. “Fourier and Wavelet Analyses of Normal and Epileptic Electroencephalogram (EEG)”. Proceedings of the 1st International IEEE EMBS Conference on Neural Engineering, pp. 406-409, March 2003. [9] J. S. Paul, C. B. Patel, H. Al-Nashash, N. Zhang, W. C. Ziai, M. A. Mirski, D. L. Sherman, “Prediction of PTZ-Induced Seizures Using Wavelet-Based Residual Entropy of Cortical and Subcortical Field Potentials”,. IEEE Trans. on Biom. Eng., vol. 50, No 5, May 2003. [10] A. Chernihovskyi,, C.E. Elger, K. Lehnertz, “Analysis of synchronization phenomena in human electroencephalograms with nonlinear excitable media”, 11th International Workshop on Cellular Neural Networks and Their Applications, pp. 81 – 85, 2008. [11] Chun-mei Wang, Jun-zhong Zou, Jian Zhang, Zhi-suo Zhang, Chongming Zhang, “Classifying Detection of Epileptic EEG Based on Approximate Entropy in Wavelet Domain”, Biomedical Engineering and Informatics, pp. 1 – 5, 2009. [12] Winterhalder, T. Maiwald, H.U. Voss, R. Schenbrenner-Scheibe, J. Timmer, A. Schulze-Bonhage, “The seizure prediction characteristic: a general framework to assess and compare seizure prediction methods”, Epilepsy & Behavior, 4, pp. 318–325, 2003.
4023