New developments in EEG research Part 2. Spatial analysis in four steps Walter J Freeman University of California at Berkeley http://sulcus.berkeley.edu Steps in spatial EEG Analysis: 1. Electrode design 2. Spatial spectral analysis 3. Spatial pattern classification 4. Location of frames in time Early on I.T. was repudiated by the key designer of the serial digital computer: “Whatever the language of the brain is, it cannot fail to differ considerably from what we consciously and explicitly consider as mathematics.” The Computer and the Brain Jancsi von Neumann New Haven: Yale UP, 1952 1904-1958 “Brains lack the arithmetic and logical depth that characterize our computations… .” “We require exquisite numerical precision over many logical steps to achieve what brains accomplish in very few short steps.” John von Neumann Step One in spatial EEG Analysis: Electrode design Clinical arrays give spatial samples; Widely spaced. Sparse sampling gives temporal modular signals. High-density arrays give spatial patterns: Closely spaced. High resolution gives access to spatial patterns. Walter J Freeman University of California at Berkeley Scalp EEG Blink artifact Standard 10-20 montage for clinical scalp EEG recording Referential Bipolar Structural MRI with 64 electrodes WJF courtesy of Jeff Duyn at NIH and Thomas Witzel at MIT Extracranial arrays This photographic montage shows the pial surface of my ‘brain in a vat’, projected to the scalp. Gyri are light, sulci dark. EEG were from 64 electrodes. Walter J Freeman From Freeman et al. 2003 University of California at Berkeley Step Two in spatial EEG analysis: Spatial spectra The electrode spacing corresponds to the digitizing step in time: 3 ms gives practical Nyquist frequency = 125 Hz. A sample rate of 3.33/cm (3 mm interval) on the scalp gives the practical Nyquist frequency: 1.0 cycle/cm. The spatial power spectral density PSDx gives the basis for choosing the optimal spatial sample interval. The PSDt is from 1000 steps, averaged over 64 EEGs. The PSDx is from 64 channels, averaged over 1000 steps. Walter J Freeman University of California at Berkeley Temporal spectra from frontal scalp From Freeman et al. 2003 From Freeman et al. 2003 Walter J Freeman University of California at Berkeley The pial PSDx is 1/f, but the scalp PSDx is not, due to impedances of dura, skull and scalp, yet a prominent peak persists @ .1-.3 c/cm. From Freeman et al. 2003 A peak appears only if the beta-gamma waves are synchronous over long distances (to 19 cm). From Freeman et al. 2003 Decomposition of spatial spectrum by temporal pass band From Freeman et al. 2003 A temporal pulse has the spatial frequency of the gyri. • The Hilbert transform is needed to detect and measure the temporal pulse in EEG activity. • A wide electrode array is needed to detect pulses. • Temporal band pass filtering is needed to reduce spurious phase slip. • An objective criterion is needed to set the filter in the beta or gamma range. A tuning curve is constructed using the cospectrum between unfiltered alpha and the SDx of the phase. Noise and nonlinearity in broad-spectrum signals give the appearance of random walk or a Markov process known as ‘phase slip’. Band pass temporal filtering is essential to make sense of the data. Co-spectra of raw EEG vs. phase SDx From Freeman, Burke & Holmes, 2003 Walter J Freeman University of California at Berkeley From Freeman, Burke & Holmes, 2003 Walter J Freeman University of California at Berkeley Band 12-30 Hz From Freeman, Burke & Holmes, 2003 Walter J Freeman University of California at Berkeley Step Three in spatial EEG analysis: Pattern classification • Analysis of olfactory bulbar EEGs reveals repeated state transitions induced by respiration. • The gamma activity is generated by global interactions, so that the same wave form appears on all channels with intracranial recording. • The spatial patterns of amplitude modulation of the carrier wave form are modified by training. An inhalation triggers a state transition to an attractor in a landscape. A stimulus selects a category of input. Cognitive-related EEG information is in the spatial domain. Left hemisphere of the rabbit brain. Squares show 8x8 electrode arrays. Circles show modal and 95% diameter activity domains. Each new pattern of neural activity has the form of amplitude modulation (AM) of an aperiodic carrier wave in the beta or gamma range. AM patterns change under classical and operant conditioning. Each frame gives a point in 64-space. Multiple frames are projected into 2-space for classification, here by stepwise discriminant analysis. Similar patterns give clusters of points. Classificatory information is spatially distributed. Correct classification depends on the number of channels, not their locations. No channel is more or less important than any other. The spatial density of information is uniform, despite variation in content. Lashley’s Dilemma ‘Generalization is one of the most primitive basic functions of organized nervous tissue.’ … ‘Here is the dilemma. Nerve impulses are transmitted through definite cell-to-cell connections. Yet all behavior is determined by masses of excitation. … The Karl Lashley (1942) problem is universal in activities of the nervous system.’ His dilemma is resolved by neurodynamics. AM pattern classification in serial conditioning. AM patterns lack invariance with respect to stimuli. Comparison of EEGs from paleocortex and neocortex Visual cortical EEGs give 1/f power spectral densities. From Barrie, Freeman & Lenhart, 1996 Spatial patterns, visual cortex Above: 64 EEGs unfiltered. Right: Contour plots of gamma amplitude at three latencies. Algorithm for binary classification by Euclidean distance 1. Collect 40 trials artifact-free: 20 reinforced = CS+; 20 not reinforced = CS-. 2. Divide into 10 each training cases and test cases and calculate centers of gravity of training cases in 64-space. 3. Find the distance of each test case to the nearest centroid, and tabulate which cases are correct or incorrect. 4. Cross-validate by reversing test and training sets. 5. Estimate the binomial probability of the level of correct classification having occurred by chance. Classification of AM patterns by Euclidean distances Classification of AM patterns in the gamma range p = .01 p = .05 Classification of AM patterns in the beta range Define a new measure for pattern stability: De is the Euclidean distance between successive points in N-space given by the square of the analytic amplitude, after normalization of frame amplitude to unit variance at each step. De tends to maintain low values during high values of analytic amplitude. Increased amplitude follows pattern stabilization. A new measure of synchrony is the ratio of variances Frequency = 23.4 Hz Pass band = 20-50 Hz Window = 2 cycles, 86 ms 1/Re = Mean of the SDt / SDt of the mean Pattern stability follows onset of phase synchrony. The sequence of a cortical state transition • Step 1: The phase of gamma oscillation is re-set, as shown by the jump and plateau in SDt. • Step 2: The cortical oscillations are re-synchronized, as shown by the rise in Re (fall in 1/Re). • Step 3: The rate of change in spatial pattern falls rapidly, as shown by the decrease in De. • Step 4: The analytic amplitude increases to a peak, as shown by the rise in A2(t). Step Four in spatial EEG analysis: Location of frames The Hilbert transform provides two forms of useful information. • Analytic phase locates frames in time, in which linearity and stationarity hold to good approximation; • Analytic amplitude gives: 1. Evidence for the level of stability of AM patterns, 2. The identity of AM patterns within frames, 3. The intensity of cortical transmission. Peaks in stabilized AM patterns in the gamma carrier range Peaks in stabilized AM patterns in the beta carrier range Nonlinear mapping [Sammon, 1969] • Define an initial plane by the 2 axes with largest variance by PCA • Calculate the N(N - 1)/2 Euclidean distances between the points in 64-space and between the points in 2-space • Define an error function by the normalized differences between the two sets of distances • Minimize the error by steepest gradient descent Classification [Barrie, Holcman and Freeman [1999] • Define the number of clusters; label the N points by membership • Calculate the center of gravity for the points in each cluster • For every point find the Euclidean distance to closest center of gravity • Classify as 'correct' or 'incorrect' • Display the points and draw a line between clusters Classification using tuning curve and 3x64 frames An optimal threshold for selecting frames based on some measure of amplitude is found by systematic change in threshold while re-calculating goodness of classification. Pairwise evaluation after 6-way nonlinear mapping Criterion of linear separability Unsolved problems for the future • Classification and measurement of frames with beta and gamma carrier waves in human EEG: size, duration, and locations in space and time • Classification of spatial AM patterns in scalp EEG with respect to categories of cognitive contents • Relations of EEG to unit data and fMRI data • Development of brain theory that is competent to explain the properties of EEG What theory will you test by analyzing EEG? If you believe that cortex maintains: A mosaic of modules Overlapping global fields your metaphor for neural activity is: Cocktail party Double, triple exposures You treat the background activity as: Noise Signal and choose your dimension for averaging: Time Space You place your electrodes in arrays: As far apart as possible Close to avoid aliasing to sample the modules and under-sampling You choose electrode diameter for spatial resolution: Small (microelectrode) Large (for low noise) Your preferred spatial filter: High-pass to localize Low-pass for reference values Your preferred temporal pass band: Narrow to get frequencies Broad to get phases What are your sites of localization? Areas of cortex and basal ganglia Project active areas onto fMRI of lobes, gyri and Broca’s areas and nuclei. Regions of brain state space Project infinite brain state space into N-space, where N is the number of channels of EEG/MEG. Outcomes: Connectionist networks, Modular operations Attractor landscapes, Itinerant trajectories Conclusions Most of the techniques illustrated in this tutorial – FFT, Hilbert transform, wavelets, temporal (FIR) filters, spatial (Gaussian) filters, stepwise discriminant analysis, Euclidean distance – are standard tools of linear analysis. Guidance by differing brain theories leads to diametrically opposed pictures of what EEGs look like, or should look like. Consciousness studies need more attention to brain theory.