868
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 5, MAY 2004
translates into a higher relative degree of background noise, the high noise immunity feature of the proposed method may be used to reduce the level of the stimuli for a more patient friendly examination. High speed of convergence of the proposed method is useful in reducing the examination time which again results in a more patient friendly and time effective clinical examination. ACKNOWLEDGMENT The authors would like to thank Dr. D. Purcell and Prof. H. Kunov of the University of Toronto for providing the clinical recording used in this paper. Discussions with X. Li of Vivosonic Corporation have been insightful in selecting the examples presented in this paper. His useful suggestions are greatly appreciated. The clarity-enhancing comments of Dr. L. Iasemidis of Arizona State University are gratefully acknowledged. REFERENCES [1] R. E. Delgado, Ö. Özdamar, S. Rahman, and C. N. Lopez, “Adaptive noise cancellation in a multimicrophone system for distortion product otoacoustic emission acquisition,” IEEE Trans. Biomed. Eng., vol. 47, pp. 1154–1164, Sept. 2000. [2] D. T. Kemp, “Stimulated acoustic emissions from within the human auditory system,” J. Acoust. Soc. Amer., vol. 64, no. 5, pp. 1386–1391, 1978. [3] R. Probst, B. L. Lonsbury-Martin, and G. K. Martin, “A review of otoacoustic emissions,” J. Acoust. Soc. Amer., vol. 89, no. 5, pp. 2027–2067, 1991. [4] X. Li, Y. Sokolov, and H. Kunov, “System and method for processing low signal-to-noise ratio signals,” Int. patent PCT/CA99/01055, May 18, 2000. [5] M. Karimi-Ghartemani and A. K. Ziarani, “Periodic orbit analysis of two dynamical systems for electrical engineering applications,” J. Eng. Math., vol. 45, no. 2, pp. 135–154, 2003. [6] A. K. Ziarani and A. Konrad, “A nonlinear adaptive method of elimination of power line interference in ECG signals,” IEEE Trans. Biomed. Eng., vol. 49, pp. 540–547, June 2002. [7] A. K. Ziarani, A. Konrad, and A. N. Sinclair, “A novel time-domain method of analysis of pulsed sine wave signals,” IEEE Trans. Instrum. Meas., vol. 52, pp. 809–814, Mar. 2003. [8] W. K. Ma and Y. T. Zhang, “Estimation of distortion product otoacoustic emissions,” IEEE Trans. Biomed. Eng., vol. 46, pp. 1261–1264, Oct. 1999.
Interictal Spike Detection Using the Walsh Transform Malek Adjouadi*, Danmary Sanchez, Mercedes Cabrerizo, Melvin Ayala, Prasanna Jayakar, Ilker Yaylali, and Armando Barreto Abstract—The objective of this study was to evaluate the feasibility of using the Walsh transformation to detect interictal spikes in electroencephalogram (EEG) data. Walsh operators were designed to formulate characteristics drawn from experimental observation, as provided by medical experts. The merits of the algorithm are: 1) in decorrelating the data to form an orthogonal basis and 2) simplicity of implementation. EEG recordings were obtained at a sampling frequency of 500 Hz using standard 10–20 electrode placements. Independent sets of EEG data recorded on 18 patients with focal epilepsy were used to train and test the algorithm. Twenty to thirty minutes of recordings were obtained with each subject awake, supine, and at rest. Spikes were annotated independently by two EEG experts. On evaluation, the algorithm identified 110 out of 139 spikes identified by either expert (True Positives = 79%) and missed 29 spikes (False Negatives = 21%). Evaluation of the algorithm revealed a Precision (Positive Predictive Value) of 85% and a Sensitivity of 79%. The encouraging preliminary results support its further development for prolonged EEG recordings in ambulatory subjects. With these results, the false detection (FD) rate is estimated at 7.2 FD per hour of continuous EEG recording. Index Terms—Epileptogenic data, focal epilepsy, interictal spike detection, Walsh transform.
I. INTRODUCTION Algorithms and methods for the automated detection of interictal spikes in the scalp electroencephalogram (EEG) can be very useful, especially during long-term EEG monitoring sessions, and may serve as a support mechanism to the decisions made by EEG experts. Several earlier studies [1]–[12] have described automated spike detection algorithms. Rule-based detection algorithms have explored two characteristics that are considered as most reliable in the detection of spikes: the fast rise and decay of the spike, and the sharpness of its peak. The spatio-temporal context is taken into account in several studies using different approaches: context-based detection [1], [10]–[12], state-based detection [2], neural networks [3]–[6], wavelet theory [7], [8], and expert systems [9], [10], to cite a few. An implementation example of the Walsh transform to stereo vision is provided in [13]. This study evaluates the feasibility of developing a spike detection algorithmusingtheWalshoperator.TheinputEEGsignalsaredecorrelated into signals with different orders (degree of sharpness) and different dimensions (width of the operator) using the Walsh transformation. II. METHODS A. Subjects Eighteen children with focal epileptic seizures served as subjects for this study. All of the procedures followed strict protocols pursuant to Manuscript received January 13, 2002; revised September 23, 2003. This work was supported in part by the National Science Foundation (NSF) and the Office of Naval Research (ONR) under Grant EIA-9 906 600 and Grant N-000149910952. Asterisk indicates corresponding author. *M. Adjouadi is with the Department of Electrical & Computer Engineering, Florida International University, 10555 W. Flagler Street, Miami, FL 33174 USA (e-mail:
[email protected]). D. Sanchez, M. Cabrerizo, M. Ayala, and A. Barreto are with the Department of Electrical & Computer Engineering, Florida International University, Miami, FL 33174 USA. P. Jayakar and I. Yaylali are with the Department of Neurology, Miami Children’s Hospital, Miami, Fl 33155 USA. Digital Object Identifier 10.1109/TBME.2004.826642
0018-9294/04$20.00 © 2004 IEEE
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 5, MAY 2004
869
6) The amplitude of a spike is greater than 20 V. The ampliA1 A2 = , with A1 Py 0 tude Aa is defined as Aa Ry ; A2 Py 0 Fy , where Py ; Ry , and Fy denote the respective latencies in the y -axis for points P; R, and F . In addition, the downward deflection voltage A2 is usually larger than the upward deflection voltage A1 , and satisfying the condition provided in [12]: = A1 =A2 7) The maximum amplitude of a spike is at least 1.5 times larger than that of the background signal, where the background signal may be defined as the EEG activity lasting twice the duration of the spike (assumed in this case to be 140 ms) at either side of a potential spike. 8) Multichannel activity may be reported, where one spike observed in a given channel may also be observed in another neighboring channel. In other words, spikes do not occur in isolation. 9) A slow wave may follow a spike. However, since this characteristic is not always present it may be used only to augment the certainty in identifying a spike, but not to undermine it. 10) Spike-like transients in a number of channels at a specific time can occur in EEG data, and should be filtered out or recognized as such, in order to minimize the false detections (FDs).
=( + ) 2
=
(1 4) (
Fig. 1.
Simulated spike and its morphology.
the ethical guidelines and regulatory requirements regarding research involving human subjects. B. The Integrated Recording System EEG data was recorded employing the standard 10–20 electrode placement system interfaced with the SynAmps of the Electric Source Imaging system (ESI-256). The SynAmp amplifiers of the ESI-256 machine allow for online amplification and digitization, digital filtering of the EEG signals, and the transferring of the digitized data to the host computer. The EEG data was collected using a 500-Hz sampling frequency. Twenty to thirty-minute epochs were recorded on each subject in the awake, supine position at rest. The data was independently annotated for spike discharges by two EEG experts. An independent set of EEG data (nine subjects each) was used to develop and test the algorithm. C. Criteria Characterizing Interictal Spikes A typical interictal spike waveform is simulated in Fig. 1 in order to provide key assessments of its characterizing features, with an excellent overview provided in [14]. With the help of medical experts, the following list of criteria was established as necessary to declare the existence of an interictal spike, defined as a waveform RP F , with two half waves RP and P F . 1) Sharpness of a spike is continuous, displaying sharpness in both narrow and wide intervals of observation. 2) The rising and falling slopes of the spike are both steep. As illustrated in Fig. 1, the rising slope mRP is measured from the first trough R to the peak of the spike, and the falling slope mPF is measured from the peak to the second trough F . 3) A sharp peak P characterizes the spike, which is due to a sudden change in polarity of the voltage signal recorded. This sharpness may occur in both the time and spatial domains. 4) A spike is estimated to have a total duration of 20 to 70 ms. The total duration of the spike, t , is measured from R to F , as the sum duration of the two half waves. Px ; Rx , and Fx denote the respective latencies in the x-axis for points P; R, and F
1
1t = 1RP + 1P F ; 1RP = Px 0 Rx and 1 P F = Fx 0 Px :
where
5) The two half waves are observed to satisfy the condition that the absolute difference of their duration is less than or equal to the average of their durations [12]. This implies that the duration of the shorter half wave must be at least a third of the duration of the longer half wave
j1RP 0 1P F j (1RP +2 1P F ) :
=
) 2
D. Algorithm Development Process
r of r th For the ordered Walsh kernel matrix, the Walsh operator !N order and length N is defined based on the sequency value (number of sign changes in its 6 elements) and the dimension N considered. The order r is given by the sequency of the operator, and refers to the type of differences (derivatives) used between sample points. The dimension N N n refers to the width of the Walsh operator, a function of the number of points considered. Considering the digitized input signal, f t , the Walsh transform defined by WNr is given by the convolution 3 of !Nr with f t as WNr !Nr 3 f t : (1) 1 The Walsh operator of 1st order and length 2, !2 , is functionally equivalent to the 1st derivative, d1
1
( =2 ) () ()
()
=
()
!21 = [1 0 1] = d1 =
@ : @t
The Walsh operator of second-order and length 4, equivalent to the second derivative, d2
!42 = [1 01 01 1] = d2 =
@2 @t2
(2)
!42 ,
is functionally
= [1 02 1]:
(3)
At this point, through experimental validation, we can proceed to make 1 2 the generalization that !N is functionally equivalent to d1 , and !N is 2 functionally equivalent to d for any N . In other words, by varying N , different characteristics of the input signal may be appreciated at different scales (or resolutions). After further analysis of the behavior r r ; in relation to interictal spikes, the following set of of WN rules are established. 1 yield two peaks for each spike. The — The results from WN first peak is associated with the rising slope, and the second 1 with the falling slope. The amplitude of each peak in WN is an indicator of the steepness of the slope, where a higher peak means a steeper slope. 2 yield a peak associated to the spike’s — The results from WN 2 relates to peak location. The amplitude of this peak in WN the sharpness of the corresponding spike, where a higher peak means a sharper spike.
( = 1 2)
E. The Implementation Steps 1) Satisfying Criterion 1—Sharpness of a Spike is Continuous: Continuity in sharpness in a spike means that it is sharp in
870
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 5, MAY 2004
TABLE I RESULTS FOR BOTH TRAINING AND TESTING SETS FOR SPIKE IDENTIFICATION
NS = total number of spikes identified. S and S = spikes identified exclusively by first and second EEG expert, respectively. S = spikes identified by both EEG experts. Note that NS = S + S + S
Fig. 2. Characteristics of operators
and
TABLE II SENSITIVITY ( ) AND PRECISION ( ) MEASUREMENTS FOR THE PHASES OF = ( + ) AND TRAINING AND TESTING. RECALL THAT = ( + )
in absolute values.
narrow as well as in wider intervals of observation. This implies 1 and W 2 , with that high values must result for the peaks in WN N N ; , and used as the respective number of points analyzed simultaneously in the input data. For wider intervals of observation, the developed algorithm takes the results at different scales (resolutions) and adds them together to detect all potential transitions under different scaling. This is expressed mathematically as
=48
16
W
r = Wr + Wr + Wr 4
8
16
r
=1 2 ;
(4)
:
In other words, sharpness/steepness of the signal identified in any r; r , resulting in high-amplitude peaks, of W4r ; W8r , or W16 ; should yield a steep and sharp signal in W r . Since the interictal spike must exhibit high degrees of sharpness in both narrow and wider intervals, the following measures, expressed in (5) as point by point multiplications, are used to emphasize that part of the signal that meets sustained steep slopes and sharp peaks, respectively
( = 1 2)
r
r
r
r
r
r
2 :W = W2 1 [W4 + W8 + W16 ] with r = 1; and r r = W r 1 [W r + W r + W r ] with r = 2: (5) W2+r :W 2+r 4 8 16 W
2) Satisfying Criterion 2—Rising and Falling Slopes of the Spike are Both Steep: To ensure that the rising and falling slopes of the spike are both very steep, we consider the two peaks resulting in W 1 and the one peak resulting in W 2 , as illustrated in Fig. 2, in direct association with the steep slopes of the spike. A maximum duration of 20 ms for the “valley” created between these two peaks in W 1 , defined as PP , confirms the steepness of the slopes. The 20-ms condition is obtained empirically through the so-called training set used in the study. In this implementation step, if the separation PP is greater than that set duration, then the first peak is eliminated and the check is made again for the second peak, and so on. The result of this procedure is that W 1 would contain only peaks that are related to signals that have both a steep rising slope and a steep falling slope. 3) Satisfying Criterion 3—A Sharp Peak Characterizes the Spike: The criterion that a sharp peak P characterizes the spike is resolved through setting dynamic thresholds both in the temporal and spatial domains, and through verification of the peak resulting in W 2 . This implementation step yields the following observations — Dynamic thresholds in temporal and spatial domains are found effective given the variations in the signal’s background activity. With the choice of windows of 3-s intervals, these thresholds are set at one standard deviation about the mean of all the peaks found in these 3-s windows. — The amplitude of the peak in W 2 is proportional to the sharpness of the peak in the input signal that has satisfied the threshold conditions. This peak in W 2 occurs in an interval corresponding to PP in W 1 .
1
1
1
4) Satisfying Criteria 4–7—Characterizing Spike’s Duration, Half Waves and Amplitude: All of the support formulae identified earlier for these steps were implemented as given. 5) Satisfying Criteria 8–10—MultiChannel Activity, Slow Wave, and Spike-Like Transients: Criteria 8, 9 are defined as support observations used to increase the certainty in identifying a spike but not to undermine it. Criterion 10 involves spike-like transients (artifactual data) that need to be filtered out or identified as such, which was accomplished in this case, as a preprocessing step. III. RESULTS The spike detection algorithm was evaluated on an independent set of EEG data from that used in the training set. To account for the intersubject variability in EEG interpretation between experts, performance was evaluated with spikes detected by at least one of the EEG experts. As indicated in Tables I and II, the algorithm identified 110 out of % and 139 spikes identified by either expert % . It also falsely identified missed 29 spikes 19 “spikes” that had not been annotated by either expert. Sensitivity S defined as “the likelihood that an event will be detected given that TP= TP F N , was 0.79. Precision P , it is present” [15], S or Positive Predictive Value, defined as “the likelihood that a signal of an event is associated with the event, given that a signal occurred” TP= TP F P , was 0.85. Common artifacts such as eye [15], P blinks, EMG, and EKG were automatically removed for not satisfying one or more of the established criteria. Fig. 3 illustrates typical examples of interictal spike detection for patient #5. Note how W 1 and W 2 are used to identify a spike. The first spike is correctly identified (TP) with W 1 showing a double peak and W 2 a single peak. Note also that the second spike identified by the experts is missed by the algorithm because W 1 failed to satisfy the two peaks for steep rising and falling slopes, and there is no clear prominent peak in W 2 as it was for the true positive (TP) case. The algorithm yielded an FD rate of about 7.2 FDs/h of EEG recording, given 20- to 30-epochs of continuous EEG recording per subject.
(True Positives = 79 ) (False Negatives = 21 )
()
=
=
(
+
(
+
)
( )
)
IV. CONCLUSION We developed an algorithm to evaluate automated interictal spike detection using the Walsh transformation. Several of the observable characteristics of the visual detection process were translated into mathe-
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 5, MAY 2004
871
Fig. 3. Results illustrating: (a) Detection of spikes for patient 5 in channels F3 and C3; (b) Walsh operators 1 = = [ + + ]( = 1), and 2 = = [ + + ]( = 2) in absolute values, prior to thresholding; (c) Walsh operators 1 and 2 after thresholding 1 and 2; and (d) Characteristics of steep slope for both falling and rising edges (two dominant peaks in 1), and sharp peek (one prominent peak in 2) sought to confirm a TP. Note: parts (b)–(d) relate to the C3 EEG channel.
matical expressions and implemented in the development of our algorithm. The study demonstrated the feasibility of using the Walsh operator for identifying spikes. 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 automated detection systems. ACKNOWLEDGMENT The support of Miami Children’s Hospital is greatly appreciated.
REFERENCES [1] J. R. Glover, N. Raghavan, P. Y. Ktonas, and J. D. Frost, “Contextbased automated detection of epileptogenic sharp transients in the EEG: Elimination of false positives,” IEEE Trans. Biomed. Eng., vol. 36, pp. 519–527, May 1989. [2] J. Gotman and L. Y. Wang, “State dependent spike detection: Validation,” Electroencephalogr. Clin. Neurophysiol., vol. 83, no. 1, pp. 12–18, July 1992. [3] G. Hellmann, “Multifold features determine linear equation for automatic spike detection applying neural networks in interictal EcoG,” Clin. Neurophysiol., vol. 11, no. 5, pp. 887–894, May 1999.
872
[4] C. W. Ko and H. W. Chung, “Automatic spike detection via an artificial neural network using raw EEG data,” Clin. Neurophysiol., vol. 111, no. 3, pp. 477–481, Mar. 2000. [5] C. Kurth, F. Gilliam, and B. Steinhoff, “EEG spike detection with a Kohonen feature map,” Ann. Biomed. Eng., vol. 28, no. 11, pp. 1362–1369, Nov.–Dec. 2000. [6] L. Tarassenko, Y. U. Khan, and M. R. Holt, “Identification of interictal spikes in the EEG using neural network analysis,” Inst. Elect. Eng. Proc. Science, Measurement, and Techniques, vol. 145, no. 6, pp. 270–278, 1998. [7] S. Popescu, “Trained wavelets used to detect epileptic spikes,” in Proc. IEEE-SP Int. Symp., Time-Frequency and Time-Scale Analysis, 1998, pp. 285–288. [8] G. Calvagno, M. Ermani, R. Rinaldo, and F. Sartoretto, “A multiresolution approach to spike detection in EEG,” in Proc. IEEE Int. Conf. Acoustics, Speech, and Signal Processing, June 2000, pp. 3582–3585. [9] B. L. Davey, W. R. Fright, G. J. Carroll, and R. D. Jones, “Expert system approach to detection of epileptiform activity in the EEG,” Med. Biol. Eng., Computing, vol. 27, no. 4, pp. 365–70, July 1989.
IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 51, NO. 5, MAY 2004
[10] A. A. Dingle, R. D. Jones, G. J. Carroll, and R. W. Fright, “A multi-stage system to detect epileptiform activity in the EEG,” IEEE Trans. Biomed. Eng., vol. 40, pp. 1260–1268, Dec. 1993. [11] A. B. Barreto, J. C. Principe, and S. A. Reid, “STL: A spatio-temporal characterization of focal interictal events,” Brain Topogr., vol. 5, no. 3, pp. 215–228, Spring 1993. [12] P. Jayakar, J. P. Patrick, E. Shwedyk, and S. S. Seshia, “Automated rule based graded analysis of ambulatory cassette EEGs,” Electroenceph. Clin. Neurophysiol., vol. 72, no. 2, pp. 165–75, Feb. 1989. [13] M. Adjouadi and F. Candocia, “A stereo matching paradigm based on the Walsh transformation,” IEEE Trans. Pattern Anal. Machine Intell., vol. 16, pp. 1212–1218, Dec. 1994. [14] Handbook of Electroencephalography and Clin. Neurophysiol., ser. Revised, vol. 1, A. S. Gevins and A. Remond, Eds., Elsevier Science Ltd, Amsterdam, The Netherlands, 1987. Methods of analysis of brain electrical and magnetic signals. [15] R. C. Eberhart, Neural Network PC Tools. San Diego, CA: Academic, 1990, pp. 161–177.