APPLICATIO OF THE WALSH TRASFORM I A ITEGRATED ALGORITHM FO R THE DETECTIO OF ITERICTAL SPIKES D. Sanchez, M. Adjouadi, A. Baeto, P. Jayaka, I. Yaylali Electical & Compute Engineeing, Floida Intenational Univesity, FL, USA euoscience Cente, Miami Childen s Hospital, FL, USA Abstact-This pape intoduces a novel spike detection algoithm based on the use of Walsh Tansfoms. The algoithm focuses on the assessment of chaacteistics in the Electoencephalogam (EEG) signal that eveal the pesence of a spike featue. The mathematical fomulation of the algoithm is intoduced and esults obtained fom the analysis of data fom 7 epileptic patients ae pesented. Keywods - EEG analysis, inteictal spike detection, Walsh tansfom I. ITRODUCTIO Electoencephalogam (EEG) ecodings povide dynamic evidence of ongoing electical activity in the bain. EEG is paticulaly useful in detemining the pesence, extent and oigins of neuological disodes, such as epilepsy. The abnomal bain activity in between epileptic seizues, captued by the EEG as inteictal spikes is fequently used as a valuable souce of infomation towads the chaacteization of the patient s illness and possible couses of action. It is in this context that automated methods fo the identification of these inteictal spikes ae of geat help to the clinicians, as a helpful pe-sceening tool to educe the lage volume of patient EEG data obtained fom long-tem monitoing, and as an objective, unbiased evaluation of the signals fom the patient. This pape descibes the definition of a new spike detection algoithm that uses the Walsh Tansfomation to assess some of the chaacteistics of the EEG signals and looks fo a match with those chaacteistics that ae commonly associated with inteictal spike activity. II. METHODOLOGY Taditionally, the two chaacteistics that ae consideed as most eliable in the detection of spikes and shap tansients ae the fast ise and decay of the spike, and the shapness of its peak, which may be measued by the fist and second deivatives of the signal, espectively [3, ]. The spatiotempoal context of the EEG is also taken into account in seveal of the patten ecognition o ule-based systems used fo spike detection [5, 8, 9]. The algoithm intoduced hee attempts to decoelate the input EEG signals into othogonal bases with diffeent odes (degees of shapness) and diffeent dimensions (degees of fuzziness) using the Walsh tansfomation, in ode to detect inteictal spikes. The algoithm uses the tansfomation as a means to assess the degee in which the basic chaacteistics of spikes ae pesent within a window of obsevation in the EEG signals. This wok was sponsoed by SF Gants: EIA-98636 and EIA-9966, the SF Gaduate Reseach Fellowship of Ms. Danmay Sanchez and OR Gant -99--95. voltage A R Fig.. Simulated spike used to descibe the mophology of inteictal spikes.. A. Citeia used in chaacteizing inteictal spikes Although inteictal spikes diffe geatly fom one patient to the next, and even within ecodings fom the same patient, many spikes follow a geneal chaacteizing patten. This geneal wavefom is simulated in Figue. As a esult of the infomation povided by neuoscientists at Miami Childen s Hospital (MCH) and ou liteatue seach in this field, the following list of pimodial citeia was established, with efeence to Figue, as necessay to declae the existence of an inteictal spike:. The inteictal spike is consideed to be the wavefom RPF, with two half waves RP and PF.. Both the ising and falling slopes of the spike ae vey steep. 3. The spike is chaacteized by a shap peak P, which is due to a sudden change in polaity of the voltage signal ecoded. This shapness occus in both the time domain and the domain.. The shapness of the spike is continuous, i.e. the spikes must display shapness in both naow and wide intevals of obsevation []. B. Algoithm Development RP Peak P Duation t The Walsh Tansfom is a well-known othogonal tansfomation with many applications in signal and image pocessing. The Walsh matix is an n by n symmetic and othogonal matix consisting of + and as its elements to constitute squae wavefoms as its basis functions [6]. The matix obtained fom the Walsh tansfomation kenel may be expanded to any dimension = n. PF A F
Repot Documentation Page Repot Date 5 Oct Repot Type /A Dates Coveed (fom... to) - Title and Subtitle Application of the Walsh Tansfom in An Integated Algoithm fo the Detection of Inteictal Spikes Contact umbe Gant umbe Pogam Element umbe Autho(s) Poject umbe Task umbe Wok Unit umbe Pefoming Oganization ame(s) and Addess(es) Electical & Compute Engineeing Floida Intenational Univesity, FL Sponsoing/Monitoing Agency ame(s) and Addess(es) US Amy Reseach, Development & Standadization Goup PSC 8 Box 5 FPO AE 999-5 Pefoming Oganization Repot umbe Sponso/Monito s Aconym(s) Sponso/Monito s Repot umbe(s) Distibution/Availability Statement Appoved fo public elease, distibution unlimited Supplementay otes Papes fom 3d Annual Intenational Confeence of the IEEE Engineeing in Medicine and Biology Society, Octobe 5-8,, held in Istanbul, Tukey. See also ADM35 fo entie confeence on cd-om., The oiginal document contains colo images. Abstact Subject Tems Repot Classification Classification of Abstact Classification of this page Limitation of Abstact UU umbe of Pages
Fo the odeed Walsh kenel matix, the Walsh opeato of th ode and length is defined based on the sequency value and dimension consideed. The ode is given by the sequency of the vecto, and efes to the type of diffeentiation used between sample points. The dimension efes to the degee of fuzziness in this type of diffeentiation. Consideing the time dependent input signal f (t), the Walsh tansfomation W is given by the convolution of f (t as: ω and ) W ω = ω f (t) () If we conside the Walsh opeato of st ode and length, ω, we ealize that it is equal to the discete mathematical st deivative, d, which can be thought of as the diffeences between adjacent sampled points: ω = [ ] = d () On the othe hand, if we conside the Walsh opeato of nd ode and length, ω, we ealize that it is not equal, but equivalent, to the discete mathematical nd deivative, d, which can be thought of as the diffeence between two - point diffeences of thee adjacent points, o the diffeence between two contiguous fist deivatives: ω = [ ] d = [ ] (3) At this point, we can make the genealization that ω is equivalent to d, and ω is equivalent to d (in the sense noted above) fo any length, with being the degee of fuzziness in the diffeentiation. This equivalency means that they pefom the same opeation when convolved with the input signal, but they take into account diffeent numbe of points fom the input signal, depending on the length. In othe wods, with a lage, the degee of fuzziness of these deivatives is lage, and thus diffeent chaacteistics of the input signal may be appeciated. With this genealization we may also say that the Walsh opeatos ω and ω may be used as opeatos fo the fist and second deivatives, espectively, with advantages noted in the othogonality of the vectos and in the simplicity of thei computation []. Afte futhe analysis of the behavio of W in elation to typical, bi-phasic inteictal spikes, we wee able to establish the following obsevations: () The esults fom W yield two peaks fo each spike. The fist peak is associated with the ising-side slope, and the second peak is associated with the falling-side slope. The amplitude of each peak in W is an indicato of the steepness of the slope, whee a highe peak means a steepe slope. () The esults fom W yield a peak associated to the peak location of the spike. The amplitude of this peak in W is an indicato of the shapness of the apex of the spike, whee a highe peak means a shape apex. In ode to extact an inteictal spike fom the backgound signal, we developed a set of integated mathematical expessions based on the Walsh opeatos. Citeion defined in the pevious section states that an inteictal spike must exhibit continuous shapness. In othe wods, it must be shap in naow as well as in wide intevals of obsevation. This implies that an actual inteictal spike must esult in high values fo the peaks in W and W fo seveal lengths. To analyze that equied multi-scale shapness, we conside the outputs of these Walsh opeatos but using diffeent scales by means of the diffeent lengths of the opeatos W and W. In this case we use =, 8, and 6 as the numbe of points analyzed in the input data. This type of appoach was also used in a study by Baeto [] fo the detection of inteictal spikes in ECoG, but using Lagange deivatives to measue the EEG shapness. In ode to account fo seveal intevals of obsevation, the algoithm we developed takes the esults at diffeent scales and then adds them togethe to detect the pesence of shapness unde diffeent scaling. This is expessed mathematically as: W = W W8 + W6 + () fo =,. The motivation in this opeation is to extact all potential tansitions using diffeent scales fo assessing shapness, in an additive way. In othe wods, if shapness of the signal is identified in any of W, W 8, o W 6, esulting in high-amplitude peaks, this will yield the ecognition of a shap signal in W as well. On the othe hand, actual inteictal spikes must also exhibit high local shapness. The best way to measue this is though the convolution of the actual mathematical fist and second deivatives, with the time signal f (t) as: D = d * f ( t) and D = d * f ( t ) (5) which take into account only and 3 data points of the input signal, espectively. Since the inteictal spike must exhibit high degees of shapness in both the naow and wide intevals, we need to combine the esulting measues of shapness in both intevals. This is achieved with a point-by-point multiplication between the actual mathematical deivative, given by D, and the addition of the Walsh tansfomations of diffeent length, given by W + W8 + W6. Theefoe, the tem W becomes a function of the deivatives and of the Walsh tansfomation, as: W ( D, ) D W + W + W ] W = (6) [ 8 6 fo =,. So, individually, these functions fo odes and will be descibed as: (a) W = D ( W + W + W ), and 8 (b) W = D ( W + W + W ) (7) The objective of this point-to-point poduct is to selectively einfoce the pats of the signal that esulted in lage outputs 8 6 6
fom the deivative (D) and composite Walsh (W + W 8 + W 6 ) tansfoms. (a) P3 - (a) Patient EEG By obseving the esponses of the Walsh tansfomations, we noted that at points whee an inteictal spike is defined, two pominent peaks occu in W, delimiting the duation of the spikes, and one pominent peak occus in W, coesponding to the shap apex of the spike. Afte applying these mathematical expessions to the epileptogenic EEG fom diffeent patients, we confimed that the esults in W emphasize the pesence of a signal that meets both of the main chaacteistics of the inteictal spike: sustained steep slopes and shap peak. At this point, dynamic thesholds wee set in ode to eliminate the W esponses of low amplitude in both the tempoal and domains. The thesholds wee set to be dynamic to take into consideation the vaiations in amplitude and fequency of the backgound activity. The dynamic theshold was set equal to twice the standad deviation about the mean, calculated fo the signals in the local backgound. Fo the tempoal dynamic theshold, we defined the local backgound activity to be a time window with duation of 3 seconds. In Figue (a), we display a 5 second EEG block collected at channels P3 though T6. ote that thee is an inteictal spike identified in electode F 8. In Figue (b), the W signal obtained fo the EEG in channel F 8 is displayed, as well as the W signal obtained afte the dynamic tempoal theshold has been applied. If we apply the dynamic tempoal theshold to all of the EEG channels shown in Figue (a), we obtain the plots in Figue (c) fo the W signals. It may be obseved in these plots that, when compaing the peaks in W fo evey electode at the time instance whee the spike is identified (almost.5 seconds into the segment), the highest peaks ae those seen in F 8, which is pecisely the location of the spike. This obsevation allows fo the implementation of the dynamic theshold, calculated acoss all electodes at each specific instant of time. In Figue (d), the signals obtained as a esult of applying the theshold ae displayed again fo all channels. We can see hee that those peaks that wee smalle than the backgound acoss the est of the electodes have aleady been eliminated. In ode to efine the detection of spikes fom these dynamic thesholds, a set of mathematical ules wee applied to the W signal in ode to confim the pesence of the est of the citeia that identify inteictal spikes. These included checks fo () total duation of the inteictal spike o shap wave to be fom to milli-seconds, () amplitude of the spike to be above mico-volts, (3) atio of amplitude between the spike and the backgound activity to be geate than.6, and () eduction of atifacts such as EKG and backgound signal, among othes. All of these checks wee pefomed with the use of the W signal, as opposed to the EEG signal itself. (b) (c) (d) FP F8 T T6 EEG F8 WT WT th WT - - - - e8 WT th e9 WT th e WT th e WT th e WT th WT th - 5.5.5.5 3 3.5.5.5.5.5 3 3.5.5 spike.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5-5.5.5.5 3 3.5.5.5.5.5 3 3.5.5 -.5.5.5 3 3.5.5 P3 WT th time FP WT th time F8 WT th time T WT th time T6 WT th time 5 spike (a) Patient EEG.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5.5.5.5 3 3.5.5 (b) WT afte time theshold pe electode (c) W afte theshold pe electode.5.5.5 3 3.5.5 Fig.. Sample EEG segment pocessed by the algoithm. (a) EEG signals P3 though T6. (b) Calculation of the W on the F8 signal and application of the tempoal dynamic theshold. (c) Tempoal dynamic thesholds fo all channels. (d) Spatial dynamic theshold fo all channels.
A. System Evaluation Setup III. RESULTS The efficiency of the poposed inteictal spike detection algoithm was tested with EEG data ecoded fom 7 patients at Miami Childen s Hospital, using the - Electode System and a sampling ate of 5 samples/second, pe channel. The channel signals wee ecoded with espect to a efeence electode located close to the vetex. A euoscan Electical Signal Imaging system, and the associated ecoding softwae wee used to captue EEG fom the patients in digital files. About minutes of EEG fom each patient wee used fo the evaluation of the algoithm. B. Evaluation Paametes and Results Pio to any pocessing by the poposed algoithm, two human expets, a clinical neuoscientist and a egisteed EEG technologist, scoed the files electonically, upon eview in the euoscan system. Each of them, independently, maked all instances of inteictal spikes they found in the files. Fo the initial assessment of the algoithm, a spike was acknowledged as a tue event if at least one of the expets had maked it. Thee wee a total of TOT_SPK = 63 such spikes. Afte unning the same files though the algoithm, the system identifications that matched the events found by eithe human expet wee consideed tue positives (TP), and the est wee consideed false positives (FP). Events maked by at least one expet, but not detected by the algoithm wee identified as false negatives (F). With these counts the sensitivity (TP/TOT_SPK) and the pecision (TP / (TP + FP)) fo the algoithm wee calculated. They ae shown in Table I. Table I. Pefomance of the spike detection algoithm (ote: Spikes acknowledged if maked by eithe expet) Set Sensitivity Pecision 8/63 8/ (8 + 9) All 7 patients =.66 =.5 IV. DISCUSSIO The esults summaized in Table I ae encouaging, paticulaly when we conside that this level of pefomance was obtained fom diect analysis of the EEG signals themselves, within a shot window of obsevation, and without efeence to global consideations, such as the state of the subject, o othe contextual clues. It should also be kept in mind that the sensitivity of the system, as epoted in Table I, uses the boadest citeion fo the acceptance of a tue inteictal event (at least one expet found it). If we wee to apply a moe stingent citeion, such that only events maked as spikes by both expets ae accepted, then the sensitivity of the system with espect to this new golden standad would be much highe, appoaching 89%. The algoithm also poved to be obust against the detection of a numbe of biologically-geneated atifacts, such as those induced by talking, jaw movement, muscle movement, eye blinking, eye movement, coughing, and swallowing. These wee ecoded fom a non-epileptic subject, and successfully ignoed by the algoithm. V. COCLUSIO The pimay chaacteizing featues of inteictal spikes, enumeated in this pape, wee embedded in ou system fo the extaction of the spikes fom the backgound activity. We tanslated each of these chaacteistics into a mathematical fomula such that we could implement them in the development of ou algoithm. The spike detection algoithm developed though this study was based on the Walsh tansfomation, which is an othogonal tansfomation that decomposes the signal into mutually independent constituents, each of which can be useful in the oveall intepetation pocess of the EEG. Encouaging esults wee obtained fom the application of the algoithm to EEG data fom seven patients. REFERECES [] Adjouadi, M., Candocia, F., A steeo matching paadigm based on the Walsh Tansfomation, IEEE Tans. on Patten Analysis and Machine Intelligence, 6(): 8, 99. [] Baeto, A. B., A Spatio-Tempoal Appoach to Epileptic Focus Localization Fom Aay Electocoticogaphy, Univesity of Floida, Gainesville, FL, 993. [3] Bikemeie, W. P., Fontaine, A. B., Celesia, G. G., Ma, K. M., Patten Recognition Techniques fo the Detection of Epileptic Tansients in EEG, IEEE Tansactions on Biomedical Engineeing, BME-5(3): 3 7, 978. [] Davey, B. L. K., Fight, W. R., Caoll, G. J., Jones, R. D., Expet System Appoach to Detection of Epileptifom Activity in the EEG, Medical and Biological Engineeing and Computing, 7: 365 37, 989. [5] Glove, J. R., Raghavan,., Ktonas, P. Y., Fost, J. D., Context-Based Automated Detection of Epileptogenic Shap Tansients in the EEG: Elimination of False Positives, IEEE Tansactions on Biomedical Engineeing, 36: 59 57, 989. [6] Gonzalez, R. C., Woods, R. E., Image Tansfoms, Digital Image Pocessing, Addison-Wesley Publishing Co., 8 59, 993. [7] Gotman, J., Pactical Use Of Compute- Assisted EEG Intepetation In Epilepsy, Clinical euophysiology, (3): 5 65, 985. [8] Gotman, J., Wang., L. Y., State Dependent Spike Detection: Validation, Electoencephalogaphy and Clinical euophysiology, 83: 8, 99. [9] Jayaka, P., Patick, J. P., Shwedyk, E., Seshia, S. S., Automated Rule Based Gaded Analysis Of Ambulatoy Cassette EEGs, Electoenceph. Clin. euophysiol., 7: 65 75, 989.