Preprint
Machine Learning

Nested sampling for general Bayesian computation

John Skilling(Kerry Group (Ireland))
December 1, 2006Bayesian Analysis1,689 citations

1.7k

Citations

125

Influential Citations

Bayesian Analysis

Venue

2006

Year

Abstract

Nested sampling estimates directly how the likelihood function relates to prior mass. The evidence (alternatively the marginal likelihood, marginal density of the data, or the prior predictive) is immediately obtained by summation. It is the prime result of the computation, and is accompanied by an estimate of numerical uncertainty. Samples from the posterior distribution are an optional by-product, obtainable for any temperature. The method relies on sampling within a hard constraint on likelihood value, as opposed to the softened likelihood of annealing methods. Progress depends only on the shape of the "nested" contours of likelihood, and not on the likelihood values. This invariance (over monotonic re-labelling) allows the method to deal with a class of phase-change problems which effectively defeat thermal annealing.

Analysis

Why This Paper Matters

Nested sampling, introduced by John Skilling in 2006, addresses a fundamental challenge in Bayesian computation: the reliable estimation of the evidence (marginal likelihood). The evidence is crucial for model comparison and selection, but its computation typically requires integrating over the entire parameter space, which is notoriously difficult for high-dimensional or multimodal posteriors. Traditional methods like thermodynamic integration or annealed importance sampling rely on a sequence of tempered distributions, which can fail in the presence of phase transitions—sharp changes in the posterior structure as temperature varies.

Skilling's key insight is to reframe the evidence integral as a one-dimensional integral over the prior mass contained within likelihood contours. By sampling from the prior subject to a hard likelihood constraint and progressively increasing that constraint, nested sampling avoids the need for annealing altogether. This invariance under monotonic transformations of the likelihood makes the method robust to phase-change problems, opening up new classes of models to Bayesian analysis.

Technical Contributions

  • Evidence as a 1D integral: The evidence Z = ∫ L(θ) π(θ) dθ is rewritten as Z = ∫_0^1 L(X) dX, where X is the prior mass with likelihood greater than L. This reduces the high-dimensional integral to a one-dimensional quadrature.
  • Nested sampling algorithm: Iteratively, the point with the lowest likelihood is removed, and a new point is sampled from the prior constrained to have higher likelihood. The prior mass shrinks geometrically, and the evidence is accumulated as a weighted sum.
  • Uncertainty quantification: The algorithm provides an estimate of the numerical uncertainty in the log-evidence, derived from the Poisson process governing the shrinkage of prior mass.
  • Posterior samples as by-product: By assigning weights to the sampled points, one can obtain posterior samples for any temperature, enabling both evidence and posterior inference in a single run.
  • Phase-change robustness: Because the method depends only on the ordering of likelihood contours, not their absolute values, it naturally handles problems where the likelihood surface has plateaus or sharp transitions.

Results

The paper does not present empirical results on specific datasets but rather establishes the theoretical foundation and demonstrates the method's behavior on illustrative examples. The key result is that nested sampling can compute the evidence with a known uncertainty, and it successfully navigates phase-change problems that cause thermal annealing to fail. The method's invariance to monotonic re-labelling is proven, and its convergence properties are discussed. Subsequent work has shown nested sampling to be highly effective in cosmology (e.g., for estimating cosmological parameters and comparing models), where it has become a standard tool.

Significance

Nested sampling has had a profound impact on Bayesian computation, particularly in fields like cosmology, astrophysics, and particle physics, where model comparison is essential. It has spawned numerous software packages (e.g., MultiNest, PolyChord, dynesty) and extensions for dynamic nested sampling, parallelization, and handling of complex likelihoods. The method's ability to provide both evidence and posterior samples in a single run, along with its robustness to phase transitions, makes it a versatile tool for practitioners. Its influence extends beyond statistics into machine learning, where it is used for model selection and hyperparameter optimization. The paper remains highly cited (over 1600 citations) and is a cornerstone of modern Bayesian computation.