AGN x-ray reflection spectroscopy with ml_mytorus: Neural posterior estimation with training on observation-driven parameter grids
Phys. Rev. D 114, 083003 – Published 1 October, 2026
DOI: https://doi.org/10.1103/xmdh-6ld8
Abstract
X-ray spectroscopy of active galactic nuclei (AGN) reveals key information about the circumnuclear matter geometry. Many AGN are known to show a narrow Fe line at 6.4 keV and associated Compton-scattered continua in their x-ray spectra, due to primary continuum scattering in cold, neutral material far from the central supermassive black hole. We present a novel approach that uses simulation-based inference (SBI) with neural posterior estimation to train a machine learning (ML) model based on Nuclear Spectroscopic Telescope Array (NuSTAR) spectral fitting results from the literature, employing the physically motivated mytorus-decoupled model, which distinguishes line of sight from global equivalent neutral hydrogen column density ( vs ). To overcome the limitations of traditional frequentist fitting—such as lack of automation, reproducibility, and computational cost—we implement normalizing flows and autoregressive networks to learn flexible posterior distributions from simulated spectra. From 34 NuSTAR spectral fitting results reported in the literature, we generated 34,000 synthetic spectra for both a uniform and a Gaussian parameter distribution and show that the latter is more strongly observationally driven. We train our neural network to determine four key MYTORUS parameters, , , power-law spectral index , and relative normalization . Mutual information analysis identifies optimal spectral regions and justifies the inclusion of redshift, exposure time, and Galactic absorption. The observation-based grid significantly outperforms uniform sampling, achieving predictive accuracy for individual parameters greater than 90% ( and ), 89% (), and 82% for within . For all four parameters simultaneously, predictive accuracy remains high at . We make ml_mytorus, the trained model, publicly available with a web interface that enables fast and reproducible parameter inference from NuSTAR spectra. Its application to NGC 4388 illustrates the promise of the approach. ml_mytorus offers a reproducible and accessible alternative for exploring MYTORUS-type models and performs well in a statistical sense, highlighting the potential of SBI methods for future studies of distant x-ray reflection in x-ray spectra of AGN and potentially other compact accreting x-ray sources such as Galactic x-ray binaries.