Bayesian models for fMRI data

41
Bayesian models for fMRI data Methods & models for fMRI data analysis in neuroeconomics April 2010 Klaas Enno Stephan Laboratory for Social and Neural Systems Research Institute for Empirical Research in Economics University of Zurich Functional Imaging Laboratory (FIL) Wellcome Trust Centre for Neuroimaging University College London With many thanks for slides & images to: FIL Methods group, particularly Guillaume Flandin The Reverend Thomas Bayes (1702-1761)

description

Bayesian models for fMRI data. Klaas Enno Stephan Laboratory for Social and Neural Systems Research Institute for Empirical Research in Economics University of Zurich Functional Imaging Laboratory (FIL) Wellcome Trust Centre for Neuroimaging University College London. - PowerPoint PPT Presentation

Transcript of Bayesian models for fMRI data

Page 1: Bayesian models for fMRI data

Bayesian models for fMRI data

Methods & models for fMRI data analysis in neuroeconomicsApril 2010

Klaas Enno Stephan Laboratory for Social and Neural Systems ResearchInstitute for Empirical Research in EconomicsUniversity of Zurich

Functional Imaging Laboratory (FIL)Wellcome Trust Centre for NeuroimagingUniversity College London

With many thanks for slides & images to:FIL Methods group, particularly Guillaume Flandin

The Reverend Thomas Bayes(1702-1761)

Page 2: Bayesian models for fMRI data

Why do I need to learn about Bayesian stats?

Because SPM is getting more and more Bayesian:

• Segmentation & spatial normalisation• Posterior probability maps (PPMs)

– 1st level: specific spatial priors– 2nd level: global spatial priors

• Dynamic Causal Modelling (DCM)• Bayesian Model Selection (BMS)• EEG: source reconstruction

Page 3: Bayesian models for fMRI data

Realignment Smoothing

Normalisation

General linear model

Statistical parametric map (SPM)Image time-series

Parameter estimates

Design matrix

Template

Kernel

Gaussian field theory

p <0.05

Statisticalinference

Bayesian segmentationand normalisation

Spatial priorson activation extent

Posterior probabilitymaps (PPMs)

Dynamic CausalModelling

Page 4: Bayesian models for fMRI data

p-value: probability of getting the observed data in the effect’s absence. If small, reject null hypothesis that there is no effect.

0

0

: 0( | )

Hp y H

Limitations:One can never accept the null hypothesisGiven enough data, one can always demonstrate a

significant effectCorrection for multiple comparisons necessary

Solution: infer posterior probability of the effect

Probability of observing the data y, given no effect ( = 0).

)|( yp

Problems of classical (frequentist) statistics

Probability of the effect, given the observed data

Page 5: Bayesian models for fMRI data

Overview of topics

• Bayes' rule• Bayesian update rules for Gaussian densities• Bayesian analyses in SPM

– Segmentation & spatial normalisation– Posterior probability maps (PPMs)

• 1st level: specific spatial priors• 2nd level: global spatial priors

– Bayesian Model Selection (BMS)

Page 6: Bayesian models for fMRI data

Bayes‘ Theorem

Reverend Thomas Bayes1702 - 1761

“Bayes‘ Theorem describes, how an ideally rational person processes information."Wikipedia

)()()|()|(

yppypyP

Likelihood

Prior

Evidence

Posterior

Page 7: Bayesian models for fMRI data

)()()|()|(

yppypyP

Given data y and parameters , the conditional probabilities are:

)(),()|(

ypypyp

)(),()|(

pypyp

Eliminating p(y,) gives Bayes’ rule:

Likelihood

Prior

Evidence

Posterior

Bayes’ Theorem

Page 8: Bayesian models for fMRI data

Bayesian statistics

)()|()|( pypyp posterior likelihood ∙ prior

)|( yp )(p

Bayes theorem allows one to formally incorporate prior knowledge into computing statistical probabilities.

Priors can be of different sorts:empirical, principled or shrinkage priors.

The “posterior” probability of the parameters given the data is an optimal combination of prior knowledge and new data, weighted by their relative precision.

new data prior knowledge

Page 9: Bayesian models for fMRI data

Bayes in motion - an animation

Page 10: Bayesian models for fMRI data

yObservation of data

likelihood p(y|)

prior distribution p()

Formulation of a generative model

Update of beliefs based upon observations, given a prior state of knowledge

( | ) ( | ) ( )p y p y p

Principles of Bayesian inference

Page 11: Bayesian models for fMRI data

Likelihood & Prior

Posterior:

Posterior mean = variance-weighted combination of prior mean and data mean

Prior

LikelihoodPosterior

y

Posterior mean & variance of univariate Gaussians

p

),;()(

),;()|(2

2

pp

e

Np

yNyp

),;()|( 2 Nyp

ppe

pe

222

222

11

111

Page 12: Bayesian models for fMRI data

Likelihood & prior

Posterior:

Prior

LikelihoodPosterior

Same thing – but expressed as precision weighting

p

),;()(

),;()|(1

1

pp

e

Np

yNyp

),;()|( 1 Nyp

ppe

pe

Relative precision weighting

y

Page 13: Bayesian models for fMRI data

Likelihood & Prior

Posterior

)2(

Relative precision weighting

Prior

LikelihoodPosterior

)2()2()1(

)1()1(

y

Same thing – but explicit hierarchical perspective

)1(

)2()2(

)1()1(

)2()1(

)1()1( )/1,;()|(

Nyp

)/1,;()(

)/1,;()|()2()2()1()1(

)1()1()1(

Np

yNyp

Page 14: Bayesian models for fMRI data

Bayesian regression: univariate case

Relative precision weighting

Normal densitiesexy

ppe

yy

pey

yx

x

222||

22

2

2|

1

11

x

Univariatelinear model),;()( 2

ppNp

),;()|( 2exyNyp

),;()|( 2|| yyNyp

p

y|

Page 15: Bayesian models for fMRI data

One step if Ce is known.Otherwise iterative estimation with EM.

GeneralLinear Model

Bayesian GLM: multivariate caseNormal densities eXθy

),;()( ppNp Cηθθ

),;()|( eNp CXθyθy

),;()|( || yyNyp Cηθθ

ppeT

yy

peT

y

ηCyCXCη

CXCXC1

||

111|

2

1

Page 16: Bayesian models for fMRI data

An intuitive example

-10 -5 0 5 10

-10

-5

0

5

10

1

2

PriorLikelihoodPosterior

Page 17: Bayesian models for fMRI data

Still intuitive

-10 -5 0 5 10

-10

-5

0

5

10

1

2

PriorLikelihoodPosterior

Page 18: Bayesian models for fMRI data

Less intuitive

-10 -5 0 5 10

-10

-5

0

5

10

1

2

PriorLikelihoodPosterior

Page 19: Bayesian models for fMRI data

Likelihood distributions from different subjects are independent one can use the posterior from one subject as the prior for the next

NiiN

iN

yy

N

iyyyy

N

iyyy

CC

CC

,...,|1

|1|,...,|

1

1|

1,...,|

11

1

Under Gaussian assumptions this is easy to compute:

groupposterior covariance

individualposterior covariances

groupposterior mean

individual posterior covariances and means“Today’s posterior is tomorrow’s prior”

Bayesian (fixed effects) group analysis

1 1

1

12

1 23

1 1

|

,

N N

N

ii

N

ii

N

ii

N N

p y y p y y p

p p y

p y p y

p y y p y

p y y p y

Page 20: Bayesian models for fMRI data

Bayesian analyses in SPM8• Segmentation & spatial normalisation• Posterior probability maps (PPMs)

– 1st level: specific spatial priors– 2nd level: global spatial priors

• Dynamic Causal Modelling (DCM)• Bayesian Model Selection (BMS)• EEG: source reconstruction

Page 21: Bayesian models for fMRI data

Spatial normalisation: Bayesian regularisation

Deformations consist of a linear combination of smooth basis functions lowest frequencies of a 3D

discrete cosine transform.Find maximum a posteriori (MAP) estimates: simultaneously minimise

– squared difference between template and source image – squared difference between parameters and their priors

)(log)(log)|(log)|(log yppypyp MAP:

Deformation parameters

“Difference” between template and source image

Squared distance between parameters and their expected values

(regularisation)

Page 22: Bayesian models for fMRI data

Bayesian segmentation with empirical priors

•Goal: for each voxel, compute probability that it belongs to a particular tissue type, given its intensity• Likelihood model: Intensities are modelled by a mixture of Gaussian distributions representing different tissue classes (e.g. GM, WM, CSF).• Priors are obtained from tissue probability maps (segmented images of 151 subjects).

Ashburner & Friston 2005, NeuroImage

p (tissue | intensity) p (intensity | tissue) ∙ p (tissue)

Page 23: Bayesian models for fMRI data

Unified segmentation & normalisation• Circular relationship between segmentation & normalisation:

– Knowing which tissue type a voxel belongs to helps normalisation.– Knowing where a voxel is (in standard space) helps segmentation.

• Build a joint generative model:– model how voxel intensities result from mixture of tissue type distributions– model how tissue types of one brain have to be spatially deformed to

match those of another brain

• Using a priori knowledge about the parameters: adopt Bayesian approach and maximise the posterior probability

Ashburner & Friston 2005, NeuroImage

Page 24: Bayesian models for fMRI data

XyGeneral Linear Model:

What are the priors?

),0(~ CNwith

• In “classical” SPM, no priors (= “flat” priors)• Full Bayes: priors are predefined on a principled or

empirical basis• Empirical Bayes: priors are estimated from the data,

assuming a hierarchical generative model PPMs in SPM Parameters of one level = priors for

distribution of parameters at lower levelParameters and hyperparameters at each level can be estimated using EM

Bayesian fMRI analyses

Page 25: Bayesian models for fMRI data

Hierarchical models and Empirical Bayes

)()()()1(

)2()2()2()1(

)1()1()1(

nnnn X

X

Xy

Hierarchicalmodel

ParametricEmpirical

Bayes (PEB)

EM = PEB = ReML

RestrictedMaximumLikelihood

(ReML)

Single-levelmodel

)()()1(

)()1()1(

)2()1()1(

...

nn

nn

XXXX

Xy

Page 26: Bayesian models for fMRI data

Posterior Probability Maps (PPMs)

)|( yp )|( yp

Posterior distribution: probability of the effect given the data

Posterior probability map: images of the probability (confidence) that an activation exceeds some specified threshold, given the data y

)|( yp

Two thresholds:• activation threshold : percentage of whole brain mean

signal (physiologically relevant size of effect)• probability that voxels must exceed to be displayed

(e.g. 95%)

mean: size of effectprecision: variability

Page 27: Bayesian models for fMRI data

PPMs vs. SPMs

Likelihood PriorPosterior

SPMs

PPMs

u

)(yft )0|( utp )|( yp

)()|()|( pypyp

Bayesian test: Classical t-test:

Page 28: Bayesian models for fMRI data

2nd level PPMs with global priors

In the absence of evidenceto the contrary, parameters

will shrink to zero.

)1()1()1( Xy1st level (GLM):

2nd level (shrinkage prior):

),0()( CNp

)2(

)2()2()1(

0

),0()( CNp

)(p

0

Basic idea: use the variance of over voxels as prior variance of at any particular voxel.2nd level: (2) = average effect over voxels, (2) = voxel-to-voxel variation. (1) reflects regionally specific effects assume that it sums to zero over all voxels shrinkage prior at the second level variance of this prior is implicitly estimated by estimating (2)

Page 29: Bayesian models for fMRI data

Shrinkage Priors Small & variable effect Large & variable effect

Small but clear effect Large & clear effect

Page 30: Bayesian models for fMRI data

2nd level PPMs with global priors

)1( Xy

1st level (GLM):

2nd level (shrinkage prior):

),0()( CNp

)2(0 ),0()( CNp

Once Cε and C are known, we can apply the usual rule for computing the posterior mean & covariance:

yCXCm

CXCXCT

yy

Ty

1||

111|

We are looking for the same effect over multiple voxels

Pooled estimation of C over voxels

voxel-specific

global pooled estimate

Friston & Penny 2003, NeuroImage

Page 31: Bayesian models for fMRI data

PPMs and multiple comparisons

No need to correct for multiple comparisons:Thresholding a PPM at 95% confidence: in every voxel, the posterior probability of an activation is 95%.At most, 5% of the voxels identified could have activations less than . Independent of the search volume, thresholding a PPM thus puts an upper bound on the false discovery rate.

Page 32: Bayesian models for fMRI data

PPMs vs.SPMsSP

Mmip

[0, 0

, 0]

<

< <

PPM2.06

rest [2.06]

SPMresults:C:\home\spm\analysis_PET

Height threshold P = 0.95

Ex tent threshold k = 0 voxels

Design matrix1 4 7 10 13 16 19 22

147

1013161922252831343740434649525560

contrast(s)

4

SPMm

ip[0

, 0, 0

]

<

< <

SPM{T39.0

}

rest

SPMresults:C:\home\spm\analysis_PET

Height threshold T = 5.50

Extent threshold k = 0 voxels

Design matrix1 4 7 10 13 16 19 22

147

1013161922252831343740434649525560

contrast(s)

3

PPMs: Show activations greater than a given size

SPMs: Show voxels with non-zero

activations

Page 33: Bayesian models for fMRI data

PPMs: pros and cons

• One can infer that a cause did not elicit a response• Inference is independent of search volume• SPMs conflate effect-size and effect-variability

DisadvantagesAdvantages• Estimating priors over voxels is computationally demanding • Practical benefits are yet to be established • Thresholds other than zero require justification

Page 34: Bayesian models for fMRI data

1st level PPMs with local spatial priors• Neighbouring voxels often not independent• Spatial dependencies vary across the brain• But spatial smoothing in SPM is uniform• Matched filter theorem: SNR maximal when

smoothing the data with a kernel which matches the smoothness of the true signal

• Basic idea: estimate regional spatial dependencies from the data and use this as a prior in a PPM regionally specific smoothing markedly increased sensitivity

Contrast map

AR(1) mapPenny et al. 2005, NeuroImage

Page 35: Bayesian models for fMRI data

A

q1 q2

W

Y

1

1 2; ,

K

kk

k k

p p

p Ga q q

α

1

11; ,

KTk

k

T T Tk k k

p p

p N

W w

w w 0 S S

u1 u2

1

1 2; ,

N

nn

n n

p p

p Ga u u

λ

1

1 1

( ) ( )

( ) ; , ( )

P

pp

Tp p p

p p

p N

A a

a a 0 S S

Y=XW+E

r1 r2

1

1 2

( ) ( )

( ) ( ; , )

P

pp

p p

p p

p Ga r r

β

The generative spatio-temporal model

Penny et al. 2005, NeuroImage

= spatial precision of parameters = observation noise precision = precision of AR coefficients

observation noise

regressioncoefficients

autoregressive parameters

Page 36: Bayesian models for fMRI data

11,0; SSwNwp T

kTk

Tk

Prior for k-th parameter:

Shrinkage prior

Spatial kernel matrix

Spatial precision: determines the

amount of smoothness

The spatial prior

Different choices possible for spatial kernel matrix S.Currently used in SPM: Laplacian prior (same as in LORETA)

Page 37: Bayesian models for fMRI data

Smoothing

Global prior Laplacian Prior

Example: application to event-related fMRI data

Contrast maps for familiar vs. non-familiar faces, obtained with

- smoothing- global spatial prior- Laplacian prior

Page 38: Bayesian models for fMRI data

Bayesian model selection (BMS)Given competing hypotheses on structure & functional mechanisms of a system, which model is the best?

For which model m does p(y|m) become maximal?

Which model represents thebest balance between model fit and model complexity?

Pitt & Miyung (2002), TICS

Page 39: Bayesian models for fMRI data

dmpmypmyp )|(),|()|( Model evidence:

Various approximations, e.g.:- negative free energy- AIC- BIC

Penny et al. (2004) NeuroImage

Bayesian model selection (BMS)

)|()|(

2

1

mypmypBF

Model comparison via Bayes factor:

)|()|(),|(),|(

mypmpmypmyp Bayes’ rules:

accounts for both accuracy and complexity of the model

allows for inference about structure (generalisability) of the model

Page 40: Bayesian models for fMRI data

Example: BMS of dynamic causal models

modulation of back-ward or forward connection?

additional drivingeffect of attentionon PPC?

bilinear or nonlinearmodulation offorward connection?

V1 V5stim

PPCM2

attention

V1 V5stim

PPCM1

attention

V1 V5stim

PPCM3attention

V1 V5stim

PPCM4attention

BF = 2966M2 better than M1

M3 better than M2BF = 12

M4 better than M3BF = 23

Stephan et al. (2008) NeuroImage

Page 41: Bayesian models for fMRI data

Thank you