  Dark matter haloes play a fundamental role in cosmological structure
formation. The most common approach to model their assembly mechanisms is
through N-body simulations. In this work we present an innovative pathway to
predict dark matter halo formation from the initial density field using a Deep
Learning algorithm. We implement and train a Deep Convolutional Neural Network
(DCNN) to solve the task of retrieving Lagrangian patches from which dark
matter halos will condense. The volumetric multi-label classification task is
turned into a regression problem by means of the euclidean distance
transformation. The network is complemented by an adaptive version of the
watershed algorithm to form the entire protohalo identification pipeline. We
show that splitting the segmentation problem into two distinct sub-tasks allows
for training smaller and faster networks, while the predictive power of the
pipeline remains the same. The model is trained on synthetic data derived from
a single full N-body simulation and achieves deviations of ~10% when
reconstructing the dark matter halo mass function at z=0. This approach
represents a promising framework for learning highly non-linear relations in
the primordial density field. As a practical application, our method can be
used to produce mock dark matter halo catalogues directly from the initial
conditions of N-body simulations.
