  High-resolution cosmological N-body simulations are excellent tools for
modelling the formation and clustering of dark matter haloes. These simulations
suggest complex physical theories of halo formation governed by a set of
effective physical parameters. Our goal is to extract these parameters and
their uncertainties in a Bayesian context. We make a step towards automatising
this process by directly comparing dark matter density projection maps
extracted from cosmological simulations, with density projections generated
from an analytical halo model. The model is based on a toy implementation of
two body correlation functions. To accomplish this we use marginal neural ratio
estimation, an algorithm for simulation-based inference that allows marginal
posteriors to be estimated by approximating marginal likelihood-to-evidence
ratios with a neural network. In this case, we train a neural network with mock
images to identify the correct values of the physical parameters that produced
a given image. Using the trained neural network on cosmological N-body
simulation images we are able to reconstruct the halo mass function, to
generate mock images similar to the N-body simulation images and to identify
the lowest mass of the haloes of those images, provided that they have the same
clustering with our training data. Our results indicate that this is a
promising approach in the path towards developing cosmological simulations
assisted by neural networks.
