Accelerated Bayesian inference for pulsar timing arrays: Normalizing flows for rapid model comparison across stochastic gravitational-wave background sources
Phys. Rev. D 112, 023533 – Published 18 July, 2025
DOI: https://doi.org/10.1103/7j5m-m9j7
Abstract
The recent detection of nanohertz stochastic gravitational-wave backgrounds (SGWBs) by pulsar timing arrays (PTAs) promises unique insights into astrophysical and cosmological origins. However, traditional Markov Chain Monte Carlo (MCMC) approaches become prohibitively expensive for large datasets. We employ a normalizing flow (NF)-based machine learning framework to accelerate Bayesian inference in PTA analyses. For the first time, we perform Bayesian model comparison across SGWB source models in the framework of machine learning by training NF architectures on the PTA dataset (NANOGrav 15 year) and enabling direct evidence estimation via learned harmonic mean estimators. Our examples include 10 conventional SGWB source models such as supermassive black hole binaries, Power-Law spectrum, cosmic strings, domain walls, scalar-induced GWs, first-order phase transitions, and dual scenario/inflationary gravitational wave. Our approach jointly infers 20 red noise parameters (10 pulsars) and two SGWB parameters per model in hours (including training), compared to with MCMC (68 pulsars). Critically, the NF method preserves rigorous model selection accuracy, with small Hellinger distances () relative to MCMC posteriors, and reproduces MCMC-based Bayes factors across all tested scenarios. This scalable technique for SGWB source comparison will be essential for future PTA expansions, and next-generation arrays such as the SKA, may offer substantial efficiency gains without sacrificing physical interpretability.