  We train deep learning models on thousands of galaxy catalogues from the
state-of-the-art hydrodynamic simulations of the CAMELS project to perform
regression and inference. We employ Graph Neural Networks (GNNs), architectures
designed to work with irregular and sparse data, like the distribution of
galaxies in the Universe. We first show that GNNs can learn to compute the
power spectrum of galaxy catalogues with a few percent accuracy. We then train
GNNs to perform likelihood-free inference at the galaxy-field level. Our models
are able to infer the value of $\Omega_{\rm m}$ with a $\sim12\%-13\%$ accuracy
just from the positions of $\sim1000$ galaxies in a volume of $(25~h^{-1}{\rm
Mpc})^3$ at $z=0$ while accounting for astrophysical uncertainties as modelled
in CAMELS. Incorporating information from galaxy properties, such as stellar
mass, stellar metallicity, and stellar radius, increases the accuracy to
$4\%-8\%$. Our models are built to be translational and rotational invariant,
and they can extract information from any scale larger than the minimum
distance between two galaxies. However, our models are not completely robust:
testing on simulations run with a different subgrid physics than the ones used
for training does not yield as accurate results.
