Bayesian Inference Will Penny Wellcome Trust Centre for Neuroimaging, UCL, UK. SPM Course, Virginia Tech, January 2012
What is Bayesian Inference? (From Daniel Wolpert)
Bayesian segmentation and normalisation realignment smoothing general linear model normalisation statistical inference p <0.05 Gaussian field theory template
Bayesian segmentation and normalisation Smoothness modelling realignment smoothing general linear model normalisation statistical inference p <0.05 Gaussian field theory template
Bayesian segmentation and normalisation Smoothness estimation Posterior probability maps (PPMs) realignment smoothing general linear model normalisation statistical inference p <0.05 Gaussian field theory template
Bayesian segmentation and normalisation Smoothness estimation Posterior probability maps (PPMs) Dynamic Causal Modelling realignment smoothing general linear model normalisation statistical inference p <0.05 Gaussian field theory template
Overview Parameter Inference PPMs, DCMs Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
Overview Parameter Inference PPMs, DCMs Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
SPM Interface
Posterior Probability Maps Y X p 1 1 N 0, L 2 amri Smooth Y (RFT) Observation noise prior precision of GLM coeff prior precision of AR coeff GLM A AR coeff (correlated noise) ML Bayesian Y observations
ROC curve Sensitivity 1-Specificity
Posterior Probability Maps activation threshold s th Probability mass p Display only voxels that exceed e.g. 95% p p th Mean (Cbeta_*.img) Posterior density PPM (spmp_*.img) probability of getting an effect, given the data Std dev (SDbeta_*.img) q( n) N( n, n) mean: size of effect covariance: uncertainty
Overview Parameter Inference PPMs, DCMs Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
Dynamic Causal Models SPC Posterior Density V1 V5 Priors are physiological or encourage stable dynamics V5->SPC
Parameter Inference GLMs, PPMs, DCMs Overview Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
Model Evidence Bayes Rule: ) ( ) ( ), ( ), ( y m p m p m y p m y p normalizing constant d m p m y p y m p ) ( ), ( ) ( Model evidence
Model Posterior Evidence p( y m) p( m) pm ( y) p( y) Model Prior B ij Bayes factor: p( y m i) p( y m j) Model, m=i Model, m=j SPC SPC V1 V1 V5 V5
Model Posterior Evidence p( y m) p( m) pm ( y) p( y) Model Prior B ij Bayes factor: p( y m i) p( y m j) For Equal Model Priors
Overview Parameter Inference PPMs, DCMs Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
Bayes Factors versus p-values Two sample t-test Subjects Conditions
p=0.05 Bayesian BF=3 Classical
Bayesian BF=20 BF=3 Classical
p=0.05 Bayesian BF=20 BF=3 Classical
p=0.01 p=0.05 Bayesian BF=20 BF=3 Classical
Parameter Inference GLMs, PPMs, DCMs Overview Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
Initial Point Free Energy Optimisation Precisions, Parameters,
Parameter Inference GLMs, PPMs, DCMs Overview Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
incorrect model (m 2 ) correct model (m 1 ) u 2 u 2 x 3 x 3 u 1 x 1 x 2 u 1 x 1 x 2 m 2 m 1 Sim ulated data sets -5-4 -3-2 -1 0 1 2 3 4 5 Log model evidence differences Figure 2
LD LD LVF MOG FG FG MOG MOG FG FG MOG LD RVF LD LVF LD LD LG LG LG LG RVF stim. LD LVF stim. RVF stim. LD RVF LVF stim. Subjects m 2 m 1 Models from Klaas Stephan -35-30 -25-20 -15-10 -5 0 5 Log model evidence differences
Random Effects (RFX) Inference 0.8 A log p(y a) n m) r 0.6 0.4 0.2 Subjects 5 10 15 0 1 2 3 4 5 6 Models 20 1 2 3 4 5 6 Models
Initial Point Gibbs Sampling p( r A, y) Frequencies, r Stochastic Method Assignments, A p( A r, Y )
log p(y a) log p(y n m) ) ( ] log ) ( exp[log ' ' n n m nm nm nm m n nm g Mult a u u g r m y p u ) ( 0 Dir r a n nm m m ), ( Y r A p ), ( y A r p Gibbs Sampling
LD LD LVF MOG FG FG MOG MOG FG FG MOG LD RVF LD LVF LD LD LG LG LG LG RVF stim. LD LVF stim. RVF stim. LD RVF LVF stim. Subjects m 2 m 1 11/12=0.92-35 -30-25 -20-15 -10-5 0 5 Log model evidence differences
5 p(r 1 >0.5 y) = 0.997 4.5 4 3.5 3 p(r 1 y) 2.5 2 1.5 1 0.5 r 1 0.843 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 r 1
Parameter Inference GLMs, PPMs, DCMs Overview Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference
PPMs for Models log p( y m) F( q) Log-evidence maps model 1 subject 1 subject N model K Compute log-evidence for each model/subject
PPMs for Models log p( y m) F( q) Log-evidence maps BMS maps subject 1 model 1 subject N q( 0.5) r k 0.941 r k PPM q( r k ) model K Compute log-evidence for each model/subject r k k EPM Probability that model k generated data Rosa et al Neuroimage, 2009
Computational fmri: Harrison et al (Frontiers 2010) Short Time Scale Long Time Scale Primary visual cortex Frontal cortex
Double Dissociations Short Time Scale Long Time Scale Primary visual cortex Frontal cortex
Parameter Inference GLMs, PPMs, DCMs Summary Model Inference Model Evidence, Bayes factors (cf. p-values) Model Estimation Variational Bayes Groups of subjects RFX model inference, PPM model inference