← Home

Bayesian Fundamentals

ar062 · 28 June 2026 · pdf

A short primer for the vocabulary the neural-Bayesian papers in the Bayesian Literature Review lean on without redefining. The aim is not to teach Bayesian statistics from scratch — it is to fix notation, name the moves, and flag where the hard parts are, so a reader recognises each term on contact when they hit it in Ma, Fiser, Lengyel, or Echeveste.

The core equation

Given a generative model — a forward story for how unobserved causes 𝜃 produce observations 𝑥 — Bayes’ rule inverts the story:

𝑝(𝜃|𝑥)=𝑝(𝑥|𝜃)𝑝(𝜃)𝑝(𝑥)𝑝(𝑥|𝜃)𝑝(𝜃)(1)

The proportionality at the right is doing most of the work in practice: every algorithm in the rest of this article exists to avoid computing 𝑝(𝑥) exactly.

Generative model vs recognition

A generative model is the brain’s (or the modeller’s) story about how the world produces the data: causes observations. Recognition (or inference) is the reverse — recover 𝑝(𝜃|𝑥) from 𝑥. These are different computations and the brain need not implement them the same way; a sensory area can run a fast amortised recognition map even if the underlying generative model is much richer. When neural-Bayesian papers say “the cortex represents the posterior”, they mean the recognition output.

Marginalisation, and why it’s the hard part

Anything you don’t care about you must integrate out:

𝑝(𝜃1|𝑥)=𝑝(𝜃1,𝜃2|𝑥)d𝜃2(2)

For high-dimensional 𝜃 this integral is intractable. Every approximate-inference algorithm below is, at heart, a different way to dodge it.

Conjugacy and the exponential family

A likelihood–prior pair is conjugate if the posterior has the same parametric form as the prior. Conjugate pairs (Gaussian–Gaussian, beta–Bernoulli, Dirichlet–multinomial) give closed-form posterior updates and are the only place Bayes is genuinely cheap. They live inside the exponential family:

𝑝(𝑥|𝜂)=(𝑥)exp(𝜂𝑇(𝑥)𝐴(𝜂))(3)

This matters for cortex because the Probabilistic Population Code framework (Ma et al. 2006, in ar007) writes posteriors as exponential families whose natural parameters are population firing rates: 𝜂𝒓. Multiplying two PPCs (combining cues) becomes adding their firing rates — the framework’s central, very pretty claim.

Three flavours of approximate inference

When the posterior is not conjugate, you approximate. Three families dominate; the neural-Bayesian papers each pick one:

KL divergence

The asymmetric “distance” between two distributions:

KL(𝑞𝑝)=𝑞(𝜃)log𝑞(𝜃)𝑝(𝜃)d𝜃0,with equality iff 𝑞=𝑝.(4)

Asymmetric because KL(𝑞𝑝)KL(𝑝𝑞) in general. VI minimises KL(𝑞𝑝) (forward KL) which makes 𝑞 mode-seeking (it concentrates on a single mode rather than averaging across modes); some methods minimise KL(𝑝𝑞) (reverse KL) which makes 𝑞 mass-covering. The choice shows up in what the approximate posterior looks like.

Posterior summaries (the things a brain might actually read out)

A posterior is a distribution; downstream computation usually wants a number or two. The standard summaries:

The neural-Bayesian split is partly about how the cortex represents this last one — as a population gain (PPC) or as trial-to-trial variability (sampling).

How this lands in the cortex

Three claims recur in the reading list, in roughly this order of strength:

  1. Cortical responses look Bayesian behaviourally. Cue integration, prior-weighted perception, multisensory fusion — all match Bayes-optimal predictions in many tasks. The papers in ar007 take this as given.
  2. The cortical representation of probability is one of two flavours. Either parametric (firing rates encode posterior parameters — PPC) or sample-based (instantaneous activity is itself a sample). These are different empirical predictions about neural variability, and the camps disagree.
  3. The cortical dynamics implement the inference algorithm. The sampling camp claims recurrent E/I circuits run Langevin or HMC; the PPC camp claims linear combinations of population activity perform the algebra. Echeveste et al. 2020 is the cleanest version of the dynamical claim.

This article stops short of those claims — see ar007 for the reading list that develops them.