Skip to main content
Back to timeline
Monthly Notices of the Royal Astronomical SocietySource publication:

A CNN+FoF hybrid pipeline identifies dark matter haloes in cosmological N-body simulations with roughly an order-of-magnitude speed-up and over 98% particle-classification metrics at the highest resolution

Synopsis

The work presents and validates a hybrid pipeline that first uses a volumetric convolutional neural network (a D3M-based VNet taking six channels of displacement and velocity) to classify each simulation particle as a halo or non-halo member, then applies a highly optimised and parallelised Friends-of-Friends algorithm to group the predicted halo members into distinct dark matter haloes; trained on GADGET-4 simulations labelled by ROCKSTAR, it reaches over 98% across all primary metrics for particle classification at the highest-resolution L100-N1283 configuration, yields catalogues with purity generally above 95% and completeness stable at about 93% above 5×10^11 M⊙, reproduces the halo mass function to within 5% of the reference while faithfully reconstructing internal density profiles,

Source-provided article image: CNN+FoF: application of deep learning to the identification of dark matter haloes
Figure 1

Figure 1. ROC curve showing the CNN’s ability to distinguish halo and non-

· Page 4

Interpretation

The pipeline splits halo finding into a GPU particle-level binary classification plus a CPU parallel FoF clustering step; at the highest-resolution L100-N1283 configuration the CNN attains accuracy 98.69%, precision 98.01%, recall 98.42%, specificity 98.80%, AUC 0.999, with an optimal probability threshold of 0.498. Earlier machine-learning halo identification largely operated on initial conditions or approximate predictions (for example Berger & Stein 2019 segmenting proto-halo Lagrangian patches, and Bernardini et al. 2020 decoupling classification and regression networks); this work instead detects virialised haloes directly from the fully evolved non-linear particle distribution and chains CNN classification with classical FoF clustering into a complete pipeline. Supervised training on 350 training, 50 validation and 100 test simulations with ROCKSTAR-derived labels; four resolution configurations (L200-N32³, L200-N64³, L200-N128³, L100-N128³) give similar metrics, and the confusion matrix reports TP 36.25%, FN 0.71%, FP 0.60%, TN 62.44%.

The CNN classification reduces the set of particles requiring further processing to roughly 37%, so the parallel FoF runs only on a highly clustered subset; the resulting catalogue at the highest resolution has global purity 99.38% and global completeness 89.34%, with spurious detections accounting for only 0.62%. Traditional FoF based on direct particle searches is inherently serial and hard to parallelise; this work exploits the fact that CNN output is already highly clustered and separated into distinct spatial domains, using a two-stage voxel-level plus particle-level search, Peano-Hilbert curve reordering and Popcorn voxel utilities to cut the clustering cost. Purity and completeness are reported for all four resolutions (purity 97.79%–99.38%, completeness 86.43%–89.34%); a match is defined as the FoF halo centre lying within the ROCKSTAR r200b radius of the nearest reference halo.

Recovered halo properties agree closely with the reference: centre-of-mass offsets ΔX_i/r200b are sharply peaked at zero along all three axes, velocity component ratios cluster around unity with modest scatter, halo masses show a tight linear correlation with ROCKSTAR, the halo mass function agrees within 5% at intermediate and high masses, and spherically averaged density profiles ρ(r) closely track ROCKSTAR across five mass bins. This shows the pipeline recovers not only halo positions and masses but also the internal mass distribution, a quantity more sensitive for galaxy-survey modelling than total-mass statistics alone. The halo mass function and density profiles are computed from the full catalogues (including unmatched haloes) over 100 test simulations; the mass-dependent analysis adopts M=5×10^11 M⊙ as the lower limit, set by completeness stabilising at about 93% above that mass.

Relative to ROCKSTAR, CNN+FoF achieves a consistent speed-up of approximately one order of magnitude across all tested resolutions, with runtime ratios ranging from 8 to 12. The gain comes from the CNN inferring halo membership in a single GPU-native forward pass, whereas ROCKSTAR's cost is dominated by an iterative six-dimensional phase-space search; the authors note that wall-clock time is currently dominated by input-output operations and the parallel FoF clustering step rather than the CNN forward pass. Mean runtimes are measured across the four resolution configurations and the ROCKSTAR-to-CNN+FoF ratio is reported; the authors also state that classification (GPU) and FoF (CPU) remain separate modules.

Perspective

The result applies to a flat ΛCDM cosmology at redshift z=0, to N-body simulations generated with GADGET-4 and labelled by ROCKSTAR, and to settings that need fast, bulk production of halo catalogues, for example coupling to field-level emulators or SBI frameworks to mass-produce mock catalogues. The authors set M=5×10^11 M⊙ as the lower mass limit because completeness stabilises at about 93% above that mass; at lower masses haloes contain fewer particles and become more sensitive to boundary definitions. Methodologically, the CNN and FoF remain separate modules, and the authors list integrating the clustering stage directly into the network as a fully end-to-end differentiable halo finder as the next step.

The authors flag several open directions: integrating the clustering stage into the network to form an end-to-end differentiable halo finder, assessing generalisability across larger simulation volumes and varying cosmological parameters, and using techniques such as evolution mapping to transfer learned features across redshifts and cosmologies to cut training cost. When reading purity and completeness, note that both vary with mass: the low-mass purity decline is attributed to FoF fragmentation and the high-mass decline to merging of adjacent structures, while the low-mass completeness decline is attributed to approaching the resolution limit. In addition, this is a preprint, and the numerical values in the body are given through tables and figure captions, so exact per-mass-bin values should still be checked against the original figures.

Sources