Artgo Fernanda
Artgo Fernanda
Artgo Fernanda
DOI 10.1007/s11517-006-0056-y
O R I GI N A L A R T IC L E
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
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.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
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
7 Discussion