Table of Contents
Fetching ...

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.

AGN X-ray Reflection Spectroscopy with ML MYTORUS:Neural Posterior Estimation with Training on Observation-Driven Parameter Grids

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 , , , and conditioned on the spectrum . 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.

Paper Structure

This paper contains 27 sections, 10 equations, 12 figures, 2 tables.

Figures (12)

  • Figure 1: Flow diagram of the SBI-NPE inference mechanism applied to X-ray spectra, implemented the sbi package. The MAF is illustrated, which transforms latent variables ${\bf z} \sim \mathcal{N}(0,I)$ into progressively more complex posterior distributions considering the information in the spectrum. The 3D plots visualize how the autoregressive dependencies introduced at each step result in increasingly complex distributions, capable of capturing correlations between parameters and non-Gaussian shapes.
  • Figure 2: Distributions of literature-based physical parameters for 35 NuSTAR observations (25 AGN). From left to right and top to bottom, shown are distributions for four parameters from mytorus decoupled fits ($N_{\rm H,Z}$, $N_{\rm H,S}$, $\Gamma$, $A_S$), as well as (double) exposure time, $z$, and $N_{\rm H}^{\rm gal}$. Each panel shows a histogram with a corresponding box-plot below it.
  • Figure 3: Literature-based mytorus-decoupled values used to construct simulated spectra for NN training. Right panel: Fitted values for physical parameters $N_{\rm H,Z}$, $N_{\rm H,S}$, $\Gamma$ ($x$, $y$, $z$ axes), and $A_S$ (color-coded as indicated by the color bar) for 34 NuSTAR observations (24 AGN) from the literature (Table \ref{['tab:tab_1']}). Left panel: Values for the same physical parameters obtained by assuming a Gaussian distribution around each one as explained in the text (Sec. \ref{['sec-sim']}), and used to construct simulated spectra for training and validation. In total, 34 000 data points are shown.
  • Figure 4: MI analysis between spectral regions and physical parameters. Each band shows the contribution of different energy intervals (shaded in yellow, labeled R1–R6). Each row corresponds to one of the four physical parameters: from top to bottom $N_{\rm H,Z}$, $N_{\rm H,S}$, $\Gamma$, and $A_S$. The MI value reported in each region quantifies the relative importance of that interval for determining the corresponding parameter. Left panels display spectra simulated with the observation-based grid, while right panels show the uniform grid. Note that MI = 0 indicates complete independence between the spectral region and the corresponding physical parameter.
  • Figure 5: Training and validation loss as a function of epochs for our SBI-NPE implementation. Upper panel: simulations generated from the observation-based grid. Lower panel: simulations generated from the uniform grid.
  • ...and 7 more figures