Neural Posterior Estimation of Neutron Star Equations of State
Abstract
We present a simulation-based inference (SBI) framework to constrain the neutron star (NS) equation of state (EoS) from astrophysical observations of masses, radii and tidal deformabilities, using Neural posterior estimation (NPE) with Conditional Normalising Flows (CNF). To ensure that the model conforms with reality, physics-informed constraints are embedded directly into the training loss. This enables efficient, likelihood-free inference of full posterior distributions for key thermodynamic quantities-including pressure, squared speed of sound, and the trace anomaly-conditioned on observational data. Our models are trained on synthetic datasets generated from two agnostic EoS priors: polytropic parametrizations (PT) and gaussian process (GP) reconstructions. These datasets span various scenarios, including the presence or absence of tidal deformability information and observational noise. Across all settings, the method produces accurate and well-calibrated posteriors, with uncertainties reduced when tidal deformability constraints are included. Furthermore, we find that the behavior of normalized predictive dispersions is strongly correlated with the maximum central density inside NSs, suggesting that the model can indirectly infer this physically meaningful quantity. The approach generalizes well across EoS families and accurately reconstructs derivative quantities such as the polytropic index, demonstrating its robustness and potential for probing dense matter in NS cores.