Debiasing with Diffusion: Probabilistic reconstruction of Dark Matter fields from galaxies with CAMELS

Victoria Ono, Core Francisco Park, Nayantara Mudur, Yueying Ni, Carolina Cuesta-Lazaro, Francisco Villaescusa-Navarro · DOI

Abstract

Galaxies are biased tracers of the underlying cosmic web, which is dominated by dark matter components that cannot be directly observed. Galaxy formation simulations can be used to study the relationship between dark matter density fields and galaxy distributions. However, this relationship can be sensitive to assumptions in cosmology and astrophysical processes embedded in the galaxy formation models, that remain uncertain in many aspects. In this work, we develop a diffusion generative model to reconstruct dark matter fields from galaxies. The diffusion model is trained on the CAMELS simulation suite that contains thousands of state-of-the-art galaxy formation simulations with varying cosmological parameters and sub-grid astrophysics. We demonstrate that the diffusion model can predict the unbiased posterior distribution of the underlying dark matter fields from the given stellar mass fields, while being able to marginalize over uncertainties in cosmological and astrophysical models. Interestingly, the model generalizes to simulation volumes approximately 500 times larger than those it was trained on, and across different galaxy formation models.

Introduction

Approximately 85% of the matter in the universe is dark matter (DM), an invisible substance that provides the gravitational scaffolding for large-scale structure. Galaxies form within the densest regions of this dark matter "cosmic web," acting as biased tracers. Understanding the complex relationship between galaxies and dark matter—known as galaxy bias—is a fundamental challenge in cosmology. This relationship is governed by both large-scale cosmological parameters and small-scale "sub-grid" astrophysical processes, such as feedback from supernovae and active galactic nuclei.

Traditional machine learning approaches to mapping galaxies to dark matter often rely on deterministic models. These models typically minimize Mean Squared Error (MSE), leading to "blurry" reconstructions that represent an average of possible configurations rather than physically plausible realizations. This work introduces a probabilistic approach using diffusion models to generate sharp, high-fidelity dark matter fields that capture the inherent stochasticity of galaxy formation.

Methodology

The core of this approach is a Variational Diffusion Model (VDM). Diffusion models operate by gradually adding Gaussian noise to data (the forward process) and learning a neural network to reverse this process (the reverse process). In this study, the model is conditioned on observable stellar mass maps ($x_{stars}$) to generate consistent dark matter density fields ($x_{DM}$).

Overview of the Variational Diffusion Model (VDM) and the ResUNet denoiser architecture.

The "denoiser" is a ResNet-based U-Net architecture. It takes the noisy dark matter map, the conditioning stellar mass map, and a time-step embedding as inputs to predict the noise component. By learning the full posterior distribution $p(x_{DM} | x_{stars})$, the model can marginalize over uncertainties in cosmological and astrophysical parameters.

The model was trained using the CAMELS (Cosmology and Astrophysics with MachinE Learning Simulations) suite. This dataset includes thousands of simulations across three distinct "flavors"—ASTRID, IllustrisTNG, and SIMBA—each employing different physical prescriptions. The training set varies six fundamental parameters, including $\Omega_m$, $\sigma_8$, and four astrophysical feedback parameters.

Results and Analysis

The diffusion model demonstrates exceptional fidelity in reconstructing the cosmic web. Quantitative analysis shows a cross-correlation coefficient exceeding 0.9 between the reconstructed fields and ground truth across most scales, indicating highly accurate structural alignment.

Comparison of input stellar mass, ground truth dark matter, and a generated sample, alongside the posterior probability distribution of halo masses.

Key findings include:

  • Probabilistic Precision: The model generates multiple realizations, providing a measure of uncertainty. Variance is naturally higher in voids and lower in massive clusters where the galaxy signal is strongest.
  • Generalization: Despite being trained on small $25 \, h^{-1}\text{Mpc}$ boxes, the model successfully generalizes to the IllustrisTNG300 simulation—a volume 500 times larger. It accurately reconstructs large-scale filaments and voids far exceeding the size of the training samples.
  • Robustness: Models trained on one simulation suite (e.g., ASTRID) maintain high performance when tested on others (e.g., SIMBA), suggesting the model learns fundamental gravitational physics rather than suite-specific artifacts.
  • Cosmological Information: Reconstructed maps retain critical cosmological information. A separate parameter inference network could recover the true matter density ($\Omega_m$) with an average error of only 14.6% from the generated maps.

Conclusion

This work presents a powerful proof-of-concept for using conditional diffusion models to bridge the gap between observable galaxies and invisible dark matter. By providing a probabilistic mapping that marginalizes over astrophysical uncertainties, the model offers a robust tool for cosmological analysis. Future research will focus on extending this framework to 3D volumes, incorporating observational effects like redshift-space distortions, and handling discrete galaxy catalogs rather than pixelated grids.

Summary updated

BibTeX
@article{ono2024debiasing,
  author = {Victoria Ono and Core Francisco Park and Nayantara Mudur and Yueying Ni and Carolina Cuesta-Lazaro and Francisco Villaescusa-Navarro},
  title = {{Debiasing with Diffusion: Probabilistic reconstruction of Dark Matter fields from galaxies with CAMELS}},
  journal = {The Astrophysical Journal},
  year = {2024},
  doi = {10.3847/1538-4357/ad5957},
}
Figure