What is Annealed Importance Sampling?
Annealed Importance Sampling is a Monte Carlo method that estimates a ratio of normalizing constants by moving particles through intermediate distributions and multiplying incremental importance weights.
Quick Facts
| Specification | Official Specification |
|---|
How It Works
Define a bridge with shared support
Given unnormalized densities f0 and f1, a common bridge is f_beta(x) = f0(x)^(1-beta) f1(x)^beta for 0 = beta0 < ... < betaK = 1. The starting distribution must be normalized and directly sampleable. Wherever the target has positive mass, the initial path must provide compatible support; a temperature schedule cannot recover regions that every run starts unable to reach.
Neal's original Annealed Importance Sampling paper develops the construction and its connection to simulated annealing. The schedule may be nonlinear, but every density convention and normalizing factor known at the endpoints must be handled consistently.
Weight first, then move at the new temperature
At bridge step k, AIS evaluates the incremental ratio f_betaK(x[k-1]) / f_betaKMinus1(x[k-1]), then applies a Markov transition invariant to f_betaK. Multiplying those ratios gives an unbiased estimate of the normalizing-constant ratio under the standard AIS construction, even when each transition performs only a finite number of updates.
Invariance is essential; full mixing at every bridge is not required for validity, but weak mixing increases variance. Reversing the update order, omitting density terms, adapting transitions from future paths, or silently changing base measures invalidates the usual estimator.
Diagnose weight concentration and path movement
Compute weights in log space and aggregate them with log-sum-exp. Report the estimate across independent batches, log-weight range, normalized-weight Effective Sample Size, maximum weight share, transition acceptance or movement, and sensitivity to the temperature schedule and number of transitions.
A high final-state acceptance rate does not prove accurate evidence estimation. If a few paths dominate, add bridges where adjacent distributions overlap poorly, improve invariant transitions, or redesign the starting distribution. Compare repeated AIS estimates and, when possible, test against a model with a known normalizer before trusting a large model.
Key Characteristics
- Connects a tractable starting distribution to a target through tempered bridges
- Accumulates incremental unnormalized-density ratios along each path
- Requires a transition invariant to every successive bridge distribution
- Produces independent path weights when runs use independent randomness
- Estimates partition-function or marginal-likelihood ratios
- Can suffer extreme variance when bridges overlap poorly
Common Use Cases
- Estimating Bayesian marginal likelihoods for model comparison
- Approximating partition functions in undirected probabilistic models
- Benchmarking evidence estimators on tractable targets
- Reweighting annealed paths toward a difficult posterior
- Initializing or comparing tempered Monte Carlo workflows
Example
Loading code...Frequently Asked Questions
What does Annealed Importance Sampling estimate?
AIS estimates the ratio between the target normalizing constant and the starting normalizing constant. When the start is normalized, this gives the target normalizer, such as a partition function or Bayesian marginal likelihood.
Does every AIS transition need to mix completely?
No. Each transition must preserve its bridge distribution, but it need not return an independent draw. Poor movement still increases weight variance and can make a formally valid estimator practically unreliable.
How should an AIS temperature schedule be chosen?
Place more bridge points where adjacent distributions have weak overlap or weights change rapidly. Pilot runs can inspect incremental log-weight variance, movement, and weight ESS, but final accuracy should be checked with independent fixed-protocol runs.
Are final AIS states unweighted posterior samples?
Not generally. Finite annealed paths end with importance weights, so posterior expectations use normalized path weights unless additional exact sampling or resampling logic justifies another interpretation.
How is Annealed Importance Sampling different from Parallel Tempering?
AIS usually runs independent one-way paths and uses accumulated weights to estimate normalizer ratios. Parallel Tempering runs interacting chains at persistent temperatures and swaps states primarily to improve exploration of a cold target.