To understand the origin and composition of our universe, cosmologists must compare telescope observations against theoretical models. This requires generating thousands of simulated universes across a vast parameter space of dark matter, dark energy, and baryonic physics.
Traditionally, this is done using numerical simulations. $N$-body simulations track billions of dark matter particles interacting gravitationally over cosmic time, while hydrodynamical simulations layer on the complex fluid dynamics of gas, star formation, and black hole feedback. However, these simulations present a massive computational bottleneck, often requiring millions of CPU hours for a single realization.
To overcome this limitation, researchers are developing deep learning emulators. Instead of stepping through differential equations billions of times, these models learn the underlying mapping between early-universe initial conditions and late-time cosmic structures, accelerating the generation of mock universes by up to six orders of magnitude.
The Field-Level Mapping Strategy
The most direct way to accelerate cosmological simulations is to replace the step-by-step numerical integration of gravity with a single forward pass of a neural network. This is known as field-level emulation.
[Initial Conditions (Linear Theory)] ---> [ 3D Convolutional / Operator Network ] ---> [ Final Non-Linear Structure ]
In traditional workflows, solvers must use tiny time steps to maintain numerical stability when calculating non-linear gravitational collapse. However, the final distribution of matter is deterministically related to the initial seed conditions. Siyu He et al. demonstrated in Learning to Predict the Cosmological Structure Formation that a 3D convolutional neural network—the Deep Density Displacement Model ($D^3M$)—can learn this highly non-linear mapping directly. By training on full $N$-body outputs, the network learns to extrapolate structural formation across varying cosmological parameters it was never explicitly trained on.
This field-level approach can also capture subtle physical phenomena that are otherwise expensive to model. For instance, adding the clustering effects of massive neutrinos typically requires specialized, multi-component $N$-body runs. Elena Giusarma et al. extended the $D^3M$ framework in Learning Neutrino Effects in Cosmology with Convolutional Neural Network, showing that a neural network can accurately inject neutrino physics into standard dark matter fields roughly 10,000 times faster than traditional methods.
To ensure these fast forward passes do not violate fundamental physics, emulators can be explicitly constrained by physical laws. Drew Jamieson et al. introduced a physics-informed architecture in Field-level Emulation of Cosmic Structure Formation with Cosmology and Redshift Dependence that treats particle velocities as the automatic time-derivative of displacements, ensuring that the emulated fields remain mathematically and physically consistent across different cosmic epochs (redshifts).
Painting Baryons onto Dark Matter Skeletons
While dark matter makes up the structural "skeleton" of the cosmic web, telescopes can only observe baryonic matter—the gas, stars, and galaxies that light up the sky. Simulating dark matter alone is computationally manageable, but simulating the baryonic physics inside dark matter clumps (halos) is what makes hydrodynamical simulations prohibitively expensive.
A powerful shortcut is to run a cheap, dark-matter-only simulation and then use machine learning to "paint" the baryonic properties onto it.
[Dark Matter Halo History (Merger Tree)] ---> [ Graph Neural Network (GNN) ] ---> [ Galaxy Properties (Stellar Mass, Color) ]
Because galaxies form and evolve hierarchically as dark matter halos collide and merge over time, this process can be naturally framed using Graph Neural Networks (GNNs). Christian Kragh Jespersen et al. developed Mangrove in Mangrove: Learning Galaxy Properties from Merger Trees, an architecture that treats the entire evolutionary "merger tree" of a dark matter halo as a directed graph. By processing the full structural history rather than just a single snapshot in time, the GNN predicts complex galaxy properties like stellar mass and star formation rates with high precision.
The importance of utilizing the entire graph topology was further reinforced by Chen-Yu Chuang et al. in Leaving No Branches Behind: Predicting Baryonic Properties of Galaxies from Merger Trees. The authors demonstrated that tracking every branch of a halo's assembly history prevents information loss, allowing the model to outperform standard snapshot-based machine learning methods by up to 45%.
For continuous distributions, such as mapping the diffuse gas or galaxy counts across vast volumes, conditional generative modeling offers an alternative to discrete graphs. Antoine Bourdin et al. utilized conditional score-based diffusion models in Inpainting Galaxy Counts onto N-Body Simulations over Multiple Cosmologies and Astrophysics to "inpaint" realistic galaxy distributions directly onto underlying dark matter fields, matching the statistical accuracy of full hydrodynamical suites in a fraction of the time.
Generative Models and Geometric Symmetries
The large-scale structure of the universe is not random; it obeys strict statistical properties and geometric symmetries, such as translation and rotation invariance. Deep generative models are uniquely suited to exploit these properties to synthesize entirely new mock catalogs.
In Encoding large-scale cosmological structure with generative adversarial networks, Aurélien Decelle et al. showed that combining Generative Adversarial Networks (GANs) with autoencoders allows researchers to compress complex 3D cosmological fields into low-dimensional latent spaces. Once trained, the generator can sample from this latent space to instantly produce high-fidelity synthetic universes that preserve the filamentary structure of the cosmic web.
When dealing with real telescope data, these generative models must also account for the spherical geometry of the sky and the effects of gravitational lensing. To address this, Janis Fluri et al. designed a tomographic weak lensing mass map emulator in A tomographic spherical mass map emulator of the KiDS-1000 survey using conditional generative adversarial networks. By pairing a conditional GAN with a spherical graph convolutional network, the authors successfully emulated high-fidelity lensing maps directly on a curved manifold, bypassing the need to project flat 3D simulations onto the sky.
The latest frontier in this domain involves embedding exact physical symmetries directly into the network architecture to prevent the model from generating physically impossible structures. Diana-Alexandra Onutu et al. demonstrated this in Score Matching on Large Geometric Graphs for Cosmology Generation by combining score-based generative models with equivariant graph neural networks. Because the underlying network is mathematically incapable of violating rotational or translational symmetries, the model achieves exceptional structural fidelity while operating six orders of magnitude faster than traditional $N$-body codes.
Why Deep Emulators Work: The Intuition
To understand why a neural network can replicate a supercomputer simulation, it helps to look at how traditional numerical solvers spend their time.
Numerical integration is fundamentally local and incremental. To resolve the high-frequency, non-linear forces that occur when particles get close to one another, a traditional differential equation solver must take incredibly small steps in time to prevent numerical explosion. This is a strict stability bottleneck explored by Michael A. Celia et al. in A comparative study of neural ordinary differential equations and neural operators for modeling temporal dynamics.
However, from a macro perspective, the evolution of cosmic structure is a highly constrained, smooth optimization problem governed by a few fundamental parameters (like the total matter density $\Omega_m$ or the amplitude of fluctuations $\sigma_8$). The final state of the universe is highly correlated with its initial state through a continuous manifold of physical possibilities.
Deep learning emulators succeed because they do not try to solve the step-by-step mechanics of every individual particle collision. Instead, they act as non-linear, non-local interpolators across this physical manifold. By utilizing architectures with built-in inductive biases—such as translation invariance in CNNs, hierarchical aggregation in GNNs, or coordinate equivariance in geometric graphs—the networks learn the global statistical rules of gravitational collapse. They map the smooth, large-scale correlations directly to the final non-linear structures, effectively skipping the intermediate temporal steps that make traditional simulations so computationally expensive.