Independent Component Analysis for 
identification of artifacts in 
Magnetoencephalographic recordings 
Ricardo Vighrio ; Veikko Jousmiiki 2, 
Matti Hiim/iliiinen 2, Riitta Hari 2, and Erkki Oja  
 Lab. of Computer & Info. Science 
Helsinki University of Technology 
P.O. Box 2200, FIN-02015 HUT, Finland 
{Ricardo.Vigario, Erkki.Oja}@hut.fi 
2Brain Research Unit, Low Temperature Lab. 
Helsinki University of Technology 
P.O. Box 2200, FIN-02015 HUT, Finland 
{veikko, msh, hari}@neuro.hut.fi 
Abstract 
We have studied the application of an independent component analysis 
(ICA) approach to the identification and possible removal of artifacts 
from a magnetoencephalographic (MEG) recording. This statistical tech- 
nique separates components according to the kurtosis of their amplitude 
distributions over time, thus distinguishing between strictly periodical 
signals, and regularly and irregularly occurring signals. Many artifacts 
belong to the last category. In order to assess the effectiveness of the 
method, controlled artifacts were produced, which included saccadic eye 
movements and blinks, increased muscular tension due to biting and the 
presence of a digital watch inside the magnetically shielded room. The 
results demonstrate the capability of the method to identify and clearly 
isolate the produced artifacts. 
1 Introduction 
When using a magnetoencephalographic (MEG) record, as a research or clinical tool, the 
investigator may face a problem of extracting the essential features of the neuromagnetic 
* Corresponding author 
230 R. Vigdrio, V. Jouxmtiki, M. Hi#niilainen, R. Hari and E. Oja 
signals in the presence of artifacts. The amplitude of the disturbance may be higher than 
that of the brain signals, and the artifacts may resemble pathological signals in shape. For 
example, the heart's electrical activity, captured by the lowest sensors of a whole-scalp 
magnetometer army, may resemble epileptic spikes and slow waves (Jousm',J and Had 
1996). 
The identification and eventual removal of artifacts is a common problem in electroen- 
cephalography (EEG), but has been very infrequently discussed in context to MEG (Had 
1993; Berg and Scherg 1994). 
The simplest and eventually most commonly used artifact correction method is rejection, 
based on discarding portions of MEG that coincide with those artifacts. Other methods 
tend to restrict the subject from producing the artifacts (e.g. by asking the subject to fix the 
eyes on a target to avoid eye-related artifacts, or to relax to avoid muscular artifacts). The 
effectiveness of those methods can be questionable in studies of neurological patients, or 
other non-co-operative subjects. In eye artifact canceling, other methods are available and 
have recently been reviewed by Vigilrio (1997b) whose method is close to the one presented 
here, and in Jung et al. (1998). 
This paper introduces a new method to separate brain activity from artifacts, based on the 
assumption that the brain activity and the artifacts are anatomically and physiologically 
separate processes, and that their independence is reflected in the statistical relation be- 
tween the magnetic signals generated by those processes. 
The remaining of the paper will include an introduction to the independent component 
analysis, with a presentation of the algorithm employed and some justification of this ap- 
proach. Experimental data are used to illustrate the feasibility of the technique, followed 
by a discussion on the results. 
2 Independent Component Analysis 
Independent component analysis is a useful extension of the principal component analysis 
(PCA). It has been developed some years ago in context with blind source separation ap- 
plications (Jutten and Herault 1991; Comon 1994). In PCA. the eigenvectors of the signal 
covadance matrix C = E{xx :v} give the directions of largest variance on the input data 
x. The principal components found by projecting x onto those perpendicular basis vectors 
are uncorrelated, and their directions orthogonal. 
However, standard PCA is not suited for dealing with non-Gaussian data. Several au- 
thors, from the signal processing to the artificial neural network communities, have shown 
that information obtained from a second-order method such as PCA is not enough and 
higher-order statistics are needed when dealing with the more demanding restriction of 
independence (Jutten and Herault 1991; Comon 1994). A good tutorial on neural ICA im- 
plementations is available by Karhunen et al. (1997). Th'e particular algorithm used in this 
study was presented and derived by Hyv/irinen and Oja (1997a, 1997b). 
2.1 The model 
In blind source separation, the original independent sources are assumed to be unknown, 
and we only have access to their weighted sum. In this model, the signals recorded in an 
MEG study are noted as a:k (i) (i ranging from 1 to L, the number of sensors used, and 
k denoting discrete time); see Fig. 1. Each a:k (i) is expressed as the weighted sum of M 
ICA for Identification of Artifacts in MEG Recordings 231 
independent signals sk (j), following the vector expression: 
M 
xk - E a(j)sk(j) - Ask, (1) 
j--1 
where xk = [xk (1),..., xk (L)] T is an L-dimensional data vector, made up of the L mix- 
tures at discrete time k. The sk(1),..., sk(M) are the M zero mean independent source 
signals, and A = [a(1),..., a(M)] is a mixing matrix independent of time whose elements 
aij are the unknown coefficients of the mixtures. In order to perform ICA, it is necessary 
to have at least as many mixtures as there are independent sources (L _ M). When this 
relation is not fully guaranteed, and the dimensionality of the problem is high enough, 
we should expect the first independent components to present clearly the most strongly 
independent signals, while the last components still consist of mixtures of the remaining 
signals. In our study, we did expect that the artifacts, being clearly independent from the 
brain activity, should come out in the first independent components. The remaining of the 
brain activity (e.g. a and/ rhythms) may need some further processing. 
The mixing matrix A is a function of the geometry of the sources and the electrical conduc- 
tivities of the brain, cerebrospinal fluid, skull and scalp. Although this matrix is unknown, 
we assume it to be constant, or slowly changing (to preserve some local constancy). 
The problem is now to estimate the independent signals sk (j) from their mixtures, or the 
equivalent problem of finding the separating matrix B that satisfies (see Eq. l) 
gk = Bxk. (2) 
In our algorithm, the solution uses the statistical definition of fourth-order cumulant or 
kurtosis that, for the ith source signal, is defined as 
kurt(s(i)) = E(s(i) 4} - 3[E{s(i)2}] 2, 
where E(s) denotes the mathematical expectation of s. 
2.2 The algorithm 
The initial step in source separation, using the method described in this article, is whiten- 
ing, or sphering. This projection of the data is used to achieve the uncorrelation between 
the solutions found, which is a prerequisite of statistical independence (Hyv'irinen and Oja 
1997a). The whitening can as well be seen to ease the separation of the independent sig- 
nals (Karhunen et al. 1997). It may be accomplished by PCA projection: v = x, with 
E{vv T } = I. The whitening matrix V is given by 
V -- A-l/2?-, T, 
where A = diag[,X(1),..., ,X(M)] is a diagonal matrix with the eigenvalues of the data 
covariance matrix E{xxT}, and , a matrix with the corresponding eigenvectors as its 
columns. 
Consider a linear combination y = wTv of a sphered data vector v, with IIw[I - 1. Then 
E{y 2 } = 1 and kurt(y) = E{y 4 }-3, whose gradient with respect to w is 4E{v(wTv)3 }. 
Based on this, Hyv'irinen and Oja (1997a) introduced a simple and efficient fixed-point 
algorithm for computing ICA, calculated over sphered zero-mean vectors v, that is able to 
find one of the rows of the separating matrix B (noted w) and so identify one independent 
source at a time -- the corresponding independent source can then be found using Eq. 2. 
This algorithm, a gradient descent over the kurtosis, is defined for a particular k as 
1. Take a random initial vector wo of unit norm. Let 1 = 1. 
232 R. Vigdrio, V. Jousmaki, M. Hiimiiliiinen, R. Had and E. Oja 
2. Let wt = E{v(wtT_v) 3 ) -- 3wt_. The expectation can be estimated using a 
large sample of vk vectors (say, 1,000 vectors). 
3. Divide wt by its norm (e.g. the Euclidean norm Ilwll - 
4. Iflw[wt_ I is not close enough to 1, let 1 = l+ 1 andgo back to step 2. Otherwise, 
output the vector wt. 
In order to estimate more than one solution, and up to a maximum of M, the algorithm 
may be run as many times as required. It is, nevertheless, necessary to remove the informa- 
tion contained in the solutions already found, to estimate each time a different independent 
component. This can be achieved, after the fourth step of the algorithm, by simply sub- 
tracting the estimated solution b = wTv from the unsphered data xk. As the solution is 
defined up to a multiplying constant, the subtracted vector must be multiplied by a vector 
containing the regression coefficients over each vector component of xn. 
3 Methods 
The MEG signals were recorded in a magnetically shielded room with a 122-channel 
whole-scalp Neuromag-122 neuromagnetometer. This device collects data at 61 locations 
over the scalp, using orthogonal double-loop pick-up coils that couple strongly to a local 
source just underneath, thus making the measurement "near-sighted" (Hfimfilfiinen et al. 
1993). 
One of the authors served as the subject and was seated under the magnetometer. He kept 
his head immobile during the measurement. He was asked to blink and make horizontal 
saccades, in order to produce typical ocular artifacts. Moreover, to produce myographic 
artifacts, the subject was asked to bite his teeth for as long as 20 seconds. Yet another 
artifact was created by placing a digital watch one meter away from the helmet into the 
shieded room. Finally, to produce breathing artifacts, a piece of metal was placed next 
to the navel. Vertical and horizontal electro-oculograms (VEOG and HEOG) and electro- 
cardiogram (ECG) between both wrists were recorded simultaneously with the MEG, in 
order to guide and ease the identification of the independent components. The bandpass- 
filtered MEG (0.03-90 Hz), VEOG, HEOG, and ECG (0.1-100 Hz) signals were digitized 
at 297 Hz, and further digitally low-pass filtered, with a cutoff frequency of 45 Hz and 
downsampled by a factor of 2. The total length of the recording was 2 minutes. A second 
set of recordings was performed, to assess the reproducibility of the results. 
Figure 1 presents a subset of 12 spontaneous MEG signals from the frontal, temporal and 
occipital areas. Due to the dimension of the data (122 magnetic signals were recorded), it 
is impractical to plot all MEG signals (the complete set is available on the internet see 
reference list for the adress (Vigilrio 1997a)). Also both EOG channels and the electrocar- 
diogram are presented. 
4 Results 
Figure 2 shows sections of 9 independent components (IC's) found from the recorded data, 
corresponding to a 1 min period, starting 1 min after the beginning of the measurements. 
The first two IC's, with a broad band spectrum, are clearly due to the musclular activity 
originated from the biting. Their separation into two components seems to correspond, on 
the basis of the field patterns, to two different sets of muscles that were activated during 
the process. IC3 and IC5 are, respectively showing the horizontal eye movements and the 
eye blinks, respectively. IC4 represents cardiac artifact that is very clearly extracted. In 
agreement with Jousm'fiki and Hari (1996), the magnetic field pattern of IC4 shows some 
predominance on the left. 
ICA for Identification of Artifacts in MEG Recording s 233 
MEG [- 1000 fT/cm 
EOG E 500 V 
ECG E 500 V 
blinking I I biting I MEG 
It 
I --> 
2t 
- ' r "l n' 
,..t..,,..,, ,.-.,..,,.,, _. 3 '1' 
_L-; -:_.  - ......  --- . ..... , 
- r.'" ' '"","l"'--"r' 3 
[.  ..I _1 ...... t ..... _..il. ,.: '1,, ' . -,-- . 4 ? 
5  
Figure 1: Samples of MEG signals, showing artifacts produced by blinh'ng, saccades, 
biting and cardiac cycle. For each of the 6 positions shown, the two orthogonal directions 
of the sensors are plotted. 
The breathing artifact was visible in several independent components, e.g. IC6 and IC7. It 
is possible that, in each breathing the relative position and orientation of the metallic piece 
with respect to the magnetometer has changed. Therefore, the breathing artifact would be 
associated with more than one column of the mixing matrix A, or to a time varying mixing 
vector. 
To make the analysis less sensible to the breathing artifact, and to find the remaining arti- 
facts, the data were high-pass filtered, with cutoff frequency at 1 Hz. Next, the independent 
component IC8 was found. It shows clearly the artifact originated at the digital watch, 
located to the right side of the magnetometer. 
The last independent component shown, relating to the first minute of the measurement, 
shows an independent component that is related to a sensor presenting higher RMS (root 
mean squared) noise than the others. 
5 Discussion 
The present paper introduces a new approach to artifact identification from MEG record- 
ings, based on the statistical technique of Independent Component Analysis. Using this 
method, we were able to isolate both eye movement and eye blinking artifacts, as well as 
234 R. Vigdrio, V. Jouxmaki, M. Hrnalainen, R. Haft and E. Oja 
cardiac, myographic, and respiratory artifacts. 
The basic assumption made upon the data used in the study is that of independence be- 
tween brain and artifact waveforms. In most cases this independence can be verified by the 
known differences in physiological origins of those signals. Nevertheless, in some event- 
related potential (ERP) studies (e.g. when using infrequent or painful stimuli), both the 
cerebral and ocular signals can be similarly time-locked to the stimulus. This local time 
dependence could in principle affect these particular ICA studies. However, as the inde- 
pendence between two signals is a measure of the similarity between their joint amplitude 
distribution and the product of each signal's distribution (calculated throughout the entire 
signal, and not only close to the stimulus applied), it can be expected that the very local 
relation between those two signals, during stimulation, will not affect their global statistical 
relation. 
6 Acknowledgment 
Supported by a gram from Juma Nacional de Investigafio Ciemifica e Tecno16gica, under 
its 'Programa PRAXIS XXI' (R.V.) and the Academy of Finland (R.H.). 
References 
Berg, P. and M. Scherg (1994). A multiple source approach to the correction of eye 
artifacts. Electroenceph. clin. Neurophysiol. 90, 229-241. 
Comon, P. (1994). Independent component analysis - a new concept? Signal Process- 
ing 36, 287-314. 
Hmlinen, M., R. Haft, R. Ilmoniemi, J. Knuutila, and O. V. Lounasmaa (1993, April). 
Magnetoencephalography theory, instrumentation, and applications to noninvasive 
studies of the working human brain. Reviews of Modern Physics 65(2), 413-497. 
Hari, R. (1993). Magnetoencephalography as a tool of clinical neurophysiology. In 
E. Niedermeyer and F. L. da Silva (Eds.), Electroencephalography. Basic princi- 
ples, clinical applications, and relatedfields, pp. 1035-1061. Baltimore: Williams 
& Wilkins. 
Hyv/irinen, A. and E. Oja (1997a). A fast fixed-point algorithm for independent compo- 
nent analysis. Neural Computation (9), 1483-1492. 
Hyv'firinen, A. and E. Oja (1997b). One-unit learning rules for independent component 
analysis. In Neural Information Processing Systems 9 (Proc. NIPS'96). MIT Press. 
Jousm/iki, V. and R. Had (1996). Cardiac artifacts in magnetoencephalogram. Journal 
of Clinical Neurophysiology 13(2), 172-176. 
Jung, T.-P., C. Humphdes, T.-W. Lee, S. Makeig, M. J. McKeown, V. Iragui, and 
T. Sejnowski (1998). Extended ica removes artifacts from electroencephalographic 
recordings. In Neural Information Processing Systems 10 (Proc. NIPS'97). MIT 
Press. 
Jutten, C. and J. Herault (1991). Blind separation of sources, part i: an adaptive algo- 
rithm based on neuromimetic architecture. Signal Processing 24, 1-10. 
Karhunen, J., E. Oja, L. Wang, R. Vigilrio, and J. Joutsensalo (1997). A class of neural 
networks for independent component analysis. IEEE Trans. Neural Networks 8(3), 
1-19. 
Vigilrio, R. (1997a). WWW adress for the MEG data: 
http://nucleus.hut.fi/-rvigario/NIPS97_data.html. 
Vigilrio, R. (1997b). Extraction of ocular artifacts from eeg using independent compo- 
nent analysis. To appear in Electroenceph. clin. Neurophysiol. 
ICA for Identification of Artifacts in MEG Recordings 235 
a.  ,l,, ha, I., t J,.& . ...l.. .... . Jt.,.aa,.,h , .,t., L I ........  .... J .r,a. L. ., k,..,. . n.. &_,.t .,, j- tk  . Ll,.,a ......, 
iW..-,ls-.....r-,,-.. m ,r-,,rT.-F.r. ., T.-r.-..-----,.-.- -',w,..,  ' Pl' .r ,r  ,"-  F""lr"'"mY'lqr'"w'""Pl'Y""'  " ,,F  
I I 
los 
Figure 2: Nine independent components found from the MEG data. For each component the 
left, back and right views of the field patterns generated by these components are shown -- 
full line stands for magnetic flux coming out from the head, and dotted line the flux inwards. 
