Maths for Brain Imaging: Lecture 10 - FIL | UCLwpenny/mbi/lecture10.pdfMaths for Brain Imaging:...

Preview:

Citation preview

Maths for Brain Imaging: Lecture 10

W.D. PennyWellcome Department of Imaging Neuroscience,

University College, London WC1N 3BG.

December 13, 2006

1 Contents

• Central Limit Theorem

• Independent Component Analysis

• Application: Removing EEG artefacts

• Discriminant analysis

• Application: Estimating perceptual state from fMRI

1

2 Central Limit Theorem

Given n samples from any probability distribution, thedistribution of the sample mean becomes Gaussian asn → ∞. For proof see [6]. A caveat is that the samplevariance must be finite.

More formally, if y1, y2, ..., yn are Independent and Iden-tically Distributed (IID) random variables with E[yi] =µ and V ar[yi] = σ2 < ∞ and

yn =1

n

n∑i=1

yi (1)

un =√

n

(yn − µ

σ

)

then p(un) converges to a standard Gaussian density asn →∞. This is the Central Limit Theorem (CLT).

The CLT can be extended to Independent and Non-Identically Disributed (IND) random variables, as longas E[yi] and V ar[yi] are finite.

This implies that if you have a Gaussian observation

2

then its a ‘mixture’ (average or weighted average) of non-Gaussian signals. ICA attempts to find the underlyingsignals by looking for projections of the observations thatare most non-Gaussian. This is implemented either (i)informally, by maximising an index of non-Gaussianitysuch as kurtosis, E[(yi − µ)4] (a Gaussian has zero kur-tosis) or (ii) formally by specifying a probability modelwhere the sources are non-Gaussian.

3

Figure 1: Take n samples from an exponential PDF, compute the sample mean.Do this multiple times to get an empirical estimate of the distribution of thesample mean. As n increases, the distribution becomes Gaussian.

4

Figure 2: Take n/2 samples from an exponential PDF and n/2 from a uniformPDF, compute the sample mean. Do this multiple times to get an empiricalestimate of the distribution of the sample mean. As n increases, the distributionbecomes Gaussian. 5

3 Independent Component Analysis

In Independent Component Analysis (ICA) an M-dimensionalvector observation y is modelled as

y = Xβ (2)

where X is an unknown mixing matrix and β an un-known M -dimensional source vector. The matrix X istherefore M × M . If we know p(β), then using themethod of transforming probability densities we can writethe likelihood of an observation as

p(y) =p(β)

| det X|(3)

The determinant measures the volume of a matrix. SoEq 3. takes into account volumetric changes in the trans-formation, so that probability mass is preserved as wetransform β into y.

ICA assumes the sources to be Independent (this is

6

the I in ICA)

p(β) =M∏i=1

ps(βi) (4)

We can therefore write the likelihood as

p(y) =

∏Mi=1 ps(βi)

| det X|(5)

The log-likelihood is then given by

log p(y) = − log | det X|+M∑i=1

log ps(βi) (6)

We can write the unknown sources as

β = X−1y (7)

= Ay

where A = X−1 is the inverse mixing matrix. We canalso write βi =

∑Mj=1 Aijyj and express the log-likelihood

as

log p(y) = log | det A|+M∑i=1

log ps(M∑

j=1Aijyj) (8)

7

The log-likelihood is now a function of the data and theinverse mixing matrix.

If we have n = 1..N independent samples of data, Y ,the likelihood is

log p(Y ) = N log | det A|+N∑

n=1

M∑i=1

log ps(M∑

j=1Aijynj) (9)

We can find A by giving this function to any optimisationalgorithm. As elements of A become co-linear | det A| →0, and the likelihood reduces. Maximising the likelihoodtherefore encourages sources to be different (via the firstterm) and encourages them to be similar to ps ie. non-Gaussian (via the second term).

3.1 Source densities

Different ICA models result from different assumptionsabout the source densities ps(βi). One possibility is thegeneralised exponential family. Another is the ‘inverse

8

cosh’ density

ps(βi) =1

cosh(βi)(10)

=1

exp βi + exp−βi

This latter choice gives rise to the original ‘Infomax’ al-gorithm [1].

9

Figure 3: Generalised exponential densities ps(βi) ∝ exp(−|βi

σ |R)with R = 1

(Blue, ’Laplacian density’), R = 2 (Green, ’Gaussian density’), R > 20 (Red,’Uniform density’). The parameter σ defines the width of the density.

10

Figure 4: Inverse Cosh, 1exp βi+exp−βi

(Blue) and Gaussian, exp−β2i (Green)

11

(a)

(b)

Figure 5: Probability contours, p(y), from 2D-ICA models with (a) Gaussiansources and (b) Heavy-tailed sources. The mixing matrices X are the same.

12

3.2 Removing EEG artefacts

Jung et al. [5] use ICA to remove artefacts from EEGdata recorded from 20 scalp electrodes placed accordingto the 10/20 system and 2 EOG electrodes, all refer-ences to the left mastoid. The sampling rate was 256Hz.An ICA decomposition was implemented by applying anextended Infomax algorithm to 10-second EEG epochsto produce sources with time series that are maximallyindependent.

This artefact removal method compares favourably toPCA and filtering approaches, and approaches for eye-movement correction based on dipole models and regres-sion [5]. It has been incorporated in the EEGLAB avail-able from http://sccn.ucsd.edu/eeglab/.

13

Figure 6: Original 5-second EEG record, containing prominent slow eye-movement (seconds 2 to 4).

14

Figure 7: Left panel: Time course of source estimates βni for n=1..N samples(N=5 x 256), and i=1..22 sources. Right panel: Spatial topographies (rows ofmixing matrix X) for 5 selected components. The top two components accountfor eye movement and the bottom three for muscle activity over fronto-temporalregions. 15

Figure 8: Corrected EEG formed by subtracting five selected components fromoriginal data. This data is free from EOG and muscle artifacts. We can nowsee activity in T3/T4 that was previously masked by muscle artifact.

16

4 Discriminant analysis

4.1 Linear decision boundary

The aim of discriminant analysis is to estimate class labely = {1, 2} given multivariate data x. This could be eg.y = 1 for patients and y = 2 for controls. One approachis to use labelled data to form a likelihood model for eachclass, p(x|y). New data points are then assigned to theclass with the highest likelihood. Another way of sayingthis is to form the Likelihood Ratio (LR)

LR12 =p(x|y = 1)

p(x|y = 2)(11)

and assign to class 1, if LR12 is greater than one. Ac-cording to the Neymann-Pearson Lemma (see eg. [3])this test has the highest sensitivity, for any given levelof specificity. Any monotonic function of LR12 will pro-vide as good a test as the likelihood, and the logarithmis often used.

If, additionally, we have prior probabilities for each

17

category, p(y) then the optimal decision is to assign tothe class with the highest posterior probability. For class1 we have

p(y = 1|x) =p(x|y = 1)p(y = 1)

p(x|y = 1)p(y = 1) + p(x|y = 2)p(y = 2)(12)

For equal priors this reduces to an LR test.A simple likelihood model for each class is a Gaus-

sian. The above posterior probability is then the sameas the ‘responsibilty’ in a Gaussian mixture model (seelast lecture). It can be re-written as

p(y = 1|x) =1

1 + p(x|y=2)p(y=2)p(x|y=1)p(y=1)

(13)

=1

1 + exp(−a)

= g(a)

18

where g(a) is the ‘sigmoid’ or ‘logistic’ function and

a = log

p(x|y = 1)p(y = 1)

p(x|y = 2)p(y = 2)

(14)

For Gaussians with equal covariances Σ1 = Σ2 = Σ wehave

log p(x|y = 1) =d

2log 2π +

1

2log |Σ| (15)

− 1

2(x− µ1)

TΣ−1(x− µ1)

log p(x|y = 2) =d

2log 2π +

1

2log |Σ|

− 1

2(x− µ2)

TΣ−1(x− µ2)

This givesa = wTx + w0 (16)

where

w = Σ−1(µ1 − µ2) (17)

19

w0 = −1

2µT

1 Σµ1 +1

2µT

2 Σµ2 + logp(y = 1)

p(y = 2)

This approach is known as logistic discrimination or lo-gistic classification. The decision boundary is given bya = 0.

4.2 Nonlinear decision boundary

If the Gaussians do not have equal covariance then thedecision boundary becomes quadratic. If Gaussians arenot good models of the class probability densities thenanother approach is required eg. Nearest Neighbour clas-sifiers, or Multi-Layer Perceptrons (MLPs). An MLPcomprises nested logistic functions.

20

A two-layer MLP is given by

p(y = 1|x) = g

H∑h=1

w(2)h zh

(18)

zh = g

D∑d=1

w(1)hd xd)

with D is the dimension of the input x, H is the numberof ’hidden units’ in the ’first layer’, and zh is the outputof the hth unit. Superscripts 1 and 2 denote 1st and2nd layer weights. This allows for classification usingarbitrary decision boundaries. There is no closed formfor the parameters w, but they can be estimated usingan optimisation algorithm as described in [2]. This is anexample of an Artificial Neural Network (ANN).

21

Figure 9: Tremor data. Crosses represent data points from patients y = 1,circles data points from normal subjects, y = 2. The solid line shows the overalldecision boundary formed by an MLP with three hidden units. The shade ofgray codes the output, p(y = 1|x) and the features, x, are from autoregressivemodelling of EMG data.

22

5 Estimating perceptual state from fMRI

Haynes and Rees [4] used Linear Discriminant Analy-sis (LDA) to classify perceptual state during binocularrivalry from fMRI data.

Retinotopic mapping and functional localisers (revers-ing checkerboard stimuli) were used to identify the V1,V2, V3 and V5 regions of visual cortex. The 50 most vi-sually responsive voxels in each region were then selectedfor subsequent analysis.

Subjects then viewed rivalrous stimuli, and pressedbuttons to indicate perceptual state, yt = 1 for red per-cept and yt = 2 for blue percept. Activity in selectedvoxels xt were then used to estimate yt. The labels yt

were time-shifted to accomodate the delay in the hemo-dynamic response.

Estimates of perceptual state were then formed using

yt = wTxt (19)

w = Σ−1(µred − µblue)

23

Figure 10: Functional localiser (4Hz reversing checkerboard) is used to select 50visually responsive voxels in each region.

24

where Σ is the within group sample covariance (esti-mated from both red and blue fMRI samples) and mred

and mblue are the mean fMRI vectors for each condition.These estimates were then time-shifted, by convolvingwith a ‘Canonical HRF’ before comparison with true val-ues. Cross-validation was used to assess accuracy.

25

Figure 11: A: Superimposed gratings viewed through red/blue filtering glasses.B: Subjects pressed buttons indicating perceptual state. C: Percept durationsfor four subjects.

26

Figure 12: Accuracy by region assessed using cross-validation.

27

Figure 13: Accuracy by number of voxels assessed using cross-validation.

28

References

[1] A.J. Bell and T.J. Sejnowski. An information maximisation ap-proach to blind separation and blind deconvolution. Neural Com-putation, 7(6):1004–1034, 1995.

[2] C.M. Bishop. Neural Networks for Pattern Recognition. OxfordUniversity Press, Oxford, 1995.

[3] P. Dayan and L.F. Abbott. Theoretical Neuroscience: Compu-tational and Mathematical Modeling of Neural Systems. MITPress, 2001.

[4] J.D. Haynes and G. Rees. Predicting the stream of consciousnessfrom activity in human visual cortex. Current Biology, 15:1301–1307, 2005.

[5] T. Jung, S. Makeig, C. Humphries, T. Lee, M. J. McKeown,V. Iragui, and T. J. Sejnowski. Removing Electroencephalo-graphic Artifacts by Blind Source Separation. Psychophysiology,1999.

[6] D.D. Wackerley, W. Mendenhall, and R.L. Scheaffer. Mathemat-ical statistics with applications. Duxbury Press, 1996.

29

Recommended