{'fraction_non_alphanumeric': 0.031522468142186455, 'fraction_numerical': 0.020657276995305163, 'mean_word_length': 4.665653495440729, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Generation of Large-scale Structure Density Maps via Generative Adversarial Networks

Generative Adversarial Networks (GANs) are a recent advancement in unsupervised machine learning. They are a cat-and-mouse game between two neural networks: [1] a discriminator network which learns to validate whether a sample is real or fake compared to a training set and [2] a generator network which learns to generate data that appear to belong to the training set. Both networks learn from each other until training is complete and the generator network is able to produce samples that are indistinguishable from the training set. We find that GANs are well-suited for fast generation of novel 3D density maps that are indistinguishable from those obtained from N-body simulations. In a matter of seconds, a fully trained GAN can generate thousands of density maps at different epochs in the history of the universe. These GAN-generated maps can then be used to study the evolution of large-scale structure over time.


INTRODUCTION
Rather than being distributed randomly throughout the universe, galaxies are found primarily within an interconnected, large-scale network of walls and filaments that stretch for 100's of Mpc (see, e.g., Giovanelli & Haynes 1991 and references therein). Between the walls and filaments lie vast, underdense regions known as cosmic voids (see, e.g., Sánchez et al. 2017). Voids are the largest structures in the universe, reaching up to 100h −1 Mpc in diameter, and they have the potential to serve as excellent laboratories for testing the popular Λ Cold Dark Matter (ΛCDM) model of structure formation. Due to their underdense nature, voids are dominated by dark energy and they are only weakly influenced by the non-linear effects of gravity. Because of this, the shapes and distributions of voids provide constraints on the dark energy equation of state, inflationary models, the sum of the neutrino masses, etc. (e.g., Li et al. 2012;Clampitt et al. 2013;Sahlén 2019).
Current observational void catalogs (e.g., Sánchez et al. 2017;Mao et al. 2017) are plagued by small number statistics due to being insufficiently deep for a complete sampling of structure on scales 1 Gpc. For example, the Dark Energy Survey (see, e.g., Flaugher 2005) found only 87 voids in their first 139 sq. degree survey (Sánchez et al. 2017). The small number of voids in the current catalogs limits our ability to place strong observational constraints on fundamental statistics such as void frequency and mean void radius. Near-future surveys from the Vera C. Rubin Observatory, as well as the Nancy Grace Roman and Euclid satellites, will result in deep maps of the universe that are able to fully sample structure on Gpc-scales.
Gigaparsec-scale simulations are necessary to determine whether or not ΛCDM can reproduce the largest structures in the universe. While Gpc-scale N-body mock catalogs do already exist (e.g., Kim et al. 2011), the largest voids are so rare that only a few dozen are found in a single Gpc-scale simulation. Such enormous simulations are computationally expensive to run, making it highly impractical to derive the statistics of the largest voids from these types of catalogs. In order to obtain a complete understanding of Gpc-scale structure in ΛCDM, a method that can quickly produce catalogs of simulated large-scale structure is required.

Generative Adversarial Networks (GANs)
A Generative Adversarial Network (GAN) (e.g., Goodfellow et al. 2014) offers a way to quickly produce novel catalogs of large-scale structure. GANs are a game between two deep neural networks: [1] a generator, which generates images, and [2] a discriminator, which learns to tell whether an image is original or generated. The Generator Network takes a random input vector and creates a novel density map that is then judged by the Discriminator Network. If the Discriminator Network deems the sample to be "fake", then the Generator learns from its mistakes and tries again. This process continues, with each network learning from the other, until an equilibrium is reached and the generator is able to produce samples that are indistinguishable from the original. GANs have already found success in astronomy. For example, Rodríguez et al. (2018) used GANs to produce 2D images of the large-scale structure of ΛCDM universes, Mustafa et al. (2019) used GANs to produce novel weak lensing convergence maps, and Schawinski et al. (2017) used GANs to recover features in Hubble Space Telescope images beyond the deconvolution limit.
Here we present some preliminary results for GAN-generated large-scale structure in ΛCDM universes. Throughout, we adopt values of the fundamental cosmological parameters that are consistent with a Planck cosmology.

Experiments
We performed two experiments that focused on: 1. reproducing the work of Rodríguez et al. (2018) for the generation of 2D mass distributions, and 2. expanding on Experiment 1 to produce 3D distributions of large-scale structure.
For Experiment 1 we used 10 Gadget-2 N-body simulations (see Springel 2005) with 512 3 particles in boxes of sidelength 100h −1 Mpc. We extracted 15,000 2D images from the simulations in the same fashion described in Rodríguez et al. (2018) to train a Deep Convolutional GAN (DCGAN). We also utilized the same smoothing function, normalization function, and network architecture that was used by Rodríguez et al. (2018).
For Experiment 2 we used a training set consisting of 500 Gadget-2 N-body simulations with 128 3 particles in boxes of sidelength 100h −1 Mpc. We applied a series of random rotations and reflections to the simulations to obtain 15,000 3D density maps to train a DCGAN. Each data cube was voxelated with a Cloud-in-Cell mass assignment scheme, then smoothed and normalized in the same way as the images from Experiment 1. The architecture for this experiment was the same as in Experiment 1, except here 3D convolution layers and half as many filters in the Generator Network's initial layer were used.

RESULTS
Our DCGANs were able to reproduce density maps of the large-scale structure. Fig. 1 (a) shows an example 2D slice from the N-body simulation training set, Fig. 1 (b) shows a generated 2D image of the large-scale structure from Experiment 1 after 21 training epochs, and Fig. 1 (c) shows a 2D slice from a generated 3D density map of the large-scale structure from Experiment 2 after 5 training epochs.

CONCLUSION
GANs are a new advancement in machine learning that pit two neural networks against each other in an adversarial game. The result is a generator network that can produce novel results that are indistinguishable from a training set. Rodríguez et al. (2018) showed that GANs can produce novel 2D density maps that even experts in the field have trouble distinguishing. The success of GANs in the field of machine vision indicates that GANs could be a useful tool for astronomers, allowing them to quickly generate simulations for the purposes of model testing. Here we showed that we have successfully trained a DCGAN to generate novel 3D density maps of a ΛCDM universe. In the future, we will use our DCGAN to produce density maps that are comparable in size to those produced by Gpc-scale N-body simulations. This will allow us to study the formation and evolution of the largest voids in ΛCDM universes, and will also allow direct comparisons of future void catalogs to the predictions of ΛCDM.