Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging...

37
Bayesian Modelling of Bayesian Modelling of Functional Imaging Data Functional Imaging Data Will Penny Will Penny The Wellcome Department of Imaging The Wellcome Department of Imaging Neuroscience, UCL Neuroscience, UCL http//:www.fil.ion.ucl.ac.uk/~wpenny http//:www.fil.ion.ucl.ac.uk/~wpenny

Transcript of Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging...

Page 1: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Bayesian Modelling of Bayesian Modelling of Functional Imaging DataFunctional Imaging DataBayesian Modelling of Bayesian Modelling of

Functional Imaging DataFunctional Imaging Data

Will PennyWill Penny

The Wellcome Department of Imaging Neuroscience, The Wellcome Department of Imaging Neuroscience, UCLUCL

http//:www.fil.ion.ucl.ac.uk/~wpennyhttp//:www.fil.ion.ucl.ac.uk/~wpenny

Page 2: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

OverviewOverviewOverviewOverview

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

Page 3: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

First level of Bayesian InferenceFirst level of Bayesian InferenceFirst level of Bayesian InferenceFirst level of Bayesian Inference

)(

)()|()|(

yp

pypyp

First level of Inference: What are the best parameters ?

We have data, y, and some parameters,

Parameters are of model, M, ….

Page 4: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

First and Second LevelsFirst and Second LevelsFirst and Second LevelsFirst and Second Levels

)|(

)|(),|(),|(

Myp

MpMypMyp

The first level again, writing in dependence on M:

)(

)()|()|(

yp

MpMypyMp

Second level of Inference: What’s the best model ?

Page 5: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Model SelectionModel SelectionModel SelectionModel Selection

We need to compute the Bayesian Evidence:

dpypMyp )()|()|(

We can’t always compute it exactly, but we can approximate it: Log p(y|M) ~ F(M)

Evidence = Accuracy - Complexity

Page 6: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Model AveragingModel AveragingModel AveragingModel Averaging

Revisiting the first level:

)|(),|()|( yMpMypypM

Model-dependent posteriors are weighted accordingto the posterior probability of each model

Page 7: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Multiple Levels

12112 )|()|()|( dwwwpwYpwYp

23223 )|()|()|( dwwwpwYpwYp

22211 )|(),|()|( dwYwpwYwpYwp

33322 )|(),|()|( dwYwpwYwpYwp

)(

)()|()|(

333

Yp

wpwYpYwp

w3

Y

w1

w2

333 )()|()( dwwpwYpYp

Evidence Up Posteriors Down

w3

Y

w1

w2

Page 8: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

OverviewOverviewOverviewOverview

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

Page 9: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Noise sources in fMRINoise sources in fMRINoise sources in fMRINoise sources in fMRI

1. Slow drifts due to instrumentation instabilities1. Slow drifts due to instrumentation instabilities

2. Subject movement2. Subject movement

3. 3. Vasomotor oscillation ~ 0.1 HzVasomotor oscillation ~ 0.1 Hz

4. Respiratory activity ~ 0.25 Hz4. Respiratory activity ~ 0.25 Hz

5. Cardiac activity ~ 1 Hz5. Cardiac activity ~ 1 Hz

1. Slow drifts due to instrumentation instabilities1. Slow drifts due to instrumentation instabilities

2. Subject movement2. Subject movement

3. 3. Vasomotor oscillation ~ 0.1 HzVasomotor oscillation ~ 0.1 Hz

4. Respiratory activity ~ 0.25 Hz4. Respiratory activity ~ 0.25 Hz

5. Cardiac activity ~ 1 Hz5. Cardiac activity ~ 1 Hz

Remove with ICA/PCA – but non-automatic

Page 10: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

fMRI time series modelfMRI time series modelfMRI time series modelfMRI time series model

• Use a General Linear Model:Use a General Linear Model:

y = X y = X + e + e

• The errors are modelled as an AR(p) processThe errors are modelled as an AR(p) process

• The order can be selected using Bayesian The order can be selected using Bayesian evidenceevidence

• Use a General Linear Model:Use a General Linear Model:

y = X y = X + e + e

• The errors are modelled as an AR(p) processThe errors are modelled as an AR(p) process

• The order can be selected using Bayesian The order can be selected using Bayesian evidenceevidence

Page 11: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Synthetic GLM-AR(3) DataSynthetic GLM-AR(3) DataSynthetic GLM-AR(3) DataSynthetic GLM-AR(3) Data

Page 12: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Map of AR model order, pMap of AR model order, pMap of AR model order, pMap of AR model order, p

p=0,1,2,3FaceData

Page 13: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

AngiogramsAngiogramsAngiogramsAngiograms

Page 14: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Other subjects, aOther subjects, a11Other subjects, aOther subjects, a11

Ring ofvoxels with

highly correlatederror

Page 15: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Other subjects, aOther subjects, a11Other subjects, aOther subjects, a11

Unmodelledsignal

orincreasedcardiac

artifact due to increasedblood flow?

Page 16: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

OverviewOverviewOverviewOverview

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The SignalA model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The SignalA model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

Page 17: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

fMRI time series modelfMRI time series modelfMRI time series modelfMRI time series model

• Use a General Linear Model for the signal :Use a General Linear Model for the signal :

y = X y = X + e + e

• Priors factorise into groups:Priors factorise into groups:

p(p() = p() = p(11) p() p(22) p() p(33))

• Priors in each group may be smoothness Priors in each group may be smoothness priors or Gaussianspriors or Gaussians

• Use a General Linear Model for the signal :Use a General Linear Model for the signal :

y = X y = X + e + e

• Priors factorise into groups:Priors factorise into groups:

p(p() = p() = p(11) p() p(22) p() p(33))

• Priors in each group may be smoothness Priors in each group may be smoothness priors or Gaussianspriors or Gaussians

Page 18: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Rik’s dataRik’s dataRik’s dataRik’s data

24 Transverse Slices acquired with TR=2s

Press left key if famous, right key if not

Time series of 351 images

Part of larger study lookingat factors influencing repetition suppresion

Every face presented twice

Page 19: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Modelling the SignalModelling the SignalModelling the SignalModelling the Signal

Assumption: Neuronal Event Stream is Identical to the Experimental Event Stream

Convolve event-stream with basis functions to account for the HRF

Page 20: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

FIR modelFIR modelFIR modelFIR model

Separate smoothness priors for each event type

Design matrixfor FIR model with

8 time bins in a 20-second window

Q. Is this a good prior ?

Page 21: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

FIR basis setFIR basis setFIR basis setFIR basis set

Left occipital cortex (x=-33, y=-81, z=-24)

FIR model average responses

Page 22: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

FIR basis setFIR basis setFIR basis setFIR basis set

Right fusiform cortex (x=45, y=-60, z=-18)

FIR model average responses

Page 23: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

RFX-Event modelRFX-Event modelRFX-Event modelRFX-Event model

Design Matrix

97 parameters ! But only 24 effective parameters

Responses to each event of type A are randomly distributed about some typical “type A” response

Page 24: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Non-stationary modelsNon-stationary modelsNon-stationary modelsNon-stationary models

As RFX-event but smoothness priors

Testing for smooth temporal variations statistically …

Page 25: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Simpler DesignsSimpler DesignsSimpler DesignsSimpler Designs

Canon. + Temp. Deriv Gammas

Page 26: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Comparing Types of ModelsComparing Types of ModelsComparing Types of ModelsComparing Types of Models

Left Occipital

Canon. + Temp. Deriv

Gammas

RFX-Event

FIR

Right Fusiform

Gammas

RFX-Event

FIR

Canon. + Temp. Deriv

Evidence

Model averaging to get peak post-stimulus response

NonStat NonStat

Page 27: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

OverviewOverviewOverviewOverview

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

1.1. Multiple levels of Bayesian InferenceMultiple levels of Bayesian Inference

2.2. A model of fMRI time series: The NoiseA model of fMRI time series: The Noise

3.3. A model of fMRI time series: The Signal A model of fMRI time series: The Signal

4.4. The fMRI Inverse ProblemThe fMRI Inverse Problem

Page 28: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

The fMRI Inverse ProblemThe fMRI Inverse ProblemThe fMRI Inverse ProblemThe fMRI Inverse Problem

• In EEG there is an ill-posed spatial inverse In EEG there is an ill-posed spatial inverse problem. We wish to recover the electrical problem. We wish to recover the electrical activity at a particular voxel from scalp activity at a particular voxel from scalp electrical activity.electrical activity.

• It is solved via modelling.It is solved via modelling.

• In fMRI there is an ill-posed temporal inverse In fMRI there is an ill-posed temporal inverse problem. We wish to recover the electrical problem. We wish to recover the electrical activity at a voxel from hemodynamic activity at activity at a voxel from hemodynamic activity at that voxel.that voxel.

• In EEG there is an ill-posed spatial inverse In EEG there is an ill-posed spatial inverse problem. We wish to recover the electrical problem. We wish to recover the electrical activity at a particular voxel from scalp activity at a particular voxel from scalp electrical activity.electrical activity.

• It is solved via modelling.It is solved via modelling.

• In fMRI there is an ill-posed temporal inverse In fMRI there is an ill-posed temporal inverse problem. We wish to recover the electrical problem. We wish to recover the electrical activity at a voxel from hemodynamic activity at activity at a voxel from hemodynamic activity at that voxel.that voxel.

Page 29: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

HDM & DCM: Conceptual shiftHDM & DCM: Conceptual shiftHDM & DCM: Conceptual shiftHDM & DCM: Conceptual shift

• For a given subject and point in brain, the HRF For a given subject and point in brain, the HRF is fixed ! is fixed !

• Need two-stage models Need two-stage models

(i) How do experimental events affect neurodynamics ?(i) How do experimental events affect neurodynamics ?

A. Via a bilinear dynamical modelA. Via a bilinear dynamical model

(ii) How do neurodynamics affect hemodynamics ?(ii) How do neurodynamics affect hemodynamics ?

A. Via the balloon modelA. Via the balloon model

• For a given subject and point in brain, the HRF For a given subject and point in brain, the HRF is fixed ! is fixed !

• Need two-stage models Need two-stage models

(i) How do experimental events affect neurodynamics ?(i) How do experimental events affect neurodynamics ?

A. Via a bilinear dynamical modelA. Via a bilinear dynamical model

(ii) How do neurodynamics affect hemodynamics ?(ii) How do neurodynamics affect hemodynamics ?

A. Via the balloon modelA. Via the balloon model

Page 30: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Bilinear DynamicsBilinear DynamicsBilinear DynamicsBilinear Dynamics

CuuBzAzz -

Z2

Stimuliu1

Setu2

Z1

+

+

-

-

-+

u1

Z1

u2

Z2

Page 31: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Neuronal Transients and BOLD: INeuronal Transients and BOLD: INeuronal Transients and BOLD: INeuronal Transients and BOLD: I

300ms 500ms

More enduring transients produce bigger BOLD signals

SecondsSeconds

Bigger transients produce bigger BOLD signals

The interaction changes the shape of the response

Page 32: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Neuronal Transients and BOLD: IINeuronal Transients and BOLD: IINeuronal Transients and BOLD: IINeuronal Transients and BOLD: II

BOLD is sensitive to frequencycontent of transients

Seconds

Seconds

Seconds

Relative timings of transients areamplified in BOLD

Page 33: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Inferences about Neuronal TransientsInferences about Neuronal TransientsInferences about Neuronal TransientsInferences about Neuronal Transients

CuuBzAzz U1,U2,F1,F2

F2

Z1 -

-+ Even for a single area we can ask eg.:

Does the second presentation of a familiar face

(a) increase the magnitude of the neuronal transient ?,

(b) increase its time constant ?

t

m(or fast v. slow responses)

Page 34: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

ConclusionsConclusionsConclusionsConclusions

• Bayesian model selection and averaging can Bayesian model selection and averaging can help in the choice of signal and noise modelshelp in the choice of signal and noise models

• I have described some useful exploratary toolsI have described some useful exploratary tools

• Spatial ModelsSpatial Models

• Need to solve fMRI inverse problemNeed to solve fMRI inverse problem

• Bayesian model selection and averaging can Bayesian model selection and averaging can help in the choice of signal and noise modelshelp in the choice of signal and noise models

• I have described some useful exploratary toolsI have described some useful exploratary tools

• Spatial ModelsSpatial Models

• Need to solve fMRI inverse problemNeed to solve fMRI inverse problem

Page 35: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Gaussian-smoothed contrast imagesGaussian-smoothed contrast imagesGaussian-smoothed contrast imagesGaussian-smoothed contrast images

Page 36: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

Wavelet-smoothed contrast imagesWavelet-smoothed contrast imagesWavelet-smoothed contrast imagesWavelet-smoothed contrast images

Page 37: Bayesian Modelling of Functional Imaging Data Will Penny The Wellcome Department of Imaging Neuroscience, UCL http//:wpenny.

w3

Y

w1

w2

Analogy: Processing in sensory cortex

12112 )|()|()|( dwwwpwYpwYp

333 )()|()( dwwpwYpYp

23223 )|()|()|( dwwwpwYpwYp

22211 )|(),|()|( dwYwpwYwpYwp

33322 )|(),|()|( dwYwpwYwpYwp

)(

)()|()|(

333

Yp

wpwYpYwp

Evidence Up Posteriors Down

w3

Y

w1

w2

“Reagan”