Bayesian Statistics in Imaging


Bayesian Statistics in Imaging

Simon
Welcome to our episode on Bayesian statistics in neuroimaging. We’ll build from the basic idea of Bayesian inference, then look at how researchers use it with fMRI and EEG. The central theme is that brain measurements are indirect and uncertain, so our assumptions and uncertainty matter.

Hope
And we’ll also compare Bayesian approaches with familiar frequentist methods, discuss what models can and can’t tell us, and finish with practical ways to get started. Let’s begin with the distinction that often causes confusion: what does a p-value actually tell us?

Simon
In a frequentist framework, a p-value is the probability of observing data at least as extreme as the data we got, assuming a specified null hypothesis is true. It is not the probability that the null hypothesis is true given our data. Those are different conditional probabilities, and you can’t simply reverse one into the other.

Hope
That reversal is exactly what researchers often want. We would like to ask, given the data we observed, how probable is a hypothesis? The same kind of caution applies to confidence intervals: a 95% confidence interval does not mean there is a 95% probability that this particular interval contains the true value. Its frequentist interpretation concerns the long-run behavior of the interval-generating procedure across repeated samples.

Simon
Frequentist methods define probability in terms of repeated sampling: imagine repeating a procedure many times and considering how often an outcome occurs. These methods are widely taught, but their interpretations can be challenging. Bayesian statistics offers a framework for statements about hypotheses or parameters given the observed data.

Hope
The basic recipe is simple to say: start with a prior belief, collect data, and update that belief to get a posterior belief. Think about predicting rain. You might begin with a prior expectation based on the season, then notice clouds, and then see someone carrying an umbrella. Each observation can update your estimate of how likely rain is.

Simon
Bayes’ rule formalizes that process. The prior represents what we believe about a hypothesis or parameter before considering the current data. The likelihood describes how compatible the observed data are with different possible values. Combining the prior and likelihood gives the posterior, which is the updated distribution we interpret.

Hope
For example, our hypothesis might be that a treatment changes survival time, or that two groups differ. A Bayesian analysis represents uncertainty about that possibility, evaluates how likely the data are under the possibilities, and produces a posterior distribution. From that posterior, we can make probabilistic statements about hypotheses or parameter values.

Simon
A useful way to picture this is with distributions for an effect size. Before a study, we might place much of our prior belief around zero, meaning no effect, while still allowing positive or negative effects. Then the data provide a likelihood centered, say, around an effect size of two, with uncertainty depending partly on the sample.

Hope
Combining those distributions produces the posterior. If the prior was more strongly concentrated around zero, the posterior may be pulled closer to zero than it would be under a weaker prior. That doesn’t mean the data disappeared; it means the result reflects both the data and the prior information.

Simon
At the other extreme, a flat prior expresses very weak information across the parameter values under consideration. In the example from the talk, that weak prior had little visible effect on the result, so the posterior closely followed the likelihood. The important lesson is that priors can influence the result, and choosing or justifying them is a real part of Bayesian analysis.

Hope
That’s why the compact version of Bayes’ rule is so useful: posterior is proportional to likelihood times prior. There is also a normalizing term, sometimes called the marginal probability of the data, but the proportional form captures the basic intuition. Bayesian analyses can then summarize the posterior with intervals or probabilities.

Simon
One such summary is a credible interval. A 95% credible interval can be interpreted as assigning 95% posterior probability to the parameter being within that interval, given the model and prior. That’s the direct probability-style interpretation many people mistakenly expect a confidence interval to have.

Hope
Bayesian methods also allow prior information to be incorporated explicitly, can help regularize estimation, and can be useful for complex models that are difficult to estimate using conventional approaches. Another tool is the Bayes factor, which compares the evidence for competing hypotheses.

Simon
Suppose the alternatives are a null hypothesis of no effect and an alternative hypothesis of an effect. A Bayes factor is a ratio of evidence for one model relative to another. A value around one indicates that the data do not favor either side much; a larger value can favor the alternative, while the comparison can also favor the null.

Hope
That ability to find evidence for the null is a notable contrast with treating a non-significant p-value as if it established no effect. The speaker offered a value greater than three as a rough example of evidence worth discussing, while emphasizing that the Bayes factor is one Bayesian tool among many.

Simon
Now let’s take the framework into neuroimaging. Matthew’s talk focused on Bayesian inference in fMRI, where we don’t directly observe many of the mechanisms we want to understand. We measure signals such as blood-oxygen-level-dependent activity and use models to infer possible underlying neuronal processes.

Hope
That is an inverse problem: many possible hidden causes can give rise to the observations. Bayesian models make assumptions about latent parameters and how those parameters generate data, including what the model treats as noise. A prior can encode constraints that are supported by theory or empirical knowledge, and the resulting posterior quantifies uncertainty after the data are considered.

Simon
Matthew’s example concerned effective connectivity: directed influence between neuronal populations. In dynamic causal modeling, or DCM, a state-space model describes how latent neuronal states change over time. A transition matrix represents how activity in one population influences the rate of change in another, and a hemodynamic model links those latent states to the fMRI signal we observe.

Hope
The question was whether structural connectivity could help constrain estimates of effective connectivity. Structural connectivity from tractography gives information about large-scale white-matter architecture, but it isn’t a complete map of functional influence. Functional dependencies can travel through indirect paths, and tractography captures only part of the relevant anatomy.

Simon
So the researchers avoided a hard rule like, ‘If we don’t detect a tract, there cannot be an effective connection.’ Instead, they used structural connectivity to inform the prior variance over effective connections. In plain language, stronger structural connectivity gave the model more prior permission to infer a nonzero effective connection, without forcing that connection to exist.

Hope
They used a hierarchical model: each participant had a first-level DCM, and individual parameters were treated as coming from a population distribution. The key advantage was carrying posterior uncertainty from the participant-level models into the group-level analysis, rather than reducing each person to a single point estimate.

Simon
They then used Bayesian model reduction to compare many candidate mappings from structural connectivity to prior variance. Evidence-weighted mappings across networks were positive and monotonic: greater structural connectivity was associated with greater prior variance over effective connectivity. The relevant scale also varied across networks in a way that reflected a sensory-to-transmodal cortical hierarchy.

Hope
That pattern suggested that structural connectivity’s influence on effective connectivity may increase as functional specialization decreases. The researchers also discussed investigating whether this constraint varies with psychological or clinical states, including work related to psilocybin administration and depression, and Huntington’s disease.

Simon
There was an important modeling caveat. Comparing many candidate prior mappings after the fact is useful, especially while developing a model, but a fuller Bayesian approach would put priors on the mapping parameters themselves and infer their posteriors together with the other quantities. That raises a new question: how should those higher-level priors be chosen?

Hope
In related work on a chromatic DCM, the team took a pragmatic development route. They estimated network-specific relationships between structural degree or valency and spectral exponents, used Bayesian model averaging to combine evidence across networks, and used those estimates to inform prior expectations. Then simulations with known ground truth helped them assess which prior variances allowed accurate parameter recovery.

Simon
That illustrates a useful workflow: propose a plausible generative story, check whether its parameters can be recovered in simulations, use empirical structure to inform sensible priors, and refine the model. Bayesian machinery is general, but the choices of latent variables, auxiliary data, and mappings still require careful scientific work.

Hope
Variational Bayesian methods make this kind of analysis practical by approximating a complicated posterior with a simpler distribution, often a Gaussian. That approximation can also provide an estimate of model evidence, or marginal likelihood, which lets researchers compare models fitted to the same data but with different assumptions or priors.

Simon
The broader message is that an auxiliary data source, such as distance between brain regions, can be mapped through a parametric function to inform prior variance. Nearby regions are, on average, more likely to be connected than distant regions, so distance can motivate a hypothesis about how much prior uncertainty to assign to different connections.

Hope
Different mappings then represent different hypotheses, and model evidence can help compare them. But this is not a push-button solution. Researchers need to test whether the model behaves sensibly in simulations and be clear that, in MRI, mechanisms are inferred rather than directly observed.

Simon
That brings us to Elise’s discussion of EEG and statistical parametric mapping, or SPM. Neuroimaging data are high-dimensional, noisy, and indirect. One major challenge is multiple comparisons: when we test thousands of sensors, time points, or locations, ordinary uncorrected thresholds can produce many false positives.

Hope
If an ERP component is well characterized, prior literature can guide a focused analysis. For example, a researcher might examine the mismatch negativity at electrode FZ in a time window around 100 to 250 milliseconds, average within that window, and use a t-test or ANOVA. But if the location and timing of an effect are not known in advance, searching across sensors and time points creates a much larger testing problem.

Simon
SPM provides a pipeline for analyzing those data. After preprocessing, such as filtering or artifact detection, each participant’s condition can be represented as an image across the scalp and time. The data can be spatially smoothed, and a general linear model is fitted across location and time to estimate effects and produce statistical parametric maps.

Hope
One approach uses Gaussian random field theory to correct for multiple comparisons. In a simplified picture, the statistical map is treated as a smooth random field, and the analysis considers its spatial and temporal structure. A family-wise error correction then identifies clusters or excursion sets that are unlikely to have arisen by chance under the correction procedure.

Simon
SPM also offers Bayesian model selection. Instead of asking only whether a statistic crosses a threshold, researchers can compare competing models and estimate their relative evidence. They can do this voxel by voxel and across space and time, then examine which model has the highest probability.

Hope
For instance, a researcher could specify two models for how experimental conditions should appear in the brain, use a variational Bayesian approximation to estimate model evidence, and compare them at the group level. Fixed-effects or random-effects approaches can be used; random effects allow for the possibility that different participants may favor different models.

Simon
In the example from the talk, one model was a clear overall winner, though there were small locations and brief time points where the other model won. That kind of map can show where and when the evidence favors each account, adding information beyond a conventional thresholded statistical map.

Hope
Elise also explained the EEG inverse problem. We observe electrical activity at the scalp and want to infer where in the brain it came from. But many combinations of source locations and activation levels can produce similar scalp patterns, so the solution is not uniquely determined by the measurements alone.

Simon
SPM’s default source-reconstruction approach uses a Bayesian method called multiple sparse priors. It starts with a head model and a forward operator, or lead-field matrix, which describes how candidate brain sources would contribute to scalp measurements. It then considers candidate sparse source patches based on anatomical assumptions.

Hope
The method adjusts the contribution of those patches, downweighting ones that do not help explain the data, and iterates toward a model with good evidence for the observations. Anatomical information can also be used to restrict the candidate sources, for example to regions relevant to a visual or auditory task.

Simon
Across the talks, Bayesian methods offered a common set of benefits: they represent uncertainty, incorporate prior knowledge, and compare competing explanations. But they don’t eliminate scientific uncertainty, and a model’s conclusions depend on the assumptions built into its generative account.

Hope
That point came up in the question about choosing a generative model. Bayesian inference doesn’t automatically tell us what model to build. A sensible starting point is a scientific theory about the latent quantity and how it relates to the observation; then researchers can build, test, and refine the model.

Simon
The panel also cautioned against treating Bayesian methods as a cure-all. They are an inferential framework, not a replacement for carefully formulating the scientific question. Questions about what a brain signal means may require substantive neuroscience, not just a different statistical method.

Hope
One audience member asked whether an unlabelled time series could be identified as auditory or visual based on whether it came from the temporal or occipital lobe. The panel did not offer a definitive method for doing that. They emphasized that this is a fundamental scientific question, beyond what an inferential framework alone can settle.

Simon
Finally, what should early-career researchers use to learn? Matthew recommended the Variational Bayesian Analysis toolbox wiki as an approachable, practical resource. Elise recommended SPM’s manuals, worked examples, videos, and tutorials, and also pointed to FieldTrip tutorials for EEG and related work.

Hope
Charles suggested two routes. If you already use a classical method, look for a Bayesian counterpart in your software and compare the results; that can help you build intuition from something familiar. Or start from the ground up with Bayes’ rule and Bayesian inference.

Simon
For that second route, the panel recommended Richard McElreath’s Statistical Rethinking lectures, available online, and his textbook. And for model-based neuroimaging more broadly, remember to simulate, invert, test identifiability, run model-confusion analyses, and iterate.

Hope
So the episode’s big takeaway is this: Bayesian inference updates prior beliefs with data to produce a posterior, and that posterior supports direct probability statements and explicit uncertainty. In neuroimaging, those ideas help researchers constrain inverse problems and compare models—but the assumptions must be justified, tested, and interpreted with care.

Ask anything
We've read this whole study set, so questions about it get the best answers.