  Neutron stars provide a unique laboratory for studying matter at extreme
pressures and densities. While there is no direct way to explore their interior
structure, X-rays emitted from these stars can indirectly provide clues to the
equation of state (EOS) of superdense nuclear matter through the inference of
the star's mass and radius. However, inference of EOS directly from a star's
X-ray spectra is extremely challenging and is complicated by systematic
uncertainties. The current state of the art is to use simulation-based
likelihoods in a piece-wise method, which first infer the star's mass and
radius to reduce the dimensionality of the problem, and from those quantities
infer the EOS. We demonstrate a series of enhancements to the state of the art,
in terms of realistic uncertainty quantification and improved regression of
physical properties with machine learning. We also demonstrate novel inference
of the EOS directly from the high-dimensional spectra of observed stars,
avoiding the intermediate mass-radius step. Our network is conditioned on the
sources of uncertainty of each star, allowing for natural and complete
propagation of uncertainties to the EOS.
