Source localization for EEGand MEG
Methods for Dummies 2006
FIL
Bahador Bahrami
0262083337-medium
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:
Slotnick S.D. chapter in Todd Handy’s ERP handbook
Rimona Weil’s 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 aninfinite number of possible dipoles
The possibilities only increase with tri-poles andquadra-poles
+
-
+
-
ERP and MEG give us
And source localization aims to infer
+
-
among
How do we know which one iscorrect?
+
-
+
-
We can’t. There is no correct answer.
We can only see which one is better
Can we find the best answer?
Source localization is an ILL-DEFINED PROBLEM
Only among the alternatives that you have considered.
HUNTING forbest possible solution
Step ONE: How does your data look like?
sens
MEG sensor location
MEG sensor location
MEG data
MEG data
Source Reconstruction
Registration
HUNTING forbest possible solution
If
then
If
then
If
then
If
then
And on and on and on and …
FORWARD MODEL
Step Two
HUNTING forbest possible solution
Forward Model
Experimental DATA
Which forward solutions fit the DATA better (less error)?
Inverse Solution
HUNTING forbest possible solution
Forward
Inverse Solution
DATA
Iterative Process
Until solution stops getting better (error stabilises)
iteration
error
Components of the source reconstruction process
Source model
Source model
Forward model
Forward model
Inverse method
Inverse method
Registration
Registration
‘Imaging’
‘Imaging’
‘ECD’
‘ECD’
ZoomMR&Source
cortex_dip
Data
Data
Anatomy
Anatomy
Recipe for Source localization inSPM5
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)
fidloc in MRI space (we will see shortly)
Structural T1 MRI scan
All in the same folder
fidloc in MRI space
Nasion
Left Tragus
Right Tragus
X
X
X
Y
Y
Y
Z
Z
Z
Nasion
Nasion
Left Tragus
Left Tragus
Right Tragus
Right Tragus
Get these using SPM Display button
Save it as a MAT file in the same directory as the data
spm_eeg
Components of the source reconstruction process
Source model
Source model
Forward model
Forward model
Inverse solution
Inverse solution
Registration
Registration
Source model
Source model
Source model
TempMesh
Templates
Templates
Individual MRI
Individual MRI
Compute transformation T
Compute transformation T
Apply inverse transformation T-1
Apply inverse transformation T-1
paul_cortex
Individual mesh
Individual mesh
- Individual MRI
- Template mesh
- spatial normalization into MNI template
- inverted transformation applied to the template mesh
- individual mesh
functions
output
Scalp Mesh
iskull mesh
Components of the source reconstruction process
Registration
Registration
Registration
Rigid transformation (R,t)
Rigid transformation (R,t)
Individual MRI space
Individual MRI space
paul_cortex
fiducials
sens
Individual sensor space
Individual sensor space
fiducials
- sensor locations
- fiducial locations
(in both sensor & MRI space)
- individual MRI
input
- registration of the EEG/MEG data intoindividual MRI space
- registrated data
- rigid transformation
functions
output
Forward model
Forward model
Foward model
Compute for
each dipole
Compute for
each dipole
paul_cortex
sens
Individual MRI space
Individual MRI space
SAG_HEAD
Model of the
head tissue properties
Model of the
head tissue properties
+
Forward operator
Forward operator
K
n
- sensor locations
- individual mesh
input
- single sphere
- three spheres
- overlapping spheres
- realistic spheres
- forward operator K
functions
output
BrainStorm
Inverse solution
Inverse solution
Inverse solution (1) - General principles
cortex_dip
ruban_cortex_dip
1 dipole source
per location
Cortical mesh
Cortical mesh
General Linear Model
Y = KJ+ E
[nxt]
[nxp]
[nxt]
[pxt]
n : number of sensors
p : number of dipoles
t : number of time samples
Under-determined GLM
Under-determined GLM
Regularized solution
Regularized solution
J
:  min( ||Y – KJ||2 + λf(J) )
J
data fit
priors
^
Inverse solution (2) - Parametric empirical Bayes
2-level hierarchical model
E2 ~ N(0,Cp)
E1 ~ N(0,Ce)
Y = KJ + E1
J = 0 + E2
paul_cortex
sens
Sensor level
Sensor level
Source level
Source level
Gaussian variables
with unknown variance
Gaussian variables
with unknown variance
Linear parametrizationof the variances
Linear parametrizationof the variances
Gaussian variables
with unknown variance
Gaussian variables
with unknown variance
Ce = 1.Qe1 + … + q.Qeq
Cp = λ1.Qp1 + … + λk.Qpk
Q: variance components
(,λ): hyperparameters
Q: variance components
(,λ): hyperparameters
Inverse solution (3) - Parametric empirical Bayes
Bayesian inference on model parameters
Inference on J and (,λ)
Inference on J and (,λ)
paul_cortex
Model M
Model M
Qe1 , … , Qeq
Qp1 , … , Qpk
+
SAG_HEAD
J
K
+
,λ
F = log( p(Y|M) =  log( p(Y|J,M) + log( p(J|M) ) dJ
E-stepmaximizing F wrt J
J = CJKT[Ce + KCJ KT]-1Y
^
M-step: maximizing of F wrt (,λ)
Ce + KCJKT = E[YYT]
Maximizing the log-evidence
Maximizing the log-evidence
data fit
priors
Expectation-Maximization (EM)
Expectation-Maximization (EM)
MAP estimate
MAP estimate
ReML estimate
ReML estimate
Inverse solution (4) - Parametric empirical Bayes
Bayesian model comparison
B12 =
p(Y|M1)
p(Y|M2)
Model evidence
Model evidence
 Relevance of model M is quantified by its evidence p(Y|M) maximized by the EM scheme
Model comparison
Model comparison
 Two models M1 and M2 can be compared by the ratio of their evidence
Bayes factor
Bayes factor
Model selection using a
‘Leaving-one-prior-out-strategy‘
Model selection using a
‘Leaving-one-prior-out-strategy‘
Inverse solution (5) - implementation
- preprocessed data
- forward operator
- individual mesh
- priors
input
- compute the MAP estimate of J
- compute the ReML estimate of (,λ)
- interpolate into individual MRI voxel-space
- inverse estimate
- model evidence
functions
output
- iterative forward and inverse computation
ECD approach
Emer
HUNTING forbest possible solution
Forward
Inverse Solution
DATA
Iterative Process
Until solution stops getting better (error stabilises)
iteration
error
Types of Analysis
Evoked
The evoked response is a reproducible response which occurs after eachstimulation and is phase-locked with the stimulus onset.
Induced
The induced response is usually characterized in the frequency domain andcontrary to the evoked response, is not phased-locked with the stimulus onset.
The evoked response is obtained (on the scalp) as the stimulus or event-locked average over trials. This is then the input data for the 'evoked' casein source reconstruction.
One can also reconstruct the evoked power in some frequency band (overthe time window), this is what is obtained when choosing 'both' in sourcereconstruction.
Jeremie says:
Conclusion - Summary
Emer
paul_cortex
sens
Data space
Data space
MRI space
MRI space
Registration
Registration
Forward model
Forward model
EEG/MEGpreprocessed data
EEG/MEGpreprocessed data
PEB inversesolution
PEB inversesolution
SPM
SPM
Important!
Sourcemodel
Sourcemodel
Forwardmodel
Forwardmodel
Inversesolution
Inversesolution
Registration
Registration
The same for allconditions.
Therefore, only doneONCE for each subject
Repeated foreach condition
Considerations
Source localization project is still ongoing
Unable to incorporate prior assumptionsabout source (e.g., from fMRI blobs)
Source localization only for conditions
Not for contrasts
Source localization is a single subjectanalysis (no way to look at group effects)
Thank you Rimona!
Thank you MFD!