1Technical University of Munich 2Massachusetts Institute of Technology
Conformal risk control promises “risk ≤ α” — but its Bayesian reading, and the failure-rate guarantee that comes with it, exists only when deployment looks exactly like calibration. Our observation: the posterior was never about ranks or spacings. It is a posterior on the calibration distribution itself, and covariate shift is just a change of measure. Pushing the same Bayesian-bootstrap masses through the likelihood ratio gives the exact posterior over the deployed risk — nothing approximate, at the same O(n) cost — and the certificate we prove tells you how far to trust it once the ratio itself is estimated.
Machine learning predictors are rarely deployed on data that match the data they were calibrated on. Conformal prediction and its risk-control generalization promise distribution-free guarantees at deployment, but only under exchangeability or a covariate shift whose likelihood ratio is known exactly—and the estimated-ratio case, the one that occurs in practice, is explicitly open, out of reach of the Bayesian construction available under exchangeability. We reach it from a different starting point: pushing a Dirichlet process prior on the calibration distribution through the likelihood ratio yields the exact Bayesian posterior over the deployed risk. That posterior is exact given the weight function, which at deployment is itself estimated, so we further prove finite-sample upper and lower bounds on the risk the selected threshold actually incurs, in terms of the weight-estimation error and the conditional shift. On synthetic and real covariate shifts, in regression and classification, the realized failure rate then stays close to target where shift-blind selection fails, and what deployment receives is a posterior over the risk of every threshold rather than a single number.
A Dirichlet-process prior on the calibration law P, concentration τ → 0+, leaves the Bayesian bootstrap: the posterior lives on the observed points, each carrying a random mass
Every second, one fresh draw of the masses Vi — each draw is one plausible calibration distribution. Nothing beyond i.i.d. sampling enters here — and crucially, this posterior is about the distribution, not about ranks or quantile spacings, so covariate shift can act on it.
The deployment law is a deterministic functional of the calibration law: tilt by the likelihood ratio, T(Q) = w·Q / ∫w dQ. Applying T to a posterior draw P* multiplies the mass of point i by wi and renormalizes — and the old normalizer ΣkEk cancels between numerator and denominator:
The same draw, before and after the tilt: mass moves toward the points the deployment distribution actually visits. The pushforward of an exact posterior is an exact posterior — no Dirichlet is assumed at any point. At uniform weights (w ≡ 1) the exchangeable theory returns unchanged, and Kish’s neff = (Σwi)2/Σwi2 falls out of the mass law’s moments rather than being imposed.
A mass draw turns the calibration losses into one candidate deployed risk curve; its α-crossing is one plausible threshold. Repeating this is the whole sampler — and it is exactly what the animation above is doing:
for m in range(M): # M ≈ 1000 posterior draws
E = exponential(scale=1, size=n + 1) # one Bayesian-bootstrap draw
V = w * E[:n] # tilt by the likelihood ratio
V_test = w_bar * E[n] # mass of the unseen test point
V, V_test = normalize(V, V_test) # → exact posterior masses Ṽ
L = risk_curve(V, V_test, losses) # one deployed risk curve L(λ)
lam[m] = crossing(L, alpha) # this draw's α-crossing
lam_hpd = quantile(lam, beta) # smallest λ that β of draws call safe
lam_dep = max(lam_wcp, lam_hpd) # never below the W-CP quantile
Left: each mass draw yields one deployed risk curve, crossing the target α at that draw’s threshold (ticks). Right: the crossings accumulate into the threshold posterior; λHPD is the point that β = 95% of draws declare safe. O(n) per draw — the exact posterior samples at the cost of the Dirichlet it replaces, and the clamp to the weighted conformal quantile λwcp means the classical marginal guarantee is inherited unchanged.
Every rule is asked for the same thing: deployed risk at most α, failing in at most 5% of calibration sets. Bars show how often each rule’s threshold actually exceeded the target risk.
BQ-CP and RCPS select as if calibration matched deployment; W-CRC uses the weights but guarantees only an expectation over calibration sets. WBCP is the only rule at the nominal failure rate — and when the effective sample size cannot support certification, it abstains rather than guessing. Full tables in the paper →
@article{lou2026weighted,
title = {Weighted Bayesian Conformal Prediction},
author = {Lou, Xiayin and Luo, Peng},
journal = {arXiv preprint arXiv:2604.06464},
year = {2026}
}