Papers
Topics
Authors
Recent
Search
2000 character limit reached

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

Published 13 Dec 2025 in astro-ph.GA | (2512.12155v1)

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.

Summary

  • The paper presents ML_MyTorus, a neural posterior estimation framework that infers four key MYTorus parameters from AGN X-ray spectra using observation-driven training grids.
  • It utilizes autoregressive normalizing flows with MADE networks to capture complex degeneracies and provide robust uncertainty quantification.
  • The approach outperforms traditional XSPEC fitting in convergence, accuracy, and reproducibility, making it scalable for future high-throughput missions.

Simulation-Based Inference for AGN X-ray Reflection: ML_MyTorus and Parameter Estimation via Observation-Driven Neural Posterior Estimation

Scientific Context and Objectives

The study addresses the challenge of extracting the fundamental physical parameters of AGN circumnuclear environments from X-ray reflection spectra, focusing on the widely used MYTorus model in its decoupled configuration. Traditional frequentist fitting (e.g., C-stat minimization in XSPEC) remains a mainstay for spectral analysis but is limited by manual workflow, issues with local minima, lack of automation, and poor reproducibility, especially as future high-throughput missions (e.g., Athena X-IFU) will provide massive spectral datasets of high complexity. Recent advances in simulation-based inference (SBI) and deep probabilistic modeling offer alternative parameter estimation pipelines, but their adaptation to physically rich, computationally expensive models with complex degeneracies remains under-explored.

This work introduces ML_MyTorus, a framework implementing Neural Posterior Estimation (NPE) via normalizing flows and autoregressive architectures, designed for regression and uncertainty quantification of the four principal decoupled MYTorus parameters: the line-of-sight column density NH,ZN_\mathrm{H,Z}, global column density NH,SN_\mathrm{H,S}, power-law index Γ\Gamma, and the relative scattered normalization ASA_S. The approach utilizes observation-driven parameter grids for synthesis and training, maximizing physical relevance and empirical coverage.

Model and Algorithmic Foundation

The inference engine models the joint posterior p(θx)p(\boldsymbol{\theta}|\mathbf{x}), where θ\boldsymbol{\theta} are the four MYTorus physical parameters and x\mathbf{x} is the observed NuSTAR spectrum. The underlying framework is an autoregressive normalizing flow constructed from a sequence of five Masked Autoencoder for Distribution Estimation (MADE) networks. Each MADE incorporates context from the spectrum and additional meta-data (redshift zz, Galactic NHN_\mathrm{H}, exposure) to condition the posterior on relevant observational constraints. Figure 1

Figure 1: Flow diagram of the SBI-NPE inference mechanism applied to X-ray spectra, highlighting progressive transformation of latent variables to the physical parameter posterior via Masked Autoregressive Flow.

Training proceeds by minimizing the negative log-likelihood (NLL) over synthetic spectrum/parameter pairs. The base distribution is a factorized multivariate normal in latent space, mapped via successive affine and non-linear transformations. During inference, posterior samples are generated by inverting the flow, yielding full joint and marginal posteriors with robust uncertainty quantification via σ68\sigma_{68} intervals.

Construction of the Observational Training Set

A major innovation is the construction of the parameter grid for simulation-based training. In contrast to previous uniform or artificially wide priors, this work samples the parameter space based on archival values from 34 published NuSTAR AGN MYTorus decoupled fits, representing 25 AGN. Each anchor point generates 1000 Gaussian-augmented variations, resulting in a corpus of 34,000 observation-driven parameter realizations, each paired with a simulated 3–30 keV NuSTAR spectrum (response and noise modeled physically). Figure 2

Figure 2: Empirical distributions for the main MYTorus physical parameters, exposure time, redshift, and Galactic column for the literature-sourced AGN sample, emphasizing domain coverage.

The approach ensures the training set embodies the statistical properties (parameter covariances, S/N, outlier regimes) of real observational data, thus enhancing generalization to actual spectra and reducing the risk of domain shift when applied to real science. Figure 3

Figure 3

Figure 3: Multidimensional distribution of literature-based parameter anchors and with Gaussian augmentation for synthetic spectra—this covers the empirical AGN parameter landscape.

Feature/Region Sensitivity and Mutual Information Analysis

Feature selection is guided by mutual information (MI) analysis between binned spectral regions and physical parameters. The results show that for the observational grid, the region 3–8 keV (R1) carries the highest entropy for NH,ZN_\mathrm{H,Z} (MI = 0.78), followed by ASA_S, while higher energy bands are more informative for Γ\Gamma. The MI also shows that auxiliary variables such as redshift, exposure, and Galactic NHN_\mathrm{H}, though subdominant, introduce non-negligible dependence and are included as conditioning variables. Figure 4

Figure 4

Figure 4: Spectral band mutual information for the four MYTorus parameters; the informed grid yields higher MI and more physically plausible parameter-spectral relationships compared to a uniform grid.

Training, Validation, and Performance Metrics

Dual training runs (observation-based vs. uniform grid sampling) demonstrate that the physically informed grid converges faster, achieves lower NLL loss, and displays higher accuracy and stability. Both the training and validation curves show no signs of overfitting, attributable to realistic regularization via the parameter distribution. Figure 5

Figure 5

Figure 5: Training and validation NLL as a function of epoch for observation-driven and uniform grids; the observational grid achieves superior convergence and generalization.

Prediction validation yields the following quantifications within the 1σ\sigma credible interval of the true parameters: NH,ZN_\mathrm{H,Z} (94%), NH,SN_\mathrm{H,S} (95%), Γ\Gamma (82%), ASA_S (92%) for the sequentially augmented, observation-based grid. In contrast, for the uniform grid, the respective accuracies are significantly lower, and joint recovery probability for all four parameters drops from 74% (observation-based) to 41% (uniform). Figure 6

Figure 6

Figure 6: Predicted vs. simulated “true” parameters for the validation set; the observation-based workflow yields predictions tightly clustered near ideal recovery.

Residual analysis shows that the error distributions are nearly centered and uncorrelated, with minor joint structure between NH,ZN_\mathrm{H,Z}, Γ\Gamma, and ASA_S—reflecting mild degeneracies inherent to the physical model. Figure 7

Figure 7: Joint residual distributions for all parameter pairs, showing model calibration and lack of systematic uncertainties in the main regime.

Application to Real NuSTAR Data

A case study on NGC 4388 demonstrates practical application. The workflow employs combined FPMA+FPMB spectrum, correct response, meta-data, and returns full marginal posteriors. Comparison to traditional XSPEC fitting shows that for the well-constrained parameters (Γ\Gamma, ASA_S) the ML and frequentist posteriors are fully consistent. However, NH,ZN_\mathrm{H,Z} and NH,SN_\mathrm{H,S} feature bimodal or degenerate solutions, correctly reflected by the neural posterior and the frequentist landscape, providing important diagnostic power over standard point estimates. Figure 8

Figure 8: Posterior histograms for NGC 4388’s main MYTorus parameters; ML_MyTorus and XSPEC solutions align in statistically robust fashion, yet posterior multimodality/degeneracy is made explicit.

Practical and Theoretical Implications

ML_MyTorus reveals distinct advantages for current and next-generation high-throughput missions:

  • Robust, automated, and reproducible inference for complex, physically coupled X-ray models,
  • Fast probabilistic parameter estimation with quantified uncertainty and degeneracy reporting,
  • Excellent generalization for sources whose spectra reside within, or near, the empirical training domain,
  • Potential for extension to other reflection models (e.g., relxill), telescopes, or time-resolved studies.

Importantly, the reliance on training labels from published fits means that any systematic bias or modeling inadequacy in those fits propagates deterministically to the ML inference—physical interpretability and coverage must therefore be continually re-evaluated as the grid expands. The availability of a public web interface and inference codebase enhances reproducibility and accessibility.

Future Directions

Scaling future iterations beyond the empirical coverage of the compiled AGN sample will necessitate adoption of joint domain adaptation (such as Simformer), inclusion of new spectral variability sources (e.g., broadening effects, response calibration), and multi-telescope/instrument generalization. As parameter degeneracy and non-Gaussianity become more prevalent with increased model sophistication, posterior reporting—not just point estimation—will be critical for astrophysical diagnostics, enabling model discrimination and hypothesis testing directly in the latent parameter space. The methodology is also extendable to other compact accretors (e.g., Galactic X-ray binaries), joint X-ray/optical modeling, and time-resolved reverberation analyses.

Conclusion

This paper establishes ML_MyTorus as a statistically rigorous and operationally viable framework for physical parameter inference from AGN X-ray reflection spectra, with performance that matches or exceeds traditional approaches in accuracy, automation, and reproducibility. The observation-driven neural posterior estimation paradigm significantly raises the standard for scalable, uncertainty-aware analysis in high-energy astrophysics, and offers a forward-compatible path as the influx of high-quality X-ray spectra continues to escalate with future observatories.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We found no open problems mentioned in this paper.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 3 tweets with 2 likes about this paper.