Costless correction of chain based nested sampling parameter estimation in gravitational wave data and beyond

Metha Prathaban, Will Handley

This paper, recently published by researchers at the University of Cambridge, addresses a subtle but significant flaw in how we calculate uncertainties in Bayesian inference—specifically within the context of gravitational wave (GW) astronomy.

TL;DR

Standard nested sampling often underestimates the uncertainty of parameter estimates (like the mass of a black hole) because it fails to account for parameter variation along likelihood contours. This paper introduces two "costless" methods that recycle discarded "phantom points" from chain-based samplers to produce accurate error bars without requiring additional computational time.

What Problem Does This Paper Address?

Nested Sampling (NS) is a workhorse algorithm in Bayesian astrophysics. It is exceptionally good at calculating the "evidence" (how well a model fits the data) and the "posterior" (the probability distribution of physical parameters). However, there is a hidden source of uncertainty in parameter estimation that is often ignored.

Standard NS assumes that a single point can represent an entire "iso-likelihood contour" (a shell in parameter space where the likelihood is constant). In reality, physical parameters can vary significantly across these shells. If you only use one point per shell, your final error bars will be too small—a problem called "over-optimism." Until now, the only way to fix this was to run the entire, computationally expensive sampler dozens of times to see how much the results varied. For complex gravitational wave models, this is often prohibitively slow.

Methods

The authors propose leveraging "phantom points." When chain-based samplers (like PolyChord) look for a new sample, they generate a Markov Chain of intermediate points. Usually, only the final point is kept, and the rest are discarded. The authors realized these discarded points are a goldmine of information about the shape of the likelihood contours.

They introduce two novel techniques:

  1. Likelihood Binning: Phantom points are grouped into "bins" based on their likelihood values. When calculating the final parameter estimates, the algorithm resamples from these bins rather than relying on a single point. This captures the true variation along the contour.
  2. Reconstructed Runs: The authors show you can take the $n$-th point from every chain to build multiple, parallel "reconstructed" nested sampling runs. These runs are used to estimate the run-to-run variance from a single execution.

Crucially, because these likelihood calls have already been made during the standard sampling process, these corrections are essentially "costless" in terms of CPU time.

Datasets

The methods were evaluated using simulated Binary Black Hole (BBH) coalescence signals, modeled after the historic GW150914 event.

  • Signal-to-Noise Ratio (SNR): 51.
  • Parameters sampled: Chirp mass ($\mathcal{M}$), mass ratio ($q$), luminosity distance ($d_L$), and zenith angle ($\theta_{jn}$).
  • Software: The study used the bilby inference library with the PolyChord and dynesty samplers.

Key Insights and Ideas

  • The "Aha" Moment: Discarded likelihood evaluations aren't trash; they are samples of the prior volume constrained by likelihood. They provide the missing information about parameter variation that standard NS ignores.
  • The Convergence Check: The authors propose a way to verify if your error bars are "correct" from a single run. By splitting phantom points into two halves (e.g., the first half of the chain vs. the second half) and comparing the resulting distributions, researchers can determine if their chains were long enough to produce uncorrelated samples.
  • Impact on $p$-$p$ Plots: In large-scale population studies, researchers use $p$-$p$ plots to check for systematic biases. The authors show that ignoring NS uncertainty can make a perfectly good model look biased. Including these new error bars fixes the "coverage" of these plots.

Key Results

  • Failure of Standard Methods: Using the standard "simulated weights" method, the researchers found a Kolmogorov-Smirnov (K-S) test $p$-value of 0.0001 for chirp mass estimates. This indicates the standard error bars were significantly failing to capture the true run-to-run variation.
  • Success of New Methods: With Likelihood Binning, the $p$-value rose to 0.4968, and with Reconstructed Runs, it reached 0.4662. A $p$-value near 0.5 indicates that the error bars are now perfectly capturing the statistical uncertainty.
  • Chain Length Matters: The paper demonstrates that for some parameters (like luminosity distance), the default chain lengths in popular samplers are actually too short to provide uncorrelated phantom points. Their new diagnostic tool successfully identifies this "under-sampling" before it leads to incorrect physical conclusions.

Limitations and Future Work

  • Sampler Dependency: These methods are specific to "chain-based" nested samplers. While these are common in GW astronomy, the methods wouldn't directly apply to "rejection-based" samplers without modification.
  • Correlation Issues: If the MCMC chains used to find new points are too short, the phantom points remain correlated with the starting point. The authors provide a way to detect this, but the "fix" still requires increasing the chain length (and thus the computational cost).
  • Future Integration: The authors hope to see these methods integrated into standard Bayesian pipelines (like bilby or parallel-bilby) to ensure that the next generation of gravitational wave catalogs has more robust and honest uncertainty estimates.

Summary updated

Abstract

Nested sampling parameter estimation differs from evidence estimation, in that it incurs an additional source of uncertainty. This uncertainty affects estimates of parameter means and credible intervals in gravitational wave analyses and beyond, and yet, it is typically not accounted for in standard uncertainty estimation methods. In this paper, we present two novel methods to quantify this uncertainty more accurately for any chain based nested sampler, using the additional likelihood calls made at runtime in producing independent samples. Using injected signals of black hole binary coalescences as an example, we first show concretely that the usual uncertainty estimation method is insufficient to capture the true error bar on parameter estimates. We then demonstrate how the extra points in the chains of chain based samplers may be carefully utilised to estimate this uncertainty correctly, and provide a way to check the accuracy of the resulting error bars. Finally, we discuss how this uncertainty affects $p$-$p$ plots and coverage assessments.
BibTeX
@inproceedings{prathaban2024costless,
  author = {Metha Prathaban and Will Handley},
  title = {{Costless correction of chain based nested sampling parameter estimation in gravitational wave data and beyond}},
  booktitle = {Monthly},
  year = {2024},
  doi = {10.1093/mnras/stae1908},
}
Figure