Large, fast, and accurate H <scp>i</scp> intensity maps with latent overlap diffusion

Sumeet Mishra, Roberto Trotta, Matteo Viel

TL;DR

This paper introduces a novel machine learning pipeline, HALOgen + LODI, that can generate realistic 3D maps of neutral hydrogen (HI) emission from dark matter-only simulations. This approach significantly speeds up the process of creating these maps, which are crucial for understanding the universe's large-scale structure, by reducing computational costs from days to minutes.

What Problem Does This Paper Address?

Mapping the distribution of neutral hydrogen (HI) through its 21 cm emission is a powerful tool for probing the universe's large-scale structure and understanding fundamental physics like dark matter and dark energy. However, accurately simulating this HI distribution requires computationally expensive full hydrodynamical simulations. These simulations are time-consuming and resource-intensive, limiting their use for generating large cosmological volumes or exploring many different cosmological scenarios. This paper aims to bridge this gap by developing a fast and accurate machine learning method to generate HI maps directly from simpler dark matter-only simulations.

Methods

The authors propose a two-stage machine learning pipeline:

  1. HALOgen (Halo Assignment and Generation with U-Net): This stage uses an attention-based ResUNet architecture to predict dark matter halo mass density maps from dark matter-only simulations. The output is not a single map but four separate maps, each representing halos within a specific mass range. This is crucial because the relationship between halo mass and HI content is complex and varies significantly across different mass scales. A custom-weighted loss function is employed to handle the sparsity of halo distributions and prevent "channel mixing" (where information from one halo mass bin leaks into another).
  2. LODI (Latent Overlap Diffusion for Intensity mapping): This stage takes the halo maps generated by HALOgen and uses a conditional variational diffusion model to generate the 3D 21 cm brightness temperature maps. Diffusion models are known for their ability to generate high-fidelity data by learning to reverse a noise-adding process. A key innovation here is the "latent overlap" method. Since generating very large volumes directly is memory-prohibitive, LODI trains on smaller sub-volumes. The latent overlap method ensures seamless stitching of these sub-volumes by allowing them to influence each other during the generation process, preventing artificial discontinuities at the boundaries.

Datasets

The authors utilize the CAMELS (Cosmological And Mechanical Engineering Learning Experiments) dataset. This dataset consists of hydrodynamical and N-body cosmological simulations with varying cosmological and astrophysical parameters. For training HALOgen, they use simulations from the "CV set" (control volume) of IllustrisTNG. For training LODI, they use 5 simulations from the CV set with different initial seeds to account for cosmic variance. The models are tested on unseen dark matter maps from simulations with different initial seeds but the same cosmology.

Key Insights and Ideas

  • Decomposition of Halo Mass: Breaking down the halo mass into distinct bins before predicting their density is crucial for accurately capturing the complex relationship between halo mass and HI content.
  • Latent Overlap for Seamless Generation: The "latent overlap" method is a novel approach to stitching together generated sub-volumes. By allowing the diffusion process in adjacent sub-volumes to influence each other in latent space, it effectively eliminates boundary artifacts and produces a coherent, large-scale map.
  • Efficiency Gain: The pipeline dramatically reduces the computational cost of generating HI maps, making it feasible to produce large cosmological volumes or many realizations for statistical analysis.
  • Power Spectrum Accuracy: The generated maps achieve good agreement with the ground truth power spectrum, even deep into the non-linear regime, demonstrating the model's ability to capture small-scale structure.

Key Results

  • The HALOgen model accurately predicts halo mass density maps, with excellent agreement for larger halo mass ranges and good agreement for smaller ones, within the 16-84 percentile band.
  • The full pipeline (HALOgen + LODI) can generate 25$^3$ (Mpc/h)$^3$ HI intensity maps from unseen dark matter maps in approximately 106 seconds (16s for HALOgen, 90s for LODI), a significant speedup compared to traditional simulations.
  • The generated 21 cm power spectrum matches the ground truth power spectrum to within 10% for wavenumbers $k \le 10~h~\text{Mpc}^{-1}$.
  • The latent overlap method significantly reduces discontinuities compared to simple tiling of independent boxes.

Limitations and Future Work

  • Generalization to Different Cosmologies: While the model performs well on simulations with the same cosmology and redshift, its ability to generalize to different cosmological parameters and redshifts needs to be tested. This is a key area for future work.
  • Smallest Halo Mass Prediction: The paper notes a slight under-prediction in the mean value of log-density for the smallest halo mass range, attributed to the loss function's weighting scheme.
  • Scalability: The current demonstration is on a 25$^3$ (Mpc/h)$^3$ volume, but the authors emphasize the approach is designed to be scalable to arbitrarily large simulations.
  • Future Directions: The authors plan to investigate more powerful and general methods for parallelizing sub-volume generation and coupling their pipeline with other generative models (like JERALD) for even faster end-to-end analysis. They also aim to adapt the diffusion model to handle realistic foregrounds and instrumental nuisances for direct comparison with observational data.

Summary updated

Abstract

ABSTRACT The distribution of 21 cm emission from neutral hydrogen is a powerful cosmological and astrophysical probe, as it traces the underlying dark matter and cold gas distributions throughout cosmic times. However, the prediction of observable signals is hindered by the large computational costs of the required hydrodynamic simulations. We introduce a novel machine learning pipeline that, once trained on a hydrodynamical simulation, is able to generate both halo mass density maps and the three-dimensional 21 cm brightness temperature signal, starting from a dark matter-only simulation. We use an attention-based ResUNet (HALOgen) to predict dark matter halo maps, which are then processed through a trained conditional variational diffusion model (LODI) to produce 21 cm brightness temperature maps. LODI is trained on smaller sub-volumes that are then seamlessly combined in 512-times larger volume using a new method, called ‘latent overlap’. We demonstrate that, once trained on 25$^3$ $\left(\text{Mpc}/h\right)^3$ volume simulations, we are able to predict the 21 cm power spectrum on an unseen dark matter map (with the same cosmology) to within 10 per cent for wavenumbers $k\le 10~\text{$h$~Mpc}^{-1}$, deep inside the non-linear regime, with a computational effort of the order of two minutes. While demonstrated on this specific volume, our approach is designed to be scalable to arbitrarily large simulations.
BibTeX
@inproceedings{mishra2025large,
  author = {Sumeet Mishra and Roberto Trotta and Matteo Viel},
  title = {{Large, fast, and accurate H <scp>i</scp> intensity maps with latent overlap diffusion}},
  booktitle = {Monthly},
  year = {2025},
  doi = {10.1093/mnras/staf2071},
}
Figure