Table of Contents
Fetching ...

Variational Autoencoder with Normalizing flow for X-ray spectral fitting

Fiona Redmen, Ethan Tregidga, James F. Steiner, Cecilia Garraffo

TL;DR

This work tackles the slow posterior inference problem in X-ray spectral fitting of black hole X-ray binaries by replacing traditional MCMC with a variational autoencoder augmented by a neural spline normalizing flow, yielding full posterior distributions over the five physical parameters ($kT_{ ext{disk}}$, $N$, $ ext{Gamma}$, $f_{ ext{sc}}$, $N_H$) from NICER spectra in the $0.3-10$ keV band. The model is trained on 10,800 real NICER spectra and 100,000 synthetic spectra in a three-stage pipeline, enforcing a physics-informed latent space via GNLL, latent, and flow losses. It achieves spectra reconstructions with fidelity comparable to Xspec while delivering dramatic speedups—about $6.4 imes10^2$ per posterior sample and up to $ imes2000$ for 1000 samples—enabling rapid, uncertainty-aware analysis for large NICER datasets. The approach demonstrates robustness on real data and lays groundwork for scalable population studies, with potential extensions to more complex physical models.

Abstract

Black hole X-ray binaries (BHBs) can be studied with spectral fitting to provide physical constraints on accretion in extreme gravitational environments. Traditional methods of spectral fitting such as Markov Chain Monte Carlo (MCMC) face limitations due to computational times. We introduce a probabilistic model, utilizing a variational autoencoder with a normalizing flow, trained to adopt a physical latent space. This neural network produces predictions for spectral-model parameters as well as their full probability distributions. Our implementations result in a significant improvement in spectral reconstructions over a previous deterministic model while performing three orders of magnitude faster than traditional methods.

Variational Autoencoder with Normalizing flow for X-ray spectral fitting

TL;DR

This work tackles the slow posterior inference problem in X-ray spectral fitting of black hole X-ray binaries by replacing traditional MCMC with a variational autoencoder augmented by a neural spline normalizing flow, yielding full posterior distributions over the five physical parameters (, , , , ) from NICER spectra in the keV band. The model is trained on 10,800 real NICER spectra and 100,000 synthetic spectra in a three-stage pipeline, enforcing a physics-informed latent space via GNLL, latent, and flow losses. It achieves spectra reconstructions with fidelity comparable to Xspec while delivering dramatic speedups—about per posterior sample and up to for 1000 samples—enabling rapid, uncertainty-aware analysis for large NICER datasets. The approach demonstrates robustness on real data and lays groundwork for scalable population studies, with potential extensions to more complex physical models.

Abstract

Black hole X-ray binaries (BHBs) can be studied with spectral fitting to provide physical constraints on accretion in extreme gravitational environments. Traditional methods of spectral fitting such as Markov Chain Monte Carlo (MCMC) face limitations due to computational times. We introduce a probabilistic model, utilizing a variational autoencoder with a normalizing flow, trained to adopt a physical latent space. This neural network produces predictions for spectral-model parameters as well as their full probability distributions. Our implementations result in a significant improvement in spectral reconstructions over a previous deterministic model while performing three orders of magnitude faster than traditional methods.
Paper Structure (7 sections, 1 equation, 3 figures, 1 table)

This paper contains 7 sections, 1 equation, 3 figures, 1 table.

Figures (3)

  • Figure 1: Illustration of AE with NF architecture.
  • Figure 2: $50$ samples from output posteriors plotted against corresponding input values for a total of $250$ spectra, and colored by total spectral count rate. PCC and best linear fits are included.
  • Figure 3: Plot of coverage versus credible level for distributions predicted from real spectra (blue, solid). The ideal coverage is also plotted (grey, dashed).