A probabilistic deep learning model to distinguishcusps and cores in dwarf galaxies

J. Expósito-Márquez1,2∗, C. B. Brook1,2 , M. Huertas-Company2,1,3 , A. Di Cintio1,2 ,A.V. Macciò4,5,6 , R. J. J. Grand2,1 , E. Arjona1,2 and G. Battaglia2,1
1
Universidad de La Laguna. Avda. Astrofísico Fco. Sánchez, La Laguna, Tenerife, Spain
2
Instituto de Astrofísica de Canarias, Calle Via Láctea s/n, E-38206 La Laguna, Tenerife, Spain
3
LERMA, Observatoire de Paris, CNRS, PSL, Université de Paris, France
4
New York University Abu Dhabi, PO Box 129188 Abu Dhabi, United Arab Emirates
5
Center for Astro, Particle and Planetary Physics (CAP3 ), New York University Abu Dhabi
6
Max Planck Institute für Astronomie, Königstuhl 17, D-69117 Heidelberg, Germany

Abstract
Numerical simulations within a cold dark matter (DM) cosmology predict halos
with a characteristic density profile with a logarithmic inner slope of -1. Various
methods, such as Jeans and Schwarzschild modelling, have been used in an attempt
to determine the inner density of observed dwarf galaxies, in order to test thistheoretical prediction. Here, we develop a mixture density convolutional neuralnetworks (MDCNNs) to derive a posterior distribution of the inner density slopesof DM halos. We train the MDCNN on a suite of simulated galaxies from the
NIHAO and AURIGA projects, inputting line-of-sight velocities and 2D spatial
information of the stars within simulated galaxies. The output of the MDCNN isa probability density function representing the posterior probability of a certain
slope to be the correct one, thus producing accurate and complex information on
the uncertainty of the predictions. The model recovers accurately the correct innerslope of dwarfs: ∼82% of the galaxies have a derived inner slope within ±0.1 of
their true value, while ∼98% within ±0.3. We then apply our model to four Local
Group dwarf spheroidal galaxies and find similar results to those obtained with theJeans modelling based code G RAV S PHERE.

1

Introduction

The ΛCDM model has produced very satisfactory results in explaining the large-scale structure of theuniverse and the basic properties of the galaxies in it (Aghanim et al., 2020). However, observations ingalactic-scale systems have shown several discrepancies with the model’s predictions. In the literature,these problems have traditionally been referred to as the small-scale problems of the ΛCDM model.
One of the main and oldest of these problems is the so-called cusp/core problem. Numericalsimulations within the ΛCDM model form dark matter halos (in which galaxies inhabit) with acharacteristic mass density profile that has an internal slope on a logarithmic scale of γ ∼ −1
(Navarro et al., 1996). This profile does not agree with observations of some galaxies with wellmeasured rotation curves, which prefer settings with less steep internal density slopes of 0.5 – 0 (e.g.
Simon et al., 2005; de Blok et al., 2008; Moore, 1994). Traditionally, the inner part of density profiles
with flatter internal slopes has been called a core, and the inner part of density profiles with the large
slopes predicted by the ΛCDM model has been called a cusp.
∗

E-mail: expox7@gmail.com

36th Conference on Neural Information Processing Systems (NeurIPS 2022).

It has been shown that cores can be explained in the ΛCDM paradigm by considering the effectthat baryons have on dark matter. If a dwarf galaxy slowly accretes gas and is then suddenly
blown away by processes such as stellar winds or supernova explosions, the dark matter expands,
decreasing the density of dark matter in the central part of the halo in which the galaxy is located andpotentially forming a core if certain reasonable conditions are met. This process has been successfullymodelled in hydrodynamical simulations of galaxies that take this baryonic feedback into account(e.g. Governato et al., 2010; Di Cintio et al., 2014; Tollet et al., 2016; Chan et al., 2015).
Even so, there is much controversy in the investigation of the cusp/core problem, mainly due tothe difficulty of obtaining precise measurements of the dark matter distribution of the halo of theobserved galaxies, being common that the techniques traditionally used to infer density profiles, such
as Jeans modelling, do not allow to constrain the value of the internal slope in such a way that thepresence of a core can be ruled out or assured (e.g. van der Marel, 1994; Battaglia et al., 2008; Collins
et al., 2021; Read et al., 2019).
In this work we present a novel model to determine the internal slope of the density profile of dark
matter halos with a robust quantification of the uncertainty, making use of simulation-based inferencewith a neural network.

2

Methodology

We train our model using a large set of hydrodynamical simulations of dwarf galaxies with haloes with
masses from 109 to 1011.5 from the NIHAO (Wang et al., 2015; Dutton et al., 2020) and AURIGA
projects (Grand et al., 2017), up to a total of 183 different galaxies. The use of different models andphysical parameters used in these simulations allows us to have a wide range of density profiles ingalaxies with similar masses, including both cores and cusps.
We make only use of the velocities and positions of the stars found in the simulated dwarf galaxies toconstruct Probability Density Functions (PDF) of the distribution of these stars in two different 2D
spaces:• The positional {x,y} space, between -2 kpc and 2 kpc in each coordinate, in the reference
system where (x,y) = (0,0) is the center of the galaxy, in a 64x64 grid.
p• The {R̂proj , v̂LOS } phase space, where R̂proj = x2 + y 2 /Rhlr is the radial position
normalized by the half-light radius Rhlr and v̂LOS = vLOS /P98% is the line-of-sightvelocity normalized by the 98% percentile of the absolute value of vLOS of all stars of thesample. R̂proj ranges from 0 to 1, and v̂LOS ranges from -1 to 1, in a 64x64 grid.
We use mixture density convolutional neural networks (MDCNNs) to map the input data composedof the two PDFs described in last section into the posterior distribution of the inner slopes of the DM
profiles of the galaxy associated to those two PDFs. We approximate the posterior distribution of theslopes with the sum of two dimensional Gaussian distribution whose parameters are estimated by
the neural network. Our model takes as input a two channel image consisting of the PDFs on the{R̂proj , v̂LOS } phase space and the {x,y} phase space separately. The images are passed through 2
convolutional sequential layers. The outputs of the two convolutional branches are then concatenatedand fed into a 3 layer fully connected network. The final output consists of 6 parameters whichparametrize the joint 2D Gaussian posterior.
Our architecture is influenced by the success of a similar approach to determine galaxy cluster masses
with dynamical information of their constituents in Ho et al. (2019) and Kodi Ramanah et al. (2021),
where it is shown that a CNN applied to a PDF of positions and velocities of the galaxies in a cluster
can retrieve its mass quite accurately.
A schematic view of the architecture used in this work can be seen in Fig. 1
The training is done over a training set consisting of 10273 galaxy subsets with their respective
inner slopes, which act as targets. The loss function to minimize during the training is the negative
logarithmic likelihood of the training sample:
2

Figure 1: Schematic representation of our double channel MDCNN architecture to infer inner slopesof the DM profiles (slope at 150 pc) of galaxies from their 2D phase-space mappings of positionaland dynamical distributions of stars. The MDCNN extracts the spatial features from the phase-space
mappings and gradually compresses into high-order features until describing the input with only 6parameters, which are used as parameters of a double Gaussian corresponding to approximation of
the posterior distribution of the inner slopes values.

pg (x|θ) =2X

ϕj N(x, µj , σj ),

(1)

j=1

where N(x, µj , σj ) P
is the j Gaussian with mean µj and standard deviation σj , ϕj is the weight of thengj Gaussian, so that j=1
ϕj = 1, and θ are the 2D maps representing the PDFs of the phase spacedescribed above.
We have performed multiple complete training runs using only 10 galaxies as validation and test
datasets in each one, changing the galaxies that would come out of the training dataset in each of the
training runs to evaluate the network in several projections of every galaxy. This allows us to analyse
the consistency of the model training and its performance in a large number of galaxies withoutcompromising the training dataset. The amount of data and the constructed arquitecture allows thesesuccessive trainings to be carried out in a small number of hours by using a personal laptop.
The output posterior distribution represents the random or aleatoric uncertainty in the slope predictionof the final model, but it does not represent the uncertainty due to the stochastic nature of the weight
determination while training the neural network (epistemic uncertainty), which can lead to different
models for the same training conditions when dealing with limited data. We use the Monte Carlo
dropout method (MC-Dropout) (Gal & Ghahramani, 2015) to approximate the epistemic uncertainty
which is based on the repeated evaluation of the same input, randomly setting to 0 the weights onsome layers while doing each inference, to construct a final evaluation with statistical information
about the epistemic uncertainty. The constructed final posterior for each galaxy projection is thenormalized mean of 100 multivariate Gaussian posteriors inferred by the model with active dropout
layers.

3

Results

The inner slope of simulated galaxies is predicted with a mean absolute deviation of µϵ = 0.056(where the deviation is defined as ϵ = γReal − γPred , and the predicted inner slope, γPred , is obtained
from the mode of the PDFs), with 82% (98%) of the galaxies having their inner slope correctly
determined within ± 0.1 (0.3) of their true value.
3

Figure 2: Probability density distributions used by the neural network as input in the case of one
simulated galaxy subset seen at 0º (face-on) and 90º (side-on), alongside with the Bayesian posteriors
predicted by the model. Left column: PDFs in the {x,y} phase space. Central column: PDFs in the{R̂proj , v̂LOS } phase space. Right column: predicted Bayesian posterior in the space of inner slope of
the DM profile (slope at 150 pc); shaded regions represent the standard deviation of the posteriorvalues for the MC-Dropout inferences at each slope point. The red vertical line shows the primary
maximum of the posterior distribution (the mode), the green one the secondary maximum and theblack one the true value of the inner DM slope. As a blue line, the mean of the distribution is shown.
This example shows how the appearance of double peaks in the posterior distributions is strongly
related to the viewing angle.

The posteriors PDFs have a mean standard deviation of σpos = 0.108, showing no bias towards moreaccuracy for cuspy or cored galaxies. Most of the posteriors for the different projections have anapproximately normal distribution (the second Gaussian disappearing or constituting a skewness
correction to the main Gaussian), but several of them have two distinct peaks. Specifically, around
30% of the galaxies have double peaks in more than 10% of their posteriors, but all of them present
a roughly monomodal posterior in some projections. This indicates that the appearance of double
peaks is a consequence of the fact that some information on the underlying DM profiles is hidden
when viewing the galaxy at some particular angle, while it is released and efficiently passed to the
network when looking at the galaxy from other angles (Fig. 2).
We adopt the catalogs by Walker et al. (2009) to directly compare our results with those obtained using
the code G RAV S PHERE, as in Read et al. (2019). The selected galaxies are Carina, Sextans, Fornax
and Sculptor, for which we further use the center position, velocity, ellipticity and half-light radius ascompiled in Battaglia et al. (2022). We do not take observational uncertainties into account in the
results presented in this work, since adding noise to the data by making use of uncertainties in theline-of-sight velocity only goes so far as to alter the mean, maximum and width of the posteriors byan order of 10−2 over multiple iterations for these four galaxies, making the uncertainties negligible.
Our model recovers their inner slopes yielding values consistent with those obtained in Read et al.
(2019) (Table 1). We found that the Fornax dSph has a strong indication of having a central DM
core, Carina and Sextans have cusps (although the latter with a large uncertainty), while Sculptor
shows a double peaked PDF indicating that a cusp is preferred, but a core can not be ruled out. These
results are in agreement with several previously derived inner slopes for these galaxies (e.g. Walker& Peñarrubia, 2011; Brook & Di Cintio, 2015; Pascale et al., 2018; Richardson & Fairbairn, 2014)
which confirms that our model trained on simulations can be reliably applied to observations.
4Carina
Sextans
Fornax
Sculptor

γGS−1.23+0.39−0.35−0.95+0.25−0.25−0.30+0.21−0.28−0.83+0.30
−0.25

γNN
−1.06+0.05−0.04−1.25+0.25−0.09−0.38+0.01−0.02−1.08+0.08−0.04

Table 1: Inner slope of the DM profile (at 150 pc) for Carina, Sextans, Sculptor and Fornax galaxies
predicted by G RAV S PHERE (γGS ) and our neural network (γNN ), with their 68 per cent confidence
intervals (for the neural network posterior, taking the primary maximum as reference).

4

Conclusions

We have shown that deep learning techniques provide a innovative method for the determinationof the inner DM profiles in dwarf galaxies, complementary to the use of Jeans and Schwarzschildmodelling, achieving great accuracy and offering a complex representation of uncertainties.
In the future, the architecture of this model could be expanded by including more input data,propermotion of stars from missions like GAIA (Gaia Collaboration et al., 2021). The current architecture
could also be used as a basis for building models that provide a more complete output, such as aprediction of the full density profile of galaxies.
Our newly developed neural network method is a promising tool for the study of the mass distribution
within dwarf galaxies, which in turn can help discriminate between different models and, in such,
constraining the properties of the DM.

5Impact statement
Our results show that simulation-based inference with neural networks provide a innovative andcomplementary method for the determination of the inner matter density profiles in galaxies. The
new methodology shows much potential both in the accuracy of inferences and in the ability toproperly construct its uncertainties, which is extremely important because the determination of themass density profiles of galaxies is extremely closely linked to our ability to constrain the propertiesof the elusive dark matter.

References
Aghanim N., et al., 2020, Astronomy &amp$$ Astrophysics, 641, A6
Battaglia G., Helmi A., Tolstoy E., Irwin M., Hill V., Jablonka P., 2008, , 681, L13
Battaglia G., Taibi S., Thomas G. F., Fritz T. K., 2022, , 657, A54
Brook C. B., Di Cintio A., 2015, , 450, 3920
Chan T. K., Kereš D., Oñorbe J., Hopkins P. F., Muratov A. L., Faucher-Giguère C.-A., Quataert E.,
2015, , 454, 2981
Collins M. L. M., et al., 2021, , 505, 5686
Di Cintio A., Brook C. B., Macciò A. V., Stinson G. S., Knebe A., Dutton A. A., Wadsley J., 2014, ,437, 415
Dutton A. A., Buck T., Macciò A. V., Dixon K. L., Blank M., Obreja A., 2020, , 499, 2648
Gaia Collaboration et al., 2021, , 649, A1
Gal Y., Ghahramani Z., 2015, Proceedings of The 33rd International Conference on Machine Learning
Governato F., et al., 2010, Nature, 463, 203
Grand R. J. J., et al., 2017, Monthly Notices of the Royal Astronomical Society, 467, 179
Ho M., Rau M. M., Ntampaka M., Farahi A., Trac H., Póczos B., 2019, The Astrophysical Journal,
887, 25
Kodi Ramanah D., Wojtak R., Arendse N., 2021, , 501, 4080
Moore B., 1994, , 370, 629
Navarro J. F., Frenk C. S., White S. D. M., 1996, ApJ, 462, 563
Pascale R., Posti L., Nipoti C., Binney J., 2018, , 480, 927
Read J. I., Walker M. G., Steger P., 2019, , 484, 1401
Richardson T., Fairbairn M., 2014, , 441, 1584
Simon J. D., Bolatto A. D., Leroy A., Blitz L., Gates E. L., 2005, The Astrophysical Journal, 621, 757
Tollet E., et al., 2016, , 456, 3542
Walker M. G., Peñarrubia J., 2011, , 742, 20
Walker M. G., Mateo M., Olszewski E. W., 2009, , 137, 3100
Wang L., Dutton A. A., Stinson G. S., Macciò A. V., Penzo C., Kang X., Keller B. W., Wadsley J.,
2015, , 454, 83
de Blok W. J. G., Walter F., Brinks E., Trachternach C., Oh S.-H., Kennicutt Jr. R. C., 2008, , 136,
2648
van der Marel R. P., 1994, Monthly Notices of the Royal Astronomical Society, 270, 271

6

Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s
contributions and scope? [Yes](b) Did you describe the limitations of your work? [Yes] The network only accepts
positional and line-of-sight velocity data, when other potential sources of information,such as proper velocity, are currently available in some cases. It also infers only theinternal slope instead of the full density profile. In addition, the training dataset still
has a lot of potential to be extended and improved.
(c) Did you discuss any potential negative societal impacts of your work? [No] It does nothave any.
(d) Have you read the ethics review guidelines and ensured that your paper conforms tothem? [Yes] It does.
2. If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] The code isproprietary for now.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they
were chosen)? [Yes](c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] A complete analysis of errors is done in the work. In thispaper only give direct information about the methodology and the errors related to theprobability distributions of the MDCNN.
(d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)? [No] Irrelevant. The scope of this workand size of used data allows calculations to be performed easily on personal laptops.
3. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators? [Yes](b) Did you mention the license of the assets? [No] They are simulations given to us by
their creators who are coauthors of this work.
(c) Did you include any new assets either in the supplemental material or as a URL? [No](d) Did you discuss whether and how consent was obtained from people whose data you’reusing/curating? [Yes] They are simulations given to us by their creators who arecoauthors of this work.
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content? [Yes] It doesn’t.

7