Investigating Cosmological GAN Emulators Using Latent Space Interpolation
Andrius Tamosiunas, Hans A. Winther, Kazuya Koyama, David J. Bacon, Robert C. Nichol, Ben Mawdsley
TTowards Universal CosmologicalEmulators with GenerativeAdversarial Networks
Andrius Tamosiunas, a, Hans A. Winther, b Kazuya Koyama, a David J. Bacon, a Robert C. Nichol, a Ben Mawdsley a a Institute of Cosmology and Gravitation, University of Portsmouth,Dennis Sciama Building, Burnaby Road, Portsmouth, PO1 3FX, United Kingdom b Institute of Theoretical Astrophysics, University of Oslo, Svein Rosselands hus, Blinderncampus Sem Saelandsvei 13 0371 OsloE-mail: [email protected], [email protected],[email protected], [email protected], [email protected],[email protected]
Abstract.
Generative adversarial networks (GANs) have been recently applied as a novel em-ulation technique for large scale structure simulations. Recent results show that GANs can beused as a fast, efficient and computationally cheap emulator for producing novel weak lensingconvergence maps as well as cosmic web data in 2-D and 3-D. However, like any algorithm,the GAN approach comes with a set of limitations, such as an unstable training procedureand the inherent randomness of the produced outputs. In this work we employ a numberof techniques commonly used in the machine learning literature to address the mentionedlimitations. In particular, we train a GAN to produce both weak lensing convergence mapsand dark matter overdensity field data for multiple redshifts, cosmological parameters andmodified gravity models. In addition, we train a GAN using the newest Illustris data to emu-late dark matter, gas and internal energy distribution data simultaneously. Finally, we applythe technique of latent space interpolation to control which outputs the algorithm produces.Our results indicate a 1-20% difference between the power spectra of the GAN-produced andthe training data samples depending on the dataset used and whether Gaussian smoothingwas applied. Finally, recent research on generative models suggests that such algorithms canbe treated as mappings from a lower-dimensional input (latent) space to a higher dimensional(data) manifold. We explore such a theoretical description as a tool for better understandingthe latent space interpolation procedure.
Keywords: generative adversarial networks, generative models, cosmological emulators, N -body simulations Corresponding author. a r X i v : . [ a s t r o - ph . C O ] A p r ontents In the era of precision cosmology an important tool for studying the evolution of large scalestructure is N -body simulations. Such simulations evolve a large number of particles underthe influence of gravity (and possibly other forces) throughout cosmic time and allow detailedstudies of the non-linear structure formation. Modern cosmological simulations are highly re-alistic and extremely complex and may include galaxy evolution, feedback processes, massiveneutrinos, weak lensing and many other effects. Such complexity however comes at a price interms of computational resources and large simulations may take several days or even weeksto run. In addition, to fully account for galaxy formation and other effects various simplifi-cation schemes and semi-analytical models are required. To address these issues a variety ofemulation techniques have been discussed in the literature [1–3]. In light of upcoming surveys– 1 –ike Euclid, such emulators will be an invaluable tool for producing mock data quickly andefficiently.Lately, machine learning techniques have been explored as a valuable tool in cosmology,with applications ranging widely from cosmological parameter extraction from observationaldata to Supernovae classification [4, 5]. Machine learning techniques have also been appliedas an alternative to the traditional emulation methods. For instance, deep learning has beenused to accurately predict non-linear structure formation [6]. Similarly GANs and variationalautoencoders (VAEs) have been used to produce novel realistic cosmic web 2-D projections,weak lensing maps and to perform dark energy model selection [7–9]. In addition the GANapproach has also been used to produce realistic cosmic microwave background temperatureanisotropy 2-D patches as well as deep field astronomical images [10, 11]. Finally, generatingfull 3-D cosmic web data has been discussed in [12, 13]. The cited works show that GANsare capable of reproducing a variety of cosmological simulation outputs efficiently and withhigh accuracy.However, certain challenges remain: the training process of the GAN algorithm is com-plicated and prone to failure and producing full scale 3-D results is computationally expensive.A common problem when training GANs is mode collapse , when the generator neural networkoverpowers the discriminator and gets stuck in producing a small sample of identical outputs.Mode collapse can be addressed in multiple ways – modern GAN architectures introduce labelflipping or use different loss functions, such as Wasserstein distance, which has been shownto reduce the probability of mode collapse [14].In this paper we address some of these issues and present our results on extendingsome of the currently existing GAN algorithms. In particular, we use a modified versionof the cosmoGAN algorithm (introduced in [8]) to produce weak lensing convergence mapsand 2-D cosmic web projections of different redshifts and multiple cosmologies, including darkmatter, gas and internal energy data. Furthermore, we explore techniques from contemporaryresearch in the field of deep learning, such as latent space interpolation, as a way to control theoutputs of the algorithm. This, to our best knowledge, is a novel approach that in the contextof cosmology has not been explored in the literature so far. Finally, we discuss GANs in theframework of Riemannian geometry in order to put our problem on a more theoretical footingand to explore the feature space learnt by the algorithm. Ultimately, our goal is to adaptthe existing algorithms towards becoming fully-controllable, universal emulators capable ofproducing both novel large scale structure data as well as other datasets, such as weak lensingconvergence maps. GANs, first introduced in a now seminal paper [15], are a system of neural networks thatare trained adversarially. In particular, a GAN consists of a generator – a neural networkresponsible for producing data from random noise and a discriminator , which is responsiblefor evaluating the produced data against the training set. The two neural networks competein an adversarial fashion during the training process – the generator is optimized to producerealistic datasets statistically identical to the training data and hence to fool the discriminator.Mathematically, such an optimization corresponds to minimizing the following cost function: min G max D J ( D, G ) = − E X ∼ P r log( D θ ( X )) − E Z ∼ P g log(1 − D θ ( G φ ( Z ))) , (2.1)– 2 – igure 1 : The pipeline of training a GAN on 2-D DM-only cosmic web slices. A numberof particle simulation boxes are mesh-painted and sliced to produce the × pxcosmic web slice training dataset. The training dataset is then used to train the system ofthe generator and the discriminator neural networks. Once the training procedure is finished,the generator can be used to generate novel 2-D cosmic web slices out of random Gaussiannoise vectors. A nearly analogous procedure is used to train the weak lensing convergencemaps, with the main difference being that an extra step of ray-tracing is required in order toproduce the training dataset.where E refers to the expectation function, D to the discriminator, θ to the weights of thediscriminator, G to the generator with weights φ , P r to the distribution of the data we areaiming for, P g to the generated distribution, X to the data (real or generated) analyzed bythe discriminator and Z to the random noise vector input to the generator.Such an optimization procedure is a nice example of game theory where the two agents(the generator and the discriminator) compete in a two player zero sum game and adjust their strategies (neural network weights) based on the common cost function. In case of perfectconvergence, the GAN would reach Nash equilibrium, i.e. the generator and the discriminatorwould reach optimal configurations (optimal sets of weights). In practice, however, reachingconvergence is difficult and the training procedure is often unstable and prone to mode collapse[16]. The two neural networks, the discriminator and the generator, have two different trainingprocedures. In particular, the discriminator classifies the datasets into real (coming from thetraining dataset) or fake (produced by the generator) and is penalized for misclassification viathe discriminator loss term. The discriminator weights are updated through backpropagationas usual. The generator, on the other hand, samples random noise, produces an image, getsthe classification of that image from the discriminator and updates its weights accordingly viabackpopagation using the generator loss function term. The full training procedure is doneby alternating between the discriminator and the generator training cycles.Assuming the adversarial training is successful, the generator G ( Z ) can then be usedseparately for producing realistic synthetic data from a randomized input vectors Z . Fig. 1lays out the pipeline for using a GAN to generate DM-only cosmic web slice data . A note on the used terminology: cosmic web slices in this work refer to the 2-D overdensity field projectionsgenerated by slicing full 3-D overdensity field data from N -body simulations. Such slices are then used totrain the GAN. – 3 – .2 Latent Space Interpolation The generator neural network with its multi-layered structure can be represented mathemat-ically as a function composition: G ( Z i ) = g ◦ g ◦ ... ◦ g n with g ik ( y i ) = S ( W ik y i + b i ) , (2.2)where each layer g i maps from an input y i to an output as shown above. Here G ( Z i ) isthe generator neural network, Z i is the random input vector, S ( y ) is a non-linear activationfunction, W ik is the weight matrix and b i is the bias term. The aim of the training procedureis to find an optimal weight matrix W (along with the bias terms), which maps the input tothe wanted output.If the training procedure is successful, the generator G ( Z i ) learns to map the valuesof a random vector Z i to the values of a statistically realistic 2-D array representing theoutput X jk (a cosmic web slice or a convergence map in our case). This can be viewed asmapping from a low-dimensional latent space Z ⊆ R d to a higher-dimensional data (pixel)space X ⊆ R D (for more details see [17] and appendix C). For a generator neural network d (cid:28) D (in our case d = 256 or , while D = 256 ).The generator network has a number of interesting properties. In particular, during thetraining procedure it maps clusters in the Z space to the clusters in the X space. Hence, ifwe treat the random input vectors Z i as points in a d -dimensional space, we can interpolatebetween multiple input vectors and produce a transition between the corresponding outputs.In particular, if we choose two input vectors Z and Z and find a line connecting them,sampling intermediate input points Z i along that line leads to a set of outputs that correspondto an almost smooth transition between outputs X and X . As an example, if we train thegenerator to produce cosmic web slices of two different redshifts, we can produce a set ofoutputs corresponding to a transition between those two redshifts by linearly interpolatingbetween the input vectors Z and Z (see fig. 2). More concretely, if we train the algorithmon cosmic web slices of redshifts { . , . } , somewhere between the two input vectors, one canfind a point Z (cid:48) , which produces an output that has a matter power spectrum approximatelycorresponding to a redshift z (cid:48) ≈ . . This is fascinating given that the training dataset didnot include intermediate redshift data. Here it is important to note that such an interpolationprocedure does not necessarily produce a perfectly smooth transition in the data space, i.e.the produced outputs corresponding to the latent space vectors Z i between Z and Z arenot always realistic (in terms of the matter power spectrum and other statistics; see fig. 18and section 5.6 for further details). Also, one might naively think that the point Z (cid:48) lies inthe middle of the line connecting Z and Z , but in general we found it not to be the case(as the middle of the mentioned line does not necessary correspond to the middle between X and X in the data space, which is known to be non-Euclidean (see appendix C)). In thiswork we investigate whether the latent space interpolation procedure can be used to mapbetween outputs of different redshifts and cosmologies and whether the produced datasetsare physically realistic.The latent space interpolation technique was performed by randomly choosing two inputvectors Z and Z , finding the line connecting the two points in the 256 (64)-dimensional space(256 (64) is the size of Z and Z ) and then sampling 64 equally spaced points along that line.The outputs of the generator neural network of those intermediate input points G ( Z int ) thencorrespond to cosmic web slices and weak lensing maps that represent a transition betweenthe two outputs G ( Z ) and G ( Z ) . – 4 – igure 2 : Illustration of the latent space interpolation procedure. Training the GAN al-gorithm on the cosmic web slices of two different redshifts encodes two different clusters inthe latent space (which is a subset of a 256-dimensional space, i.e. the size of the randomnoise input vector). Sampling a point from the line connecting two input points Z and Z in this space produces an output with redshift z (cid:48) . As we will see, in the case of our datasetwith z = 1 . and z = 0 . , several points near the centre of this line correspond to outputsapproximately emulating z (cid:48) ≈ . .In order to perform linear latent space interpolation it is crucial to have the abilityto distinguish between different data classes produced by the GAN (e.g. cosmic web slicesof different redshifts). To resolve this problem we employed a combination of the usualsummary statistics like the power spectrum and the Minkowski functionals along with twodifferent machine learning algorithms. In particular, we tested using a deep convolutionalneural network and gradient boosted decision trees for distinguishing the different classes ofdatasets produced by the GAN [18]. Gravitational potentials influence the path of photons in such a way that they introduce coher-ent distortions in the apparent shape (shear) and position of light sources. Weak gravitionallensing introduces ellipticity changes in objects of the order of ≈
1% and can be measuredacross the sky, meaning that maps of the lensing distortion of objects can be made and relatedto maps of the mass distribution in the Universe. The magnitude of the shear depends uponthe combined effect of the gravitational potentials between the source and the observer. Anobserver will detect this integrated effect and maps of the integrated mass, or convergence,can be made. Gravitational lensing has the significant advantage that it is sensitive to bothluminous and dark matter, and can therefore directly detect the combined matter distribu-tion. In addition, weak lensing convergence maps allow for detecting the growth of structurein the Universe and hence they can also be used for probing statistics beyond two point cor-relation functions, such as in the higher moments of the convergence field or by observingthe topology of the field with Minkowski functionals and peak statistics [19, 20]. As futuresurveys attempt to further probe the non-linear regime of structure growth, the information– 5 –eld in these higher order statistics will become increasingly important, and will also requireaccurate simulations in order to provide cosmological constraints. This requirement for largenumbers of simulations that also model complex physical phenomena means that more com-putationally efficient alternatives to N -body simulations, such as the GAN approach proposedin this work, are required.In order to train the GAN algorithm to produce realistic convergence maps, we usedpublicly available datasets. In particular, to test whether we can reproduce the originalresults from [8] we used the publicly available data from [21]. The dataset consisted of8000 weak lensing maps that were originally produced by running a Gadget2 [22] simulationwith particles in
240 Mpc /h box. To perform ray tracing the Gadget weak lensingsimulation pipeline was used. The simulation box was rotated multiple times for each raytracing procedure, resulting in 1000 12 sq. degree maps per simulation box.In order to train the GAN algorithm on convergence maps of different cosmologies andredshifts, we used the dataset publicly available at [23–25]. The available dataset containedweak lensing convergence maps covering a field of view of 3.5 deg × × /h side cube and particles. The dataset includes 96 different cos-mologies (with varying Ω m and σ parameters). The values of Ω m = 0 . and σ = 0 . wereused as the fiducial cosmology. In our analysis, we only used a small subset of this dataset,namely, the maps where only one of the two cosmological parameter varies. In particular,we worked with the dataset consisting of the maps with σ = { . , . } with a commonvalue of Ω m = 0 . . This was done in order to simplify the latent space analysis.For the weak lensing map data we used the same architecture as described in table 1in [7]. In fact the same basic architecture with minor variations was used for training allthe datasets described later on. In particular, for the cosmic web slice data we increased therandom input vector size to 256 (from 64 in the case of weak lensing maps). For the multi-component dataset (dark matter, gas and internal energy), we changed the input layer toaccount for the 3-D input data. In summary, for the discriminator, we used an architectureof 4 convolutional layers with batch normalization and LeakyRelu activation. In the finallayer, we used the sigmoid activation. For the generator, we used a linear input layer followedby 4 deconvolution layers with
Relu activation and batch normalization. The output layerused the tanh activation function. The key parameter in terms of the training procedure isthe learning rate. For all the cosmic web slice datasets, we found the learning rate value of R L = 3 × − to work well. In the case of all the considered weak lensing datasets we used R L = 9 × − . The training procedure and all the key parameters are described in greatdetail in the publicly available code (see appendix A for more information). The cosmic web or the dark matter overdensity field refers to the intricate network of filamentsand voids as seen in the output data of N -body simulations. The statistical features of thecosmic web contain important information about the underlying cosmology and could hideimprints of modifications to the standard laws of gravity. In addition, emulating a largenumber of overdensity fields is important for reliable estimation of the errors of cosmologicalparameters. Hence, emulators, such as the one proposed in this work, will be of specialimportance for the statistical analysis in the context of the upcoming observational surveys.To build the cosmic web training dataset we used a similar procedure to the one outlinedin [7]. In particular, we ran L-PICOLA [26] to produce a total of 15 independent simulation– 6 –oxes with different cosmologies. Initially, we used the same cosmology as described in [7]with h = 0 . , Ω Λ = 0 . and Ω m = 0 . . Subsequently, we studied the effects of varyingone of the cosmological parameters, namely the σ parameter. We explored the values of σ = { . , . , . } along with Ω Λ = 0 . , Ω m = 0 . and h = 0 . . For each different setof simulations, we saved snapshots at 3 different redshifts: z = { . , . , . } . For eachsimulation, we used a box size of 512 Mpc/ h and a number of particles of . For the latentspace interpolation procedure, we trained the GAN on slices with redshifts { . , . } , with acommon value of σ = 0 . .To produce the slices for training the GAN, we used nbodykit [27], which allows paintingan overdensity field from a catalogue of simulated particles. To obtain the needed slices, wecut the simulation box into sections of 2 Mpc width in x, y, z directions and for each sectiona mesh painting procedure was done. This refers to splitting the section into cells, where thenumerical value of each cell corresponds to the dark matter overdensity δ ( x ) . Finally,after a 2-D projection of each slice, a px image was obtained, with each pixel valuecorresponding to the overdensity field. To emphasize the features of the large scale structure,we applied the same non-linear transformation as described in [7]: s ( x ) = 2 x/ ( x + a ) − ,with a = 250 , which rescales the overdensity values to [ − , and increases the contrast ofthe images.In order to emulate modified gravity effects we used the MG-PICOLA code, whichextends the original L-PICOLA code in order to allow simulating theories that exhibit scale-dependent growth [28–31]. This includes models, such as f ( R ) theories which replace the Ricciscalar with a more general function in the Einstein-Hilbert action (see [32] for an overview ofthe phenomenology of such models). In particular, multiple runs of MG-PICOLA were runwith the following range of the f R parameter: [10 − , − ] . Such a wide range was chosento make the latent space interpolation procedure easier. The f ( R ) simulations were alsorun with the same seed as the corresponding Λ CDM simulations, making the two datasetsdescribed above directly comparable.
Simultaneously generating the dark matter and the corresponding baryonic overdensity fielddata is a great challenge from both the theoretical and the computational perspectives.Namely, generating the baryonic distribution requires detailed hydrodynamical simulationsthat account for the intricacies of galaxy formation and feedback processes, which leads toa major increase in the required computational resources. For this reason, emulating largeamounts of hydrodynamical simulation data is of special importance.To produce the dark matter, baryonic matter and the internal energy distribution sliceswe used the publicly available Illustris-3 simulation data [33, 34]. Illustris-3 refers to thelow resolution Illustris run including the full physics model with a box size of 75000 kpc /h and over × dark matter and gas tracer particles. The cosmology of the simulationcan be summarized by the following parameters: Ω m = 0 . , Ω Λ = 0 . , h = 0 . .The simulation included the following physical effects: radiative gas cooling, star formation,galactic-scale winds from star formation feedback, supermassive blackhole formation, accre-tion, and feedback.To form the training dataset we used an analogous procedure to the one used for thecosmic web slices in section 3.2. In particular, we sliced the full simulation box into slicesof 100 kpc /h and for each slice used mesh painting to obtain an overdensity field. This wasdone for the dark matter and gas data. In addition, we also used the available internal energy– 7 –thermal energy in the units of (km / s) ) distribution data. Fig. 3 shows a few samples fromthe dataset. (a) DM overdensity field (b) Gas overdensity field(c) Internal energy field (d) All components combined Figure 3 : Samples from the Illustris simulation dataset used to train the GAN algorithm:2-D slices of the different simulation components.To investigate whether the GAN algorithm could be trained on multidimensional arraydata, we treated the DM, gas and energy distribution 2-D slices as RGB planes in a singleimage. In particular, a common way of representing colors in an image is forming a fullcolor image out of three planes, each corresponding to the pixel values for red, green andblue colours. In this framework, a full-color image corresponds to a 3-D array. Convolutionalneural networks, including the one that the cosmoGAN algorithm is based on are originallydesigned to be trained on such RGB images. Hence we combined the mentioned DM, gas andinternal energy slices into a set of RGB arrays that were used as a training set.
The initial stages of training (i.e. reproducing the results in [7, 8] were done using the GoogleCloud computing platform. The following setup was used: 4 standard vCPUs with 15 GBmemory, 1 NVIDIA Tesla K80 GPU and 2TB of SSD hard drive space.Later stages of training (i.e. training the GAN on different cosmology, modified gravityand redshift data) were done using the local Sciama HPC cluster, which has 3702 cores of2.66 GHz Intel Xeon processors with 2 GB of memory per core.– 8 –iven how unstable the GAN training procedure is we used a simple procedure of eval-uating the best checkpoint: we calculated the mean square difference between the meanvalues of the GAN-produced and the training dataset power spectra, pixel histograms andthe Minkowski functionals. The set of GAN weights that minimize this value was used forthe plots displayed in the result section.
The results produced by the algorithm were investigated using the following diagnostics: the2-D matter power spectrum, overdensity (pixel) value histogram and the three Minkowskifunctionals. In addition, we computed the cross and the auto power spectrum in order toinvestigate the correlations between the datasets on different scales. The cross power spectrumwas calculated using: (cid:104) ¯ δ ( l ) ¯ δ ∗ ( l (cid:48) ) (cid:105) = (2 π ) δ D ( l − l (cid:48) ) P × ( l ) , (4.1)where ¯ δ and ¯ δ are the Fourier transforms of the two overdensity fields at some Fourier bin l and δ D is the Dirac delta function.The Minkowski functionals are a useful tool in studying the morphological features offields that provide not only the information of spatial correlations but also the informationon object shapes and topology. For some field f ( x ) in 2-D space we can define the threeMinkowski functionals as follows: V ( ν ) = (cid:90) Q ν d Ω , V ( ν ) = (cid:90) ∂Q ν dl, V ( ν ) = (cid:90) ∂Q ν π κ c dl. (4.2)Where Q ν ≡ { x ∈ R | f ( x ) > ν } is the area and ∂Q ν ≡ { x ∈ R | f ( x ) = ν } is theboundary of the field above threshold value ν . The integrals V , V , V correspond to thearea, boundary length and the integrated geodesic curvature κ c along the boundary. In simplewords the procedure of measuring the Minkowski functionals refers to taking the values ofthe field above a given threshold ν , evaluating the integrals in eq. 4.2 and then changing thethreshold for a range of values.Minkowski fuctionals are a useful tool in weak lensing convergence map studies as theyallow us to capture non-Gaussian information on the small scales, which is not fully accessedby the power spectrum alone. In addition, Minkowski functionals have been used to detectdifferent cosmologies, modified gravity models and the effects of massive neutrinos in weaklensing convergence maps [35–37]. Given the usefulness of Minkowski functionals in accessingthe non-Gaussian information on the small scales, we chose to apply the functionals forstudying the produced cosmic web projections as well. To calculate the Minkowski functionalsproperly on a 2-D grid we used the minkfncts2d algorithm, which utilizes a marching squarealgorithm as well as pixel weighting to capture the boundary lengths correctly [38, 39].Minkowski functionals are sensitive to the Gaussian smoothing applied to the GAN-produced images and the training data. Hence, it is important to study the effects of Gaussiansmoothing as it might give a deeper insight into the detected differences between the datasets.The procedure of smoothing refers to a convolution between a chosen kernel and the pixelsof an image. In more detail, a chosen kernel matrix is centered on each pixel of an image andeach surounding pixel is multiplied by the values of the kernel and subsequently summed. Inthe simplest case, such a procedure corresponds to averaging a chosen number of pixels in agiven image. In the case of Gaussian filtering, a Gaussian kernel is used instead.– 9 –o filter the noise we used Gaussian smoothing with a × kernel window and a standarddeviation of 1 px. We found the Minkowski functionals to be especially sensitive to any kindof smoothing. For instance, the position and the shape of the trough of the third Minkowskifunctional is highly sensitive to existence of any small-scale noise. Fig. 4 illustrates the effectsof Gaussian smoothing with different kernel sizes on the three Minkowski functionals. Figure 4 : An illustration of the effects of Gaussian smoothing on the Minkowski functionalscalculated using cosmic web slices from the training data with redshift z = 0 . . The coloredbands correspond to the mean and the standard deviation of the functionals calculated usingdifferent sizes of Gaussian smoothing kernels on a batch of 64 images. After around 150 epochs (corresponding to around 96 hours on our HPC) the GAN startedproducing statistically realistic convergence maps as measured by the power spectrum and theMinkowski functionals. The diagnostics were computed at an ensemble level – 100 batches of64 convergence maps were produced by the GAN and the mean values along with the standarddeviation were computed and compared with the training data. An analogous procedure wasdone when calculating the pixel intensity distribution histograms.The power spectra agree well between the GAN-produced and the training data, withminor differences on the small scales (see fig. 5). In particular, the difference between thetraining and the GAN-produced dataset power spectra is around 5% or lower for most valuesof k . Only at the smallest scales, a significant difference of 10% is reached. Similarly, the pixelintensity histogram in general shows a good agreement with significant differences appearingonly for the highest and the lowest pixel intensity values (which is also detected in the originalwork in [8]). A selection of GAN-produced maps are presented for visual inspection in fig.19. We also computed the Minkowski functionals for the GAN-produced and the trainingdatasets. The results are shown in fig. 6. In general there is a good agreement betweenthe training data and the GAN-produced maps, given the standard deviation, however, someminor differences can be detected in the Euler characteristic and the boundary functional,likely resulting from noise. – 10 – a) Power spectrum (b) Pixel intensity histogram Figure 5 : The matter power spectrum (with the relative difference) and the pixel intensityhistogram for an ensemble of 6400 weak lensing convergence maps. The dashed lines corre-spond to the mean values, while the contours correspond to the standard deviation. Notethat the pixel intensity values were normalized to the range of [ − , . Figure 6 : A comparison of the Minkowski functionals evaluated using 100 batches of 64ramdomly selected maps for both datasets.
We also found that the GAN is capable of producing realistic weak lensing maps for multiplecosmologies. This is an important result as it shows that the algorithm is able to pick up onthe various subtle statistical differences between different cosmologies that usually requires adetailed study of the power spectrum, Minkowski functionals and other statistics.However, we found the training procedure to be highly prone to mode collapse. A widehyperparameter search had to be performed to find an optimal set of parameters that didnot lead to full or partial mode collapse. The most important parameter in this contextwas found to be the learning rate. As a rule of thumb, decreasing the learning rate led tomode collapse happening later in the training procedure. When the learning rate was reducedbelow a certain value (discussed further in the analysis section), mode collapse was avoided– 11 –ltogether. As in the case with the cosmic web slice data, applying a transformation to eachpixel of the image in order to increase the contrast had a positive effect in reducing theprobability of mode collapse as well.
Figure 7 : A selection of diagnostics to compare the training and the GAN-produced weaklensing convergence maps for σ = { . , . } with Ω m = 0 . . Top left : power spectrafor an ensemble of 64 randomly chosen shear maps; top right : power spectra (mean and stan-dard deviation) with and without Gaussian smoothing produced using 1000 randomly chosenshear maps with σ = 0 . ; bottom left : same as top right, but for σ = 0 . ; bottomright : the pixel intensity distribution (for both datasets combined). The blue and the greendots give P tr /P GAN − with and without Gaussian smoothing applied correspondingly.Fig. 7 summarizes the results of training the GAN on shear maps with different σ values. The results indicate an agreement of the power spectra in the range of 5-10% for k > − h Mpc − for σ = 0 . . In the case of σ = 0 . the agreement is significantlybetter, ranging between 1-3% on most scales. Interestingly, Gaussian smoothing increasesthe difference to around 5-15% in this particular case. This shows that for this dataset,Gaussian noise is not the major source of the statistical differences between the training and– 12 –he GAN-generated datasets.Fig. 8 compares the Minkowski functionals calculated using the training and the GAN-produced datasets. Given the standard deviation in both datasets, the results overlap forall threshold values. However, for thresholds in the range of [0 . , . there is a significantdifference between the training and the GAN-generated datasets. We found that this ispartially due to small-scale noise in the GAN-produced data (see fig. 4). However, afterexperimenting with adding artificial noise to the training dataset images, it is clear that thenoise alone cannot fully account for the observed differences in the Minkowski functionals.Another reason for the observed differences could be a relatively small size of the used datasetconsisting of a few thousand weak lensing maps. It is likely that having more training datasamples could significantly improve the results. Figure 8 : A comparison of the Minkowski functionals evaluated using 1000 randomly selectedweak lensing convergence maps with σ = { . , . } . Gaussian smoothing is applied forall datasets. We also found that the GAN is capable of producing realistic cosmic web 2D projectionsfor different redshifts. As before with the weak lensing maps of different cosmologies, thisresult illustrates that the algorithm in general does not get confused between the two differentredshifts and is capable of detecting subtle statistical differences between the different datasets(fig. 9). In addition, we found that using Gaussian smoothing, as before, led to a betteragreement between the training and the GAN-produced datasets. The effect is especiallynoticeable in the Minkowski functional analysis (fig. 10). Visual samples of the producedcosmic web slices are shown in fig. 20.We found the power spectra results for both redshift values to be very similar. Namely,for the non-smoothed case the difference between the training and the GAN-produced powerspecta ranges between 5-10%. The results are similar for the smoothed case, with exceptionof k values around 1 h Mpc − where the difference reaches 20%.The effects of the Gaussian smoothing on both the power spectra and the Minkowskifunctionals illustrate that one of the reasons for the differences between the GAN-generatedand the training datasets is noise appearing on different scales in the GAN-produced im-ages. Applying Gaussian smoothing, in general, filters the majority of such noise, however, itcannot fully account for all the differences appearing in the different statistical diagnostics.– 13 – igure 9 : A selection of diagnostics to compare the training and the GAN-produced cosmicweb slices for redshifts z = 0 . and z = 1 . with σ = 0 . . Top left : power spectra foran ensemble of 64 randomly chosen slices for two different redshifts; top right : mean andstandard deviation of the power spectra produced using 1000 randomly chosen slices with z = 0 . ; bottom left : same as top right, but for z = 1 . ; bottom right : the overdensityhistogram (no smoothing). The blue and the green dots give P tr /P GAN − with and withoutGaussian smoothing applied correspondingly.In addition, smoothing can improve the results on some scales, while worsening them onothers. As an example, in fig. 9, Gaussian smoothing increases the difference between theGAN-produced and the training dataset power spectra on the smallest scales. Training the GAN on the cosmic web slices of different cosmologies and modified gravitymodels offered another way of testing whether the algorithm would pick up on the subtlestatistical differences between the different datasets. In addition, the classification task forthe discriminator neural network is more difficult when training on datasets with multiple– 14 – igure 10 : A comparison of the Minkowski functionals evaluated using 1000 randomly se-lected cosmic web slices of redshifts z = { . , . } for both datasets. Gaussian smoothing isapplied for all datasets.cosmologies leading to longer training times.The results indicate that the GAN is indeed capable of producing statistically realisticcosmic web data of different cosmologies and modified gravity models. With no Gaussiansmoothing applied, the relative agreement between the power spectra is 1-10% (see fig. 11).Applying smoothing in this case resulted in increasing the relative power spectrum differenceto over 10 % on average. In the case of cosmic web slices for different f R values, the agreementbetween the two datasets was good, ranging between 1-10% on all scales. Smoothing improvedthe situation only in the mid-range of the covered k values, reducing the agreement on thesmallest scales (see fig. 13).Fig. 12 shows the Minkowski functional analysis. In this case, very little deviationis observed. In general, there is a good agreement between the GAN-produced and thetraining datasets, especially for the first and the second Minkowski functionals. For the thirdMinkowski functional, the results diverge around the lower trough area, which is also observedfor other datasets. This is at least in part related to small-scale noise as indicated by theprevious analysis.The results are similar for the GAN trained on cosmic web slices corresponding todifferent f ( R ) models (fig. 14). In general, we found a good agreement between the datasets,given the standard deviation of the data and the GAN-produced results. Gaussian smoothing,in this case, was more effective in reducing some of the offset observed in the power spectrumanalysis. However, it increased the offset on the smallest scales. In the case of training the GAN algorithm on multiple components at the same time, we foundthe training procedure to be relatively quick and efficient (around 1.3 time quicker comparedto the datasets discussed previously) despite the training dataset being 3 times bigger. This ismost likely due to the fact that the cosmic web slices in this particular dataset correspondedto a much larger simulation box and hence were not as detailed on the smallest scales.As before, we calculated the relative difference between the GAN-produced and thetraining datasets. The internal energy slices were analysed using Minkowski functionals aswell as the cross-power spectrum (fig. 15). The analysis was done for both dark matter– 15 – igure 11 : A selection of diagnostics to compare the training and the GAN-produced cosmicweb slices for σ = 0 . and σ = 0 . at z = 0 . . Top left : power spectra for an ensemble of64 randomly chosen slices for both datasets; top right : mean and standard deviation of thepower spectra computed using 1000 randomly chosen slices of σ = 0 . ; bottom left : sameas top right, but for σ = 0 . ; bottom right : the overdensity histogram (no smoothing).The blue and the green dots give P tr /P GAN − with and without Gaussian smoothing appliedcorrespondingly.and the gas components. The relative difference between the power spectra for both DMand gas cosmic web slices was found to be at around 5% level for all the covered range.Gaussian smoothing reduced this value to 1-5%. In addition, the cross-power spectrum wascalculated for all the components. For both the dark matter-gas and the gas-energy pairsthere is a good agreement between the training and the GAN-produced datasets given thelarge standard deviation. Both plots show values well above zero for most k values, indicatinga significant correlation between the dark matter and the corresponding gas as well as theinternal energy distributions on all scales as expected.The Minkowski functional analysis (fig. 16) revealed a generally good agreement between– 16 – igure 12 : A comparison of the Minkowski functionals evaluated using 1000 randomly se-lected cosmic web slices from the dataset with two different values of σ = { . , . } . Gaussiansmoothing is applied for both datasets.the two datasets, with significant differences appearing only in the boundary and the Eulercharacteristic Minkowski functionals for the energy cosmic web slices. This is somewhatsurprising as the internal energy slices in general are significantly less complex on the smallestof scales when compared to the corresponding dark matter and gas data (see fig. 3), hence weexpected the GAN to easily learn to reproduce the named dataset. However, we also foundthat the internal energy data and the corresponding Minkowski functionals are especiallysensitive to adding any small scale artificial noise. A more detailed Minkowski functionalanalysis is required to determine the reason for this divergence. To perform the latent space interpolation procedure we trained the GAN to produce cosmicweb slices of two different redshifts along with weak lensing maps of different σ values.Once trained, we produced a batch of outputs and in each case chose a pair of slices/mapscorresponding to different redshifts or σ values. Subsequently, we interpolated between theinput vectors Z and Z corresponding to the outputs with different redshifts and σ values(see fig. 2).Fig. 17 illustrates the results of the latent space interpolation procedure. In particular,it shows that the technique does indeed produce intermediate power spectra. However, thetransition is not linear – the power spectra lines corresponding to equally spaced inputs (inthe latent space) are not equally spaced in the power spectrum space. This is the case asthe produced data samples can be described as points on a Riemannian manifold, which ingeneral has curvature (see appendix C for more details).Fig. 17 and 18 show the results of interpolating between cosmic web slices with redshifts z = 0 . and z = 1 . and weak lensing maps with σ = 0 . and σ = 0 . . The interpolatedsamples are statistically realistic and the transition is nearly smooth. The power spectrumcomparison was done by comparing 100 latent space points drawn from the central region(equal in length to 1/4 of the total length of the line) of the line connecting the two latentspace clusters corresponding to the different redshifts and σ values against 100 training datasamples (see fig. 2 and 17 for more information). We found that the intermediate powerspectra are in good agreement. – 17 – igure 13 : A selection of diagnostics to compare the training and the GAN-produced cosmicweb slices for f R = { − , − } (with σ = 0 . and z = 0 . ). Top left : power spectra foran ensemble of 64 randomly chosen slices for both datasets; top right : mean and standarddeviation of the power spectra produced using 1000 randomly chosen slices with f R = 10 − ; bottom left : same as top right, but for f R = 10 − ; bottom right : the overdensityhistogram (no smoothing). The blue and the green dots give P tr /P GAN − with and withoutGaussian smoothing applied correspondingly.An important part of the latent space interpolation procedure is being able to distinguishbetween the GAN-generated cosmic web slices and weak lensing maps of different redshifts,cosmologies and modified gravity parameters. In this regard, we have tested two machinelearning algorithms: a convolutional neural network and gradient boosted decision trees. Weinitially used a 3-layer convolutional neural network with 128 and 64 output filters of theconvolution correspondingly with kernel size equal to × px and tanh activation functions.We found that the neural network approach has mostly failed to distinguish between thedifferent dataset classes reliably. After a thorough hyperparameter search we managed toreach accuracy of around 75%, which was not good enough for the given task. The gradientboosted decision tree algorithm ( XGBoost [18]) was found to be faster and more accurate inpredicting the dataset class. In particular, we reached 95-98% accuracy (depending on the– 18 – igure 14 : A comparison of the Minkowski functionals evaluated using 1000 randomly se-lected cosmic web slices from the dataset with two different values of f R = { − , − } .Gaussian smoothing is applied for both datasets.dataset and hyperparameters used), when predicting the dataset class of unseen test samples.Table 1 summarizes the parameters used when training the XGBoost algorithm.
Parameter:
Learning rate Max. tree depth Training step Objective
Value: multi:softprob
Table 1 : The
XGBoost parameters used for classifying the cosmic web slices with redshifts z = { . , . } and the weak lensing maps with σ = { . , . } .Combining such a machine learning approach with a power spectrum analysis allowedus to distinguish between the different classes of the GAN-produced outputs reliably.The latent space interpolation results illustrate a number of interesting features of GANs.Firstly, the results illustrate that the GAN training procedure tightly encodes the variousfeatures discovered in our training dataset in the high-dimensional latent space. By findingclusters in this latent space, corresponding to outputs of different redshifts or cosmology pa-rameters, and linearly interpolating between them, we can produce outputs with intermediatevalues of the mentioned parameters. This allows us to control the outputs produced by thegenerator. The main goal of this work was to investigate whether GANs can be used as a universal, fastand efficient emulator capable of producing realistic and novel mock data. Our results areencouraging, illustrating that GANs are indeed capable of producing realistic mock datasets.In addition, we have shown that GANs can be used to emulate dark matter, gas and internalenergy distribution data simultaneously. This is a key result, as generating realistic gasdistributions requires complex and computationally expensive hydrodynamical simulations.Hence, producing vast amounts of realistic multi-component mock data quickly and efficientlywill be of special importance in the context of upcoming observational surveys.The GAN-produced data in general cannot be distinguished from the training datasetvisually. In terms of the power spectrum analysis, the relative difference between the GAN-– 19 – igure 15 : A selection of diagnostics to compare the training and the GAN-produced multi-component cosmic web slices.
Top left : the mean and the standard deviation of the powerspectrum for 1000 randomly chosen slices for both datasets along with the correspondingrelative difference between the datasets (green for P gasT r /P gasGAN − and blue for P DMT r /P DMGAN − ); top right : same as top left, but with Gaussian smoothing applied; bottom left : the cross-power spectrum calculated between 1000 randomly chosen dark matter and the correspondinggas cosmic web pairs for both the training and the GAN-produced datasets; bottom right :same as bottom left, but for the gas-energy cross-power.produced and the training data ranges between 1-20% depending on the dataset and whetherGaussian smoothing was applied. The Minkowski functional analysis revealed a generallygood agreement between the two datasets with an exception of the third Minkowski func-tional corresponding to curvature, which showed subtle differences for all studied datasets. Inaddition, greater differences were observed when training the GAN on datasets with multipledata classes. This is somewhat expected, as the training task becomes more difficult. Ingeneral, these differences can be partially accounted for as a result of small-scale noise in theGAN-generated images. We found Gaussian smoothing with a × pixel kernel size to be– 20 – igure 16 : Results of the Minkowski functional analysis for the GAN trained on the DM,gas and the internal energy data. Top row:
Minkowski functionals for the DM cosmic webslices; middle row:
Minkowski functionals for the gas overdensity slice data; bottom row: the corresponding Minkowski functionals for the internal energy data. In all cases Gaussiansmoothing is applied.effective in filtering away most of such noise. In addition, the training datasets used in thiswork are smaller than those used in [7, 8], which, at least partially, accounts for the differencesbetween our and their corresponding results.We also investigated a commonly used technique of latent space interpolation as a toolfor controlling the outputs of the generator neural network. Interestingly, we found that such a– 21 – a) CW slice redshift interpolation (b) WL σ interpolation Figure 17 : The results of the linear latent space interpolation technique.
Left: the matterpower spectrum corresponding to a linear interpolation between two cosmic web slices ofredshifts z = 0 . and z = 1 . . The lines in gray are the intermediate output slices generatedby the procedure, while the black line corresponds to the mean value of the power spectrumcalculated by choosing 100 random (training data) slices of redshift z = 0 . . The greendashed line corresponds to the mean of 100 outputs produced using latent space points lyingclose to the centre of the line connecting the two clusters of redshifts z = 0 . and z = 1 . .More specifically, we sample 100 points from a region equal to 1/4 of the total length of theline centered at the middle point. Right: interpolating between two randomly chosen weaklensing maps with different values of σ . As before, the black line corresponds to the meanpower spectrum produced from 100 random maps with σ = 0 . . The green line is themean power spectrum of 100 outputs generated using latent space points lying close to thecentre of the line connecting the two clusters corresponding to σ = 0 . and σ = 0 . Figure 18 : The results of the latent space interpolation procedure for cosmic web slices ofredshifts z = 0 . (far right) and z = 1 . (far left) and weak lensing convergence maps of σ = 0 . (far left) and σ = 0 . (far right).– 22 –rocedure allows us to generate samples with intermediate redshift/cosmology/ f R parametervalues, even if our model had not been explicitly trained on those particular values. In general,the latent space interpolation procedure offers a powerful way of controlling the outputs ofthe GAN as well as a tool for investigating the feature space of the generator neural network.However, it is important to point out some of the drawbacks of this procedure. Namely, aspointed out in machine learning literature, the latent space of a convolutional GAN is knownto be entangled . In other words, moving in a different direction in the latent space necessarilycauses multiple changes to the outputs of the GAN. As a concrete example, finding a latentspace line that induces a change in redshift of a given output necessarily also introduces othersubtle changes to the output (e.g. the depth of the voids or the distribution of the filaments).So if we take a random output of redshift z = 1 . and perform the linear interpolationprocedure to obtain a cosmic web slice of z = 0 . , the obtained slice will correspond to arealistic but different distribution of the required redshift. This is a drawback as in an idealcase we would love to have full control of individual parameters, while not affecting otherindependent features of a dataset. There are however other generative models discussed inthe literature that allow such manipulation of the latent space. Namely, the β -VAE variationalautoencoder and the InfoGAN algorithms, allow encoding features into the latent space in aspecial way that allows full control of individual key parameters without affecting the otherfeatures of the dataset (latent space disentanglement) [40–42].Another important pitfall to discuss is the problem of mode collapse. As is widelydiscussed in the literature, the generator neural network is prone to getting stuck in producinga very small subsample of realistic mock datapoints that fool the discriminator neural network.Resolving mode collapse is an important open problem in the field of deep learning, with avariety of known strategies ranging from choosing a particular GAN architecture, to alteringthe training procedure or the cost function [43, 44]. Mode collapse was encountered multipletimes in our training procedure as well. As a rule of thumb, we found that reducing thelearning rate parameter had the biggest effect towards resolving mode collapse for all studieddatasets. Learning rates around the values of × − for the cosmic web data and × − for the weak lensing maps were found to be the most effective in avoiding any mode collapse.As we have shown, GANs can be used to generate novel 2-D data efficiently. A naturalquestion to ask is whether this also applies to 3-D data. As an example, an analogousemulator capable of generating 3-D cosmic web data, such as that produced by state of theart hydrodynamic and DM-only simulations would be very useful. In principle there is no limiton the dimensionality of the data used for training a GAN, however, in practice, going from 2-D to 3-D data leads to a significant increase of the generator and the discriminator networks.In addition, in the case of 3-D cosmic web data, forming a big enough training datasetwould become an issue, as running thousands of simulations would be required. However,as previously mentioned, there are sophisticated ways of emulating 3-D cosmic web data asshown in [12], where a system of GANs is used to upscale small resolution comic web cubesto full size simulation boxes. Note that the techniques introduced in this work (e.g. latentspace interpolation) can be readily combined with the mentioned 3-D approach.A number of interesting directions can be explored in future work. Namely, it wouldbe interesting to further investigate the latent space interpolation techniques in the contextof more advanced generative models, such as the InfoGAN algorithm. In addition, a moredetailed investigation into the Riemannian geometry of GANs could lead to a better un-derstanding of the feature space of the algorithm. Finally, many other datasets could beexplored. With upcoming surveys, such as Euclid, generating mock galaxy and galaxy cluster– 23 –ata quickly and efficiently is of special interest. A GAN could be used to generate galax-ies with realistic intrinsic alignments, density distributions and other properties. Similarly,GANs could be used to quickly emulate realistic galaxy cluster density distributions at afraction of the computational cost required to run full hydrodynamic simulations.To conclude, GANs offer an entirely new approach for cosmological data emulation.Such a game theory based approach has been demonstrated to offer a quick and efficient wayof producing novel data for a low computational cost. As we have shown in this work, thetrade-off for this is a 1-20% difference in the power spectrum, which can be satisfactory ornot depending on what application such an emulator is used for. Even though a numberof questions remain to be answered regarding the stability of the training procedure andtraining on higher dimensional data, GANs will undoubtedly be a useful tool for emulatingcosmological data in the era of modern N -body simulations and precision cosmology. Acknowledgments
AT is supported by the Science & Technology Facilities Council (STFC) through the DISCnetCentre for Doctoral Training funding. The Google Cloud computational resources were fundedby the Research and Innovation Funding by the University of Portsmouth.KK has received funding from the European Research Council (ERC) under the Euro-pean Union’s Horizon 2020 research and innovation programme (grant agreement No. 646702"CosTesGrav"). DB and KK are also supported by the UK STFC ST/S000550/1.We thank the Columbia Lensing group (http://columbialensing.org) for making theirsuite of simulated maps available, and NSF for supporting the creation of those maps throughgrant AST-1210877 and XSEDE allocation AST-140041.This work would also not have been possible without the access to the HPC Sciamafacilities at the Institute of Cosmology and Gravitation and the support by the IT staff.We also thank Adam Amara for the guidance and the useful discussions. Finally, wethank Minas Karamanis for the help with the statistical analysis.– 24 – eferences [1] H. A. Winther, S. Casas, M. Baldi, K. Koyama, B. Li et al.,
Emulators for the nonlinear matterpower spectrum beyond Λ CDM , Phys. Rev. D (Dec., 2019) 123540, [ ].[2] M. Knabenhans, J. Stadel, S. Marelli, D. Potter, R. Teyssier et al.,
Euclid preparation: II. TheEUCLIDEMULATOR - a tool to compute the cosmology dependence of the nonlinear matterpower spectrum , MNRAS (Apr, 2019) 5509–5529, [ ].[3] J. Kwan, K. Heitmann, S. Habib, N. Padmanabhan, E. Lawrence et al.,
Cosmic Emulation:Fast Predictions for the Galaxy Power Spectrum , ApJ (Sep, 2015) 35, [ ].[4] M. Ntampaka, C. Avestruz, S. Boada, J. Caldeira, J. Cisewski-Kehe et al.,
The Role ofMachine Learning in the Next Decade of Cosmology , BAAS (May, 2019) 14, [ ].[5] J. Merten, C. Giocoli, M. Baldi, M. Meneghetti, A. Peel et al., On the dissection of degeneratecosmologies with machine learning , MNRAS (July, 2019) 104–122, [ ].[6] S. He, Y. Li, Y. Feng, S. Ho, S. Ravanbakhsh et al.,
Learning to predict the cosmologicalstructure formation , Proceedings of the National Academy of Science (July, 2019)13825–13832, [ ].[7] A. C. Rodríguez, T. Kacprzak, A. Lucchi, A. Amara, R. Sgier et al.,
Fast cosmic websimulations with generative adversarial networks , Computational Astrophysics and Cosmology (Nov, 2018) 4, [ ].[8] M. Mustafa, D. Bard, W. Bhimji, Z. Lukić, R. Al-Rfou et al., CosmoGAN: creating high-fidelityweak lensing convergence maps using Generative Adversarial Networks , ComputationalAstrophysics and Cosmology (May, 2019) 1, [ ].[9] S.-Y. Li, Y.-L. Li and T.-J. Zhang, Model comparison of dark energy models using deepnetwork , Research in Astronomy and Astrophysics (Sep, 2019) 137, [ ].[10] A. Mishra, P. Reddy and R. Nigam, CMB-GAN: Fast Simulations of Cosmic Microwavebackground anisotropy maps using Deep Learning , arXiv e-prints (Aug, 2019)arXiv:1908.04682, [ ].[11] M. J. Smith and J. E. Geach, Generative deep fields: arbitrarily sized, random syntheticastronomical images through deep learning , MNRAS (Dec, 2019) 4985–4990, [ ].[12] N. Perraudin, A. Srivastava, A. Lucchi, T. Kacprzak, T. Hofmann et al.,
Cosmological N-bodysimulations: a challenge for scalable generative models , Computational Astrophysics andCosmology (Dec, 2019) 5, [ ].[13] D. Kodi Ramanah, T. Charnock, F. Villaescusa-Navarro and B. D. Wandelt, Super-resolutionemulator of cosmological simulations using deep physical models , arXiv e-prints (Jan, 2020)arXiv:2001.05519, [ ].[14] M. Arjovsky, S. Chintala and L. Bottou, Wasserstein GAN , arXiv e-prints (Jan, 2017)arXiv:1701.07875, [ ].[15] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley et al., GenerativeAdversarial Networks , arXiv e-prints (Jun, 2014) arXiv:1406.2661, [ ].[16] F. Farnia and A. Ozdaglar, GANs May Have No Nash Equilibria , arXiv e-prints (Feb., 2020)arXiv:2002.09124, [ ].[17] H. Shao, A. Kumar and P. T. Fletcher, The Riemannian Geometry of Deep Generative Models , arXiv e-prints (Nov, 2017) arXiv:1711.08014, [ ].[18] T. Chen and C. Guestrin, Xgboost: A scalable tree boosting system , in
Proceedings of the 22ndACM SIGKDD International Conference on Knowledge Discovery and Data Mining , KDD ’16,(New York, NY, USA), pp. 785–794, Association for Computing Machinery, 2016. DOI. – 25 –
19] B. Mawdsley, D. Bacon, C. Chang, P. Melchior, E. Rozo et al.,
Dark Energy Survey Year 1Results: Wide-field mass maps via forward fitting in harmonic space , MNRAS (Mar.,2020) 5662–5679, [ ].[20] J. P. Dietrich and J. Hartlap,
Cosmology with the shear-peak statistics , MNRAS (02, 2010)1049–1058.[21] M. Mustafa, D. Bard, W. Bhimji, Z. Lukić, R. Al-Rfou et al., “cosmoGAN.” https://github.com/MustafaMustafa/cosmoGAN , Online; accessed 2020-01-24.[22] V. Springel,
The cosmological simulation code gadget-2 , MNRAS (12, 2005) 1105–1134.[23] Columbia Lensing, “Columbia Lensing Group Data Products.” http://columbialensing.org ,Online; accessed 2020-01-24.[24] A. Gupta, J. M. Z. Matilla, D. Hsu and Z. Haiman,
Non-Gaussian information from weaklensing data via deep learning , Phys. Rev. D (May, 2018) 103515, [ ].[25] J. M. Zorrilla Matilla, Z. Haiman, D. Hsu, A. Gupta and A. Petri, Do dark matter halosexplain lensing peaks? , Phys. Rev. D (Oct., 2016) 083506, [ ].[26] C. Howlett, M. Manera and W. Percival, L-picola: A parallel code for fast dark mattersimulation , Astronomy and Computing (2015) 109 – 126.[27] N. Hand, Y. Feng, F. Beutler, Y. Li, C. Modi et al., nbodykit: An Open-source, MassivelyParallel Toolkit for Large-scale Structure , The Astronomical Journal (Oct, 2018) 160,[ ].[28] H. A. Winther, “MG-PICOLA.” https://github.com/HAWinther/MG-PICOLA-PUBLIC , Online;accessed 2020-03-26.[29] H. A. Winther, K. Koyama, M. Manera, B. S. Wright and G.-B. Zhao,
COLA withscale-dependent growth: applications to screened modified gravity models , Journal of Cosmologyand Astroparticle Physics (aug, 2017) 006–006.[30] S. Tassev, M. Zaldarriaga and D. J. Eisenstein,
Solving large scale structure in ten easy stepswith COLA , Journal of Cosmology and Astroparticle Physics (jun, 2013) 036–036.[31] R. Scoccimarro, L. Hui, M. Manera and K. C. Chan,
Large-scale bias and efficient generation ofinitial conditions for nonlocal primordial non-gaussianity , Phys. Rev. D (Apr, 2012) 083002.[32] B. Li and K. Koyama, Modified Gravity: Progresses and Outlook of Theories, NumericalTechniques and Observational Tests . World Scientific Publishing Company Pte Limited, 2019.[33] M. Vogelsberger, S. Genel, V. Springel, P. Torrey, D. Sijacki et al.,
Properties of galaxiesreproduced by a hydrodynamic simulation , Nature (May, 2014) 177–182, [ ].[34] D. Nelson, A. Pillepich, S. Genel, M. Vogelsberger, V. Springel et al.,
The illustris simulation:Public data release , Astronomy and Computing (Nov., 2015) 12–37, [ ].[35] C. Ling, Q. Wang, R. Li, B. Li, J. Wang et al., Distinguishing general relativity and f ( R ) gravity with the gravitational lensing Minkowski functionals , Phys. Rev. D (Sept., 2015)064024, [ ].[36] G. A. Marques, J. Liu, J. M. Zorrilla Matilla, Z. Haiman, A. Bernui et al., Constrainingneutrino mass with weak lensing Minkowski Functionals , Journal of Cosmology andAstroparticle Physics (June, 2019) 019, [ ].[37] A. Petri, Z. Haiman, L. Hui, M. May and J. M. Kratochvil,
Cosmology with Minkowskifunctionals and moments of the weak lensing convergence field , Phys. Rev. D (Dec., 2013)123002, [ ].[38] H. Mantz, K. Jacobs and K. Mecke, Utilizing minkowski functionals for image analysis: amarching square algorithm , Journal of Statistical Mechanics: Theory and Experiment (dec, 2008) P12015. – 26 – minkfncts2d
Python package. https://github.com/cefarix/minkfncts2d , Online; accessed2020-03-09.[40] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever et al.,
InfoGAN: InterpretableRepresentation Learning by Information Maximizing Generative Adversarial Nets , arXive-prints (June, 2016) arXiv:1606.03657, [ ].[41] I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot et al., beta-vae: Learning basic visualconcepts with a constrained variational framework , in ICLR , 2017.[42] C. P. Burgess, I. Higgins, A. Pal, L. Matthey, N. Watters et al.,
Understanding disentangling in β -VAE , arXiv e-prints (Apr., 2018) arXiv:1804.03599, [ ].[43] Yicheng and Hong, Comparison of Generative Adversarial Networks Architectures WhichReduce Mode Collapse , arXiv e-prints (Oct., 2019) arXiv:1910.04636, [ ].[44] A. Srivastava, L. Valkov, C. Russell, M. U. Gutmann and C. Sutton, VEEGAN: ReducingMode Collapse in GANs using Implicit Variational Learning , arXiv e-prints (May, 2017)arXiv:1705.07761, [ ].[45] M. Hauser and A. Ray, Principles of riemannian geometry in neural networks , in
Advances inNeural Information Processing Systems 30 (I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach,R. Fergus et al., eds.), pp. 2807–2816. Curran Associates, Inc., 2017.
Appendices
A Data and Code Availability
The key scripts along with small data samples and the best checkpoints are available at:https://github.com/AndriusT/cw_wl_GAN. The link also contains detailed instructions onhow to produce the data samples from the publicly available Illustris data.
B Samples of the GAN-produced Data
This section contains a selection of GAN-produced samples for visual inspection. Fig. 19contains randomly selected weak lensing convergence maps produced by the GAN algorithm(these are the samples described in sections 5.2 and 5.3).Fig. 20 shows a selection of randomly selected cosmic web 2-D slices for two differentredshifts. Both the training data and the produced slices have been Gaussian-smoothed.
C Riemannian Geometry of GANs
Recently various connections between GANs and Riemannian geometry have been exploredin the machine learning literature. Such connections are important to explore, not only forthe sake of curiosity, but also because they allow us to describe GANs and their optimizationprocedure in a language more familiar to physicists. A Riemannian geometry description ofGANs is also powerful when exploring the latent space of a trained generator neural networkand the outputs that it produces. Finally, a differential geometry description could shinesome light on the connections between generative models and information geometry, whichis a well-established field and could offer some new insights into training and analyzing theoutputs of such models. – 27 – igure 19 : A comparison of 4 randomly selected weak lensing convergence maps. The colorsare log-normalized to emphasize the main features and to allow a direct comparison with theresults in [8].