[Paper Review] Marginal Likelihoods from Monte Carlo Markov Chains
This paper proposes a Bayesian nearest-neighbor method using k-th nearest neighbor distances with Mahalanobis distance to estimate the marginal likelihood (Bayesian evidence) from MCMC samples. It achieves ~2× accuracy in 20 dimensions with 10⁵ samples, showing k=1 is optimal and prewhitening improves performance, enabling robust model comparison in high-dimensional parameter spaces.
In this paper, we present a method for computing the marginal likelihood, also known as the model likelihood or Bayesian evidence, from Markov Chain Monte Carlo (MCMC), or other sampled posterior distributions. In order to do this, one needs to be able to estimate the density of points in parameter space, and this can be challenging in high numbers of dimensions. Here we present a Bayesian analysis, where we obtain the posterior for the marginal likelihood, using $k$th nearest-neighbour distances in parameter space, using the Mahalanobis distance metric, under the assumption that the points in the chain (thinned if required) are independent. We generalise the algorithm to apply to importance-sampled chains, where each point is assigned a weight. We illustrate this with an idealised posterior of known form with an analytic marginal likelihood, and show that for chains of length $\sim 10^5$ points, the technique is effective for parameter spaces with up to $\sim 20$ dimensions. We also argue that $k=1$ is the optimal choice, and discuss failure modes for the algorithm. In a companion paper (Heavens et al. 2017) we apply the technique to the main MCMC chains from the 2015 Planck analysis of cosmic background radiation data, to infer that quantitatively the simplest 6-parameter flat $Λ$CDM standard model of cosmology is preferred over all extensions considered.
Motivation & Objective
- To develop a method for computing the marginal likelihood from MCMC samples, which is essential for Bayesian model comparison.
- To address the challenge of estimating high-dimensional density from MCMC samples, where the curse of dimensionality hinders standard density estimation.
- To generalize the method to importance-sampled chains, broadening its applicability to non-i.i.d. posterior samples.
- To evaluate the performance and robustness of the method across varying dimensions and sample sizes, particularly in high-dimensional parameter spaces.
- To identify optimal k and transformation strategies (e.g., prewhitening) that improve accuracy and reduce variance in marginal likelihood estimation.
Proposed method
- Uses k-th nearest neighbor distances in parameter space to estimate the local density of MCMC samples, leveraging the fact that density is proportional to the inverse of the volume spanned by neighbors.
- Applies the Mahalanobis distance metric to account for correlations and scale in high-dimensional parameter spaces, improving accuracy over Euclidean distance.
- Employs a Bayesian framework to combine likelihoods from all MCMC points, forming a posterior distribution over the marginal likelihood.
- Generalizes the method to importance-sampled chains by incorporating weights into the nearest-neighbor density estimation.
- Prewhitens the chain by transforming parameters to uncorrelated, unit-variance components using the chain's covariance matrix, enabling use of Euclidean distance in the transformed space.
- Uses the Jacobian of the transformation to correctly compute the marginal likelihood in the prewhitened space.
Experimental results
Research questions
- RQ1Can the marginal likelihood be accurately estimated from standard MCMC chains using nearest-neighbor density estimation?
- RQ2How does the choice of k (number of nearest neighbors) affect the accuracy and variance of the marginal likelihood estimate?
- RQ3Does using the Mahalanobis distance or prewhitening significantly improve performance in high-dimensional parameter spaces?
- RQ4What are the failure modes of the method, and under what conditions does it break down?
- RQ5Can the method be generalized to importance-sampled chains, and how does it perform under non-i.i.d. sampling?
Key findings
- The method achieves approximately 2× accuracy in 20-dimensional parameter spaces using chains of length ~10⁵, with the error remaining within a factor of two.
- k=1 is found to be optimal, as higher k values increase bias and reduce accuracy, despite lower variance.
- Using the Mahalanobis distance or prewhitening the chain significantly improves performance, especially in higher dimensions, compared to naive Euclidean distance.
- The method fails when the target distribution is not well-approximated by a constant over the typical nearest-neighbor distance, particularly when (αₘN/V)^(-1/m) > 0.5.
- Prewhitening reduces noise and improves accuracy, with k=1 showing higher accuracy than k=4 even though it is noisier.
- The algorithm assumes independent samples; thus, chain thinning is recommended if autocorrelation is present.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.