Sie sind auf Seite 1von 63

Source localization for EEG and MEG

Methods for Dummies 2006 FIL


Bahador Bahrami

Before we start
SPM5 and source localization:
On-going work in progress

MFD and source localization:


This is the first on this topic

Main references for this talk:


Jeremie Mattouts slides from SPM course Slotnick S.D. chapter in Todd Handys ERP handbook Rimona Weils wonderful help (thanks Rimona!)

Outline
Theoretical
Source localization stated as a problem Solution to the problem and their limitations

Practical*
How to prepare data Which buttons to press What to avoid What to expect

* Subject to change along with the development of SPM 5

Source localization as a problem

+ -

+ -

Any field potential vector could be consistent with an infinite number of possible dipoles

The possibilities only increase with tri-poles and quadra-poles

ERP and MEG give us

And source localization aims to infer

+ among

How do we know which one is correct?


+ -

+ -

We cant. There is no correct answer.


Source localization is an ILL-DEFINED PROBLEM

We can only see which one is better


Can we find the best answer?
Only among the alternatives that you have considered.

HUNTING for best possible solution


Step ONE: How does your data look like?

MEG sensor location

Source Reconstruction Registration


MEG data

HUNTING for best possible solution


Step Two If
then

If

then

FORWARD MODEL
If
then

If

then

And on and on and on and

HUNTING for best possible solution


Forward Model Experimental DATA

Inverse Solution

Which forward solutions fit the DATA better (less error)?

HUNTING for best possible solution


Forward DATA

Inverse Solution

Iterative Process
Until solution stops getting better (error stabilises)

error

iteration

Components of the source reconstruction process


Source model
ECD Imaging

Forward model

Registration Inverse method


Data Anatomy

Recipe for Source localization in SPM5


Ingredients
MEG converter has given you
.MAT data file (contains experimental data) sensloc file (sensors locations) sensorient (sensors orientations) fidloc (fiducial locations in MEG space)

All in the same folder

fidloc in MRI space (we will see shortly) Structural T1 MRI scan

fidloc in MRI space


X Nasion X Left Tragus X Right Tragus YNasion YLeft Tragus YRight Tragus Z Nasion Z Left Tragus Z Right Tragus

Get these using SPM Display button Save it as a MAT file in the same directory as the data

Components of the source reconstruction process

Source model

Registration

Forward model

Inverse solution

Source model

Source model
Compute transformation T

Individual MRI Templates

Apply inverse transformation T-1

Individual mesh

functions
- Individual MRI - Template mesh - spatial normalization into MNI template - inverted transformation applied to the template mesh

output
- individual mesh

Scalp Mesh iskull mesh

Components of the source reconstruction process

Registration

Registration
fiducials

fiducials

Rigid transformation (R,t)

Individual sensor space Individual MRI space

input
- sensor locations - fiducial locations
(in both sensor & MRI space)

functions - registration of the EEG/MEG data into


individual MRI space

output
- registrated data - rigid transformation

- individual MRI

jm1

Forward model

Slide 32 jm1 In SPM5, the Imaging pipeline requires processing the four main steps successively: - Source model Defining a cortical mesh of dipoles for a given individual - Registration is independent of the source model... so could be performed before - Forward model requires the two previous step to have been completed - Inverse solution requires the three previous components Let's consider those steps one by one...
jmattout, 4/20/2005

Foward model

Compute for each dipole

+
n
Individual MRI space Model of the head tissue properties

K
Forward operator

input
- sensor locations - individual mesh

functions
- single sphere - three spheres - overlapping spheres - realistic spheres

output
- forward operator K

BrainStorm

jm2

Inverse solution

Slide 36 jm2 In SPM5, the Imaging pipeline requires processing the four main steps successively: - Source model Defining a cortical mesh of dipoles for a given individual - Registration is independent of the source model... so could be performed before - Forward model requires the two previous step to have been completed - Inverse solution requires the three previous components Let's consider those steps one by one...
jmattout, 4/20/2005

jm7

Inverse solution (1) - General principles


General Linear Model

Cortical mesh

1 dipole source per location

Under-determined GLM

Y = KJ+ E
[nxt] [nxp][pxt] [nxt]

n : number of sensors p : number of dipoles t : number of time samples

Regularized solution

2 ^ J : min( ||Y KJ|| + f(J) ) J


data fit priors

Slide 37 jm7 We consider one dipole per location and is oriented perpendicularly to the surface (following the orientation of the cortical neuron dendrites). (I am thinking of proposing also a three-dipoles per location model, but not in the first release of the toolbox) In Imaging, the problem comes down to a GLM formulation that one has to invert. Contrarery to the fMRI GLM, this one is higly under-determined since p >> n. Regularization is required, which consists of minimizing a twofold criterion made of a data fit term and a prior term. To give rise to a realistic and reliable solution, the prior term needs to be defined carefully and the two terms have to be optimally relatively weighted.
jmattout, 4/20/2005

jm8

Inverse solution (2) - Parametric empirical Bayes


2-level hierarchical model

Gaussian variables Gaussian variables with unknown variance with unknown variance

Y = KJ + E1 E1 ~ N(0,Ce) J = 0 + E2
E2 ~ N(0,Cp)

Sensor level

Source level

Linear parametrization of the variances

Ce = Q1.Qe1 + + Qq.Qeq Cp = 1.Qp1 + + k.Qpk

Q: variance components (Q, ): hyperparameters

Slide 38 jm8 SPM uses a Parametric empirical Bayesian approach, based on the following 2-level hierarchical model: - 1st level, the previous GLM - 2nd level, the unknown source parameters are considered as a gaussian random variable with zero mean (shrinkage prior) and unknown variance. Contrary to the classical Minimum Norm or Weighted Minimum Norm approach, the noise and source variances are considered unknown and are estimated together with the source amplitudes. Therfore, the variances are parameterized as a linear combination of variance components. - At the sensor level, several variance components can be considered such as an identity matrix (noise i.i.d), an empirical estimate of the noise variance (rest acquisition and/or data anti-averaging) - At the source level, all sorts of prior which can be expressed in terms of variance component can be incorporated The corresponding weights or hyperparameter are estimated in the PEB approach.
jmattout, 4/20/2005

jm9

Inverse solution (3) - Parametric empirical Bayes


Bayesian inference on model parameters

Model M

+
J K

Q e1 , , Q eq Q p1 , , Qpk Q,

Inference on J and (Q, )


Maximizing the log-evidence

F = log( p(Y|M) ) = log( p(Y|J,M) ) + log( p(J|M) ) dJ


data fit priors

Expectation-Maximization (EM)

E-step: maximizing F wrt J M-step: maximizing of F wrt (Q, )

^ J = CJKT[Ce + KCJ KT]-1Y Ce + KCJKT = E[YYT]

MAP estimate ReML estimate

Slide 39 jm9 Given a model M, PEB provides inference on the parameters and hyperparameters of M. Note that M is defined by the source model (associated with J, the mesh and its particular size), the forward calculation attached to it and the considered variance components. Inference is made by maximizing the log-evidence (maybe you should show what is the evidence in the Bayes law !?). In the formulation of the log-evidence one recognizes the two terms of a regularization process. In SPM, this is solved using an iterative EM algorithm. The E-step provides the Maximum A Posteriori estimate of the source amplitudes. The M-step provides the ReML estimates of the hyperparameters, accounting for the loss of degrees of freedom due to the E-step and so that the predicted data covariance matrix should fit the empirical data covariance best. Importantly, the PEB approach enables the user to accomodate multiple priors and to weight their contribution optimally, according to the data (data-driven estimate of the hyperparameters, contrary to the classical and so-called L-curve approach).
jmattout, 4/20/2005

jm10

Inverse solution (4) - Parametric empirical Bayes


Bayesian model comparison
Model evidence
Relevance of model M is quantified by its evidence p(Y|M) maximized by the EM scheme

Model comparison
Two models M1 and M2 can be compared by the ratio of their evidence B12 = p(Y|M1) p(Y|M2) Bayes factor

Model selection using a Leaving-one-prior-out-strategy

Slide 40 jm10 Finally, given a particular data set, PEB allows evaluating the relevance of the model M. Indeed, the higher the maximized log-evidence, the more relevant the model. Then, model comparison can be performed and two models can be quantatively compared using their Bayes factor (the ratio of their log-evidence). The Bayes factor can then be interprated probabilistically as proposed by Kass & Raftery (1995) or as done with DCMs (Penny 2004). For instance, if B12 = 1, there's no evidence in favor of any of the model. If B12 > 20, there is a strong evidence in favor of model M1. This becomes very useful for chosing the optimal sets of priors. Indeed, based on Bayes factor, one can adopt a 'Leaving one out strategy' and thus evaluate the effect of each prior and finally chose the prior model which yields the higher evidence.
jmattout, 4/20/2005

jm11

Inverse solution (5) - implementation

input
- preprocessed data - forward operator - individual mesh - priors

functions
- compute the MAP estimate of J - compute the ReML estimate of (Q, ) - interpolate into individual MRI voxel-space

output
- inverse estimate - model evidence

ECD approach
- iterative forward and inverse computation

Slide 41 jm11 Well, just read the slide more or less... with a mention of Christophe's approach that will be also available. Note that for the ECD approach, the foward operator will have to be recomputed along the iterative inverse process. Note also that interpolation from the mesh to the MRI voxels can be performed... then enabling to derive SPMs. Thanks to the use of a template mesh, this can be easily performed directly into the MNI template for inter-subject comparison or group analysis.
jmattout, 4/20/2005

HUNTING for best possible solution


Forward DATA

Inverse Solution

Iterative Process
Until solution stops getting better (error stabilises)

error

iteration

Types of Analysis
Jeremie says:

Evoked
The evoked response is a reproducible response which occurs after each stimulation and is phase-locked with the stimulus onset.

Induced
The induced response is usually characterized in the frequency domain and contrary to the evoked response, is not phased-locked with the stimulus onset.

The evoked response is obtained (on the scalp) as the stimulus or eventlocked average over trials. This is then the input data for the 'evoked' case in source reconstruction. One can also reconstruct the evoked power in some frequency band (over the time window), this is what is obtained when choosing 'both' in source reconstruction.

jm6

Conclusion - Summary
Data space MRI space

Registration

Forward model

EEG/MEG preprocessed data

PEB inverse solution


SPM

Slide 51 jm6 Well, I guess you just need to rephrase and summarize the whole pipeline. Note that the approach yields equivalently to SPMs in individual or template space as well as to PPMs (Guillaume's talk on PPMs will just preceed yours on source localization). A group analysis is also possible, well everything which SPM_EEG offers can be applied... Bravo!
jmattout, 4/21/2005

jm4

Important!

Source model The same for all conditions.

Registra tion

Forward model

Inverse solution Repeated for each condition

Therefore, only done ONCE for each subject

Slide 52 jm4 In SPM5, the Imaging pipeline requires processing the four main steps successively: - Source model Defining a cortical mesh of dipoles for a given individual - Registration is independent of the source model... so could be performed before - Forward model requires the two previous step to have been completed - Inverse solution requires the three previous components Let's consider those steps one by one...
jmattout, 4/20/2005

Considerations
Source localization project is still ongoing Unable to incorporate prior assumptions about source (e.g., from fMRI blobs) Source localization only for conditions Not for contrasts Source localization is a single subject analysis (no way to look at group effects)

Thank you Rimona!

Thank you MFD!

Das könnte Ihnen auch gefallen