The electronic structure in matter under extreme conditions is a challenging complex system prevalent in astrophysical objects and highly relevant for technological applications. We show how machine-learning surrogates in terms of neural networks have a profound impact on the efficient modeling of matter under extreme conditions. We demonstrate the utility of a surrogate model that is trained on emph{ab initio} quantum Monte Carlo data for various applications in the emerging field of warm dense matter research.