Computer Methods and Programs in Biomedicine 20 (1985) 17-22
17
Elsevier CPB 00684
Automatic classification of visual evoked responses Isak G a t h 1, E h u d B a r - O n ~ a n d Dietrich L e h m a n n 2 1 Department of Biomedical Engineering Technion, Haifa 32000, Israel and 2 Department of Neurology, University Hospital, Zurich, Switzerland
An automatic method performing selective averagingof visual evoked potentials depending on the state of the EEG background activity is described. The method is based on adaptive segmentation of the EEG signal and on fuzzy clustering. A simulation example, extracting two different square pulses from the backgroundactivity, is given, as well as an example averagingtwo types of visual evoked potentials from the backgroundEEG signal. Visual evoked responses Selectiveaveraging EEG segmentation Fuzzyclustering
1. Introduction
2. Methods
The procedure of recording cortical evoked potentials usually involves averaging of these responses from the background EEG signal. It is thus reasonable to assume that short time variations in the evoked potentials will be smoothed out during the averaging procedure. However, there are indications [1,2] that there is a correlation between functional brain 'states' and perceptual measures, these 'states' being linked to the rapid changes of the EEG signal. Hence, nonselective averaging of the evoked potentials with respect to the changing patterns of the ongoing EEG will tend to obscure possible correlations between these responses and functional brain states. Recently [1,3] we have described a new method for classification of EEG signals based on adaptive segmentation of the EEG and fuzzy clustering. The aim of the present study was to achieve automatic classification of visual evoked potentials through selective averaging, employing segmentation and fuzzy clustering of the EEG.
2.1. Simulation
Alternating periods, each a few seconds long, of 10 Hz and 7 Hz sinusoidal signal were recorded on an analog magnetic tape recorder, with a peak-topeak amplitude of 1 V. In the 10 Hz signal segments square pulses of 40 ms duration and an amplitude of 0.2 V were embedded, while in the 7 Hz sinusoidal segments pulses of 20 ms duration and amplitude of 0.2 V were embedded (Fig. 1). 2.2. Recording
EEG signal data from a 44-year-old healthy volunteer was recorded during visual stimulation with flash light (xenon discharge lamp) at a rate of 1/s. During the experimental session the subject was reclining in a chair with the eyes closed, and the stimulus luminance was high enough to produce maximal amplitude visual evoked potentials. Grass gold cup electrodes were used for the recording. Four channels were recorded; at the inion, and at spaces of 2.5 cm anterior to it on the midline. The reference electrode was at 30% ha-
0169-2607/85/$03.30 © 1985 Elsevier Science Publishers B.V. (Biomedical Division)
18
I
I
I
I
1
I
1sec
IOHz sinusoidol
7 Hz sinusoidal
with 40 ms pulses
w i t h 20 ms pulses I
Fig. 1. Simulation signal. Periods of 10 Hz sinusoidal signal (left of dotted line) are alternating with periods of 7 Hz sinusoidal signal (right of line). In the 10 Hz signal, square pulses of 40 ms duration are embedded, while in the 7 Hz signal, pulses of 20 ms duration are embedded. The signal to background ratio is 1/5.
sion-inion distance. During the experimental session the EEG signal showed periods of wellorganized alpha activity alternating with periods of mixed frequency low amplitude signal. The signals were bandpass filtered between 0.5 and 20.0 Hz, amplified and stored on an analog FM magnetic tape recorder for off-line signal processing.
2.3. Data analysis The analysis was divided into four stages:
2.3.1. Adaptive segmentation of the EEG signal
[1,3,41 The autoregressive model [5] was employed to divide the EEG signal into quasi-stationary segments of variable length, homogeneous in their spectral content. This was done as follows. The 16 order prediction coefficients for the first 2-s portion of the signal were computed, and the prediction error calculated comparing the value of the predicted signal sample with the actual one. A transition coefficient, T, was defined, comparing the error autocorrelation for the fixed window (the first 2 s of the segment) with that of successive signal portions, moving the autocorrelation window sequentially in steps of one sample:
M [rf(k)-rm(k)] 2
T= E
k=O
where rf (0) is the zero-lag error autocorrelation for the fixed window (the first 2 s of the segment), and rr(k) and rm(k) the k-lag error autocorrelations for the fixed and moving windows, respectively. M is equal to 4. Whenever the transition Coefficient exceeded a predetermined value, the segment was terminated, and the process of segmentation was continued. Each EEG segment was now characterized by its prediction coefficients, its length, and its total power. From the prediction coefficients the smoothed power spectrum [5] was computed, with a resolution of 0.5 Hz.
2.3.2. Further data reduction This was achieved by time-dependent clustering. Neighboring segments were merged together when the Euclidian distance between their respective power spectra was smaller than a preset empirical value. These 'secondary' segments were represented by their power in the various EEG frequency bands (delta, theta, alpha, sigma and beta).
2.3.3. Classification of the total bulk of secondary segments into 2 classes (states) employing fuzzy clustering [6, 7] This was carried out as follows: The various EEG physiological frequency bands were defined using fuzzy subset theory. For example, alpha activity was characterized by the three fuzzy conditions: (a) its frequency is a spectral peak, (b) its frequency band is approximately between 8 and 12 Hz and (c) its frequency lies in the neighborhood of alpha frequency of previous EEG segments. Such fuzzy conditions are expressed by membership functions, taking the value from zero (no membership in the relevant class) to 1.0 (maximal membership). An EEG segment could belong at the same time to various fuzzy classes (e.g. alpha, theta and delta activities), but with different degrees of membership. Whether a certain EEG segment is classified as alpha activity or not is given by the intersection of the three fuzzy conditions (Fig. 2). The classification of the secondary segments in the present study into two classes (states) was achieved by optimal fuzzy partition, using the 'k-nearest prototype' method [7]. Two spectral
19
L
• .......
1.0~
!
,.
,,,
,'
-
{
t-
t .,,
',
L,/~ ';U/AV/A~.'~_,' ~ , 7
6
8
9
lo
/
\',,
,'~ . . . . j'~
, ,x4,
12
14
.
13
FPequency (Hz)
Fig. 2. The degreeof membership for the three fuzzyconditions for alpha activity,and the fuzzydecision D: broken line, alpha frequency is a peak; solid line, alpha bandwidth; dotted line, alpha frequency is in the neighborhood of that of previous segments.
prototypes were chosen as centroids for the two clusters: waking EEG with dominant alpha, and low amplitude mixed frequency EEG (Fig. 3). Thus, the whole bulk of secondary segments was divided into two groups, listing the starting and ending times of each EEG segment estimated separately for the two groups.
2.3.4. Averaging of the signal This was performed using the trigger pulses of the flash light in order to extract the visual evoked responses from the background EEG. Only 'typical' segments for the relevant cluster, with a high degree of membership in that cluster, participated in the averaging. The analysis was implemented on a PDP 11/34 minicomputer. The signals were sampled at 40 Hz by the LP8 of the minicomputer, and the routines for adaptive segmentation and fuzzy clustering were written in FORTRAN. A gating routine was generated which carried out averaging of the visual evoked responses, during the occurrence of each of the two states (clusters) separately, using the relays of the LP8 of the P D P / l l and the starting and ending times for each of the EEG segments.
3. S a m p l e r u n s
3.1. Simulation Log mog.
15
1000
i
i
i
i
i
i
i
i
i
Se~lment n o . 5 8
100
i al stimulation 1/s 10
i
i
2.0
4.0
6.0
8.0
10.0 12.0
14.0 16.0
18.0 20.0
FPequency ( H z ) ls l
Log mag.
l
I
I
l
I
I
I
I
I
Segment no. 47
100
i
i
i
i
i
i
Visual stimulation
2,0
4.0
6.0
B.O
i
L
i
i
1/5
10.0 12.0 14.0
16.0; 18.0 20.0
Frequency ( H z )
Fig. 3. Two E E G segments used as prototypes for the fuzzy clustering and their respective spectra. Segment 47 represents low amplitude-mixed frequency and segment 58 well-developed alpha activity.
Fig. 4 shows the results of the adaptive segmentation and clustering of the simulation signal. The two curves demonstrate time-dependent frequency profiles (power spectrum calculated from the prediction coefficients) for the bandwidths representing the two sinusoidals (10 Hz and 7 Hz) comprising the simulation signal shown in Fig. 1. The prototype spectra employed during the fuzzy clustering are given in Fig. 5, and the respective membership functions for the two clusters (cluster I, segments with 10 Hz sinusoidal; cluster I£, segments with 7 Hz sinusoidal) are shown in Fig. 6. Table 1 summarizes the opening and closing times for the various segments of the simulation signal, classified to cluster I or II. Using the ending and starting times for averaging the square pulses separately in each of the two clusters, the results are shown in Fig. 7. The two square pulses embedded in the simulation signal are clearly extracted.
3.2. EEG signal Adaptive segmentation and time-dependent clustering of the EEG signal recorded during the visual evoked response experiment was carried out.
20 Log meg.
Degree of membership 100% 95
Cluster I
osHz
/ 100 F 50*
I
I
0.4
0.8
1.2
Lo 9 mog. lO00r-
1.6 2£) 2.4 Time (rain)
2.8
3.2
3.6
4.0
I
i
I
I
0.4
0.8
1.2
1.5 1.9 2.3 Time (rain)
I
2.7
3.1
3.5
3.8
(24
0.8
1.2
1.5
2.7
3.1
3.5
I 3.8
100% 6 . 5 - 7 . 5 Hz
100
F
50%
1.9
2.3
Time ( min ) Time (rain)
Fig. 4. Time-dependent frequency profiles for the bandwidths 9.5-10.5 Hz and 6.5-7.5 Hz for the simulation signal in Fig. 1.
Fig. 6. The degree of membership in the two clusters of each segment of the simulation signal (Fig. 1).
Prototype 1
Rel. megnitude 65.0"/~
Cluster I
32.5ok --
I
I
I
2.0
4.0
6.0
I# L I I I I I 8.0 10.0 12.0 14.0 16.0 18.0 20.0 Frequency (Hz)
ReI. magnitude
256 ms Cluster
Prototype 2
68.9% -
34.4%
256 ms
] 2.0
I 4.0
6D
8£)
I I I I I I 10.0 12.0 14,0 16.0 18.0 20.0
Frequency ( H z )
Fig. 5. Power spectra for the two prototypes used for fuzzy clustering of the segments of the signal described in Fig. 1.
Fig. 7. End result of the selective averaging of the square pulses from the signal described in Fig. 1. From segments belonging to cluster I a square pulse with a duration of 40 ms has been recovered, and from d u s t e r II a square of 20 ms duration. Twenty sweeps were averaged in each case.
21
Degree o1 membership
Cluster
TABLE 1
(modulated alpha)
100%
Gating times for segments belonging to cluster 1 or lI. Section of the simulation signal described in Fig. 1.
50%
L
]
0,6
1.1
I
I
Degree of membership
0.6
1.1
i
177 2.3 2.6 Time ( m i n )
17
3.4
4.0
4.5
I 5.7
5.1
C l u s t e r T T ( m i x e d flat octivity)
2,3
2.8
3.4
I
I
I
]
4.0
4.5
5.1
5.7
Time (rain)
Fig. 8. The degree of membership in the two clusters of all the EEG segments as a function of time.
In the next stage fuzzy clustering of the secondary EEG segments was performed, the prototypes for the two clusters being the estimated spectrum of
Segment No.
Cluster
Start (s)
Stop (s)
1 2 3 4 5 6 7 8 9 10
1 2 2 1 2 1 2 1 2 1
1.0 14.3 19.6 36.5 57.5 77.0 91.8 107.5 125.3 139.0
13.8 17.6 34.0 55.5 71.7 90.8 105.0 124.3 138.5 160.4
an EEG segment with well-developed alpha and the estimated spectrum of a segment with low amplitude mixed frequency (Fig. 3). The resulting membership functions for all the secondary EEG segments in the two clusters are demonstrated in Fig. 8. In the final stage, averaging of the EEG signal was carried out separately in segments belonging to either cluster I (well-developed alpha activity) or cluster II (mixed flat activity). The results of averaging 40 sweeps are shown in Fig. 9. Differences in both latencies and amplitudes of the various peaks and troughs of the visual evoked potentials, extracted from two different types of EEG background activity, can be seen.
4. Comments
i
I
I I
I (
IV~
t
I
,; 512 ms
Fig. 9. The averaged evoked potentials from channel 4 (most posterior), selectively recovered either from cluster I (broken line) or cluster II (solid line). 40 sweeps.
The psychophysiological correlation of cortical evoked potentials are inherently linked to changes in the functional 'state' of the brain, also expressed in the fluctuating patterns of the ongoing background EEG activity [8]. Therefore, extraction of cortical evoked potentials from the background EEG, most often involving group averaging, should bare some reference to the ever changing character of the background EEG [9]. Wiener filtering and time varying filtering based on Wiener filtering [10,11,12], have been used in order to improve the estimation of the evoked response from the background noise. Although the
22
results showed a decrease in the number of sweeps needed for extraction of the response, these methods still involve smoothing out of short time variations of the responses. In order to refrain from group averaging of the evoked potentials, another approach was suggested [13,14,15], based on the estimation of single evoked potentials from the background activity by a combination of template matching and adaptive filtering. The present study offers a new method aimed to disclose short time variabilities in the evoked potentials. In contrary to the other methods mentioned above, which are based primarily on various forms of linear filtering of the response, we deal primarily with the background noise (EEG activity). This background activity is classified according to its inherent properties to various classes (states), using adaptive segmentation and fuzzy decision making, and the averaging of the response is carried out selectively during the occurrence of each of the states. A similar strategy was employed [1] to investigate the relationship between vigilance performance (auditory choice reaction time) and the ongoing background EEG. Using this scheme of analysis, the simulation results showed recovery of the signal from the background EEG even when the signal to background EEG ratio was 1/5. Applying the same approach to a visual evoked potential experiment revealed differences in amplitudes and latencies between the evoked potentials averaged during the occurrence of cluster I and cluster II EEG segments. The physiological meaning of these findings is still to be verified. Likewise, it remains to be seen whether the relationship between the ongoing EEG and the evoked potentials is similar or different for different topographies of the electrode combinations.
5. Hardware and software specifications The program described here has been implemented on a PDP 11/34 minicomputer with 64 K core memory. All routines were written in FORTRAN.
Acknowledgement This work was supported by the Roche Research Foundation.
References [1] 1. Gath, D. Lehmann and E. Bar-On, Fuzzy clustering of EEG signal and vigilance performance, Int. J. Neurosci. 20 (1983) 303-312. [2] D. Lehmann and M. Koukkou, Classes of spontaneous private experiences and ongoing human EEG activity, in: Rhythmic EEG activities and cortical functioning, eds. G. Pfurtscheller, P. Buser, F. Lopez da Silva and H. Petsche, pp. 289-297 (Elsevier, Amsterdam, 1980). [3] I. Gath and E. Bar-On, Computerized method for scoring of polygraphic sleep recordings, Comput. Programs Biomed. 11 (1980) 217-223. [4] G. Bodenstein and H.M. Praetorius, Feature extraction from the EEG by adaptive segmentation, Proc. IEEE. 65 (1977) 642-652. [5] J. Makhoul, Linear prediction: A tutorial review, Proc. IEEE. 63 (1975) 561-580. [6] R.E. Bellman and L.A. Zadeh, Decision making in a fuzzy environment, Management Sci. 51 (1970) 141-164. [7] J.C. Bezedek and P.F. Castelaz, Prototype classification and feature selection with fuzzy sets, IEEE Trans. Sys. Cybern. SMC-7, 2 (1977) 87-92. [8] D. Lehmann, Fluctuations of functional state: EEG patterns and perceptual and cognitive strategies, in: Functional states of the brain, eds. M. Koukkou, D. Lehmann, and J. Angst, pp. 189-202 (Elsevier, Amsterdam, 1980). [9] E. Levonian, Evoked potentials in relation to subsequent alpha frequency, Science 152 (1966) 1280-1281. [10] J.P.C. De Heerd, A posteriori time varying filtering of averaged evoked potentials. I. Introduction and conceptual basis, Biol. Cybern. 41 (1981) 211-222. [11] J.P.C. De Heerd, A posteriori time varying filtering of averaged evoked potentials. II. Mathematical and computational aspects, Biol. Cybern. 41 (1981) 223-234. [12] D.J. Doyle, Some comments on the use of Wiener filtering for the estimation of evoked potentials, Electroencephal. Clin. Neurophysiol. 38 (1975) 533-534. [13] J.l. Aunon and C.D. McGillem, Techniques for processing simple evoked potentials, Trans. San Diego Biomed. Syrup. (1975) 211-218. [14] C.D. McGillem and J.I. Aunon, Measurements of signal components in single visually evoked brain potentials, IEEE Trans. Biomed. Eng., BME-24 (1977) 232-241. [15] Y. Friedman and A. Cartoon, Analysis of single cerebral evoked responses by adaptive filtering, Trans. San Diego Biomed. Eng. Symp. (1978) 233-238.