Nested sampling with normalizing flows for gravitational-wave inference

Michael J. Williams*, John Veitch, Chris Messenger

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review


We present a novel method for sampling iso-likelihood contours in nested sampling using a type of machine learning algorithm known as normalizing flows and incorporate it into our sampler nessai. nessai is designed for problems where computing the likelihood is computationally expensive and therefore the cost of training a normalizing flow is offset by the overall reduction in the number of likelihood evaluations. We validate our sampler on 128 simulated gravitational wave signals from compact binary coalescence and show that it produces unbiased estimates of the system parameters. Subsequently, we compare our results to those obtained with dynesty and find good agreement between the computed log-evidences while requiring 2.07 times fewer likelihood evaluations. We also highlight how the likelihood evaluation can be parallelized in nessai without any modifications to the algorithm. Finally, we outline diagnostics included in nessai and how these can be used to tune the sampler's settings.

Original languageEnglish
Article number103006
Number of pages19
JournalPhysical Review D
Issue number10
Publication statusPublished - 5 May 2021


  • UKRI
  • STFC
  • ST/L000946/1

Cite this