AGN X-ray Reflection Spectroscopy with ML MYTORUS:Neural Posterior Estimation with Training on Observation-Driven Parameter Grids
Ingrid Vanessa Daza-Perilla, Panayiotis Tzanavaris, V. Madurga-Favieres, M. Yukita, A. Ptak, T. Yaqoob
TL;DR
This paper introduces SBI-NPE to infer the four MYTORUS decoupled X-ray reflection parameters from NuSTAR spectra by training on an observation-driven grid of simulated spectra. It leverages normalizing flows and Masked Autoregressive Flows, together with MADE, to obtain flexible posterior distributions for $N_{ m H,Z}$, $N_{ m H,S}$, $oldsymbol{\Gamma}$, and $A_S$ conditioned on the spectrum ${f x}$. The method demonstrates high predictive accuracy in validation and testing, significantly outperforming a uniformly sampled training grid, and provides robust uncertainty quantification via posterior distributions. A public ML_MyTorus tool and web interface enable rapid, reproducible inferences from NuSTAR data, with a case study on NGC 4388 highlighting the approach's ability to reveal degenerate solutions and guide follow-up analysis. Overall, this work establishes a scalable, physiology-driven, simulation-based inference pipeline that complements traditional XSPEC fits and paves the way for applying similar methods to future X-ray observatories.
Abstract
X-ray spectroscopy of active galactic nuclei (AGN) reveals key information about circumnuclear geometry. Many AGN show a narrow Fe K-alpha line at 6.4 keV and associated Compton-scattered continua, produced by primary continuum scattering in cold, neutral material far from the central supermassive black hole. We present a novel approach based on Simulation-Based Inference with Neural Posterior Estimation (SBI-NPE) to train a machine-learning (ML) model using NuSTAR spectral fitting results from the literature, adopting the physically motivated MYTORUS-decoupled model, which separates line-of-sight and global equivalent hydrogen column densities (NH_Z and NH_S). To overcome limitations of traditional frequentist fitting such as local minima, limited automation, reproducibility, and computational cost, we employ normalizing flows and autoregressive networks to learn flexible posterior distributions from simulated spectra. From 34 NuSTAR spectral fits, we generate 34,000 synthetic spectra using uniform and Gaussian parameter distributions, showing that the latter is more strongly observationally driven. The network is trained to infer four MYTORUS parameters: NH_Z, NH_S, the photon index Gamma, and the relative normalization AS. Mutual information analysis identifies optimal spectral regions and motivates the inclusion of redshift, exposure time, and Galactic absorption. The observation-based grid significantly outperforms uniform sampling, achieving predictive accuracies above 90 percent for NH_S and AS, 89 percent for NH_Z, and 82 percent for Gamma within one sigma, with a joint accuracy of 70 percent for all parameters. We publicly release ML MYTORUS with a web interface enabling fast, reproducible inference from NuSTAR spectra. An application to NGC 4388 illustrates the promise of this approach.
