Sleep Spindle Detection in Sleep EEG Signal Using Sparse Bump Modeling Mahshid Najafi1, Zahra Ghanbari1, Behnam Molaee-Ardekani2, Mohammad-Bagher Shamsollahi1, Thomas Penzel3 1
BiSIPL, Department of Electrical Engineering, Sharif University of Technology, Tehran, Iran 2 University of Rennes 1, F35000; INSERM U642, Rennes, France 3 Charité, Berlin, Germany
[email protected],
[email protected],
[email protected],
[email protected],
[email protected]
Keywords- Sleep Spindle; Detection; Bump Modeling; sleep EEG;
50
INTRODUCTION
Sleep is one of the necessities of our lives and it is quintessential to our health. Therefore, physicians have scored sleep to different stages in order to study sleep in more details. Sleep is divided to Non Rapid Eye Movement (NREM) and Rapid Eye Movement (REM) stages. NREM stage is also subdivided into four stages (stage I to IV) [1]. Sleep Spindle is used in sleep scoring, because it is the hallmark of second stage of sleep. Sleep spindle is defined as a rhythmic sequence with waxing and waning waves, and its frequency is approximately between 7 to 14 Hz. Also, its time duration is between 0.5 to 2 seconds [2]. An example of sleep spindle is shown in Fig. 1(top). Sleep EEG is usually recorded during whole night. There can be up to 1000 spindles in an entire night sleep. Moreover, spindles can be accompanied by EEG background, and sometimes superposed by other waveforms; therefore, finding sleep spindles manually is a time consuming process. This justifies development of biomedical signal processing methods for automatic detection of sleep spindles. In the last few decades, different methods have been developed for automatic detection of sleep spindles. In 1991, Poiseau et al. used matched filtering to detect sleep spindles [3]. They reported 83.3% correct detection. In their method, the EEG was compared to a pre-defined template with a constant frequency. This could bring some limitations where spindles frequency varies with time. Due to this drawback, practical use of this method is very limited. In next studies, most of methods were based on Fourier transform
0
-50
Frequency (Hz)
I.
and parametric models, especially autoregressive models (AR). For instance, Gorur et al. used short time Fourier transform along with multi layer perceptron (MLP) neural network and support vector machine (SVM) classification [4]. They reported that their algorithms sensitivities were 88.7% and 95.4% using MLP and SVM, respectively. Gorur et al. also used AR model coefficients as features, which succeeded to detect spindles 93.6% correctly [5]. More recently, a few time-frequency methods have been developed for spindles detection [6]. These methods may use both time and frequency properties of spindles. Wavelet transform [7] and matching pursuit [8] have also been used in spindle detection. Matching pursuit could achieve around 90% agreement rate between algorithm results and expert results [9].
Amplitude (uV)
Astract— Sleep spindle is the hallmark of second stage of sleep in human being, which is defined as a rhythmic sequence with waxing and waning waves, whose frequency is approximately between 8 to 14 Hz, and its time duration is between 0.5 to 2 seconds. Bump modeling is a method for extracting regions with higher amounts of energy in a related time-frequency map. The bump model of the sleep spindle consists of a group of high energy bumps concentrating in approximately 8 to 14 Hz frequency band. In this study, it will be shown that the power of bumps of EEG can be used in automated detection of sleep spindle. The presented method sensitivity is 99.41% which shows high correctly detection rate, and its error detection ratio is 14.51%, which demonstrates the low dependency of the presented algorithm to the subjects, and its low false detection ratio.
0
1
2
3
4
5
6
7
8
9
10
60 47 34 21 8 0
2.5
5 Time (sec)
7.5
10
Figure 1. An example of a sleep spindle (top). Bump model of a sleep spindle (bottom).
Beside analysis of spindles in frequency and time frequency domain, some groups have tried to detect spindles based on their visual assessments [10, 11]. In these methods, some popular EEG characteristics such as period, amplitude, and symmetry of spindles by which experts find spindles are employed. Held et al. used these properties with a time-based fuzzy logic-approach on the sigmaband filtered EEG signal. They achieved 87.7% agreement between the detection system and the medical experts [10]. Another example can be the work conducted by Ventouras et al. in which spindles were detected automatically with 79.2% to 87.5% sensitivity. The false positive rate of this method was 15.5% [11]. It should be mentioned that in most of these studies, results are basically given on one subject; so, the performance might be very sensitive to subjects.
978-1-4244-7000-6/11/$26.00 ©2011 IEEE 196
Bump modeling is a method based on Morlet wavelet transform for extracting regions with higher amounts of energy in a related time-frequency map. Indeed, it can be used to extract oscillatory bursts in biomedical signals. This is done by modeling the map with special functions which are called ‘Bumps’. Bump modeling has been proposed in 2005 by Vialatte [12, 13]. It is based on the fact that EEG signals can be divided into two parts; background and burst patterns. It is believed that burst patterns convey much more information. In spite of background activities, they are transient and could be demonstrated by particularly higher amplitude [14]. The main purpose of the present study is the automated detection of spindles using bump modeling. . Indeed, bump modeling is used for extracting some features from EEG signals. These bump-based features are classified to ‘spindle’ and ‘nonspindle’ classes by ECOC (Error Correcting Output Coding) classifier. ECOC is a powerful tool which has been used in various fields, such as face and text recognition and intravascular ultrasound tissue characterization successfully [15]. This paper is organized as follows: In the methodology section, we introduce the bump modeling, the ECOC classifier, and detection strategy such as feature extraction. In the result section, we talk about the evaluation process and the performance of our method in detection of spindles.
II.
METHODOLOGY
A. Data Acquisition And Preprocessing The sleep data were acquired from 5 subjects according to standard polysomnography (PSG). The EEG signal sampling rate was 300 Hz. The EEG was passed through a band-pass filter with cut off frequencies equal to 0.5 and 50 Hz. Then, the EEG was smoothed by Savitzky-Golay smoothing filter [16]. This filter was chosen, because sleep spindle is a low frequency pattern in sleep EEG signal, and this smoothing filter preserves its low frequency components. Spindles were marked carefully by an expert. In this study, the sampling frequency of the annotations was 4 Hz. Annotations were up sampled by a factor of 75 to have the same sampling frequency as EEG signals.
B. Bump Modeling The main idea of bump modeling is to approximate a timefrequency map with a sparse encoding of the map by a set of elementary parameterized functions, called ‘Bumps’ [12]. Main steps of the bump modeling algorithm in the time-frequency map, after proper normalization are as follow: • • •
Time-frequency zones which are going to be modeled are first determined by windowing the map. Then, there would be a set of overlapping areas. The window which contains the maximum amount of energy is identified. A bump ߮ is adapted to the selected zone, and then this zone is withdrawn from the initial map. In order to minimize the cost function, C, bump parameters are computed using the BFGS (Broyden-Fletcher-GoldfarbShanno) algorithm [17]. ଵ (1) ܥൌ σ௧ǡאௐሺݖǡ௧ െ ߮ ሺ݂ǡ ݐሻሻଶ ଶ
The summation runs on all pixels within the window ܹǤݖǡ௧ are the time-frequency coefficients at time ݐand frequency ݂ , respectively. ߮ ሺ݂ǡ ݐሻ demonstrates the value of the bump function in time ݐand frequency ݂. •
The algorithm stops when the amount of information modeled by the bumps reaches a threshold, else it returns to the third stage. The bump ߮ ሺ݂ǡ ݐሻ has the following half episodic shape, which has been founded basically a good bump function for electrophysiological signals. ߮ ሺ݂ǡ ݐሻ ൌ ܽξͳ െ ߥ݂ Ͳݎ ߥ ͳ ቊ ߮ ሺ݂ǡ ݐሻ ൌ Ͳ݂ ߥݎ ͳ
(2)
where ߥ ൌ ሺ݁ଶ ݁௧ଶ ሻ. ݁ ൌ ሺ݂ െ ߤ ሻȀ݈ , ݁௧ ൌ ሺ ݐെ ߤ௧ ሻȀ݈௧ . ߤ , and ߤ௧ are the coordinates of the ellipsoid centers. ݈ and ݈௧ are the halflength of the main axes and ܽ is the amplitude. ݐand ݂ are time and frequency respectively. Each bump is described by 5 parameters; two parameters as its coordinates on the map, one parameter as its amplitude, and two parameter as the lengths of its axes [17].
C. ECOC Classifier ECOC was first introduced in 1994 [18]. In this strategy, the multi-class problem is solved by combining binary problems by using error correction principles. If a set of ܰ classes are to be learned, by applying it to the coding step of the ECOC, ݊ different group of classes would be formed, and ݊ binary problems (dichotomies) would be trained. Therefore, a codeword with the length of ݊ for each class would be in hand where each bin, is corresponded to the response of a binary problem. The next step is defining a coding matrix, ܯ, where א ܯሼെͳǡ Ͳǡ ͳሽே כ in the ternary case. Each row of this matrix would be a codeword. In the process of joining classes to sets, if the class is considered by the dichotomy, each dichotomy is coded by ሼͳǡ െͳሽ, according to their class set membership. However, if the class is not considered by the dichotomy, it isͲ [15]. In the decoding process, after applying the ݊trained binary classifiers, for each data point in the test set, there would be a code, ݔ. ݔwould be compared to the base codewords of each class, which were defined in ܯ. Then, the data point would be assigned to the class, according to distance of the closet codeword. Hamming and Euclidean distances, or any other distances, can be used. In other words, a new test input,ݔ, would be evaluated by all the classifiers, and the method assigns label ܿ with the closet decoding measure [15].
D. Detection Strategy As mentioned earlier, bump modeling identifies those timefrequency regions with high amounts of energy, and express them with bumps. Therefore, potentially, bump modeling should succeed in analyzing EEG signals containing sleep spindles. As illustrated in Fig. 1 (bottom), bump modeling of a sleep spindle consists several number of high-energy bumps concentrated between 8 Hz to 14 Hz. This analysis leads us want to extract some features from these bumps for our spindle detection purpose. Since duration of sleep spindles lasts at least for 0.5 second, we divided the EEG to 0.5 second duration segments. In this study, the total number of EEG segments was 3666 including 2444 training and 1222 test segments. The training and test data sets were not overlapped, and they were taken from different subjects. In such a
197
III.
RESULTS AND DISCUSSION
In this study, we evaluated the performance of our method using some expert-based annotated EEG signals. Our evaluation process consists of two steps. In the first step, we roughly classify each EEG segment into ‘spindle’ and ‘non-spindle’ segments. In the second step, we purify the results that are obtained by the first step. In the first step of our evaluation process, the label of each segment obtained by ECOC is compared with the expert’s labeling for the same segment. The results of this method are shown in table I. The results are obtained from summation of the results of 100 times shuffling data. TABLE I.
ALGORITHM SPINDLE AND NON-SPINDLE SEGMENTS CLASSIFICATION RESULTS.
Segments Status True Detection of Spindle (TP) False Detection of Spindle (FP) False Non-Spindle (FN) True Non-Spindle (TN)
Number of Segments 1262 1152 30938 88848
In this table, the number of true classified and false classified segments for both spindle segments and non-spindle segments are given. As the results show, the outcome of this step does not necessarily provide a suitable measure for the evaluation of the algorithm. For example, as illustrated in Fig. 2, for a spindle which lasts approximately 2 seconds, the algorithm may successfully determine the occurrence of a spindle, but does not generate the exact expert’s labeling style. This difference in labeling style should not cause degradation of the performance of the algorithm. Indeed, the first step of the evaluation process is based on individual segments labels; therefore, it considers that three of these segments (2.5-3.5 and 4-4.5 seconds) have been correctly detected as spindle, and two other segments (2.5-3 seconds and 3.5-4 seconds) have not been detected correctly. This error in labeling causes that the false negative rate of the algorithm be higher than its actual value. This error is mainly due to the background EEG, and other EEG components, that are superposed on spindles. Additionally, up sampling of expert’s annotation signals is another source of error. The maximum of this error is equal to the ratio of the sampling rate of the EEG to that of the annotation signal.
198
Amplitude (uV)
The bump modeling described in section B was used to extract bump-related features of time-frequency representation of each EEG segment. We calculated the bump model of each segment using the ButIf toolbox, released in 2009 [14]. After finding the 5 aforementioned parameters corresponding to each bump, we used these parameters to calculate the power of any bump locating in the 8 Hz to 14 Hz interval. Then, total power of these bumps bumps at 8, 9, 10, 11, 12, 13, and 14 Hz (i.e., 1 Hz steps between 8 to 14 Hz) was computed. These total power parameters gives us 6 features for each EEG segment. These features constituted the input features to ECOC classification method.
An Example of Sleep Spindle 50
0
-50
0
1
2
3 Time (sec) Evaluation Process
4
5
6
3
2
Expert's Annotation 1st Evaluation Process Result Merge Spindles
C
Label
case, intra- and inter-subject sensitivities of the algorithm were simultaneously implied in the algorithm results. In order to have more precise results, the test and training data were shuffled and chosen randomly. Shuffling the data was repeated 100 times.
D 1
0
0
1
2
3 Time (sec)
4
5
6
Figure 2. An assessed spindle (top). Expert’s label, 1st step of evaluation process result, and merging adjacent detected spindle using purified evaluation process (bottom).
The second step of the evaluation process is designed to reduce these kinds of errors. In the second step, we purify the results obtaining in the first step. In this step, the algorithm performance is appraised by its ability to detect the occurrence of spindles, which is also more appropriate for clinical applications. The second step of evaluation process is demonstrated in the diagram of Fig. 3. The outcome of this step determines whether or not, an EEG segment has been correctly classified as spindle in the first step. In this step, first, the adjacent EEG segments, which have been classified as spindles, are merged to create a single spindle, unless their time duration exceeds 2 seconds. Afterwards, the distance between upward (resp. downward) edges of detected spindles and nearest upward (resp. downward) edges of labeled spindle by the expert is measured. This distance is nominated by C (resp. D) (see Fig. 2). Finally, the validity of spindle detection is investigated according to the following diagram. Different Cases
C&D < X TP
C OR D > X O.R< Thr
O.R> Thr
FP
TP
C&D>X FP
Figure 3. The purified evaluation process diagram
As demonstrated in the diagram, if the aforementioned distances are less than the up-sampling rate, X, the detected spindle is considered as a correct detection, and if both C and D are more than X, then the detected spindle will be considered as a false detection. If one of C or D parameters is higher than X, the detected spindle may be considered as a true detection or not. Indeed, in this case, the overlap between the detected spindle and its nearest assigned labeled spindle (by the expert) is calculated. If the ratio between this overlap and the actual spindle length, socalled as O.R, is higher than a threshold the detected spindle is marked as a true detected spindle. Clearly, if a spindle assessed by the expert is not assign to any detected spindles by the algorithm, this spindle will be considered as a missed spindle. Also, if more than one detected spindles by algorithm are assigned to a assessed
spindle by the expert, just the one which has the least C and D, and the most overlap ratio is accepted as true detection, and others are considered as false detection. In this study, the X value and the threshold corresponding to O.R were set to 0.75 and 98%, respectively. The results of the purified evaluation process are shown in table 2. In this table, the number of true detected, not detected and false detected spindles are given. TABLE II.
[2]
[3]
ALGORITHM SPINDLE OCCURRENCE RESULT.
Spindle Occurrence Detection
Number of Spindles
True Detection (TP)
2350
False Detection (FP)
329
Not Detected (FN)
14
[4]
[5]
To examine the algorithm results in a more accurate way, the sensitivity or true positive rate, positive predictive value (PPV), correct detection ratio (C.D.R), and error detection ratio (E.D.R) values were also calculated as follows: Sensitivity = TP / (TP+FN)
(3)
PPV = TP / (TP+FP)
(4)
C.D.R = 1-(FP+FN) / (TP+FN)
(5)
E.D.R = (FP+FN) / (TP+FN)
(6)
The values of these criteria for the algorithm results of test data set are given in table III. As results show, the presented method has the ability to correctly detect the occurrence of spindles by the 99.4% sensitivity, and 87.72% PPV. Regarding the fact that, the data were shuffled, and also, they were chosen from different subjects, the error detection rate, which is 14.51%, shows the low dependency of algorithm on the subjects, and its low false detection ratio. TABLE III.
REFERENCES [1]
DIFFERENT CRITERIA VALUES FOR EVALUATING
[6]
[7]
[8]
[9]
[10]
[11]
ALGORITHM RESULTS
Value 99.41% 87.72% 85.49% 14.51%
Criterion Sensitivity PPV C.D.R E.D.R
[12]
[13]
IV.
CONCLUSIONS
The sleep spindle bump model consists of several number of high energy bumps which are concentrated approximately between 8 Hz to 14 Hz. In the present work, we showed that the power of bumps in this frequency interval can be used in order to detect sleep spindles. The sensitivity of this method was 99.41% which is a high correctly detection rate, and the error detection ratio was 14.51%, which is rather a low false detection ratio and demonstrates the low sensitivity of the presented algorithm to subjects’ data. The good performance of our method is basically because of the ability of bump modeling in finding regions with higher amount of energies and pruning the background EEG. Also, ECOC classifier is a robust classifier which has been used in various fields, such as pattern recognition. In future works, we seek to detect other patterns of sleep EEG using sparse bump modeling.
ACKNOWLEDGEMENT
[14]
[15]
[16]
[17]
[18]
S. Sanei and J. A. Chambers, EEG Signal Processing vol. 1: John Wiley & Sons Inc., 2007. M. Steriade, "chapter Cellular Substrates of Brain Rhythms," in Electroencephalography: Basic Principles, Clinical Applications, and related Fields: Wiliam I& Wilkins, 1993. E. Poiseau and M. Jobert, "Matched filtering applied to the détection of spindles and K-complexes in sleep EEG," in 13° Colloque sur le traitement du signal et des images France: GRETSI, Groupe d’Etudes du Traitement du Signal et des Images, 1991, pp. 187-190. D. Gorur, U. Halici, H. Aydin, G. Ongun, F. Ozgen, and K. Leblebicioglu, "Sleep spindles detection using short time Fourier transform and neural networks," in Neural Networks, 2002. IJCNN '02. Proceedings of the 2002 International Joint Conference on, 2002, pp. 1631-1636. D. Görür, H. Aydin, G. Ongun, F. Ozgen, and K. Leblebicioglu, "Sleep spindles detecton using autoregressive modeling," in Proceedings of ICANN, 2003. P. Xanthopoulos, S. Golemati, V. Sakkalis, P. Y. Ktonas, M. Zervakis, and C. R. Soldatos, "Modeling the time-varying microstructure of simulated sleep EEG spindles using time-frequency analysis methods," in Engineering in Medicine and Biology Society, 2006. EMBS '06. 28th Annual International Conference of the IEEE, 2006, pp. 2438-2441. B. Ahmed, A. Redissi, and R. Tafreshi, "An automatic sleep spindle detector based on wavelets and the teager energy operator," in Engineering in Medicine and Biology Society, 2009. EMBC 2009. Annual International Conference of the IEEE, 2009, pp. 2596-2599. P. J. Durka and K. J. Blinowska, "Matching pursuit parametrization of sleep spindles," in Engineering in Medicine and Biology Society, 1996. Bridging Disciplines for Biomedicine. Proceedings of the 18th Annual International Conference of the IEEE, 1996, pp. 1011-1012 vol.3. J. Zygierewicz, "Analysis of sleep spindles and model of their generation," in Department of Physics. vol. Doctor of Physics Warsaw: Warsaw University, 2000, p. 96. C. M. Held, L. Causa, P. Estevez, C. Perez, M. Garrido, C. Algarin, and P. Peirano, "Dual approach for automated sleep spindles detection within EEG background activity in infant polysomnograms," in Engineering in Medicine and Biology Society, 2004. IEMBS '04. 26th Annual International Conference of the IEEE, 2004, pp. 566-569. E. M. Ventouras, E. A. Monoyiou, P. Y. Ktonas, T. Paparrigopoulos, D. G. Dikeos, N. K. Uzunoglu, and C. R. Soldatos, "Sleep spindle detection using artificial neural networks trained with filtered time-domain EEG: A feasibility study," Computer Methods and Programs in Biomedicine, vol. 78, pp. 191-207, 2005. F. B. Vialatte, C. Martin, R. Dubois, J. Haddad, B. Quenet, R. Gervais, and G. Dreyfus, "A machine learning approach to the analysis of timefrequency maps, and its application to neural dynamics," Neural Networks, vol. 20, pp. 194-209, 2007. M. Köppen, N. Kasabov, G. Coghill, F.-B. Vialatte, J. Dauwels, J. SoléCasals, "Improved Sparse Bump Modeling for Electrophysiological Data," in Advances in Neuro-Information Processing. vol. 5506: Springer Berlin / Heidelberg, 2009, pp. 224-231. F. Vialatte, J. Sole-Casals, J. Dauwels, M. Maurice, and A. Cichocki, "Bump time-frequency toolbox: a toolbox for time-frequency oscillatory bursts extraction in electrophysiological signals," BMC Neuroscience, vol. 10, p. 46, 2009. S. Escalera, O. Pujol, J. Mauri, and P. Radeva, "Intravascular Ultrasound Tissue Characterization with Sub-class Error-Correcting Output Codes," Journal of Signal Processing Systems, vol. 55, pp. 35-47, 2009. A. Savitzky and M. J. E. Golay, "Smoothing and Differentiation of Data by Simplified Least Squares Procedures," Analytical Chemistry, vol. 36, pp. 1627-1639, 1964. W. Duch, J. Kacprzyk, E. Oja, S. Zadrozny, F. Vialatte, A. Cichocki, "Early Detection of Alzheimer’s Disease by Blind Source Separation, Time Frequency Representation, and Bump Modeling of EEG Signals," in Artificial Neural Networks: Biological Inspirations – ICANN 2005. vol. 3696: Springer Berlin / Heidelberg, 2005, pp. 683-692. G. D. Thomas and B. Ghulum, "Solving multiclass learning problems via error-correcting output codes," J. Artif. Int. Res., vol. 2, pp. 263-286, 1994.
The authors wish to express their thanks to Dr. Francois Vialatte for all his discussions and invaluable helps.
199