Bayesian Inference Foundations
Bayes' rule is how the stack turns diagnostics and priors into calibrated posteriors, the basis of every uncertainty estimate the twin reports.
From prior to posterior
Bayesian inference updates belief about unknown quantities - profiles, calibration factors, model parameters - by combining a prior with the likelihood of observed diagnostics. The result is a posterior distribution, not a point estimate, so every inferred quantity carries honest uncertainty. This is the foundation of the stack's uncertainty quantification.
Bayes' rule:
p(theta | D) = p(D | theta) p(theta) / p(D)
p(theta) : prior (physics knowledge, past shots)
p(D | theta) : likelihood (diagnostic model + noise)
p(theta | D) : posterior (updated belief)
p(D) : evidence = Integral p(D|theta) p(theta) dtheta
Priors carry physics
Priors are where known physics enters: profile smoothness, positivity of pressure, plausible ranges for transport coefficients, and - for the burner - the extrapolation risk of an untested regime encoded as a deliberately wide prior. A well-chosen prior regularizes ill-posed reconstructions and prevents overconfident fits to noisy diagnostics.
# posterior via log-prob (schematic)
def log_posterior(theta, data):
lp = log_prior(theta) # physics constraints
resid = (forward_model(theta) - data) / sigma
ll = -0.5 * sum(resid**2) # Gaussian likelihood
return lp + ll # up to the evidence const
The evidence and model comparison
The evidence p(D) - the denominator - is the probability of the data under the whole model. Comparing evidences across competing models (e.g. different transport closures) is principled model selection, automatically penalizing needless complexity. The stack uses this to choose between candidate twin sub-models rather than overfitting the most flexible one.
- Output is a distribution: calibrated uncertainty, not a point.
- Priors inject physics and encode extrapolation risk (burner).
- Likelihood carries the diagnostic forward model and noise.
- Evidence enables honest model comparison and complexity control.
Exact posteriors are rarely closed-form, so the stack computes them with the tools on the following pages: Gaussian processes for smooth surrogates, MCMC/HMC for sampling, and variational inference for speed. All share this foundation, and all report the uncertainty the machines' safety case requires.