An introduction to thermodynamic integration and application to dynamic causal models

Eduardo A. Aponte, Yu Yao, Sudhir Raman, Stefan Frässle, Jakob Heinzle, Will D. Penny, Klaas E. Stephan

Research output: Contribution to journalArticlepeer-review

2 Citations (Scopus)
14 Downloads (Pure)


In generative modeling of neuroimaging data, such as dynamic causal modeling (DCM), one typically considers several alternative models, either to determine the most plausible explanation for observed data (Bayesian model selection) or to account for model uncertainty (Bayesian model averaging). Both procedures rest on estimates of the model evidence, a principled trade-off between model accuracy and complexity. In the context of DCM, the log evidence is usually approximated using variational Bayes. Although this approach is highly efficient, it makes distributional assumptions and is vulnerable to local extrema. This paper introduces the use of thermodynamic integration (TI) for Bayesian model selection and averaging in the context of DCM. TI is based on Markov chain Monte Carlo sampling which is asymptotically exact but orders of magnitude slower than variational Bayes. In this paper, we explain the theoretical foundations of TI, covering key concepts such as the free energy and its origins in statistical physics. Our aim is to convey an in-depth understanding of the method starting from its historical origin in statistical physics. In addition, we demonstrate the practical application of TI via a series of examples which serve to guide the user in applying this method. Furthermore, these examples demonstrate that, given an efficient implementation and hardware capable of parallel processing, the challenge of high computational demand can be overcome successfully. The TI implementation presented in this paper is freely available as part of the open source software TAPAS.

Original languageEnglish
Pages (from-to)1–15
Number of pages15
JournalCognitive Neurodynamics
Early online date25 Jul 2021
Publication statusPublished - Feb 2022


  • DCM
  • Free energy
  • Model comparison
  • Model evidence
  • Population MCMC
  • fMRI

Cite this