M/EEG source analysis
SPM for MEEG course – London – May 2016
Jérémie MattoutLyon Neuroscience Research Center
“Will it ever happen that mathematicians will know enough about the physiology of the brain, andneurophysiologists enough of mathematical discovery, for efficient cooperation to be possible”
Jacques Hadamard (mathematician, 1865-1963)
Introduction
?
EEG
MEG
Jacques Hadamard (mathematician, 1865-1963)Well-posed inverse problem:
- a solution exists
- the solution is unique
- the solution is stable
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
reconstruction / inversion
Introduction
?
EEG
MEG
reconstruction / inversion
likelihood / predictive / forward
Bayesian inference enables:
- to incorporate priors on the solution
- to account for uncertainty through probabilitic distributions
- to yield a unique and optimal solution given a likelihood model andpriors over model parameters
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Generative models
EEG
MEG
likelihood / predictive / forward
A particular generative model is fully defined by:
- A data likelihood density function
- A prior distribution over source parameters 𝜽
𝜽
𝒀
𝒑 𝒀 𝜽
𝒑 𝜽
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Sources
• Observable from scalp:the synchronous and additive activities of numorous neighbouring neurons
Cortical macro-column Current dipole
𝜽 :- Dipole location (x, y, z)- Dipole orientation (Ox, Oy, Oz)- Dipole strength
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• Equivalent Current Dipole (ECD)- Only a few activated sources- Each source corresponds to a fairly large brain area- Each source activity is modelled by one current dipole
e.g. early response to auditory stimulus
e.g. MRI-derived cortical mesh
• Distributed or imaging approach- The whole brain/cortex may be active- The source space is discretized using a grid over the whole brain (voxels)
or a cortical mesh (nodes)- Each voxel or node is the location of a dipolar source- Each dipole models the activity of a small brain region
Only a few parameters 𝜃 to be estimated(location, orientation and strength)
Many parameters 𝜃 to be estimated(strength only)
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Sources
From sources to sensors
MEG
EEG
• Predicting the sensor data Y from known source parameters 𝜽:- requires solving the Maxwell’s equations in a quasi-static regime- amounts to solving a well-posed forward problem- involves approximations
?𝜽𝒀
James Clerk Maxwell(1831 - 1879)
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• EEG is sensitive to bothradial and tangential sources
• MEG is barely sensitive to radial sources
• EEG is sensitive to conductivities • MEG is barely sensitive to conductivities
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
From sources to sensors
Simple Head Model Realistic Head Model
Concentric spheres Boundary element method (BEM)
Pros :
Cons :
Fast analytic solution Realistic geometry
Heads are not spherical Slow approximate numerical solutions
Scalp (skin-air boundary)
Outer Skull (bone-skin boundary)
Inner Skull (CSF-bone boundary)
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
From sources to sensors
• Automated extraction of individual meshes
Individual MRI
Estimate Spatial Transform
Template
Deformation
Template meshes in MNI space
Inverse normalziation
Canonical (individual) meshMattout et al., Comp. Int & Neuro, 2007
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
From sources to sensors
• Data features 𝒀 to be fitted/explained- Evoked response- Induced response- Steady-state response
• Accounting for noise 𝜺 in the data
𝒀 = 𝒈 𝜽 + 𝜺
𝒑 𝜺 = 𝑵(𝟎, 𝑪𝜺)
Gaussian noise
The proba. of a largenoise is small
𝒑 𝒀 𝜽 = 𝑵(𝒈 𝜽 , 𝑪𝜺)
Data likelihood
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Sensors
Bayesian inference
MYP
MPMYPMYP
,,
EEG
MEG
Likelihood Prior
),|( MYp )|( Mp
Generative model M
𝜽𝒀
Posterior Evidence
)|( MYp),|( MYp
Bayesian inference
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
ECD model
j
r
Y
j r
• A Bayesian model for Equivalent Current Dipole (ECD) solutions- Enables to put priors on source parameters- Enables formal model comparison (e.g. on number of sources or initial conditions)
Kiebel et al., NeuroImage, 2008
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• A Bayesian model for Equivalent Current Dipole (ECD) solutions- Enables to put priors on source parameters- Enables formal model comparison (e.g. on number of sources or initial conditions)
Kiebel et al., NeuroImage, 2008
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
ECD model
𝒀 = 𝑲. 𝜽 + 𝜺
Evoked EEG response: Nsens x Time
Forward operator or lead-field matrix: Nsens x Nsources
Unknown source dynamics: Nsources x Time
noise
• A Bayesian model for Distributed / Imaging solutions- Many dipoles with fixed location and orientation- Dipole strength ? -> linear model
𝒑 𝒀 𝜽 = 𝑵(𝐊. 𝜽, 𝑪𝜺)
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Imaging models
• A Bayesian model for Distributed / Imaging solutions- Many dipoles with fixed location and orientation- Dipole strength ? -> linear model
The proba. of a largeintensity is small
𝒑 𝜽 = 𝑵(0, 𝑪𝜽)
Prior over dipole strength
𝜃
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Setting priors
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
i.i.d or Minimum norm
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Single dipole
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Smoothness (like LORETA)
• Alternative priors correspond to alternative prior covariance matrices
𝒑 𝜽 = 𝑵(0, 𝑪𝜽)
Ndip x Ndip
• Typical priors
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Setting priors
• Alternative priors correspond to alternative prior covariance matrices
𝒑 𝜽 = 𝑵(0, 𝑪𝜽)
Ndip x Ndip
• More advanced priors
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
160
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
fMRI based
246810121416
2
4
6
8
10
12
14
160
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Data or Lead-field basede.g. (Beamformer or MSP)
Henson et al., Hum. Brain Map., 2010 Mattout et al., NeuroImage, 2005
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Setting priors
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
𝑸𝟏 𝑸𝟐 𝑸𝟑
…
𝑸𝒏
𝑪𝜽 = 𝝀𝟏. 𝑸𝟏 + 𝝀𝟐. 𝑸𝟐 + 𝝀𝟑. 𝑸𝟑 +⋯+ 𝝀𝒏. 𝑸𝒏
Empirical Bayes
Model (Hyper)parameters0 100 200 300 400 500 600 700-8
-6
-4
-2
0
2
4
6
8
estimated response - condition 1
at 36, -18, -23 mm
time ms
PPM at 229 ms (100 percent confidence)
512 dipoles
Percent variance explained 99.15 (65.03)
log-evidence = 8157380.8
0 100 200 300 400 500 600 700-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
estimated response - condition 1
at 46, -31, 4 mm
time ms
PPM at 229 ms (100 percent confidence)
512 dipoles
Percent variance explained 99.93 (65.54)
log-evidence = 8361406.1
0 100 200 300 400 500 600 700-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
estimated response - condition 1
at 46, -31, 4 mm
time ms
PPM at 229 ms (100 percent confidence)
512 dipoles
Percent variance explained 99.87 (65.51)
log-evidence = 8388254.2
0 50 100 15010
2
104
106
108
Iteration
Free energy
Accuracy
Complexity
0 100 200 300 400 500 600 700-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
estimated response - condition 1
at 46, -31, 4 mm
time ms
PPM at 229 ms (100 percent confidence)
512 dipoles
Percent variance explained 99.90 (65.53)
log-evidence = 8389771.6
AccuracyFree EnergyCompexity
Inference (iterative) process
Philips et al., NeuroImage, 2005Mattout et al., NeuroImage, 2006Friston et al., NeuroImage, 2008Lopez et al., NeuroImage, 2014
• Multivariate Sparse Priors (MSP)
• Comparing priors using log-evidence (free energy)
5010
015
020
025
030
035
040
0-0
.2
-0.1
5
-0.1
-0.0
50
0.050.
1
0.15
estim
ated
res
pons
e -
cond
ition
1
at -
54, -
27, 1
0 m
m
time
ms
PP
M a
t 188
ms
(100
per
cent
con
fiden
ce)
512
dipo
les
Per
cent
var
ianc
e ex
plai
ned
11.2
1 (1
0.26
)
log-
evid
ence
= 5
3.1
5010
015
020
025
030
035
040
0-0
.25
-0.2
-0.1
5
-0.1
-0.0
50
0.050.
1
0.150.
2
0.25
estim
ated
res
pons
e -
cond
ition
1
at 5
0, -
26, 1
1 m
m
time
ms
PP
M a
t 188
ms
(100
per
cent
con
fiden
ce)
512
dipo
les
Per
cent
var
ianc
e ex
plai
ned
99.7
8 (9
1.33
)
log-
evid
ence
= 1
12.8
5010
015
020
025
030
035
040
0-0
.03
-0.0
2
-0.0
10
0.01
0.02
0.03
estim
ated
res
pons
e -
cond
ition
1
at 5
7, -
26, 9
mm
time
ms
PP
M a
t 188
ms
(100
per
cent
con
fiden
ce)
512
dipo
les
Per
cent
var
ianc
e ex
plai
ned
99.1
8 (9
0.78
)
log-
evid
ence
= 9
9.9
Predicted
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Explained variance
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
246810121416
2
4
6
8
10
12
14
160
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Predicted
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
5010
015
020
025
030
035
040
0-4-3-2-101234
x 10
-3es
timat
ed r
espo
nse
- co
nditio
n 1
at 6
5, -
21, 1
1 m
m
time
ms
PP
M a
t 188
ms
(100
per
cent
con
fiden
ce)
512
dipo
les
Per
cent
var
ianc
e ex
plai
ned
98.4
9 (9
0.16
)
log-
evid
ence
= 9
3.1
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
11 % 96% 97% 98%
Alternative priors𝒀 : observed data
𝜽 : estimatedsource intensities
𝒀 : predicted data
0
50
Free-energy
𝑭 ≅ 𝒑 𝒀 𝑴M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
Comparing models
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• Any assumption (part of model M) can be formally tested on real datausing Bayesian model comparison
Spherical head model Realistic surfacic model (BEM)
Biophysics
Anatomy
Mesh resolution (High / Low)Dipole oreintation (fixed / free)
Sources
• No evidence in favor of individual vs. Inverse-norm mesh• Evidence in favor of BEM head model• Evidence in favor of high + fixed vs. low + free
Mattout et al., NeuroImage, 2007
Henson et al., NeuroImage, 2007Henson et al., NeuroImage, 2009
Comparing models
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• MSP based source reconstruction for a single subject
Fixed
Variable
Data
...
Y
,η Ω
...𝑸𝟐𝑸𝟏
𝝀𝒊𝑪𝜽 𝑪𝜺𝝀𝒊𝜺
𝑸𝟏𝜺 𝑸𝟐
𝜺
𝜺
K
𝜽
Friston et al., NeuroImage, 2008
Group inference
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
• MSP based source reconstruction for multiple subjects
Fixed
Variable
Data
...
,η Ω
...𝑸𝟐𝑸𝟏
𝝀𝒊𝑪𝜽 𝑪𝟏,𝜺𝝀𝟏,𝒊𝜺
𝑸𝟏,𝟏𝜺 𝑸𝟏,𝟐
𝜺
𝜽𝟏
𝑲𝟏 𝑲𝟐
𝜺𝟏 𝜽𝟐 𝜺𝟐
𝒀𝟏 𝒀𝟐
...𝑸𝟐,𝟏𝜺 𝑸𝟐,𝟐
𝜺
𝑪𝟐,𝜺𝝀𝟐,𝒊𝜺
A two-step procedure:- Estimating the group prior variance- Estimating the individual source intensities
Litvak and Friston, NeuroImage, 2008
Group inference
M/EEG source analysis
IntroductionIll-posed inverse problemWhy a Bayesian approach?
Generative modelsSourcesFrom sources to sensorsSensors
Bayesian inferenceECD modelImaging modelsSetting priorsEmpirical BayesComparing modelsGroup inferenceEEG/MEG fusion
ExampleMMN studyGroup multimodal inference
EEG/MEG fusion• MSP based source reconstruction for multimodal data
Fixed
Variable
Data
...
,η Ω
𝑸𝟐𝑸𝟏
𝝀𝒊𝑪𝜽
𝑲𝑬𝑬𝑮 𝑲𝑴𝑬𝑮𝒀𝑬𝑬𝑮 𝒀𝑴𝑬𝑮
𝜽 𝜺𝑴𝑬𝑮
...𝑸𝑴𝑬𝑮,𝟏𝜺 𝑸𝑴𝑬𝑮,𝟐
𝜺
𝑪𝑴𝑬𝑮,𝜺𝝀𝑴𝑬𝑮,𝒊𝜺
𝜺𝑬𝑬𝑮
...𝑸𝑬𝑬𝑮,𝟏𝜺 𝑸𝑬𝑬𝑮,𝟐
𝜺
𝑪𝑬𝑬𝑮,𝜺𝝀𝑬𝑬𝑮,𝒊𝜺
Henson et al., NeuroImage, 2011
Acknowledgements
Gareth BarnesAnne CaclinJean DaunizeauGuillaume FlandinKarl FristonRik HensonStefan KiebelFrançoise LecaignardVladimir LitvakChristophe Philips