Creating Virtual Universes Using Generative Adversarial Networks

Mustafa Mustafa, Deborah Bard, Wahid Bhimji, Rami Al-Rfou, Zarija LukicarXiv 2017 · DOI

Abstract

Inferring model parameters from experimental data is a grand challenge in many sciences, including cosmology. This often relies critically on high fidelity numerical simulations, which are prohibitively computationally expensive. The application of deep learning techniques to generative modeling is renewing interest in using high dimensional density estimators as computationally inexpensive emulators of fully-fledged simulations. These generative models have the potential to make a dramatic shift in the field of scientific simulations, but for that shift to happen we need to study the performance of such generators in the precision regime needed for science applications. To this end, in this work we apply Generative Adversarial Networks to the problem of generating weak lensing convergence maps. We show that our generator network produces maps that are described by, with high statistical confidence, the same summary statistics as the fully simulated maps.

Introduction

To understand the nature of dark matter and dark energy, cosmologists analyze "weak gravitational lensing"—the phenomenon where the gravity of massive structures bends light from distant galaxies. This process creates "convergence maps," which serve as a 2D record of the universe's matter distribution.

However, at small scales, the physics involved is non-linear and complex, requiring massive N-body simulations on supercomputers. These simulations are prohibitively expensive, often requiring thousands of CPU hours for a single realization. Bayesian methods like Markov Chain Monte Carlo (MCMC) may require hundreds of thousands of such maps to find optimal cosmological parameters. Consequently, the field requires a computationally efficient emulator that can generate these maps without sacrificing underlying physical accuracy.

Methods

The authors developed CosmoGAN, adapting the Deep Convolutional Generative Adversarial Network (DCGAN) architecture. The system employs two competing networks: a Generator ($G$) that transforms 64-dimensional random noise into 256x256 pixel convergence maps, and a Discriminator ($D$) that attempts to distinguish these from "real" maps derived from N-body simulations.

Unlike standard DCGANs designed for natural images, CosmoGAN was tuned for scientific data. The architecture uses a reduced number of filters and a non-saturating heuristic loss function. Crucially, the authors implemented statistical tests, such as the Kolmogorov-Smirnov (KS) test, as stopping criteria during training to ensure the network captures the precise statistical properties of the cosmic web rather than just achieving visual plausibility.

The training data consisted of 45 high-resolution N-body simulations of a standard $\Lambda$CDM universe, ray-traced into 1,000 large maps and randomly cropped into 256x256 pixel patches.

Results and Statistical Fidelity

CosmoGAN achieves a massive speedup, producing 1,024 images in approximately 15 seconds on a single GPU—a task that would traditionally require thousands of CPU hours.

Comparison of validation (top) and GAN-generated (bottom) convergence maps.

Beyond visual indistinguishability, the generated maps demonstrate high fidelity across various cosmological metrics:

  • Power Spectrum and Beyond: The network successfully reproduces the power spectrum (Gaussian information) and Minkowski Functionals, which capture the non-Gaussian, web-like structure of the universe (area, perimeter, and genus).
  • Statistical Confidence: The generated maps are statistically indistinguishable from simulations, achieving KS p-values > 0.99 for pixel intensity distributions.
  • Novelty: Tests using the "Birthday Paradox" and latent space interpolation confirmed that the network is not merely memorizing training data but has learned a smooth mapping to create novel "virtual universes."
Pixel intensity distribution for validation data (black) and GAN-generated maps (red).

Conclusion and Future Work

CosmoGAN serves as a successful proof-of-concept for using GANs to emulate complex cosmological simulations. While currently fixed to a single set of cosmological parameters, future iterations will focus on Conditional GANs. This would allow researchers to input specific parameters (e.g., dark matter density) and generate corresponding universes, providing a full-fledged emulator for parameter inference and accelerating cosmological research by several orders of magnitude.

Summary updated

BibTeX
@misc{mustafa2017creating,
  author = {Mustafa Mustafa and Deborah Bard and Wahid Bhimji and Rami Al-Rfou and Zarija Lukic},
  title = {{Creating Virtual Universes Using Generative Adversarial Networks}},
  year = {2017},
  eprint = {1706.02390},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.02390},
}
Figure