homepages.cae.wisc.eduhomepages.cae.wisc.edu/~ece539/project/f01/lakshmanan.doc · web viewneural...

19
ECE 539 Project Report Fall 2001 An ANN Approach to EEG Data Scoring Anand Lakshmanan

Upload: haque

Post on 20-May-2018

216 views

Category:

Documents


2 download

TRANSCRIPT

ECE 539Project Report

Fall 2001

An ANN Approach to EEG Data Scoring

Anand Lakshmanan

Introduction:

The human brain is the most complex information-processing structure known to science. The brain contains some 100 billion neurons which operate by generating and passing electrical signals. The summation of all this electrical activity results in signals that can be detected and recorded outside the brain. In analogy to the recording of the activity of the heart in an electrocardiogram (ECG), the recording of the brains activity is called an electroencephalogram (EEG).Electroencephalograms, or EEGs are weak electrical signals obtained from electrodes placed on a person’s head. These brain wave signals represent the state of cell activity in the brain, and their interpretation is a major analytical problem.

Over the years, physicians and scientists have correlated certain waveforms with the level of an individual’s consciousness, with brain damage which might be present or with certain kinds of brain ailments. The EEG represents dynamics of electrical brain activity on a time scale of milliseconds. Neural systems are capable of generating complex EEG signals with highly nonlinear dynamics

Neural Networks have evolved from the way neurons in the human brain function.Naturally, it makes sense to apply neural networks to aid the analysis of EEGdata that is collected from the human brain!!In psychology related experiments, it is a common practice to compute the total power spectral density(psd) of eeg signals in order to make some important decisions, for example , to classify a human subject as a mentally depressed person or not. In doing so, eye artifacts cause large scale localized errors in the eeg output.

Types of eye movements (artifacts)1. horizontal eyeball movements2. vertical eyeball movements3. blinks

So it is a common practice to “score-out” the eye artifact time epochs from eeg data and compute the psd from the rest of the clean eeg data.

Thousands of human hours are spent in the classification between normal eeg and an eye artifact data. If ANN approach is applied in this classification problem, it would eliminate the need for manual scoring and thus would save time and effort in a massive scale.The following paper discusses a pattern classification approach to differentiate between an eye-artifact and a normal eeg signal. A multilayer perceptron network was used to classify the data based on its features. The simplified model used here is startle under noise. Startle refers to an eye blink. Good classification rates are achieved by the network

however it is a long way to go before we can surpass other non-linear effects that come into picture which is discussed in the limitations section.

Theory:

EEG is normally used to record the brain wave in medical treatment. The recording isusually taken by electrodes (small metallic discs) pasted by an electricity conducting gel to the surface of the scalp.

In EEG recording, a powerful electronic amplifier increases several hundreds or thousands of times the amplitude of the weak signal (less than a few micro volts) which is generated in this place. In the past, a device called galvanometer, which has a pen attached to its pointer, writes on the paper strip, which moves continuously at a fixed speed past it. In the present time, with the advent of powerful electronic computer and very high storage, we can use A/D device to transform signal between electrode and computer. A lot of data can be recorded and easily analyzed and printed. One pair of electrodes usually makes up a channel.

Since earlier times, it is known that the characteristics of EEG activity change in manydifferent situations, particularly with the level of vigilance: alertness, rest, sleep anddreaming. The frequency of wave change can be labeled with names such as alpha, beta, theta and delta. Particular mental tasks also alter the pattern of the waves in different parts of the brain.

A small pic to show how eye blink contaminates EEG signal

Data Collection:

Much of the time spent was on data collection.EEG and Startle data are collected on a routine basis at the Psychology Department, UW Madison for various research studies. I was involved in setting up of an experiment where data is collected from human subjects. I sat through some data collection sessions. In addition, a large volume of data was collected and manually scored.

Just to give an insight,here is how a typical cap electrode looks like

This one has only a few electrodes while modern EGI ( Electro Geodesics Inc) have come out with 128 channel net that can directly sit over a subjects head.

Startle data was collected using Snapshot Storage software which runs on DOS.The software was obtained from HEM Data Corporation. I wrote a C++ code which was modified from the code used for other studies.This Snap Stream program collects data from channels as per the specified sampling rate and gain settings of an attached Bio-Electric Amplifier.

A small dos program controls the gain and filter settings for the different channels.A hardware contour following integrator S7601 from Coulbourn Instruments was used to convert the raw startle to integrated startle data.

This unit has an active amplifier, inverter amplifier and signal mixer in the input to full wave rectify without diode offset error.

The integrator section is a balanced bleed-fill network to maintain equal charge and discharge time constants.

The o/p is the true average of the input signal. The time constant is adjustable from 50ms to 2 secs making the unit suitable for

integration of biopotentials upto the lowest band of EEG signals.

The raw and integrated signals look like these:

Data is streamed into stimulus files.

I used a program startle.m written by Adrian Pederson to read in the data from stimulus file and convert into understandable parameters.

Using a probe channel and exciting the channel in occasional intervals , we can cause the blink of subjects which are captured in four epochs as shown in an example.

1 2 3 4-50 0 20 120 250-2

0

2

4

6

8

10

12

Time (ms)

Vol

tage

(AD

C)

AR050012 - Startle number 1

This one for example is collected for subject 50 trial 12 and displays the 1st among 12 blinks.

Epoch 1 is the base line periodEpoch 2 is the wait period for the blink as the probe stimulus has happened.Epoch 3 is the startle capture epoch.( The blink is seen) Epoch 4 is post startle epoch.

Amount of data into the neural network:

• 43 subjects * 21sessions * 10000 = data points for classification

Data Preprocessing:

1. Hardware Integration as described in the data collection.2. Scaling.3. Mean removal.4. Software notch filtering through Matlab. 60 Hz digital notch filter using Signal

Processing function.

ANN MLP model:

The neural network that I used is MLP with back propagation.

I wrote a program to use the available data and features in the ANN model.

The following factors were important: subject age subject gender block number order number stm number picture number valence startle probe time condition Peakdiff onset rel time peak rel time peak voltage onset voltage past mean

Since some pictures are presented which eventually evoke eye blinks following a burst of white noise at the probe time, the block , order and stimulus number are also important as they may imply relative degree of emotional negativity or neutrality of pictures there by the responses may be good or poor.

Sample Architecture:

The above shown architecture of 15-5-5-1 has so far got me the best classification:

Initially I had many other feature vectors and on further analysis I found that they have little or no significance in the determination of o/p of the pattern classifier. I eliminated them and verified that results don’t change at all , thus conserving cost.

Since the data available was large I had a vast sample space to experiment on and find the best fit in terms of the configuration which got me the smallest error during training and testing.

Twenty percent of the available data was dedicated exclusively for testing to ascertain the generality of the model fitting.

Eeg or Eye

Optimizations were carried out to choose the number of layers , no of neurons in each layer dynamically and improvements were achieved.

I modified the “bp.m” program and ran the data for different network architectures and following are the results.

MLP Architecture(Random Selection)

Learning Rate(I mostly ran with 0.1) and did a few variations to observe what happens

Momentum(I mostly ran with 0.8) and did a few variations to observe what happens.

Maximum Achieved Crate over 20 runs each

15 -2 -3 -1 0.1 0.8 82.3%15-2-4-1 0.1 0.8 85.8%15-2-2-1 0.1 0.8 80.2%15-2-3-1 0.02 0.8 86.3%15-2-3-1 0.1 0.9 85.1%15-3-3-1 0.4 0.3 90.3%15-5-5-1 0.1 0.8 95.2%15-3-3-4-1 0.1 0.8 94.5%15-10-10-1 0.1 0.8 94.2%15-3-7-2-3-1 0.1 0.8 84.3%15-4-1 0.1 0.8 65.8%15-2-1 0.1 0.8 60.2%15-3-1 0.02 0.8 56.3%15-10-1 0.1 0.9 75.1%15-3-3-1 0.01 0.1 76.4%15-10-5-1 0.1 0.8 85.2%15-3-2-4-1 0.8 0.95 75.2%15-1-10-1 0.9 0.1 74.2%15-3-4-9-3-1 0.1 0.5 81.3%

I varied the number of epochs in most cases to maximize the achievable Crate.

Initially I randomly chose learning rate and momentum and got weird Crate values which never seemed to pick up. Finally I decided to stick around the optimal values to test other architectures and occasionally vary them to ascertain their optimality.

Observations and Conclusions:

For low values of learning rate and momentum the Crate goes low and so is the case for high values for these two parameters. Classification is poor for too small and too large no of hidden neurons.

I optimized for the best network model and a 15-5-5-1 seemed to work best for me giving a classification rate of 95.2%

Discussion:Neural networks are able to recognize differences in patterns based on automatic learning procedures. The application is attractive, not only that it provides faster responses, but especially because of its capability to automatically discover irregularities in patterns not seen or detected before. Another important feature is that it enables the discovery of regularities in the training signal itself as a consequence of the actual learning process.

Limitations:

The modeling of startle data under noise may not be perfect.A lot of non-linearities come into picture for eg , muscle activity.Blink voltages are different for different channels , more dominant in eye related channels. The eye channels among the 128 channels are : EGI channels: 8, 26, 125, 126, 127, 128. So these channels are more likely to get affected than others in terms of data contamination . Small errors can cause misleading conclusions because eye artifacts will distort computable power spectrum.

References:1. Class Notes.2. Neural Networks – A comprehensive foundation by Simon Haykin.3. Applications – Coulbourn Instrumentation manuals.