Bayesian Methods Will Penny and Guillaume Flandin Wellcome Department of Imaging Neuroscience, University College London, UK SPM Course, London, May 12 th 2006
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
Bayes rule YY Given p(Y), p( ) and p(Y, ) Conditional densities are given by Eliminating p(Y, ) gives Bayes rule Likelihood Prior Evidence Posterior
Gaussian Likelihood and Prior Posterior Relative Precision Weighting Prior Likelihood Posterior
Bivariate Gaussian
Model Comparison Select the model m with the highest probability given the data: Model comparison and Bayes factor: Model evidence (marginal likelihood): Accuracy Complexity B 12 p(m 1 |Y)Evidence 1 to Weak 3 to Positive 20 to Strong 150 99 Very strong
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
ANOVA Four conditions Model 0 (dotted lines) – no effect Model 1 (solid lines) – an effect
Bayesian Classical p=0.05 BF=3 Compare inferences on 100 data sets
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
Spatial Normalisation Deformation parameters Mean square difference between template and source image (Likelihood) Mean square difference between template and source image (Likelihood) Squared distance between parameters and their expected values (Prior) Squared distance between parameters and their expected values (Prior) Template Max Posterior Max Likelihood Posterior
Segmentation Intensities are modelled by a mixture of K Gaussian distributions. Overlay prior belonging probability maps to assist the segmentation: Prior probability of each voxel being of a particular type is derived from segmented images of 151 subjects. Intensities are modelled by a mixture of K Gaussian distributions. Overlay prior belonging probability maps to assist the segmentation: Prior probability of each voxel being of a particular type is derived from segmented images of 151 subjects.
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
fMRI stats Even without applied spatial smoothing, activation maps (and maps of eg. AR coefficients) have spatial structure. AR(1)Contrast Definition of a spatial prior via Gaussian Markov Random Field Automatic spatial regularisation of Regression coefficients and AR coefficients
Generative Model A Y Y=X β +E where E is an AR(p) General Linear Model with Auto-Regressive error terms (GLM-AR):
Spatial prior Over the regression coefficients: Shrinkage prior Same prior on the AR coefficients. Spatial kernel matrix Spatial precison: determines the amount of smoothness Gaussian Markov Random Field priors 1 on diagonal elements d ii d ij > 0 if voxels i and j are neighbors. 0 elsewhere
Convergence & Sensitivity o Global o Spatial o Smoothing Sensitivity Iteration Number F 1-Specificity ROC curve Convergence
Event related fMRI: familiar versus unfamiliar faces Global prior Spatial Prior Smoothing
Posterior Probability Maps Posterior distribution: probability of getting an effect, given the data Posterior probability map: images of the probability or confidence that an activation exceeds some specified threshold, given the data 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%) 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 effect precision: variability
Posterior Probability Maps Mean (Cbeta_*.img) Std dev (SDbeta_*.img) PPM (spmP_*.img) Activation threshold Probability Posterior probability distribution p( |Y )
SPM5 Interface
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
Hemodynamic basis sets Informed Fourier Gamma
FIR models Time after event Size of signal 5s
Inf2: Canonical + temporal deriv
SPM5: from spm_vb_roi_basis.m
Overview Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)
Dynamic Causal Models V1 V5 SPC Motion Photic Attention V1 V5 SPC Motion Photic Attention V1V5SPC Motion Photic Attention Bayesian Evidence: Bayes factors: m=1 m=3 m= Attention 0.03
Summary Bayes rule and model comparison ANOVAs Normalisation Segmentation fMRI stats Hemodynamic models Connectivity models (DCM)