Multilevel and multicanonical sampling
Separate conditional variance reduction from a deliberately biased sampling ensemble, and restore the target expectation with the correct weights.
On this page
The question for today
What you’ll understand
- Apply conditional expectation to reduce measurement variance.
- State the locality assumptions needed for subdomain factorization.
- Reweight a flat-energy multicanonical toy ensemble back to canonical probabilities.
Two useful strategies address different causes of expensive field measurements. Multilevel integration exploits conditional structure to reduce noise in an observable while preserving the target measure. Multicanonical sampling changes the simulation measure to visit otherwise rare regions, then reweights to the desired ensemble. They can sometimes be combined, but neither operation is a generic cure for all slow modes or sign cancellations. Explicit conditional probabilities and density-of-states factors will make their distinct mechanisms visible in examples small enough to enumerate exactly.
Replace a noisy variable by a conditional expectation
Choose boundary data B and average the remaining degrees of freedom conditionally on B. The tower property guarantees that the outer expectation of this conditional average equals the original expectation. The variance decomposition separates fluctuation between boundary conditions from noise remaining inside each conditional ensemble. If the inner conditional expectation could be computed exactly, the second contribution would disappear. In practice it is estimated with finite inner samples, so its uncertainty and computational cost remain in the algorithm.
Drawing many inner samples at one fixed boundary does not create many independent outer configurations. The persistent boundary variance gives a floor that only additional outer sampling can reduce. Estimator correlations can also appear if subdomain updates share random numbers or reuse states. Thus a claimed variance improvement must specify both levels’ sampling schedule and compare cost at equal total precision. Conditional averaging preserves correctness only when its conditional measures and the subsequent outer averaging are constructed consistently.
Local actions can factor a conditional field integral
For a local lattice action, holding an adequate separating set of boundary variables fixed can make disjoint interiors conditionally independent. A suitable observable built from factors in those interiors can then use products of separately estimated conditional averages. The boundary must include every variable needed by interactions crossing the separation. Longer-range couplings or a nonlocal effective determinant can invalidate a naive partition, even when the original microscopic theory had local interactions.
In pure lattice gauge theory this idea underlies powerful multilevel estimates of suitable Wilson-loop and related observables. Such demonstrations depend on the action and factorization structure and should not be advertised as an unchanged solution for arbitrary dynamical-fermion observables. At the simple probability level, if X and Y are conditionally independent given B, their conditional product average factorizes. Distinguishing that conditional statement from unconditional independence is essential: averaging over a shared fluctuating boundary can correlate X and Y strongly.
A flat histogram requires a compensating change of measure
For discrete energy levels with density of states g, assign each configuration a positive multicanonical weight W depending on its energy. The resulting energy marginal is proportional to g times W, so a weight inverse to g makes it flat over the specified range. This differs from assigning equal weight to every configuration, which usually favors energy levels with many states. To recover a canonical expectation, reweight each sampled configuration by its Boltzmann factor divided by W, retaining a normalized ratio.
The density of states is generally unknown and must be estimated or tuned. A clean production design fixes the chosen weights after tuning; an adaptive algorithm needs its own convergence justification rather than an automatic stationary-chain claim during adaptation. Flatness in energy does not ensure rapid passage through barriers in other coordinates, and restricted energy ranges can exclude target support. Positive auxiliary bias also does not erase a fluctuating physical sign. The binomial sample-mean lab below illustrates only the reduction of an independent inner-average variance, without outer boundaries or field configurations.
Work it through
Conditional averaging with a fluctuating boundary
Let B be ± with equal probability. Conditional on B, independent Bernoulli variables X and Y each have success probability 0.8 for B = + and 0.2 for B = −. For O = XY, find its mean, raw variance, and variance after exact conditional averaging.
Conditional independence gives and . The outer mean is .
The raw product is itself a zero-or-one variable, so its variance is . This includes both boundary and inner-decision fluctuations.
The exactly averaged observable takes values 0.64 and 0.04. Their deviations from the mean are ±0.30, giving variance 0.09. Exact inner averaging removes 0.1344 of variance but leaves the boundary component; a finite-cost inner estimate would retain additional noise.
The mean remains 0.34 while ideal conditional averaging reduces variance from 0.2244 to 0.09, without eliminating outer-boundary fluctuations.
The living notebook
Explore the model
Interactive lab · sampling
Independent inner averaging has a known variance
Reset and set Bernoulli probability , independent samples ; predict sample-mean variance 1/16. Repeat from Reset with both controls , ; predict variance 1/64. The instrument displays exact binomial sample-mean probabilities, not newly drawn samples. It illustrates an independent inner mean only and contains no conditional boundary, multilevel field estimator, or multicanonical energy bias.
- Mean sample proportion
- 0.5
- Sample-mean variance
- 0.0125
- Uniform CDF error bound
- ≤ 0.1062
Exact binomial masses for the mean of n independent Bernoulli trials, compared with normal mass between adjacent half-count boundaries; normal tails outside the finite support remain outside the bars. Playback highlights outcomes, not random samples. The Berry–Esseen bound applies to standardized CDFs, not individual bars or continuity-corrected errors. At p = 0 or 1, normal comparison and that bound are disabled. Normal-CDF evaluation uses a numerical approximation with absolute error below 7.5×10⁻⁸ (at most 1.5×10⁻⁷ per interval, before rounding). Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forReducing an inner mean’s variance does not remove uncertainty from a separately fluctuating outer ensemble.
Pause & reason
Check your understanding
Your turn
Try it yourself
A toy model has energy levels 0, J, and 2J with degeneracies 1, 2, and 1, where J is positive. Choose W = 1/g and recover the canonical probabilities and mean energy at .
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The multicanonical energy marginal is flat, but the desired canonical marginal is proportional to degeneracy times the Boltzmann factor.
Compare with the solution
The configuration weights W are 1, 1/2, and 1 at the respective energies, giving equal multicanonical energy probabilities. Canonical energy weights are , , and . Their normalized probabilities are 4/9, 4/9, and 1/9. The mean energy is . Equal energy-level sampling therefore does not imply equal canonical energy probabilities; the reweighting restores both degeneracy and Boltzmann suppression.
Keep the idea
Take it with you
- Conditional expectation reduces inner noise while leaving outer fluctuations to be sampled.
- Subdomain factorization requires an action-compatible separating boundary.
- Multicanonical weights change the sampling measure and need controlled reweighting, tuning, and overlap checks.
Read further
Original sources and deeper explanations to follow at your own pace.
- Lüscher and Weisz, Locality and exponential error reduction in numerical lattice gauge theory, §§3–4: sublattice expectations and multilevel factorization
- Bernd Berg, Multicanonical Simulations Step by Step, §§1 and 3–3.1: density-of-states weights and canonical reconstruction
- Kari Rummukainen, Simulation Methods in Physics, Multicanonical methods, pp. 4–6: biased ensembles and inverse reweighting
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.