the m/eeg inverse problem gareth r. barnes. format what is an inverse problem prior knowledge- links...
TRANSCRIPT
The M/EEG inverse problem
Gareth R. Barnes
Format
• What is an inverse problem• Prior knowledge- links to popular algorithms.• Validation of prior knowledge/ Model
evidence
Inverse problems aren’t difficult
The forward problem
Lead fields (L)
Dipolar source
Model describesconductivity & geometry
Lead fields (determined by head model) describe the sensitivity of
an M/EEG sensor to a dipolar source at a particular location
Head Model
Prediction
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
M/EEGsensors
Inverse problem
Gen
erat
ed s
ourc
e ac
tivity
brain?
Gen
erat
ed s
ourc
e ac
tivity
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Forwardproblem
Current densityEstimate
M/EEG sensors
J
Y LJPrior info
Measurement (Y) Prediction ( )Y
Inverse problem
Measurement (Y)
Gen
erat
ed s
ourc
e ac
tivity
brain?
Gen
erat
ed s
ourc
e ac
tivity
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Forwardproblem
Current densityEstimate
Prediction ( )
M/EEG sensors J WY
J
Y
Y LJ
Prior info
' ' 1( )W CL R LCL Sensor Noise(known)
Lead field(known)
sour
ces
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Gene
rated
sour
ce a
ctivit
y
sources
Source covariance matrix,One diagonal element per source
Inversion depends on choice of source covariance matrix (prior information)
Prior information
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Predicted
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
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
resp
onse
- co
nditio
n 1
at -5
4, -2
7, 1
0 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
11.2
1 (1
0.26
)lo
g-ev
iden
ce =
53.
1
Gen
erat
ed s
ourc
e ac
tivity
Y (measured field)
Prior info (source covariance)
PREDICTED
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Inverse problem
Single dipole fit
J
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Gen
erat
ed s
ourc
e ac
tivity
Y (measured field)
Prior info (source covariance)
PREDICTED
Inverse problem
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
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
resp
onse
- co
nditio
n 1
at 5
0, -2
6, 1
1 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.7
8 (9
1.33
)lo
g-ev
iden
ce =
112
.8
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
Single dipole fit
J
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
Gen
erat
ed s
ourc
e ac
tivity
Y (measured field)
Prior info (source covariance)
PREDICTED
Inverse problem
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
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
resp
onse
- co
nditio
n 1
at 5
0, -2
6, 1
1 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.7
8 (9
1.33
)lo
g-ev
iden
ce =
112
.8
Two dipole fit
J
Gen
erat
ed s
ourc
e ac
tivity
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
Y (measured field)
Prior info (source covariance)
PREDICTED
Inverse problem
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 re
spon
se -
cond
ition
1at
65,
-21,
11
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
98.4
9 (9
0.16
)lo
g-ev
iden
ce =
93.
1
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Minimum norm
J
Gen
erat
ed s
ourc
e ac
tivity
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
Y (measured field)
Prior info (source covariance)
PREDICTED
Inverse problem
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.08
-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-0
.03
-0.0
2
-0.0
10
0.01
0.02
0.03
estim
ated
resp
onse
- co
nditio
n 1
at 5
7, -2
6, 9
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.1
8 (9
0.78
)lo
g-ev
iden
ce =
99.
9
Projectiononto lead field*
Beamformer
*Assuming no correlated sources
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
Y (measured field)
Prior info (source covariance)
PREDICTED
Inverse problem
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
Predicted
-0.08
-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-0
.03
-0.0
2
-0.0
10
0.01
0.02
0.03
estim
ated
resp
onse
- co
nditio
n 1
at 5
7, -2
6, 9
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.1
8 (9
0.78
)lo
g-ev
iden
ce =
99.
9
fMRI data
fMRI biased dSPM(Dale et al. 2000)
Maybe…
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
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
Minimum norm
Dipole fit LORETA
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
SAM,DICsBeamformer
?
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 biaseddSPM
Some popular priors
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Summary• MEG inverse problem requires prior
information in the form of a source covariance matrix.
• Different inversion algorithms- SAM, DICS, LORETA, Minimum Norm, dSPM… just have different prior source covariance structure.
• Historically- different MEG groups have tended to use different algorithms/acronyms.
See Mosher et al. 2003, Friston et al. 2008, Wipf and Nagarajan 2009, Lopez et al. 2013
Software
• SPM12: http://www.fil.ion.ucl.ac.uk/spm/software/spm12/
• DAiSS- SPM12 toolbox for Data Analysis in Source Space (beamforming, minimum norm and related methods), developed by collaboration of UCL, Oxford and other MEG centres.https://code.google.com/p/spm-beamforming-toolbox/
• Fieldtrip : http://fieldtrip.fcdonders.nl/• Brainstorm:http://neuroimage.usc.edu/brainstorm/• MNE: http://martinos.org/mne/stable/index.html
Which priors should I use ?
• Compare to other modalities..
• Use model comparison… rest of the talk.
Singh et al. 2002
fMRI
MEGbeamformer
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
resp
onse
- co
nditio
n 1
at -5
4, -2
7, 1
0 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
11.2
1 (1
0.26
)lo
g-ev
iden
ce =
53.
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
resp
onse
- co
nditio
n 1
at 5
0, -2
6, 1
1 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.7
8 (9
1.33
)lo
g-ev
iden
ce =
112
.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
resp
onse
- co
nditio
n 1
at 5
7, -2
6, 9
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.1
8 (9
0.78
)lo
g-ev
iden
ce =
99.
9
Predicted
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
Y (measured field)How do we chose between priors ?
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Variance explained
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 re
spon
se -
cond
ition
1at
65,
-21,
11
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
98.4
9 (9
0.16
)lo
g-ev
iden
ce =
93.
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%
Prior
J
Y
Measurement (Y)
Gen
erat
ed s
ourc
e ac
tivity
Gen
erat
ed s
ourc
e ac
tivity
Forwardproblem
Prediction ( )
Eyes
J
Y
Inverse problem
True recipe J
Estimatedrecipe
Measurement (Y)
Gen
erat
ed s
ourc
e ac
tivity
Forwardproblem
Prediction ( )
J
Y
Inverse problem
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Prior info (source covariance)
Diagonal elements correspondto ingredients
Use prior info (possible ingredients)
Possible priors
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
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
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
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
A
B
C
Measurement (Y)
Gen
erat
ed s
ourc
e ac
tivity
Forwardproblem
Prediction ( )
J
Y
Inverse problem
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Prior info (source covariance)
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
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
?
Which is most likely prior (which prior has highest evidence) ?
A
B
C
P(Y)
Complexity
Area under each curve=1.0
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
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
Space of possible datasets (Y)
Consider 3 generative models
Evidence
Measurement (Y)
Gen
erat
ed s
ourc
e ac
tivity
Forwardproblem
Prediction ( )
J
YInverse problem
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Prior info (source covariance)
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
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
?
Cross validation or prediction of unknown data
A
B
C
The more parameters in the model the more accurate the fit(to training data).
y
x
Polynomial fit example
4 parameter fit
2 parameter fit
Training data
The more parameters the more accurate the fit to training data, but more complex model may not generalise to new (test) data.
y
x
Polynomial fit example
4 parameter fit
2 parameter fittest data
Training data
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
x
-0.6 -0.4 -0.2 0 0.2 0.4-0.6
-0.4
-0.2
0
0.2
0.4
Measured
Pre
dict
ed
GSIID
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
O
Fit to training data
More complex model fits training data better
-0.6 -0.4 -0.2 0 0.2 0.4-0.6
-0.4
-0.2
0
0.2
0.4
Measured
Pre
dict
ed
GSIID
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
x
Predicted
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
Measured
-0.08
-0.06
-0.04
-0.02
0
0.02
0.04
0.06
0.08
0.1
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
O
Fit to test data
Simpler model fits test data better
0.37 0.38 0.39 0.4 0.410
5
10
15
20
Mod
el e
vide
nce
Cross validation accuracy
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
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
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
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
Cross validation error
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Relationship between model evidence and cross validation
Random priorslo
g
Can be approximated analytically…
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
resp
onse
- co
nditio
n 1
at -5
4, -2
7, 1
0 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
11.2
1 (1
0.26
)lo
g-ev
iden
ce =
53.
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
resp
onse
- co
nditio
n 1
at 5
0, -2
6, 1
1 m
m
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.7
8 (9
1.33
)lo
g-ev
iden
ce =
112
.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
resp
onse
- co
nditio
n 1
at 5
7, -2
6, 9
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
99.1
8 (9
0.78
)lo
g-ev
iden
ce =
99.
9
Predicted
-0.025
-0.02
-0.015
-0.01
-0.005
0
0.005
0.01
0.015
0.02
How do we chose between priors ?
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
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 re
spon
se -
cond
ition
1at
65,
-21,
11
mm
time
ms
PPM
at 1
88 m
s (1
00 p
erce
nt c
onfid
ence
)51
2 di
pole
sPe
rcen
t var
ianc
e ex
plai
ned
98.4
9 (9
0.16
)lo
g-ev
iden
ce =
93.
1
2 4 6 8 10 12 14 16
2
4
6
8
10
12
14
16
Prior
J
Y
Dip 1 Dip 2 BMF Min Norm05
10152025
Log modelevidence
Muliple Sparse Priors (MSP), Champagne
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1l
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
2l
l3
+
Prior to maximise model evidence
12345678910
1
2
3
4
5
6
7
8
9
10
Candidate Priors
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
1 2 3 4 5 6 7 8 9 10
1
2
3
4
5
6
7
8
9
10
ln
0 100 200 300 400 500 600 700-8
-6
-4
-2
0
2
4
6
8
estimated response - condition 1at 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 1at 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 1at 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 energyAccuracyComplexity
0 100 200 300 400 500 600 700-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
estimated response - condition 1at 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
Multiple Sparse priors
So now construct the priors to maximise model evidence(minimise cross validation error).
Conclusion
• MEG inverse problem can be solved.. If you have some prior knowledge.
• All prior knowledge encapsulated in a source covariance matrix.
• Can test between priors (or develop new priors) using cross validation or Bayesian framework.
References• Mosher et al., 2003• J. Mosher, S. Baillet, R.M. Leahi• Equivalence of linear approaches in bioelectromagnetic inverse solutions• IEEE Workshop on Statistical Signal Processing (2003), pp. 294–297
• Friston et al., 2008• K. Friston, L. Harrison, J. Daunizeau, S. Kiebel, C. Phillips, N. Trujillo-Barreto, R.
Henson, G. Flandin, J. Mattout• Multiple sparse priors for the M/EEG inverse problem• NeuroImage, 39 (2008), pp. 1104–1120
• Wipf and Nagarajan, 2009• D. Wipf, S. Nagarajan• A unified Bayesian framework for MEG/EEG source imaging• NeuroImage, 44 (2009), pp. 947–966
Thank you
• Karl Friston• Jose David Lopez• Vladimir Litvak• Guillaume Flandin• Will Penny• Jean Daunizeau
• Christophe Phillips• Rik Henson• Jason Taylor• Luzia Troebinger• Chris Mathys• Saskia Helbling
And all SPM developers
Analytical approximation to model evidence
• Free energy= accuracy- complexity
MEG
EEG
What do we measure with EEG & MEG ?
From a single source to the sensor: MEG