Efficient Bayesian analysis of kilonovae and gamma ray burst afterglows with fiesta
Hauke Koehn, Thibeau Wouters, Peter T. H. Pang, Mattia Bulla, Henrik Rose, Hannah Wichern, Tim Dietrich
TL;DR
This work addresses the computational bottleneck of Bayesian inference for kilonova and GRB afterglow emission by introducing fiesta, a JAX-based framework that trains ML surrogates for the GRB afterglow models (afterglowpy, pyblastafterglow) and a kilonova model (possis). Surrogates predict the spectral flux density $F_\nu$ across time and frequency, enabling likelihood evaluations to be performed efficiently and permitting posterior sampling with flowMC on GPUs. The authors validate the approach with injection tests and show substantial speedups (minutes vs hours) while reproducing posteriors consistent with base models, applying the method to AT2017gfo/GRB170817A and GRB211211A and, for the first time, performing a Bayesian inference with pyblastafterglow. Fiesta thus enables rapid, high-dimensional, multi-messenger parameter estimation and sets the stage for joint GW–EM analyses and broader deployment to future transient surveys.
Abstract
Gamma-ray burst (GRB) afterglows and kilonovae (KNe) are electromagnetic transients that can accompany binary neutron star (BNS) mergers. Therefore, studying their emission processes is of general interest for constraining cosmological parameters or the behavior of ultra-dense matter. One common method to analyze electromagnetic data from BNS mergers is to sample a Bayesian posterior over the parameters of a physical model for the transient. However, sampling the posterior is computationally costly and because of the many likelihood evaluations required in this process, detailed models are too expensive to be used directly in Bayesian inference. In this paper, we address the problem by introducing fiesta, a python package to train machine learning (ML) surrogates for GRB afterglow and kilonova models that have the capacity to accelerate likelihood evaluations. Specifically, we introduce extensive ML surrogates for the state-of-the-art GRB afterglow models afterglowpy and pyblastafterglow, along with a new surrogate for KN emission based on the possis code. Our surrogates enable evaluation of the light-curve posterior within minutes. We also provide built-in posterior sampling capabilities in fiesta that rely on the flowMC package, which efficiently scale to higher dimensions when adding up to tens of nuisance sampling parameters. Because of its use of the JAX framework, fiesta also allows for GPU acceleration during both surrogate training and posterior sampling. We applied our framework to reanalyze AT2017gfo/GRB170817A and GRB211211A with our surrogates, thus employing the new pyblastafterglow model for the first time in Bayesian inference.
