Dynamic Causal Modelling (DCM) for fMRI Rosalyn Moran Virginia Tech Carilion Research Institute With thanks to the FIL Methods Group for slides and images SPM Course, UCL May 2013 Dynamic causal modelling (DCM) • DCM framework was introduced in 2003 for fMRI by Karl Friston, Lee Harrison and Will Penny (NeuroImage 19:1273-1302) • part of the SPM software package • currently more than 250 160 published papers on DCM Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Principles of Organisation Functional specialization Functional integration Functional vs Effective Connectivity Functional connectivity is defined in terms of statistical dependencies, it is an operational concept that underlies the detection of (inference about) a functional connection, without any commitment to how that connection was caused - Assessing mutual information & testing for significant departures from zero - Simple assessment: patterns of correlations - Undirected or Directed Functional Connectivity eg. Granger Connectivity Effective connectivity is defined at the level of hidden neuronal states generating measurements. Effective connectivity is always directed and rests on an explicit (parameterised) model of causal influences — usually expressed in terms of difference (discrete time) or differential (continuous time) equations. - Eg. DCM - causality is inherent in the form of the model ie. fluctuations in hidden neuronal states cause changes in others: for example, changes in postsynaptic potentials in one area are caused by inputs from other areas. Dynamic Causal Modeling (DCM) Hemodynamic forward model: neural activityBOLD Electromagnetic forward model: neural activityEEG MEG LFP Neural state equation: dx F ( x , u, ) dt fMRI simple neuronal model complicated forward model EEG/MEG complicated neuronal model simple forward model inputs Deterministic DCM x = (A + uB)x + Cu y y H{2} y = g(x, H ) + e e ~ N (0, s ) x2 H{1} A(2,2) A(2,1) C(1) u1 A(1,2) x1 B(1,2) A(1,1) u2 Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Example: a linear model of interacting visual regions x4 = a42 x2 + a43 x3 + a44 x4 x3 = a31x1 + a33 x3 + a34 x4 x3 FG left FG right x1 LG left LG right x4 x2 RVF LVF u2 u1 x1 = a11x1 + a12 x2 + a13 x3 + c12u2 Visual input in the - left (LVF) - right (RVF) visual field. LG = lingual gyrus FG = fusiform gyrus x2 = a21x1 + a22 x2 + a24 x4 + c21u1 Example: a linear model of interacting visual regions x3 x1 FG left LG left FG right LG right x4 LG = lingual gyrus FG = fusiform gyrus x2 Visual input in the - left (LVF) - right (RVF) visual field. RVF LVF u2 u1 x1 = a11x1 + a12 x2 + a13 x3 + c12u2 x2 = a21x1 + a22 x2 + a24 x4 + c21u1 x3 = a31 x1 + a33 x3 + a34 x4 x4 = a42 x2 + a43 x3 + a44 x4 Example: a linear model of interacting visual regions x3 x1 FG left LG left { A, C} LG right x4 LG = lingual gyrus FG = fusiform gyrus x2 Visual input in the - left (LVF) - right (RVF) visual field. RVF LVF u2 u1 state changes x = Ax +Cu FG right é ê ê ê ê ê êë x1 ùú éê x2 ú ê ú=ê x3 ú ê ú ê x4 úû êë effective connectivity 0 ùé úê a21 a22 0 a24 ú ê úê a31 0 a33 a34 ú ê úê 0 a42 a43 a44 úû êë a11 a12 a13 system state input parameters x1 ùú é 0 ê x2 ú ê c21 ú+ê x3 ú ê 0 ú ê 0 x4 úû ë c12 0 0 0 external inputs ù úé ù úê u1 ú úê ú úë u2 û ú û Extension: bilinear model x3 FG left FG right x4 m x = (A+ åu j B ( j ) )x + Cu j=1 x1 é ê ê ê ê ê êë ì x1 ù ïéê ú x2 ú ïïê ú = íê x3 ú ïê ú ïê x4 úû ïêë î a31 0 0 a42 LG right x2 RVF CONTEXT LVF u2 u3 u1 0 ùú é ê 0 a24 ú ê ú + u3 ê a33 a34 ú ê ú a43 a44 úû êë a11 a12 a13 a21 a22 LG left (3) 12 0 b 0 0 0 0 0 0 0 0 0 0 ùü 0 úï ï 0 ú ïý (3) ú b34 ú ï ï ú 0 û ïþ é ê ê ê ê ê êë x1 ù é 0 ú ê x2 ú ê c21 ú+ê x3 ú ê 0 ú x4 úû êë 0 c12 0 0 0 0 0 0 0 ù úé u1 ù ú úê úê u2 ú úê u ú úêë 3 úû û Vanilla DCM: Deterministic Bilinear DCM driving input Simply a two-dimensional taylor expansion (around x0=0, u0=0): dx f f f f ( x, u) f ( x0 ,0) x u ux ... dt x u xu 2 ¶f A= ¶x ¶f C= ¶u modulation u=0 Bilinear state equation: x=0 ¶2 f B= ¶x¶u m dx A ui B ( i ) x Cu dt i 1 DCM parameters = rate constants Generic solution to the ODEs in DCM: s z1 dz1 dt sz1 z1 (t ) z1 (0) exp( st ), Decay function A 0.10 B If A B is 0.10 s-1 this means that, per unit time, the increase in activity in B corresponds to 10% of the activity in A 1 0.8 0.6 0.5z1 (0) 0.4 0.2 0 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 ln 2 / s z1 (0) 1 Example: context-dependent decay stimuli u1 context u2 u1 - + x = Ax + u2 B (2) x + Cu1 é 2 é x ù é -1 a ù b11 0 12 ú ê ê 1 ú=ê x + u2 ê 0 b2 ê x ú ê a ú -1 22 ë 2 û ë 21 û ë - x1 + + u1 u2 u2 Z1 + x1 x2 - Z2 - Penny et al. 2004, NeuroImage x2 ù é ùé u ù c 0 úx +ê 1 úê 1 ú ú ê 0 0 úê u ú ûë 2 û û ë bilinear DCM non-linear DCM modulation driving input driving input modulation Two-dimensional Taylor series (around x0=0, u0=0): dx 2 f x2 f f 2 f f ( x, u) f ( x0 ,0) ... x u ux ... 2 dt x 2 x u xu Bilinear state equation: m dx A ui B ( i ) x Cu dt i 1 Nonlinear state equation: m n dx (i ) ( j) A ui B x j D x Cu dt i 1 j 1 Neural population activity 0.4 0.3 0.2 u2 0.1 0 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 0.6 u1 0.4 x3 0.2 0 0.3 0.2 0.1 0 x1 x2 3 fMRI signal change (%) 2 1 0 Nonlinear dynamic causal model (DCM) 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 4 3 m n dx (i ) ( j) A ui B x j D x Cu dt i 1 j 1 2 1 0 -1 3 2 1 Stephan et al. 2008, NeuroImage 0 y y BOLD y activity x2(t) neuronal states hemodynamic model x integration modulatory input u2(t) t Neural state equation endogenous connectivity t λ activity x3(t) activity x1(t) driving input u1(t) y modulation of connectivity direct inputs x ( A u j B( j ) ) x Cu x x x u j x A B( j) x C u Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Basics of DCM: Neuronal and BOLD level y • Cognitive system is modelled at its underlying neuronal level (not directly accessible for fMRI). • The modelled neuronal dynamics (x) are λ transformed into area-specific BOLD signals (y) by a hemodynamic model (λ). • Overcoming Regional variability of the haemodynamic response • ie DCM not based on temporal precedence at the measurement level x Basics of DCM: Neuronal and BOLD level y PLoSBIOLOGY Identifying Neural Drivers with Functional MRI: An Electrophysiological Validation Olivier David 1,2*, Isabelle Guillemain 1,2, Sandrine Saillet 1,2, Sebastien Reyt 1,2, Colin Deransart 1,2, λ x Christoph Segebarth 1,2, Antoine Depaulis1,2 1 INSERM, U836, Grenoble Institut des Neurosciences, Grenoble, France, 2 Université Joseph Fourier, Grenoble, France Whether functional magnetic resonance imaging (fMRI) allows the identification of neural drivers remains an open question of particular importance to refine physiological and neuropsychological models of the brain, and/or to understand neurophysiopathology. Here, in a rat model of absence epilepsy showing spontaneous spike-and-wave discharges originating from the first somatosensory cortex (S1BF), we performed simultaneous electroencephalo“Connectivity analysis applied directly on graphic (EEG) and fMRI measurements, and subsequent intracerebral EEG (iEEG) recordings in regions strongly activated in fMRI (S1BF, thalamus, striatum). fMRI connectivity was determined from fMRI time series directly and fMRIand signals failed because from hidden state variables using a measure of Granger causality and Dynamic Causal Modelling that relates synaptic hemodynamics varied between regions, activity to fMRI. fMRI connectivity was compared to directed functional coupling estimated from iEEG using asymmetry in generalised synchronisation metrics. The neural driver of spike-and-wave discharges was estimated in S1BF from rendering termporal precedence iEEG, and from fMRI only when hemodynamic effects were explicitly removed. Functional connectivity analysis applied directly on fMRI signals failed because hemodynamics between regions, rendering temporal precedence irrelevant” ….The varied neural driver was irrelevant. This paper provides the first experimental substantiation of the theoretical possibility to improve identified using DCM, where these effects interregional coupling estimation from hidden neural states of fMRI. As such, it has important implications for future studies on brain connectivity using functional neuroimaging. are accounted for… Citation: David O, Guillemain I, Saillet S, Reyt S, Deransart C, et al. (2008) Identifying neural drivers with functional MRI: an electrophysiological validation. PLoS Biol 6(12): e315. doi:10.1371/journal.pbio.0060315 Introduction Distinguishing effer ent fr om affer ent connect ions i n distributed networks is critical to construct formal theories integrated neuroscience, these formal ideas have initiated a search for neural networks using sophisticated signal analysis techniques to estimate the connect ivity between distant regions [4,12–18]. At the brain level, connectivity analyses The hemodynamic model • 6 hemodynamic parameters: stimulus functions u t activity x(t ) { , , , , , } h neural state equation vasodilatory signal important for model fitting, but of no interest for statistical inference s = x - k s - g ( f -1) f s s hemodynamic state equations flow induction (rCBF) f s f • Computed separately for each area region-specific HRFs! changes in volume τv f v1 /α v v changes in dHb τq f E ( f,E0 ) qE0 v1/α q/v q BOLD signal Friston et al. 2000, NeuroImage Stephan et al. 2007, NeuroImage y(t) = l ( v, q) Estimated BOLD response The hemodynamic model • 6 hemodynamic parameters: stimulus functions u t activity x(t ) { , , , , , } h neural state equation vasodilatory signal important for model fitting, but of no interest for statistical inference s = x - k s - g ( f -1) f s s hemodynamic state equations flow induction (rCBF) f s f • Computed separately for each area region-specific HRFs! changes in volume τv f v1 /α v v changes in dHb τq f E ( f,E0 ) qE0 v1/α q/v q BOLD signal Friston et al. 2000, NeuroImage Stephan et al. 2007, NeuroImage y(t) = l ( v, q) Estimated BOLD response How interdependent are neural and hemodynamic parameter estimates? 1 A 0.8 5 0.6 10 B 0.4 15 C 0.2 20 0 25 -0.2 h ε 30 -0.4 35 -0.6 -0.8 40 5 10 15 20 25 30 35 40 -1 Stephan et al. 2007, NeuroImage Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias DCM is a Bayesian approach new data prior knowledge p( y | ) p ( ) p( | y ) p( y | ) p( ) posterior likelihood ∙ prior Bayes theorem allows one to formally incorporate prior knowledge into computing statistical probabilities. In DCM: empirical, principled & 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. stimulus function u Overview: parameter estimation • • • • Combining the neural and hemodynamic states gives the complete forward model. An observation model includes measurement error e and confounds X (e.g. drift). Bayesian inversion: parameter estimation by means of variational EM under Laplace approximation Result: Gaussian a posteriori parameter distributions, characterised by mean ηθ|y and covariance Cθ|y. neural state equation x ( A u j B j ) x Cu activity - dependent vasodilatory signal s z s γ( f 1) s s f parameters flow - induction (rCBF) hidden states z ={x,s, f ,v,q} state equation z = F(x,u,q ) f s h { , , , , } f n { A, B1...B m , C} { h , n } changes in volume τv f v1 /α v changes in dHb τq f E ( f, ) q v1/α q/v q v ηθ|y y (x ) y h(u , ) X e modelled BOLD response observation model VB in a nutshell (mean-field approximation) Neg. free-energy approx. to model evidence. Mean field approx. Maximise neg. free energy wrt. q = minimise divergence, by maximising variational energies ln p y | m F KL q , , p , | y F ln p y, , q KL q , , p , | m p , | y q , q q q exp I exp ln p y, , q ( ) q exp I exp ln p y, , q ( ) Iterative updating of sufficient statistics of approx. posteriors by gradient ascent. Bayesian Inversion Specify generative forward model (with prior distributions of parameters) Regional responses Variational Expectation-Maximization algorithm Iterative procedure: 1. 2. 3. Compute model response using current set of parameters Compare model response with data Improve parameters, if possible 1. Posterior distributions of parameters p ( | y , m) 2. Model evidence p ( y | m) Inference about DCM parameters: Bayesian single-subject analysis • Gaussian assumptions about the posterior distributions of the parameters • posterior probability that a certain parameter (or contrast of parameters) is above a chosen threshold γ: • By default, γ is chosen as zero – the prior ("does the effect exist?"). Inference about DCM parameters: Bayesian parameter averaging (FFX group analysis) Under Gaussian assumptions this is easy to compute: Likelihood distributions from different subjects are independent individual posterior covariances group posterior covariance N C|1y1 ,..., y N C|1yi i 1 | y ,..., y 1 group posterior mean N N 1 C | yi | yi C | y1 ,..., y N i 1 individual posterior covariances and means Inference about DCM parameters: RFX group analysis (frequentist) • In analogy to “random effects” analyses in SPM, 2nd level analyses can be applied to DCM parameters: Separate fitting of identical models for each subject Selection of parameters of interest one-sample t-test: parameter > 0 ? paired t-test: parameter 1 > parameter 2 ? rmANOVA: e.g. in case of multiple sessions per subject Inference about Model Architecture, Bayesian Model Selection Model evidence: p( y | mi ) Approximation: Free Energy F ln p( y | mi ) KL[q( ), p( | G, )] accounts for both accuracy and complexity of the model allows for inference about structure (generalisability) of the model Fixed Effects Model selection via Random Effects Model selection log Group Bayes factor: via Model probability: BF1, 2 ln p( y m1 ) ln p( y m2 ) k k p (r | y, ) rk q k ( 1 K ) Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Bayesian Model Selection DCM – Attention to Motion Results Paradigm 4 conditions - fixation only - observe static dots - observe moving dots - attend to moving dots baseline SPC + photic V3A + motion V5+ Attention – No attention Büchel & Friston 1997, Cereb. Cortex Büchel et al. 1998, Brain What connection in the network mediates attention ? Bayesian Model Selection m1 m2 Modulation By attention Modulation By attention PPC External stim V1 m3 V5 m4 Modulation By attention PPC stim V1 V5 PPC stim V1 V5 ln p y m 0.10 PPC 0.26 V1 0.39 0.26 1.25 stim PPC stim V1 V5 estimated effective synaptic strengths for best model (m4) attention models marginal likelihood 0.13 0.46 [Stephan et al., Neuroimage, 2008] Modulation By attention V5 Parameter Inference attention MAP = 1.25 0.10 0.8 0.7 PPC 0.6 0.26 0.5 0.39 1.25 stim 0.26 V1 0.13 0.46 0.50 V5 0.4 0.3 0.2 0.1 0 -2 motion Stephan et al. 2008, NeuroImage -1 0 1 2 3 4 p( DVPPC 5,V 1 0 | y ) 99.1% 5 Data Fits motion & attention static motion & no attention dots V1 V5 PPC observed fitted Overview • Dynamic causal models (DCMs) – Basic idea – Neural level – Hemodynamic level – Parameter estimation, priors & inference • Applications of DCM to fMRI data - Attention to Motion - The Status Quo Bias Overcoming status quo bias in the human brain Fleming et al PNAS 2010 Difficulty High Low Decision Accept Reject Overcoming status quo bias in the human brain Fleming et al PNAS 2010 Difficulty High Low Decision Accept Reject Main effect of difficulty in medial frontal and right inferior frontal cortex Overcoming status quo bias in the human brain Fleming et al PNAS 2010 Difficulty High Low Decision Accept Reject Interaction of decision and difficulty in region of subthalamic nucleus: Greater activity in STN when default is rejected in difficult trials Overcoming status quo bias in the human brain Fleming et al PNAS 2010 DCM: “aim was to establish a possible mechanistic explanation for the interaction effect seen in the STN. Whether rejecting the default option is reflected in a modulation of connection strength from rIFC to STN, from MFC to STN, or both “… MFC rIFC STN Overcoming status quo bias in the human brain Fleming et al PNAS 2010 Difficulty Difficulty MFC rIFC Reject Difficulty MFC rIFC rIFC Reject Reject STN STN STN Difficulty Difficulty Difficulty MFC MFC STN Reject rIFC Reject STN Difficulty rIFC Reject STN Reject Reject Difficulty Difficulty MFC MFC Difficulty MFC rIFC rIFC STN Difficulty MFC rIFC Reject STN Reject Difficulty MFC rIFC Reject STN Reject Example: Overcoming status quo bias in the human brain Fleming et al PNAS 2010 Difficulty Difficulty MFC rIFC Reject Difficulty MFC Reject STN STN Difficulty Difficulty Difficulty MFC MFC STN Reject rIFC Reject STN Difficulty rIFC Reject STN Reject Reject Difficulty Difficulty MFC MFC Difficulty MFC rIFC rIFC STN rIFC rIFC Reject STN Difficulty MFC rIFC Reject STN Reject Difficulty MFC rIFC Reject STN Reject Overcoming status quo bias in the human brain Fleming et al PNAS 2010 The summary statistic approach Effects across subjects consistently greater than zero P < 0.01 * P < 0.001 ** The evolution of DCM in SPM • DCM is not one specific model, but a framework for Bayesian inversion of dynamic system models • The default implementation in SPM is evolving over time – better numerical routines for inversion – change in priors to cover new variants (e.g., stochastic DCMs, endogenous DCMs etc.) To enable replication of your results, you should ideally state which SPM version you are using when publishing papers. GLM vs. DCM DCM tries to model the same phenomena (i.e. local BOLD responses) as a GLM, just in a different way (via connectivity and its modulation). No activation detected by a GLM → no motivation to include this region in a deterministic DCM. However, a stochastic DCM could be applied despite the absence of a local activation. Stephan 2004, J. Anat. Thank you