Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System...

16
Online Artifact Removal on An EEG-based BCI System Sheng Zha [email protected] Abstract Brain-computer interface system, as a new technology in controlling and monitoring, has been drawing more and more attention. Brain-computer interface systems based on EEG signals, in particular, has been more and more popular since the technology of collecting EEG data is comparatively cheap and easy. However, due to the existence of various kinds of noises (artifacts), especially those from external origins such as power supply interference, and those from inner origins such as EOG and EMG, the analysis of EEG signals would be influenced and thus the BCI systems would produce false or inaccurate results. On the other hand, BCI systems also require real-time data flow that drives the controlling or monitoring system. In order to meet these two needs, this paper digs deep into the properties of EEG signals and artifacts, and proposes a novel online artifact removal algorithm that removes artifacts from EEG data flow in real-time. This algorithm is based on independent component analysis (ICA) and wavelet-denoising algorithms using the spatial and topological features of artifacts in the way of drawing component scalp maps. Results show that this algorithm is effective and computationally efficient in removing artifacts. Introduction A brain–computer interface (BCI), often called a mind-machine interface (MMI), or sometimes called a direct neural interface or a brain–machine interface (BMI), is a direct communication pathway between the brain and an external device. BCIs are often directed at assisting, augmenting, or repairing human cognitive or sensory-motor functions. Electroencephalography (EEG) is the recording of electrical activity along the scalp produced by the firing of neurons within the brain. EEG is one of the mostly used and most objective physiology indicator for subjects mental activity and state, and is widely applied in BCI systems. For example, vigilance is a term which describes the ability of subjects to maintain their focus of attention and to remain alert to stimuli for a prolonged period of time. It is of great importance to be able to check if one, especially one who is operating heavy equipment or performing vital jobs such as flight control, is vigilant enough in order to avoid accidents and tragedies. When vigilance state changes, electroencephalograms (EEG) recorded from the person will also has some relative changes. Through decades of research, we are aware that some EEG signal components of certain rhythms are in some way correlated to human’s vigilance level. Often, different rhythms of EEG signals are divided into delta (up to 4 Hz), theta (4 to 7 Hz), alpha (8 to 12 Hz), beta (12 to 30 Hz), gamma (30 to 100 Hz), and mu (8 to 13 Hz). Their amplitude are correlated to all kinds of human activities. Therefore, we can estimate the vigilance by using EEG of subjects performing some tasks. EEG signals are often recorded by a set of equipments that consist of electrode cap, amplifier, voltmeter and signal collector. EEG signals are feeble compared to all kinds of noises and artifacts. Artifacts refer to the interference signals generated by the muscle activities, such as eye movement, heartbeat, activation of muscles that are near head, etc. (EOG, EKG, EMG induced artifacts, respectively)[1]. Also, there are white noises and noises from other nearby electrical appliances.

Transcript of Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System...

Page 1: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

Online Artifact Removal on An EEG-based BCI SystemSheng Zha [email protected]

AbstractBrain-computer interface system, as a new technology in controlling and monitoring, has been drawing more and more attention. Brain-computer interface systems based on EEG signals, in particular, has been more and more popular since the technology of collecting EEG data is comparatively cheap and easy. However, due to the existence of various kinds of noises (artifacts), especially those from external origins such as power supply interference, and those from inner origins such as EOG and EMG, the analysis of EEG signals would be influenced and thus the BCI systems would produce false or inaccurate results. On the other hand, BCI systems also require real-time data flow that drives the controlling or monitoring system. In order to meet these two needs, this paper digs deep into the properties of EEG signals and artifacts, and proposes a novel online artifact removal algorithm that removes artifacts from EEG data flow in real-time. This algorithm is based on independent component analysis (ICA) and wavelet-denoising algorithms using the spatial and topological features of artifacts in the way of drawing component scalp maps. Results show that this algorithm is effective and computationally efficient in removing artifacts.

IntroductionA brain–computer interface (BCI), often called a mind-machine interface (MMI), or sometimes called a direct neural interface or a brain–machine interface (BMI), is a direct communication pathway between the brain and an external device. BCIs are often directed at assisting, augmenting, or repairing human cognitive or sensory-motor functions.

Electroencephalography (EEG) is the recording of electrical activity along the scalp produced by the firing of neurons within the brain. EEG is one of the mostly used and most objective physiology indicator for subjects mental activity and state, and is widely applied in BCI systems. For example, vigilance is a term which describes the ability of subjects to maintain their focus of attention and to remain alert to stimuli for a prolonged period of time. It is of great importance to be able to check if one, especially one who is operating heavy equipment or performing vital jobs such as flight control, is vigilant enough in order to avoid accidents and tragedies. When vigilance state changes, electroencephalograms (EEG) recorded from the person will also has some relative changes. Through decades of research, we are aware that some EEG signal components of certain rhythms are in some way correlated to human’s vigilance level. Often, different rhythms of EEG signals are divided into delta (up to 4 Hz), theta (4 to 7 Hz), alpha (8 to 12 Hz), beta (12 to 30 Hz), gamma (30 to 100 Hz), and mu (8 to 13 Hz). Their amplitude are correlated to all kinds of human activities. Therefore, we can estimate the vigilance by using EEG of subjects performing some tasks.

EEG signals are often recorded by a set of equipments that consist of electrode cap, amplifier, voltmeter and signal collector. EEG signals are feeble compared to all kinds of noises and artifacts. Artifacts refer to the interference signals generated by the muscle activities, such as eye movement, heartbeat, activation of muscles that are near head, etc. (EOG, EKG, EMG induced artifacts, respectively)[1]. Also, there are white noises and noises from other nearby electrical appliances.

Page 2: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig.1 Delta, Theta, Alpha, Beta, Gamma rhythms

fig.2 Electrode location map

Page 3: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

Lots of methods have been introduced and applied to remove artifacts. At first, artifacts are removed through traditional filtering. But traditional filtering methods have very limited capability, and they often induce a great loss of real EEG signals. The independent component analysis becomes the most popular way of artifact identification and removal in the past five years. Someone recently developed generalized morphological component analysis for artifact removal [2], which also seems to be a valid method. The technique of wavelet-denoising [13] is also a comparatively new method used in artifact removal. This technique is of comparatively low computational cost and high efficiency.

Neurological Phenomenon in EEGThere are some neurological phenomenon that are particularly of interest in Brain-Computer Interface systems, including:• Changes in the brain rhythms such as Mu, Beta and Gamma rhythms related to a

movement (CBR): A voluntary movement results in a circumscribed desynchronization in the Mu and lower Beta bands

• Movement-related potentials (MRP): MRPs are low-frequency potentials that start about 1–1.5 s before a movement.

• Other movement-related activities (OMRAs): The movement-related activities that do not belong to any of the preceding categories are categorized as OMRA.

• Slow cortical potentials (SCPs): SCPs are slow non-movement potential changes generated by the user. They reflect changes in the cortical polarization of the EEG, lasting from 300 ms up to several seconds.

• Cognitive tasks (CTs): Changes in the brain signals as a result of non-movement mental tasks

• P300: Infrequent or particularly significant auditory, visual or somatosensory stimuli, when interspersed with frequent or routine stimuli, typically evoke a positive peak at about 300 ms after the stimulus is received

• Visual evoked potentials (VEP): VEPs are small changes in the brain signal, generated in response to a visual stimulus such as flashing lights

• Steady-State visual evoked potentials (SSVEP): If a visual stimulus is presented repetitively at a rate of 5–6 Hz or greater, a continuous oscillatory electrical response is elicited in the visual pathways. Such a response is termed SSVEP.

• Auditory evoked potentials (AEPs): AEPs are small electrical activity changes that are generated in response to an auditory stimulus.

• Somatosensory evoked potentials (SSEPs): SSEPs are potentials generated in response to the stimulation of somatic sensation.

• Multiple neurological phenomena (MNs): BCI systems based on multiple neurological phenomena use a combination of two or more of the above-mentioned neurological phenomena.

These phenomenon should be preserved in the artifact removal step.Due to the need for online artifact removal in applications such as BCI and online EEG evaluation, it is important to have an efficient yet still effective method for artifact detection and removal. One category of methods stand out among all the artifact removal methods in terms of close-to-real-time performance, which is ICA-based methods. There are lots of ICA methods available now, such as Infomax, FastICA[7], Second Order Blind Identification (SOBI) [15], and AMUSE [4].

Artifacts in EEGArtifacts in EEG signals usually originate from sources other than neurological activities in the brain. They could contaminate the EEG waves by modifying the shapes of neurological phenomenon waves, which could result in fallacious responses in BCI systems. A special

Page 4: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

case to this claim is that sometimes, irrelevant neurological phenomenon would be regarded as artifacts as well in some application. For example, a Cognitive Task based BCI system would treat SSVEP, a static neurological phenomenon, as artifact. These artifacts could incur errors when controlling devices. Thus, for each specific type of EEG application, it is necessary to avoid and remove artifacts.

Artifacts could come from both physiological and non-physiological sources. Non-physiological signals are from sources other than the human subject, such as the 50Hz mains power, or the contact resistance changes related to subjects movement. These could be avoided by proper filtering and other measures. Physiological signals are produced by a large variety of body activities. For example, ECG comes from heartbeat, which is a rhythmic signal that could be mixed in the collected EEG. Breathe could also result in rhythmic signals. Some changes on the scalp such as exuding could also give rise to artifacts that are related to changes in the resistance at the electrodes.

There are two kinds of physiological artifacts that are widely studied, which are the signals that are related to eye movement (EOG) and that of muscle movement(EMG). EOG is often caused by eye-blinks, which is of high amplitude, and movement of eyeball, which is of low frequency. EOG consists of a wide spectrum, and it has a peak at around 4Hz, which is the major component in the activities on the forehead. EMG activities in EEG record are often caused by the movement of subjects’ head, body, lower jaw or tone. They also have wide spectrum, and they often peak at above 30Hz. In difficult tasks EMG activities are often increased because of more facial muscle movements. Studies have shown that EOG and EMG could affect the neurological phenomenon that are made use of in BCI systems. These two types of artifacts are more challenging to remove than non-physiological artifacts due to their non-static wide-spectrum nature.

There are three types of methods that can be used to treat artifacts, which are artifact avoidance, artifact exclusion and artifact removal[5].

To avoid occurrences of artifacts, proper instructions should be given to subjects, such as to avoid moving their body or eye-blinks during experiment. This is easy to perform, and the resulting EEG records are less compromised by movement-related artifacts. But this method could not deal with artifacts as a result of spontaneous physiological activities such as heartbeat and breathe. Even eye and muscle movement are harder to control that people would normally think. It’s also hard to collect a longer period of EEG record with artifact avoidance.

When artifacts do occur, the window of EEG that’s contaminated by artifacts could be manually or automatically excluded by inspection on the wave shapes. This method takes the burden of dealing with artifacts from subjects which makes the experiments easier to carry out, especially for subjects with movement disorder such as patients with Parkinson’s disease. Manual exclusion is often achieved by visual inspection by the domain experts. We could generally assume that the experts have located and removed all the contaminated records and the left records are clean of artifacts. On the other hand, this process involve huge amount of labor from the experts, and it will always be biased. Moreover, it could induce large amount of loss of data because of the deletion process. This is true even for automatic exclusion techniques. For online BCI systems, automatic exclusion is used which reduces the amount of labor. But, this could result in gaps in the data, which essentially disable the systems to react in that empty window. What’s worse is that artifacts from spontaneous movements could happen constantly, which means that little data will actually be pure after this process.

Page 5: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

Artifact removal is the process of identifying and removing artifact signals. It is required that artifact removal methods leave the most concerned neurological phenomenon intact. Currently popular artifact removal methods fall into the following categories: traditional linear filtering, linear combination and regression, blind source separation and wavelet-denoising.

Linear filtering is a simple and practical way of removing artifacts that fall into a specific range of frequencies on the spectrum. It requires that the concerned neurological phenomenon lie in a different range of frequencies than the artifacts. For example, a high-pass filter could remove EOG while a low-pass filter could remove EMG[1]. Simplicity is its most important strength. However, it couldn’t handle the artifacts if there’s any frequency overlap between neurological phenomenon, which is the most common situation.

Linear combination and regression is most useful when removing EOG artifacts. It’s based on the following assumption:

, where is the EOG-contaminated EEG signal in i-th channel, is the pure EEG signal in i-th channel, EOG(t) is the EOG signal and K is the coefficient that needs to be estimated. A common way to estimate the coefficient K is the least square method. Usually, the channel near the eyes will be used as EOG(t). But that could also contain EEG signals, and as a result, EEG signals are weakened due to that leakage. For removing EMG, multiple electrodes are needed as references for different muscle groups, and for each group a coefficient K is needed.

Blind source separation is the separation of a set of source signals from a set of mixed signals, without the aid of information (or with very little information) about the source signals or the mixing process. This problem is in general highly underdetermined, but useful solutions can be derived under a surprising variety of conditions. Much of the early literature in this field focuses on the separation of temporal signals such as audio. However, blind signal separation is now routinely performed on multidimensional data, such as images and tensors, which may involve no time dimension whatsoever.

Since the chief difficulty of the problem is its underdetermination, methods for blind source separation generally seek to narrow the set of possible solutions in a way that is unlikely to exclude the desired solution. In one approach, exemplified by principal and independent component analysis, one seeks source signals that are minimally correlated or maximally independent in a probabilistic or information-theoretic sense.

As a mathematical tool, wavelets can be used to extract information from many different kinds of data. Sets of wavelets are generally needed to analyze data fully. A set of "complementary" wavelets will deconstruct data without gaps or overlap so that the deconstruction process is mathematically reversible. Thus, sets of complementary wavelets are useful in wavelet based compression/decompression algorithms where it is desirable to recover the original information with minimal loss. In formal terms, this representation is a wavelet series representation of a square-integrable function with respect to either a complete, orthonormal set of basis functions, or an overcomplete set or frame of a vector space, for the Hilbert space of square integrable functions. A related use is for smoothing/denoising data based on wavelet coefficient thresholding, also called wavelet shrinkage. By adaptively thresholding the wavelet coefficients that correspond to

Page 6: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

undesired frequency components smoothing and/or denoising operations can be performed.

ICAThe standardized formula of blind source separation describes a model of linear combination of sources[6]:

, where are the N source signals contaminated by noises. The mixing matrix is unknown. The characteristics of noise signals are also unknown, but they are often modeled as white multivariate gaussian random process. The goal of blind source separation is to estimate N, s(t) and A given only x(t) and minimum number of parameters.

Traditional ICA solves this problem by assuming square noise-free signals, and s(t) should be statistically independent non-gaussian random variables. This model could be formalized as the following:

, where V is the whitening matrix, which could be calculated by eigenvalue decomposition of the covariance matrix of the data. Since whitening identifies the independent components up to a rotation, the mixing matrix for the whitened data is orthonormal, i.e., with unit norm columns. Source estimates from whitened data

with , therefore, do not involve matrix inversion.

Since all higher order components of Gaussian variables go away, only sources with non-Gaussian marginal distributions are identifiable by imposing independence assumption. Thus, estimating the mixing matrix in conventional ICA involves orthonormally

constrained optimization of to maximize the non-Gaussianity of the marginal distributions of . The FastICA algorithm is a computationally efficient approach with a fixed-point algorithm.

Automatic Online Artifact RemovalMany approaches have been proved to be effective on removing artifacts[3]. However, in order to achieve online artifact removal, there is an additional requirement on the artifact removal module, which is real-time computational performance. The following process is proposed to address this issue. Its basic idea is to extract signals through independent component analysis and discard noises, and the identification is achieved by pattern recognition.

Presently in researches “wet” electrodes are most commonly adopted to collect EEG records outside the scalp. The data collection of experiments in this research are also carried out this way. Raw data is at a sample rate of 500Hz. According to sampling theorem, this could guarantee that any information at up to 250Hz is preserved. Since generally we only care about around 0.5Hz - 100Hz in EEG research, downsampling is usually carried out as the first preprocessing step.

After downsampling, one pass of independent component analysis should be performed. This produces a mixing matrix A which describes the weight of each independent

Page 7: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

component channel. This weight could be visualized on a scalp map. An open source toolkit called EEGLAB implemented this functionality of drawing independent components.

fig.3 Example of scalp map

Scalp map depicts the projection of each corresponding independent component, which helps us locate the source of certain independent component. Their spatial distribution could reflect whether the corresponding independent component belongs to artifact or neurological phenomenon.

fig.4 “good” and “bad” sample

These 28 scalp maps come from a single subject in one experiment. Domain experts have marked them to be either good or bad. Good elements include the neurological phenomenon we care about, and bad elements include both physiological and non-physiological artifacts. For example, bad components C1, C16 and C18 could be related to eye blinks [9].

Page 8: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig.5 Example of scalp map labels

The spatial distribution of independent components [10] could be used as features for the machine learning techniques to identify artifact components. An SVM with gaussian kernel should suffice this task.

However, there is an important issue to deal with. You might have noticed that there are a lot more “bad” components than “good” components, thus resulting in an imbalanced dataset. Data imbalance problem often results in abnormal behaviors of classifiers, especially when only accuracy is chosen as the metrics.

Take a simple example, in a two-class classification problem with 1:9 ratio of positive to negative class, by predicting all negative would yield a 90% accuracy, which looks great. But this kind of classifier is useless in practice. In this context, an F1-score is a better choice. The definition is as follows. R = TP/(TP + FN), P = TP / (TP + FP), F1 = 2RP/(R+P), where TP stands for true-positives, FP for false-positives, FN for false-negatives.

Some learning techniques of dealing imbalanced data are shown to be useful. Common techniques include SMOTE (a pseudo oversampling method that generates “samples” around the minority class), weighted SVM [8][11][14] (a way to assign different weight on imbalanced classes). In this artifact removal process I adopted a method called Min-Max-Modular network (M3). The process is described in the following flow chart:

Page 9: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig.6 Flow chart of M3 approach

The training process of this algorithm first involves dividing the training problem into multiple smaller problems by dividing into multiple smaller datasets. Then, these smaller datasets are fed to each classifier. All classifiers are identical, and the classifier we use in this experiment is gaussian kernel SVM. After training all the classifiers, in testing all we need to do is to combine the prediction of classifiers with min and max operations. This algorithm has several merits. First of all, since all the subproblems are logically parallel and there is no dependency among subproblems, the training process is highly parallelizable. Secondly, the imbalance ratio could be lowered through proper task decomposition. For example, let the imbalance ratio of the problem we have to be 1:N, and we could divide the majority set into 2N mutually exclusive sets, and the minority set into 2 mutually exclusive sets. For each classifier, we feed one of the smaller set from majority set and the whole positive set, which means the imbalance ratio that each classifier sees is 1:1. Hence, every classifier is dealing with a smaller problem that’s not imbalanced. Generally there are several ways of task decomposition, such as random decomposition, hyperplane decomposition, clustering decomposition, and decomposition according to prior knowledge. Last but not least, this approach is quite extendable. Since each classifier is a local expert in the feature space that’s allocated to it, if we extend the original problem by adding more samples the classifiers are still valid, and we only need some extra classifier modules for the extra data. Also, the classifiers don’t have to be identical, and we could choose classifiers for each different subproblems.

When combining the results, M3 network follows two principles, the minimization and maximization principles. The minimization principle requires that all the modules with the same positive training set combine prediction by taking minimum among prediction of all modules. The maximization principle requires that all the modules with the same negative training set combine prediction by taking maximum among all modules.

Page 10: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig. 7 Task decomposition in M3 network

With the above approaches, the system could already identify artifacts automatically. The problem lies in the weakness of ICA. Since the problem that ICA deals with is underdetermined, in practice neurological phenomenon often leaks into the components of artifacts. This results in weakened neurological phenomenon in processed EEG records. One technique to solve this is to make use of wavelet denoising method [12]. Wavelet denoising method could easily separate the major component in the signal waves especially when their kurtosis is high. In practice the neurological phenomenon signals are much weaker than the artifacts, and thus the neurological phenomenon signals would be the “noise” that is filtered out by wavelet denoising. Then after wavelet denoising we just need to add the “noise” back to enhance the performance.

Page 11: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig. 8 Flow chart of online artifact removal algorithm

Note that some “bad” independent components are weak and they don’t have high kurtosis, which means that wavelet denoising might not separate the useful signals so well. In that case, all we can do is to discard these signals so that the signals are not contaminated again. This implies that thresholding on the kurtosis will be a useful technique.

Vigilance Estimation ExperimentAs validation experiment, we picked the vigilance estimation experiment that’s currently undergoing in the lab. Vigilance is a term which describes the ability of subjects to maintain their focus of attention and to remain alert to stimuli for a prolonged period of time. It is of great importance to be able to check if one, especially one who is operating heavy equipment or performing vital jobs such as flight control, is vigilant enough in order to avoid accidents and tragedies. In order to estimate human’s vigilance, we need the subjects to respond to stimuli as soon as possible, and we need to figure out a way to correlate their performance with their EEG signals. Hence, we carried out an experiment:a) The task is to respond to the stimuli from the screen in front of the subject as quickly as possible.b) The stimuli are various kinds of traffic signs that have four different colors.c) Subjects are required to respond by pushing four buttons with four different color labels.d) Their performance is reflected in the aspects of the response time and the accuracy of

responses.

Page 12: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

fig.9 Example stimuli

The stimuli are generated at random intervals of several seconds. During the experiment, subjects’ EEG signals are recorded as well as the events of stimuli and responses. The response time and accuracy are used as the indicators of different levels of vigilance (in this project I only use smoothened response time as indicator). Hence, the task is to find a framework that correlate the online data flow of EEG signals with subjects’ performance.

fig.10 Response example

When developing the framework, I tried fuzzy C-mean algorithm first. It is implemented in the Matlab library. Since it didn’t perform well, I then turned to HMM-AR (autoregressive hidden Markov model).

This model consists of four main steps:1, Feature extraction using wavelet packet.2, AR-HMM model Initialization using ARfit.3, Learning HMM model using EM4, Using Viterbi algorithm to estimate the most likely state path

The hidden state sequence is taken as the estimation of vigilance level. Since the EM algorithm is like a gradient descent algorithm, the start point is of great importance. Kalman filter is capable of estimating observations and producing good initial point. There is one implementation in a toolbox written by Kevin Murphy.

Transition matrix is initialized like this:

1− 1d

1d

0

12d

1− 1d

12d

0 1d

1− 1d

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

Page 13: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

The prior distribution is initialized as ones(1,S)/SWhere S = numberOfStates. The mean matrix is initialized as yt−Ft ai

, where yt is the

observation at time t, Ft =−[yt−1, yt−2,..., yy−p ] , and ai is the AR coefficient, and i

2 is the state noise also estimated with Kalman filter.The EM process is then trying to maximizing its log-likelihood to itself. Then with the sequences of coefficients, the Viterbi path could be calculated.

ResultsWe adopted the vigilance estimation experiment to validate the effect of the online artifact removal method by checking whether the absolute value of correlation between the estimated vigilance level and the response time is increased. Note that if certain response is fallacious, the corresponding response time in that window is set to be 2 seconds, which is above normal. The traffic sign experiments involved 14 subject in a total of 29 trials. Scalp maps are manually labeled, and the dataset looks like this:

Item Count Ratio

Neurological phenomenon components 361 19.15%

Artifact components 1524 80.85%

EOG-related artifact components 645 34.22%

Other artifact components 879 46.63%

Total 1885 100.00%

F1 score is used as the evaluation metrics for classifying artifact components. 83% of the data is used for training and 17% for testing. The test set consists of 61 “good” components and 264 “bad” components. By using SMOTE sampling with weighted SVM with oversampling rate of 20% and imbalance ratio of 1:3.5 the F1 score is 0.7112 where as M3-SVM network achieved 0.8188.

In the validation experiment the ICA algorithm that is used is the FastICA, and the mother wavelet used in denoising is bior3.5. All the data is down-sampled to 100Hz. The electrodes that are chosen includes FP1, FP2, AF4, F4, F6, FT8, T7, C5, C3, C1, CZ, C2. The threshold on kurtosis is set to be 2.25 based on empirical values.

Vigilance Estimation Experiment: Correlation between prediction curve and mark curveTrial Raw “Artifact-free”

1 -0.08424 0.4822

2 0.9653 0.9635

3 -0.31 0.7709

4 -0.6716 0.8081

Page 14: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

Vigilance Estimation Experiment: Mean Square Error between prediction curve and mark curve

Trial Raw “Artifact-free”

1 0.3843 0.09516

2 0.07155 0.01574

3 0.2867 0.1145

4 0.02337 0.01455

Page 15: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology
Page 16: Online Artifact Removal on An EEG-based BCI SystemOnline Artifact Removal on An EEG-based BCI System Sheng Zha szha@umd.edu Abstract Brain-computer interface system, as a new technology

Reference[1] M. Fatourechi, A. Bashashati, R. K. Ward, G. E. Birch. EMG and EOG artifacts in brain computer interface systems: A survey[M]. Clinical Neurophysiology 118 (2007) 480–494.[2] X. Y. Yong, R. K. Ward, G. E. Birch. Generalized Morphological Component Analysis for EEG Source Separation and Artifact Removal[C]. Proceedings of the 4th International IEEE EMBS Conference on Neural Engineering Antalya, Turkey, April 29 - May 2, 2009. IEEE 978-1-4244-2073-5/09[3] H. S. Huang, N. R. Pal, L. W. Ko, C. T. Lin. Automatic Identification of Useful Independent Components with a View to Removing Artifacts from EEG Signal[C]. Proceedings of International Joint Conference on Neural Networks, Atlanta, Georgia, USA, June 14-19, 2009. IEEE 978-1-4244-3553-1/09[4] R. B. Wang, C. H. Hou, D. Chen. Blind Separation of Instantaneous Linear Mixtures of Cyclostationary Signals[C]. IEEE 978-1-4244-5555-3/10[5] G. Bartels, L. C. Shi, B. L. Lu. Automatic Artifact Removal from EEG - A Mixed Approach Based on Double Blind Source Separation and Support Vector Machine[R].[6] A. Hyvarinen, J. Karhunen, E. Oja. Independent Component Analysis[M].[7] C. W. Hesse. The FastICA Algorithm With Spatial Constraints[C]. IEEE SIGNAL PROCESSING LETTERS, VOL. 12, NO. 11, NOVEMBER 2005.[8] R. Akbani, S. Kwek, N. Japkowicz. Applying Support Vector Machines to Imbalanced Datasets.[9] M. T. Akhtar, C. J. James, W. Mitsuhashi. Modifying the Spatially-Constrained ICA for Efficient Removal of Artifacts from EEG Data[C]. IEEE 978-1-4244-4713-8/10[10] A. C. Tang, B. A. Pearlmutter, N. A. Malaszenko, D. B. Phung. Independent Components of Magnetoencephalography: Single-Trial Response Onset Times[R].[11] S. Y. Shao, K. Q. Shen, C. J. Ong, Automatic EEG Artifact Removal: A Weighted Support Vector Machine Approach With Error Correction[C]. IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 56, NO. 2, FEBRUARY 2009[12] G. Inuso, F. La Foresta, N. Mammone, F. C. Morabito. Wavelet-ICA methodology for efficient artifact removal from Electroencephalographic recordings[C]. IEEE 1-4244-1380-X/07[13] X. L. Li, J. Li, X. Yao. A wavelet-based data pre-processing analysis approach in mass spectrometry[J]. Computers in Biology and Medicine 37 (2007) 509 – 516.[14] R. Akbani, S. Kwek, N. Japkowicz. Applying Support Vector Machines to Imbalanced Datasets[R].[15] Y. Wang, M. T. Sutherland, L. L. Sanfratello, A. C. Tang. Single-Trial Classification of ERPs Using Second-Order Blind Identification (SOBI)[R].[16] J. Sherwood, R. Derakhshani. On Classifiability of Wavelet Features for EEG-Based Brain-computer Interfaces[R]. IEEE 10.1.1.156.5665.[17] L. A. Fraiwan, Y. Khaswaneh, K. Y. Lweesy. Automatic Sleep Stage Scoring with Wavelet Packets Based on Single EEG Recoding[J]. World Academy of Science, Engineering and Technology v54-85 2009[18] H. B. He, E. A. Garcia. Learning from Imbalanced Data[J]. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 21, NO. 9, P1263, SEPTEMBER 2009[19] A. Hyvarinen, J. Karhunen, E. Oja. Independent Component Analysis[M]. Wiley-Interscience. JOHN WILEY & SONS, INC.[20] A. Greco, N. Mammone, F. C. Morabito, M. Versaci. Kurtosis, Renyi’s Entropy and Independent Component Scalp Maps for the Automatic Artifact Rejection from EEG data[J]. World Academy of Science, Engineering and Technology 21 2006.