Artgo Fernanda

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Med Biol Eng Comput (2006)

DOI 10.1007/s11517-006-0056-y

O R I GI N A L A R T IC L E

Fernanda I. M. Argoud Æ Fernando M. De Azevedo


José Marino Neto Æ Eugênio Grillo

SADE3: an effective system for automated detection of epileptiform


events in long-term EEG based on context information

Received: 10 August 2005 / Accepted: 23 March 2006


 International Federation for Medical and Biological Engineering 2006

Abstract Interictal spike detection is a time-consuming, sharp waves were previously identified by three experi-
low-efficiency task, but is important to epilepsy diag- enced human electroencephalographers. In these tests,
nosis. Automated systems reported to date usually have the SADE3 system simultaneously achieved 70.9% sen-
their practical efficacy compromised by elevated rates of sitivity, 99.9% specificity and a rate of 0.13 false-posi-
false-positive detections per minute, which are caused tives per minute, indicating its usefulness and low
mainly by the influence of artifacts (such as noise vulnerability to artifact influence. After tests, the SADE3
activity and ocular movements) and by the adoption of system showed itself to be able to process bipolar cor-
single or simple approaches. This work describes the tical EEG records, from long-term monitoring, up to 32
development of a hybrid system for automatic detection channels, without any data preparation or event posi-
of spikes in long-term electroencephalogram (EEG), tioning. At the same time, SADE3 revealed a high
named System for Automatic Detection of Epileptiform capacity to reject non-epileptic paroxysms, robustness in
Events in EEG (SADE3), which uses wavelet transform, relation to a variety of spike morphologies, flexibility in
neural networks and artificial intelligence procedures to adjustment of performance rates and the capacity to
recognize epileptic and to reject non-epileptic activity. actually save time during EEG reading. Furthermore, it
The system’s pre-processing stage filters the EEG epochs can be adapted to other applications for pattern recog-
with the Coiflet wavelet function, which showed the nition, with simple adjustments.
closest correlation to epileptogenic (EPG) activity, in
opposition to some other wavelet functions that did not Keywords Spike automatic detection Æ Epilepsy Æ
correlate with these events. In contrast to current at- Neural networks Æ Wavelet transform Æ Expert systems
tempts using continuous wavelet transform, we chose to
work with fast wavelet transform to reduce processing
time and data volume. Detail components at appropri- 1 Introduction
ate decomposition levels were used to accentuate spikes,
sharp waves, high-frequency noise activity and ocular Despite the development of a number of invasive and
artifacts. These four detailed components were used to expensive examinations in the last few years, epilepsy
train four specialized neural networks, designed to de- diagnosis is still strongly based on the analysis of elec-
tect and classify the EPG and non-EPG events. An ex- troencephalograms (EEG). The majority of epileptic
pert module analyzes the networks’ outputs, together individuals present epilepsy-related activity in cortical
with multichannel and context information and con- EEG, called ‘‘epileptogenic’’ (EPG) events or activity,
cludes the detection. The system was evaluated with which are characterized by high synchronization of
126,000 EEG epochs, obtained from seven different neuronal discharges. Particularly during the interictal
patients during long-term monitoring, under diverse period, the most frequent EPG events are spikes and
behavior and mental states. More than 6,721 spikes and sharp waves (Fig. 1), which differ slightly from each
other in duration. Spike detection is also fundamental to
F. I. M. Argoud (&) Æ Fernando M. De Azevedo
therapy and pharmacological management and to the
J. M. Neto Æ E. Grillo investigation of surgical necessity.
Biomedical Engineering Institute (IEB), Federal University The visual investigation of EPG events in EEG must
of Santa Catarina (UFSC), Florianópolis, Brazil be accomplished by qualified electroencephalographers
E-mail: [email protected] (EEGers) and is a very time-consuming, low-efficiency
E-mail: [email protected]
E-mail: [email protected] task. In routine recordings, typically of 30 min subdi-
E-mail: eugeniogrillo@floripa.com.br vided in windows of 10–20 s duration, the EEGer must
Fig. 1 Spikes, spike-and-wave
complexes (above) and sharp
waves (below) marked on one
channel of EEG recordings.
Spikes are events shorter than
70 ms; sharp waves could
remain up to 200 ms of
duration, while spike-and-wave
complexes consist of spikes
followed by a slow wave
(> 200 ms)

review around 120 pages of 24–32 channels EEG, (WT). The processing time is considerably short, as
looking for EPG transients. However, when it is neces- usually fast algorithms are available, and this can be
sary to capture epileptic abnormalities occurring under important in long-term monitoring. No context infor-
specific pathological conditions or under a special pa- mation is required, which can be advantageous if this
tient status, long-term EEG monitoring is more suitable information is unknown or indeterminate. However, the
than ambulatory EEG. Long-term recording can last for number of false detections tends to be higher, because
days or weeks, thus presenting a higher probability of these approaches disregard the patient’s state-dependent
recording transitory seizures, interictal activity and information, events morphologies, EEG variability as
sleep-related events. However, in long-term EEG, visual well as multichannel interaction [3, 13, 14, 22, 23]. De-
analysis is almost prohibitive and computer-assisted spite the acceptable results of these systems, most of them
analysis is still jeopardized by major procedural and use continuous wavelet transform (CWT) that is slow
technical problems, including very frequent false-posi- and redundant, rendering it troublesome for use in long-
tive detections [29]. Such a ‘‘false-positive per minute’’ term EEG. Mimetic/intelligent systems use artificial
(FPM) rate (see Appendix for definitions) in automated intelligence (AI) tools combined with other tools and
detection is caused by the influence of non-EPG events methods, in an attempt to imitate the reasoning and
and rhythms, which are frequent in EEG signals and procedure of EEGers [18]. Such systems use artificial
which have similar morphologies to spikes and sharp neural networks (ANNs), context information organized
waves. We can call this activity ‘‘non-epileptogenic in production rules and/or case-based reasoning, to
events’’ (nEPG), as distinct from the EPGs (those model human abilities of pattern recognition and of
associated with the pathology itself), and this is repre- knowledge storage and recovery. In these systems, for-
sented mainly by noise artifacts and ocular movements. mal models of spikes do not exist nor is the focus on
In fact, many EEGers raise objections to the review of signal processing. Finally, most of the developed auto-
EEG recordings overly compromised by eye blinks, mated systems belong to the hybrid category, which ap-
muscular activity, electrodes or equipment interference. plies more than one of the aforementioned approaches [1,
At the same time, it is unfeasible to completely remove 6–8, 11, 12, 15, 19, 28–30]. In the few approaches that
artifacts from the recordings, without losing relevant reported the FPM rate, the indexes ranged from 0.11 to
information. And when an automated system detects 14.4.
such events, at least once in each recording window Spike detection is a multiperiod and multichannel
(FPM‡4, for 15 s windows), there is no time saving at analysis task: as there are nEPG events technically
all. Under this condition, automated detection systems identical to EPG ones (Fig. 2), the differentiation in
have no practical applicability [29]. this case must be done by context information analysis.
We can classify the current systems for automatic The solution to this kind of problem thus passes
spike detection as parametric, signal transforming, mi- through a complete analysis of recordings, in contrast
metic/intelligent or hybrid systems (for an extensive to a simple focus on spike modeling as an isolated
survey, see Ref. [29]). Parametric systems establish event. The development of a spike detector useful for
mathematical models of spikes, through statistical sets of the analysis of long-term EEG demands, after testing
relevant parameters of their morphologies, classifying with real data (without spike positioning or another
candidate events that match the model as EPG [9, 10, 19]. kind of data preparation), that the automatic system
Signal transforming-based automatic detection systems can maintain high specificity (that quantifies rejection
basically extract time–frequency features from the signal, to non-epileptic events), minimum FPM rates (that
by filtering or decomposing it with transformation tools, indicate the time-saving value) and enough sensitivity
as short-time Fourier transform and wavelet transform to point out epileptogenicity and focus localization.
Fig. 2 Epileptiform events
resembling spike-and-wave
complexes, at channel
zygomatic (#4), due to electrode
artifacts

Different from routine ambulatory EEG, sensitivity is


not critical in long-term monitoring, because of the 2 EEG signal database
greater probability of occurrence of EPG events.
However, as long-term monitoring records also sleep- The nine long-term recordings used to train and to test
related activity and all mental and behavior states, the SADE3 system were obtained at the Montreal
which means a greater assortment of events, a system Neurological Institute (MNI, Canada), from seven epi-
designed for long-term EEG must have additional leptic patients. The density of EPG activity and vari-
specificity. ability in the capture of sleep–wake cycles determined
In the present work, some major EEGers heuristics intervals’ selection. The resulting 12-h EEG recordings
were used to develop a multistage system [named System contained a great quantity of spikes, sharp waves, spike-
for Automatic Detection of Epileptiform Events in EEG and-wave complexes, polyspike-and-wave complexes
(SADE3)] to detect and classify EPG and nEPG events and electrographic seizures, and also non-ictal patterns
in long-term EEG recording, aiming to achieve, simul- of ‘‘normal’’ background activity and noises/artifacts.
taneously, adequate performance rates, reliability and Electrode placement followed zygomatic-temporal
robustness. The block diagram of the proposed system is montage [17], 10–20 system, with 32 bipolar channels
illustrated in Fig. 3. The architecture is based on the and a sampling rate of 100 Hz.
EEGers routine procedure, which could be summarized Three specialists blindly and independently revised
as: (1) performing a primary scan to find a visually de- and marked the EPG events present in every recording.
tached electrographic event; (2) if necessary, quantifying They were individually asked to indicate events as
and adjusting amplitudes, sharpness and length of the ‘‘EPG’’ (for spikes, sharp waves and complexes), ‘‘IC-
signal; (3) checking if the morphology of the candidate TAL’’ (for electrographic seizures), ‘‘EOG/BLINK’’ (for
event matches with any EPG and nEPG category; (4) ocular movements and eye blinks), ‘‘SLEEP’’ (for sleep-
recovering spatial-temporal and context information to related events, such as K-Complex and Sleep Spindles),
settle on the detection. In the following sections, we will ‘‘ALPHA’’ (for occipital normal rhythm) and ‘‘ARTIF’’
describe each developmental step and each SADE3’s (for EMG noise and electrode/equipment interference).
module. Background activity was labeled as ‘‘BACKG’’. EPG
and nEPG events considered indistinguishable, as a re-

Fig. 3 Diagram of modules of the system SADE3: input S is candidate event. Note that at each network output Yj, the
decomposed and reconstructed by Coiflet wavelet transform to threshold of detection Tj generates one additional degree of
filter non-epileptiform activity, then normalized and conditioned. If freedom to the system. The Expert System block associate
modulus maxima in resulting detail components D2 or D3 exceed detections Yj to context information to define the epileptogenic
threshold T0, a detection is considered. In this case, all detail detection. Threshold T5 represents the feasible adjustments at rules
components will feed a Classification Neural Bank, where set, confidence factors, etc
specialized artificial neural networks (ANN1–ANN4) classify the
sult of a variant morphology or uncertain etiology, were • Biorthogonal1: 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3,
marked as ‘‘IND’’, or ‘‘indeterminate events’’. Only 3.5, 3.7, 3.9, 4.4, 5.5 and 6.8;
events similarly indicated as such by all the three spe- • Coiflets: 1–5;
cialists were used in the tests. • Daubechies: 1–20;
• Symlets: 2–8.

3 Pre-processing stage From the MNI database, we selected hundred and


thirty-five 1-s intervals containing typical spikes and
The WT is a time–frequency representation that can sharp waves. Each interval was decomposed until level 5
provide simultaneous time and frequency resolutions. and reconstructed, generating five detail components.
This is important for automatic spike detection because To reduce the dependence on the local absolute ampli-
it allows the emphasis of fast or transitory patterns tudes, which are inappropriately variable in EEG sig-
(such as EPG events) in time, while utilizing filters of nals, the following relationship was applied over the
variable bandwidths. The WT correlates the signal to 31,725 resulting detail components:
be transformed, f ðtÞ 2 L2 ðRÞ; with a family of func-
tions, derived from the same basic function, named dj ½n 2
^
dj ½n ¼
‘‘mother-wavelet’’ [21]. WT has been classically applied r2
to pattern recognition, data compression, noise re-
moval, signal and image processing, among others [16, where factor r is the standard deviation of the interval.
21, 24, 27]. Then, the ‘‘modulus maxima’’ [16] in each interval was
The pre-processing stage consists of WT decomposi- found and the algorithm checked if the detail component
tion, followed by a reconstruction (inverse transform) to showed an energy peak exactly at the spike’s occurrence
obtain the resulting detail components dj[n], to level of point, which directly implies a correlation between the
decomposition j [4, 16, 21, 24–27]. After wavelet filter- wavelet basis and the EPG paroxysm. Since some
ing, the conditioning routines prepare the epochs to be wavelet functions of less regularity incorporated time-
presented to the neural networks. We choose to work delays in the reconstructed signal, neighborhood was
with signals in the time domain, after filtering out also considered as local maxima.
undesirable data with WT, to retain some temporal By measuring and quantifying this peak, in terms of
semantic information, which we believe optimizes the normalized power, we verified that wavelet Coiflet1
training of neural networks (Fig. 4). generated the highest coefficients, for levels 2 and 3 of
decomposition, at the precise instant of occurrence of
spike peaks (suggesting minimum time shift). At the
3.1 Determination of best wavelet class same time, signals decomposed with wavelet functions
Biorthogonal1.1, Biorthogonal1.3, Biorthogonal1.5,
A great issue in WT theory is the estimation of the best Daubechies1 and Daubechies19 did not present energy
family of wavelets to be used in a particular application. peaks with considerable emergence at the spike’s posi-
In specific cases of automatic detection of EPG activity, tion, nor in the vicinity, for any decomposition level.
in EEG signals, this decision is usually arbitrary, Moreover, signals decomposed with wavelet functions
empirical or unreported [6, 12, 13, 20]. Nevertheless, we Biorthogonal6.8, Daubechies6, Daubechies9 and Sym-
observed that this choice could be critical to obtaining let6 presented energy peaks corresponding to non-EPG
satisfactory results with the WT, especially in spike events or signal characteristics, such as noise artifacts,
detection [2]. eye blinks or epoch edges (discontinuities). As the scale
As an alternative to the arbitrary choice, we propose is inversely proportional to frequency, the increase in the
here that wavelet functions aimed at the EEG signals level of decomposition provokes the decrease in both the
must present compact support, use FIR filters for filter bandwidth and the center frequency. In fact, we
decomposition and reconstruction, and allow for cal- observed that level 2 is more adequate for spike detec-
culation by fast algorithms. These criteria were imposed tion and level 3, for sharp wave detection. Level 2 also
by the choice of time domain analysis (when an inverse showed higher time resolution (since it employs shorter
transform is required), to avoid extreme redundancy of time windows) and a lower susceptibility to ocular
CWT analysis and to reduce the processing time of a artifacts than level 3. On the other hand, this level was
massive amount of EEG data. These constraints elimi- more vulnerable to high-frequency, noisy muscle activity
nated several wavelet functions traditionally used in the than level 3. The alpha rhythm and sleep-related events
automated detection of EEG events (e.g., the Mexican were significantly filtered out by Coiflet1, at both levels.
Hat). We tested four families of wavelet functions that
satisfy these criteria, and several filter orders were tested
in each family, for the decomposition and reconstruc-
tion, in the case of biorthogonal wavelets. These selec- 1
For biorthogonal wavelets, the first number indicates the decom-
tion procedures resulted in the investigation of the position filter order, while the last number (after the decimal point)
following 47 wavelet functions: indicates the reconstruction filter order.
Fig. 4 a FWT algorithm
implements a filtering cascade
with h and g, followed by a
decimation (by a factor 2),
generating the approximation
and detail components.
b Inverse FWT reconstructs
progressively each aj by adding
resulting components aj+1 and
dj+1, after an oversampling
(zeros inserting)

3.2 Wavelet analysis on SADE3 to the structures and parameters of the networks chosen
for each application.
According to the results described, the detail compo- In this work, instead of training one single ANN to
nents 2 and 3 of Coiflet1 were applied to EEG signals to discriminate among many types of nEPG events, we
accentuate spikes and sharp waves, respectively. Ana- thought that a more promising and faster procedure
logous investigations indicated that detail 1 of Coiflet1 is would be to build specialized ANNs, each one capable
more suitable for the emphasis of high-frequency noise of recognizing and classifying a specific kind of event.
artifacts, while detail 4 of Coiflet2 is more appropriate Thus, two networks (ANN1 and ANN2) were trained to
for ocular activity. recognize EPG patterns (spikes and sharp waves,
Other tasks accomplished by this stage are: segmen- respectively) and two networks (ANN3 and ANN4), to
tation of each file (of 32 channels·15 s) in 1-s intervals, recognize nEPG patterns (events ‘‘EOG/BLINK’’ and
to facilitate processing; treatment of borders to avoid ‘‘ARTIF,’’ respectively), because these nEPG patterns
inconsistent results due to boundaries discontinuities, represented the source of the majority of false-positive
and the calculation of frequency distributions (in 100 detections, in preliminary tests.
amplitude categories), which are used as inputs to the All networks have the same topology, of feedforward
neural networks. This was done to eliminate ANNs four-layered Perceptron, as an alternative to the classical
susceptibility to the relative location of the spikes, in the three-layered Perceptron, to optimize convergence. In
intervals. Finally, a mechanism checks the occurrence of the first layer, each network has 100 neurons, corre-
threshold T0 being exceeded in each interval and, if sponding to the sizes of the input vectors, in the second
positive, considers the event as a ‘‘candidate’’ EPG layer 21 neurons, 4 neurons in the third and 1 neuron at
event. the output. The sizes of both intermediary layers were
estimated according to the empirical criterion of estab-
lishing the number of hidden neurons as a quadratic
4 The use of neural networks in the automatic detection average between the sizes of the input and output layers.
of spikes The transfer functions in the intermediary neuron layers
are of a hyperbolic tangent type (bipolar). At the output
The WT is easily capable of amplifying the EPG activity layer the transfer function is of a logistic type (unipolar).
in relation to EEG background activity. However, this The ANN1 training set is made up of 99 detail 2
has not been sufficient for automatic recognition in epochs, of which 47 have spikes and 52 have only nor-
EEG, perhaps due to the great variability of EPG and mal non-EPG activity. The ANN2 network was trained
nEPG patterns. Occasionally, fast wavelet transform with 180 detail 3 epochs, of which 90 contained sharp
(FWT) ends up by also amplifying nEPG events, and waves and 90, only normal activity. Each training set
therefore increasing the rate of false-positive detections. was obtained after successive convergence tests and
For this reason, the recognition of detected patterns was refinements. At the ANN1 and ANN2 inputs, the values
left to ANNs. which extrapolate a typical range of EPG event ampli-
ANNs are complex mathematical systems adapted to tudes (up to 200 lV±10%) are truncated in order to
recognize patterns. They comprise elements corres- diminish the influence of blinking and high-energy
ponding to some biological neuron characteristics, noises. These events have amplitudes of the order of
which are linked to each other through weighted con- 300–500 lV, which can become dominant in the analy-
nections, called ‘‘synaptic weights’’ [5]. The use of ANNs sis. Thus, the vectors that feed the neural networks
became popular as they allow for complex, non-linear represent amplitude distribution histograms ranging
analysis, in a relatively simple way, giving satisfactory from 0 to 220 lV. The ANN3 network was trained with
performance in the absence of semantic or physical 63 epochs containing blinking and eye movements and
justification and more refined consideration, with regard 63 epochs with normal background activity, making a
total of 126 detail 4, wavelet Coiflet2 vectors. The The SADE3 knowledge base was devised in order to
ANN4 network was trained with 70 noise activity pat- consider and to process context information in detec-
terns and 70 normal background activity, in a total of tions and to increase system specificity. Also, the SADE3
140 detail 1 components, wavelet Coiflet1 epochs. The expert system incorporates some rules that compensate
networks were trained up to the point were the mean for wavelet and neural analysis limitations, by rejecting
quadratic error was less than 0.05, lasting on average nEPG events detected by the ANN3 and ANN4 net-
120,000 cycles, for a 4–6-h period. The learning rate works, and by combining the outputs of the ANN1 and
started at a value of 0.01 with increments of 1.05 and ANN2 networks. This module is illustrated in an inde-
decrements of 0.70, at each adjustment. The momentum pendent and compact way (Fig. 3), in order to simplify
factor was defined as 0.95. the illustration. However, some rules were distributed
through the system, as they check the other module data
and are fired according to the fulfillment of the premises,
5 Context analysis and production rules in the last modules. Briefly, the algorithm checks and
calculates:
While revising EEG signals, the EEGer does a multi-
channel analysis to detect EPG activity. When a possible 1. Which detail component presented peak amplitudes
event is found, the EEGer scans the nearest channels that surpassed the threshold T0. If there were any
looking for confirmation of the activity during that per- occurrences, it nominated the event as an EPG can-
iod of time, especially when in relation to focal epilepsy. didate and kept the ‘‘modulus maxima’’ occurrence
By observing EEGers’ modus operandi, we can infer point within the epoch;
some consensual assumptions, with respect to EPG 2. If the epoch was truncated above 220 lV (maximum
events detection, including: amplitude in standard spikes) and large amplitudes
were detected also in the detail component d1 (most
1. Isolated paroxysms could not be considered EPG,
sensitive to noisy activity), the epoch was not taken
because at least one group of neurons must be in-
into account as it might contain high-frequency and
volved in a synchronous depolarization, which im-
high-amplitude noisy activity;
plies more than one channel presenting the events;
3. If ANN1 threshold (T1) and/or ANN2 threshold
2. At contiguous or near bipolar channels, a local epi-
(T2) were surpassed at the net outputs (respectively,
leptic activity is represented by spikes of opposite
Y1 and Y2, as illustrated in Fig. 3), the algorithm
polarity, which is called ‘‘field,’’ or ‘‘phase reversal,’’
initiated the analysis of potential EPG events: a
by EEGers;
detection possibility factor D was set and the algo-
3. An epileptic state tends to remain for a few minutes.
rithm fired a group of related rules. When
So, temporal information on previous recording
[(Y1 > T1) AND (Y2 £ T2)], the algorithm loaded
windows is relevant to confirm detection in the cur-
the rules which investigate noise occurrence in the
rent window;
epoch, to which detail 2 is the most sensitive. If
4. Paroxysms that appear only at frontal channels, close
[(Y1 £ T1) AND (Y2 > T2)], the algorithm exe-
to the eyes and in both hemispheres, could be
cuted rules for checking the occurrence of eye
more attributed to eye movements than to epileptic
movements, to which detail 3 is the most sensitive.
activity;
When both networks detected events, a higher value
5. The ‘‘reliable’’ spikes are followed by a high-energy
was attributed to factor D and the algorithm fired
slow wave;
another set of rules. If the thresholds were not sur-
6. Some nEPG events are more frequent during specific
passed, the algorithm set a minimum value to the
stages of the sleep–wake cycle (which can be esti-
epoch-related D and initiated the analysis of the next
mated by polysomnography analysis), and their
channel or the next time interval;
influence can be more harmful during these periods;
4. If there were any phase reversals in the epoch, in the
and so on.
nearest channels, the algorithm will reinforce the
So, generally events isolated in time and space are detection belief factors of affected channels; if not, it
disconsidered. A paroxystic event that does not repeat will inhibit the D values;
within a brief time interval probably was originated 5. If there was a candidate event, but the ANN3
from muscle activity, electrodes or equipment noise. network also detected an ocular event, it will in-
Also, one single spike, present in just one channel is hibit D;
immediately rejected by EEGers as epileptic; the pres- 6. If there was a candidate event, but the ANN4 net-
ence of a ‘‘field’’ is necessary to validate the detection. work also detected a noisy event, it will inhibit D;
As well as analyzing temporal and multichannel infor- 7. If the general threshold T5 was surpassed in each
mation, the EEGers did not take into consideration channel, within a given period ti. If positive, it records
epochs that were over-compromised due to noises and the occurrence channel k, the details which generated
artifacts. Furthermore, it was checked whether the the surpassings, the exact point at which the peak
patient was asleep during the time of the examinations, occurred and the resulting value D(k, ti) of detection
so as to dismiss sleep events and so on. belief, in a file;
8. If only one event, in only one channel, in that period non-EPG events were chosen preferably with spike
of time, presented a D greater than the T5 detection morphologies. None of the test epochs were previously
threshold, it will inhibit D; used during the networks training.
9. If events were detected only in ocular channels and A collection of 810 test patterns was obtained, of
bilaterally, and no events were detected within the which 89 were spikes and sharp waves, 32 were unde-
ANN1 network (less sensitive to ocular artifacts), it termined spikes/sharp waves (variant morphologies), 27
will inhibit D factors in these epochs; were epochs, which came from ictal periods, 114 were
10. If three or more candidate events reached factor ocular movements/blinks, 13 were undetermined blinks,
D > T5, in distinct channels, but at the same point 142 were artifacts, 14 were undetermined artifacts and
of occurrence or in neighboring areas, with negative 406 were background activity epochs, occasionally
outputs on the ANN3 and ANN4 networks, it superimposed on some low-intensity muscle activity.
reinforces the factor D in all involved channels, in
that period.
6.1.2 Tests with neural network for spike detection
Apart from the rules described here, other rules can
be implemented such as: estimating the sleep–wake stage The ANN1 network was individually tested with the 89
either through the time register or through the signal typical EPG events, with the 32 undetermined spikes/
spectral content, in order to reject sleep artifacts; sharp waves and with 149 non-EPG epochs, resulting in
counting the channels that show candidate events for 270 epochs. To integrate the non-EPG epochs group, we
checking focal or generalized activity; checking the purposely selected the following 34 patterns:
occurrence of events in earlier and later time windows;
• Six ocular movements in frontal channels;
to confirm current detection and so on. The definite
• 14 epochs containing noise and/or superimposed
values of detection thresholds (Ti) and detection possi-
muscular activity;
bility factors (Di) were ascribed according to the indi-
• 12 epochs containing alpha rhythm or normal sleep
vidual and integrated tests, as described in the following
activities, especially K-complexes and sleep spindles,
section.
which can be confirmed by the time at which the
recording was done.
6 Results
This special selection was performed in order to test the
The parameters and definitions used for the assessment minimum specificity of the network, that is, its capacity
of system performance are described in Appendix. Two to reject patterns, which would normally generate false-
approaches were used to test system performance: iso- positives. Of the selected epochs, 27 contained EPG ictal
lated tools/modules tests and integrated system tests. activities, superimposed over background activity.
However, as the aim of this work was not epileptic sei-
zure detection, ictal activity was considered as a negative
6.1 Individual tests with networks pattern. Neural network outputs within the interval of
[0, 03] were considered as negative; at [0.3, 0.7] were
Initially individual tests were done on each neural net- considered as undetermined and at [0.7, 1] were con-
work, to estimate the system performance in detecting sidered as positive. These values were arbitrary and later
each of the four patterns and to study the partial con- adjusted, according to the results obtained in the test
tribution of each network within the general perfor- itself.
mance of the system.
Table 1 Tests with the network for spikes detection
6.1.1 Test files Pattern type # epochs TP FP TI FI TN FN

From each nine database recordings, we randomly chose Positive detection


ten 15-s windows to form a group of tests for the SADE3 EPG 89 63 – – 03 – 23
Ambiguous detection
system. For each selected window, both the earlier and IND 32 – 17* 02 – – 13*
later 15-s periods were also included, so as to guarantee Negative detection
sufficient temporal information for marking later events. ICTAL 27 – 06 – 02 19 –
From each of the resulting 270 windows, three events EOG/BLINK 06 – 01 – 01 04 –
ARTIF 14 – 10 – 02 02 –
were taken: an EPG, an ocular movement/blink (‘‘EOG/ ALPHA/SLEEP 12 – 06 – 00 06 –
BLINK’’) and a noise/muscle artifact (‘‘ARTIF’’). In BACKG 90 – 12 – 06 72 –
the absence of any of these events during a particular Total 270 63 52 02 14 103 36
period, it was substituted by a normal period of back-
Sensitivity: 70.78%; Specificity: 69.12%; Positive predictive value:
ground activity (‘‘BACKG’’), so as to test networks’ 54.78%; Negative predictive value: 74.10%. The asterisk indicates
abilities in negative detections. To be able to test the patterns that EEGers could not classify, but which the network
rejection capacity of the networks to their maximum, identified as negative or positive
Table 1 summarizes the results obtained. It can be detection truly corresponding to a positive event [pre-
seen that the network was inappropriately sensitive to dictive positive value (PPV)] would be 54.78%. On the
noise activity, as outputs of the 14 patterns, 10 generated other hand, the probability of a positive event not being
false-positive detections and for 2 patterns the network detected by this network [100-PNV (predictive negative
was not able to make a decision, thus generating unde- value)] would be approximately 25.90%. The specificity
termined responses. The number of false-negatives was of 69.12% (Fig. 5) and the table data show that the
high (23, without taking into consideration the unde- ANN1 network unaided is not capable of rejecting
termined ones), suggesting that the detection threshold nEPG patterns. Therefore, we can opt to increase the
should be decreased. However, it was noted that in all upper threshold for negative detection (T1=0.8), to
false-negative detections output values for positive pat- decrease the number of false-positives in the network (in
terns were quite low (less than 0.28). This shows that the detriment to sensitivity), but the need to use other sys-
network was unable to recognize these patterns and that tem networks is clear.
further training could resolve this deficiency.
The number of false-positives was also high (35,
without considering undetermined ones), which suggests 6.1.3 Tests with neural network for sharp wave detection
an increase in the negative detection threshold. But
again, it was noted that outputs of these 28 had re- The ANN2 network was individually tested using the
sponses superior to 0.90, which shows that the network same patterns used for the ANN1 network and its per-
was not able to reject these patterns. In contrast to hu- formance was found to be slightly superior. However,
man specialists who prefer to mark an event as unde- the sharp wave detection network was found to be less
termined if there are any doubts during detection, a sensitive to noisy activity and ictal patterns, due to the
network’s tendency to delimit responses was observed. use of a greater wavelet decomposition level (which fil-
In practically all cases, undetermined patterns were ters the highest frequencies from the signals).
erroneously classified (as positives or negatives) and also Furthermore, the ANN2 network detected true EPG
in only seven cases the network’s response was unde- activity differently from the ANN1 network. This means
termined. On the other hand, in all cases in which there that the responses of the two networks are comple-
was a simultaneous presence of nEPG activity and an mentary to each other, since one was capable of
EPG pattern, the network was able to generalize and detecting positive events that the other ignored. The
properly recognize the positive pattern. ANN2 network was clearly more selective and did not
It is also interesting to note that the network was able show significant susceptibility to ocular movements and
to correctly reject 31 nEPG patterns, but it generated blinking. Table 2 summarizes the obtained results. The
false-positives for some events of normal background positive predictive value increased to 63.63% and the
activity and for epoch edges, in 12 epochs. The minimum probability of a positive event not being detected (100-
sensitivity obtained was 70.78% (Fig. 5), a value supe- PNV) fell to 19.18%. Due to these satisfactory results
rior to the level of agreement between two human spe- (Fig. 6), the detection threshold T2 was kept at 0.7.
cialists, which is 50% [6]. If system responses were only
based on this network, the probability of a positive 6.1.4 Tests with neural networks for ocular activity
detection

The ANN3 network was tested with 108 ocular move-


ment patterns or blinks, 13 non-obvious ocular events

Table 2 Tests with a network for sharp waves detection

Pattern type # epochs VP FP VI FI VN FN

Positive detection
EPG 89 64 – – 10 – 15
Ambiguous detection
IND 32 – 13* 06 – – 13*
Negative detection
ICTAL 27 – 02 – 00 25 –
EOG/BLINK 06 – 03 – 01 02 –
ARTIF 14 – 02 – 02 10 –
ALPHA/SLEEP 12 – 02 – 01 09 –
BACKG 90 – 14 – 04 72 –
Total 270 63 36 06 18 118 28

Sensitivity: 71.91%; Specificity: 79.19%; Positive predictive value:


63.63%; Negative predictive value: 80.82%. The asterisk indicates
Fig. 5 Performance curves of the neural network to spike recog- patterns that EEGers were not able to classify, but which the net-
nition, as a function of output threshold T1 work identified as negative or positive
Fig. 6 Performance curves of the neural network to sharp wave Fig. 8 Performance curves of the neural network to noise and
recognition, as a function of output threshold T2 artifacts recognition, as a function of output threshold T4

activity or noise in electrode/equipments, making a total


(undetermined) and 149 patterns not related to ocular of 270 epochs. When the detection threshold T4 was
activity, making a total of 270 epochs. We obtained the varied at the network output, a performance graph was
performance graph in Fig. 7, with the variation of T3 obtained (Fig. 8). We note that for a threshold of 0.9,
threshold detection. It was noted that, beyond the the sensitivity and specificity values become stable at 61
threshold value of 0.4, specificity and sensitivity were and 87%, respectively. Therefore, for the ANN4 net-
kept at almost constant values of 90 and 60%, respec- work output the detection threshold was set at T4=0.9.
tively. Therefore, the ANN3 network detection thresh-
old output was set at T3=0.4.
6.1.6 Integrated system tests and results
6.1.5 Tests with neural network for muscle and electrode To test all integrated modules in the system, the 270
artifact detection windows of 15 s each (240 recordings of 32 channels and
30 recordings with 24 channels) were tested, which is
The ANN4 network was tested with 142 muscle and equal to 67.5 min of continuous EEG recording. These
noise artifact patterns, 14 variant morphology artifacts tests were done during various stages of sleep–wake
(undetermined) and 114 patterns not related to muscular cycles and behavioral states of seven distinct patients.
Also, the EPG activity concentration, the presence of
noisy activity, of ocular activity, of normal rhythms and
of epileptic electrographic seizures (present in recordings
of two patients) varied substantially.
The system analyzed 6,721 epochs marked by EEGers
as EPG and 119,279, as non-EPG, amounting to 126,000
epochs, of 1-s duration each. There was no data prepa-
ration, such as spikes positioning or selection of typical
events, for the submission of epochs to the system. The
results are summarized in Figs. 9 and 10. The specificity
obtained exceeded expectations: regardless of the
detection threshold used, this was close to 100%. System
sensitivity varied from 82.1 to 70.9%, with threshold
variation T5. PPVs and PNVs were kept practically
constant, at between 95.20 and 98.76%, respectively.
On the other hand, according to Ref. [29], the FPM
rate is the performance parameter, which really mea-
sures system efficiency, by saving the EEGers’ time. In
our work, the FPM rate varied from 13.39 to 0.13 FP/
Fig. 7 Performance curves of the neural network to ocular min. It can be seen from the graph (Fig. 10) that,
movements recognition, as a function of output threshold T3 regardless of sensitivity and specificity, only from T5‡0.7
marking as many EPG events as possible and investi-
gating the location of the epileptic focus.

7 Discussion

We tested the system’s capacity to deal with the vari-


ability of EPGs and non-EPG patterns, with multi-
channel analysis and effectively saving human revision
time. The system is sufficiently flexible, although still
subject to improvements, either through the expansion
of its knowledge base or through the adjustment of the
parameters. The results from integrated system tests
were markedly superior compared with results from
individual tests, due to the combination of different re-
sources. Also, the testing set used for integrated evalu-
ation is more representative of real EEG recordings,
Fig. 9 Sensitivity and specificity rates to system SADE3, after tests with regular EPG and nEPG frequencies.
with 126,000 1-s EEG intervals, as functions of output threshold, The system was found to be immune to various non-
T5
EPG activities, including nEPG events and even during
electrographic epileptic seizures. It is impossible to di-
is there a real saving in revision time (FPM £ 4 FP/min, rectly compare the SADE3 system with other spike
in 15-s windows). From T5‡0.9, the rate falls to 0.13 FP/ detectors reported, as they usually do not sufficiently
min, which means a false-positive every 7.7 min (around describe their training and testing sets, and some do not
31 windows). For T5=0.9, sensitivity is 70.9% and report all attained performance rates [29]. By comparing
specificity is 99.99%, which, in the majority of cases, can SADE3 with those partially reported, the performance
be considered sufficient as a performance rate in the that we obtained is compatible or superior to the best
automatic detection of EPG events in long-term EEG. systems that have been developed [29].
Resulting values can vary due to the adjustment of We are not aware of other systems that have trained
free parameters of the system (T0–T5 thresholds), neural networks for the recognition of nEPG-negative
according to need. It is recommended, for example, that patterns (besides the EPG positive patterns), aiming to
a first scan of EEG signals should be carried out, with a increase specificity and decrease the false-positive per
maximum specificity and FPM rate (T5=0.9). After the minute rate. A limitation to the SADE3 system is the
detection of possible spikes, which would confirm a processing time, which is still prohibitive if one expects
pathology, signals could be scanned a second time, now to use online analysis. Processing time depends directly
with maximum sensitivity (T5=0.3), with a view to on the density of events (mainly the EPGs), within the
recording. For example, the system will take approxi-
mately 30 s to process a 15-s window, containing seven
synchronous generalized depolarizations (corresponding
to about 200 positive patterns), in a microcomputer with
a Pentium IV, 2.80 GHz processor and 512 MB of
RAM. This time falls to 10 s/window, if there are no
positive events in the window.
It should be noted that the present study was carried
out exclusively with surface bipolar recordings and for
the detection of interictal EPG patterns. Thus, we sug-
gest that the techniques presented here deserve further
testing with monopolar, depth/intracranial recordings,
and for the detection of other EPG patterns, such as
hipsarrythmia or epileptic electrographic seizure. Once a
minimum sensitivity of 70% is assured, for specificity
and FPM rates obtained, one can conclude that the
system has practical utility and should save revision time
during long-term EEG monitoring.

Acknowledgments To CAPES, for supporting continuity of this


Fig. 10 False-positive per minute rate (FPM), as function of project, through its PRODOC program. To the Montreal Neuro-
output threshold T5. After value T5= 0.78 (dotted line) the rate logical Institute and Prof. Dr Jean Gotman, for the assistance given
becomes inferior to 1 FP/min to this work.
2. Argoud FIM, De Azevedo FM, Marino Neto J (2005) Sistema
Appendix de detecção automática de paroxismos epileptogênicos em si-
nais de eletro encefalograma. Revista da SBA—Controle e
Automação 4(15):467–475
Definitions used in the assessment of system 3. Attelis CE, Isaacson SI, Sirne RO (1997) Detection of epileptic
performance: events in electroencephalograms using wavelet analysis. Ann
True positive: number of events marked as positive Biomed Eng 25(1):286–293
by both the EEGer and the system; 4. BourgesSévenier M (1994) Réalisation dúne bibliothéque C
False positive: number of events marked as positive de fonctions ondelettes. Relatório técnico 1, Rennes Cedex,
France: IRISA—Institut de Recherche en Informatique et
by the system only; Systémes Aléatoires, p. 108. http://www.wavelet.org/wavelet/
True negative: number of events that were neither digest—04/digest—04.01.html
marked by the specialist, 5. De Azevedo FM (1997) Uma proposta de modelos formais de
nor the system; neurônios e redes neurais artificiais. Anais do 3o. Congresso
Brasileiro de Redes Neurais, Florianópolis, pp 503–514
False negative:number of positive events, which were 6. Duempelmann M, Elger CE (1999) Visual and automatic
not marked by the system; investigation of epileptiform spikes in intracranial EEG
True number of events marked recordings. Epilepsia 40(3):275–285
indeterminate: as undetermined by the specialist 7. Feucht M, Hoffmann K, Steinberger K, Witte H, Benninger F,
Arnold M, Doering A (1997) Simultaneous spike detection and
and by the system; topographic classification in pediatric surface EEGs. Neuro-
False number of positive or negative Report 8:2193–2197
indeterminate: events marked as undetermined 8. Gabor AJ, Seyal M (1992) Automated interracial EEG spike
by the system; detection using artificial networks. Electroencephalogr Clin
FPM rate: distribution of false-positive Neurophysiol 83(1):271–280
9. Gotman J, Gloor P (1976) Automatic recognition and quanti-
detections over time in minutes: fication of interictal epileptic activity in the human scalp EEG.
Electroencephalogr Clin Neurophysiol 41:513–529
FP 10. Gotman J, Wang LY (1991) State-dependent spike detection:
FPM ¼
Dt concepts and preliminary results. Electroencephalogr Clin
Neurophysiol 79:11–19
Sensitivity: the system’s capacity to recognize 11. Hoffmann K, et al (1996) Analysis and classification of inte-
positive events, given by: rictal spikes discharges in benign partial epilepsy of childhood
on the basis of the Hilbert transform. Neurosci Lett
TP 211(1):195–198
Sensitivity ¼  100% 12. Kalayci T, Özdamar O (1995) Wavelet preprocessing for
TP þ FN automated neural network detection of EEG spikes. In: IEEE
Engineering in Medicine and Biology Magazine. Proceedings,
Specificity: the system’s capacity to recognize March 1995, pp 160–166
negative activity, given by: 13. Khan YU, Gotman J (2003) Wavelet based automatic seizure
detection in intracerebral electroencephalogram. Clin Neuro-
TN physiol 114:898–908
Specificity ¼  100%
TN þ FP 14. Latka M, Was Z, Kozik A, West B (2003) Wavelet analysis of
epileptic spikes. Phys Rev E 67:052902
PPV: percentage of successful judgments by 15. Liu HS, Zhang T, Yang FS (2002) A multistage, multimethod
the system in positive detections: approach for automatic detection and classification of epilep-
tiform EEG. IEEE Trans Biomed Eng 49(12):1557–1566
16. Mallat S (1999) A wavelet tour of signal processing, 2nd edn.
Academic/Elsevier, San Diego, 637 pp
TP 17. Morales-Chacon L, Zaldivar M (1999) The use of zygomatic
PPV ¼  100%
TP þ FP electrodes in the assessment of epileptic patients—presentation
of methodology for recording and assessing a digital EEG. Rev
PNV: percentage of successful judgments Neurol 28(3):224–227
by the system in negative detections: 18. Pradhan N, Sadasivan PK, Arunodaya GR (1996) Detection of
seizure activity in EEG by an artificial neural network: a pre-
liminary study. Comput Biomed Res 29(4):303–313
TN 19. Pereira MCV (2003) Tratamento de Sinais Bioelétricos para
PNV ¼  100% Processamento por Redes Neurais Artificiais. Ph.D. thesis,
TN þ FN Instituto de Engenharia Biomédica—IEB, Departamento de
Engenharia Elétrica—EEL, Universidade Federal de Santa
Catarina—UFSC, Brazil
20. Schiff SJ, Aldoubri A, Unser M, Satao S (1994) Fast wavelet
transformation of EEG. Electroencephalogr Clin Neurophysiol
References 91:442–455
21. Sheng Y (1996) Wavelet transform. In: The transforms and
1. Argoud FIM (2001) Contribuição à Automatização da De- applications handbook, 1st edn. CRC and IEEE, Boca Raton,
tecção e Análise de Eventos Epileptiformes em Eletro encefal- pp 747–827
ograma. Ph.D. thesis, Instituto de Engenharia 22. Stelle AL, Comley RA (1989) Portable analyzer for real-time
Biomédica—IEB, Departamento de Engenharia Elétri- detection of the epileptic pre-cursor. RBE 6(2):101–107
ca—EEL, Universidade Federal de Santa Catarina—UFSC, 23. Stelle AL, Comley RA (1990) The application of the Wigner
Brazil distribution to the analysis of EEG signals. RBE 7(1):670–676
24. Sweldens W (1996) The lifting scheme: a customdesign con- 28. Webber WR, Litt B, Wilson K, Lesser RP (1994) Practical
struction of biorthogonal wavelets. Appl Comput Harmon detection of epileptiform discharges (EDs) in the EEG using an
Anal 3(2):186–200 artificial neural network: a comparison of raw and parame-
25. Sweldens W, Schröder P (1997) Building your own wavelets at terized EEG data. Electroencephalogr Clin Neurophysiol
home—introductory material. Wavelet Dig. http://www.wave- 91:194–204
let.org/wavelet/digest—04/digest—04.01.html 29. Wilson SB, Emerson R (2002) Spike detection: a review and
26. Thakor NV, Sherman D (1995) Wavelet (timescale) analysis comparison of algorithms. Clin Neurophysiol 113:1873–1881
in biomedical signal processing. In: The biomedical engineering 30. Wilson SB, Turner CA, Emerson RG, Scheuer ML (1999)
handbook, 1st edn. CRC and IEEE, Boca Raton, pp 887–906 Spike detection. Clin Neurophysiol 110:404–411
27. Unser M, Aldoubri A (1996) A review of wavelets in biomed-
ical applications. Proc IEEE 84:626–638

You might also like