Purpose
Tracking issue. #1273 builds the joint-distribution (Geweke) validation framework and applies it to two samplers: rwm (simplest correct kernel, establishes the baseline) and hmc (highest risk). src/mc/ ships ten sampler-related components.
Remaining after #1273:
nuts — No-U-Turn Sampler
mala — Metropolis-adjusted Langevin
slice — coordinate-wise slice sampling
gibbs — systematic-scan Gibbs
adaptive-metropolis — full-covariance Haario adaptive Metropolis
ars — adaptive rejection sampling (not an MCMC subclass; may need a different validation construction)
parallel-tempering — replica-exchange coordinator
run-chains — multi-chain driver
Each currently has only a .sample() marginal goodness-of-fit test, which as #1273 argues cannot detect a kernel that samples from a subtly wrong stationary distribution.
Priority ordering
Not all of these carry equal risk, and the rollout should reflect that rather than going alphabetically:
nuts — highest risk in the library. The recursive doubling with slice sampling and the U-turn termination criterion must satisfy detailed balance in a way that is genuinely easy to get subtly wrong, and the failure is invisible to a marginal test.
mala — the drift term makes the proposal asymmetric, so the acceptance ratio requires a proposal-density correction. Omitting or mis-signing it is a classic bug that leaves the marginal looking approximately right.
parallel-tempering — the replica-exchange acceptance ratio is a separate correctness surface from the within-replica kernels, and swap moves must preserve the joint distribution across temperatures.
adaptive-metropolis — adaptation must stop (or satisfy diminishing adaptation) before the chain is valid; test/mc/adaptive-metropolis.js already has a "frozen covariance during sampling" test, so the intent is there, but joint-distribution validation is what proves it.
slice, gibbs — structurally simpler, lower risk.
ars — not an MCMC subclass and produces independent draws, so Geweke's construction does not apply directly. Needs its own validation design; consider whether an envelope-correctness test plus a strong distributional test is the right substitute, and record the reasoning.
run-chains — a driver, not a kernel. What needs validating is chain independence, which overlaps with the PRNG seed-separation question in the xoshiro battery issue rather than with Geweke.
Scope
Spawn one follow-up issue per sampler, in the order above, after #1273 has proven the framework — specifically after its negative control has been shown to reject a deliberately broken kernel. A framework that has not yet demonstrated it can fail is not worth rolling out to eight more samplers.
Close only when every sampler is validated or explicitly excluded with a recorded reason (as ars and run-chains may well be).
Related
#1273 (framework, rwm + hmc).
Purpose
Tracking issue. #1273 builds the joint-distribution (Geweke) validation framework and applies it to two samplers:
rwm(simplest correct kernel, establishes the baseline) andhmc(highest risk).src/mc/ships ten sampler-related components.Remaining after #1273:
nuts— No-U-Turn Samplermala— Metropolis-adjusted Langevinslice— coordinate-wise slice samplinggibbs— systematic-scan Gibbsadaptive-metropolis— full-covariance Haario adaptive Metropolisars— adaptive rejection sampling (not anMCMCsubclass; may need a different validation construction)parallel-tempering— replica-exchange coordinatorrun-chains— multi-chain driverEach currently has only a
.sample()marginal goodness-of-fit test, which as #1273 argues cannot detect a kernel that samples from a subtly wrong stationary distribution.Priority ordering
Not all of these carry equal risk, and the rollout should reflect that rather than going alphabetically:
nuts— highest risk in the library. The recursive doubling with slice sampling and the U-turn termination criterion must satisfy detailed balance in a way that is genuinely easy to get subtly wrong, and the failure is invisible to a marginal test.mala— the drift term makes the proposal asymmetric, so the acceptance ratio requires a proposal-density correction. Omitting or mis-signing it is a classic bug that leaves the marginal looking approximately right.parallel-tempering— the replica-exchange acceptance ratio is a separate correctness surface from the within-replica kernels, and swap moves must preserve the joint distribution across temperatures.adaptive-metropolis— adaptation must stop (or satisfy diminishing adaptation) before the chain is valid;test/mc/adaptive-metropolis.jsalready has a "frozen covariance during sampling" test, so the intent is there, but joint-distribution validation is what proves it.slice,gibbs— structurally simpler, lower risk.ars— not anMCMCsubclass and produces independent draws, so Geweke's construction does not apply directly. Needs its own validation design; consider whether an envelope-correctness test plus a strong distributional test is the right substitute, and record the reasoning.run-chains— a driver, not a kernel. What needs validating is chain independence, which overlaps with the PRNG seed-separation question in the xoshiro battery issue rather than with Geweke.Scope
Spawn one follow-up issue per sampler, in the order above, after #1273 has proven the framework — specifically after its negative control has been shown to reject a deliberately broken kernel. A framework that has not yet demonstrated it can fail is not worth rolling out to eight more samplers.
Close only when every sampler is validated or explicitly excluded with a recorded reason (as
arsandrun-chainsmay well be).Related
#1273 (framework,
rwm+hmc).