arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2607.28604v1 [astro-ph.CO] 30 Jul 2026

Cosmo-SPINN: Fuzzy Dark Matter Simulations with Physics-Informed Generative NetworksJournal: ApJ

Ashutosh K. Mishra OrcID: 0009-0002-8819-8236 Affiliation: Institute of Physics, Laboratory of Astrophysics, École Polytechnique Fédérale de Lausanne (EPFL), Observatoire de Sauverny, Versoix, 1290, Switzerland Corresponding author: Ashutosh K. Mishra    Emma Tolley OrcID: 0000-0002-1027-1213 Affiliation: Institute of Physics, Laboratory of Astrophysics, École Polytechnique Fédérale de Lausanne (EPFL), Observatoire de Sauverny, Versoix, 1290, Switzerland    Nicolas Cerardi Affiliation: Institute of Physics, Laboratory of Astrophysics, École Polytechnique Fédérale de Lausanne (EPFL), Observatoire de Sauverny, Versoix, 1290, Switzerland
Received xxx xx, 2026; Revised xxx xx, 2026; Accepted xxx xx, 2026
Abstract

Generative machine learning models have recently emerged as powerful tools for producing cosmological simulations. However, many existing emulators do not explicitly enforce the underlying physical dynamics governing cosmological evolution, often leading to artifacts and poor adherence to the evolution equations. In this work, we present a physics-informed generative U-Net framework for fuzzy dark matter (FDM) that addresses two complementary tasks: (i) the evolution of cosmological fields from initial conditions to an arbitrary cosmological scale factor and (ii) the super-resolution of FDM simulations at a specified cosmological scale factor. Our model incorporates a physics-informed loss function that explicitly enforces consistency with the underlying Schrödinger-Poisson (SP) dynamics during training. For the evolution task, we find that the inclusion of this physics-based loss significantly improves the quality of the predicted simulations, even when only a small amount of training data is available. Using only 20% of the training data, the model accurately reproduces the target simulations in a 1 h1h^{-1}Mpc box. Furthermore, the framework generalizes effectively across previously unseen realizations of the initial conditions. For the super-resolution task, we present, for the first time, a generative super-resolution model trained on FDM simulations obtained by solving the full SP equations, considering both single and multiple realizations of the initial conditions and analyzing the role of the physics-informed loss in each case. Our approach enables modern generative modeling of cosmological simulations while maintaining physical consistency and substantially reducing generative artifacts.

Keywords: 
gravitation — dark matter — methods:numerical

I Introduction

The nature of dark matter (DM) remains one of the central unsolved problems in cosmology. Beyond the standard Cold Dark Matter (CDM) paradigm, numerous alternative DM candidates have been proposed (see, e.g., 6 for a review). Among the many proposed candidates, ultralight scalar particles such as axion-like fields have attracted significant attention across a wide range of masses (1; 12; 18; 10). A particularly well-studied type is ultralight fuzzy dark matter (FDM), corresponding to particle masses in the range 1022eVm1020eV10^{-22}eV\lesssim m\lesssim 10^{-20}eV, where quantum effects become astrophysically relevant and give rise to wave-like behavior on galactic scales. In the non-relativistic regime, the dynamics of this ultralight dark matter are governed by the Schrödinger–Poisson (SP) equations. FDM retains the large-scale structure of CDM while modifying small-scale structure formation, such as producing solitonic halo cores (40; 17), potentially alleviating several small-scale tensions of the standard cosmological model.

These characteristic predictions have made FDM an attractive alternative to CDM. While FDM has been shown to successfully reproduce the velocity dispersion profiles of the Milky Way (9) and a number of dwarf galaxies (5), recent observational analyses have placed increasingly stringent constraints on ultralight dark matter models. Using stellar kinematics of ultra-faint dwarf galaxies together with full SP simulations, 34 derived lower bounds on the dark matter particle mass as strong as m>8×1018m>8\times 10^{-18} eV under certain assumptions, significantly constraining the canonical FDM regime. The systems used in this analysis were the dwarf galaxies Segue 1 and Segue 2, together with the “micro-galaxy” Ursa Major III/UNIONS 1. However, the interpretation of these constraints remains uncertain, as both Segue 1 and Ursa Major III may not be dark-matter-dominated systems(29; 13), contrary to the assumptions adopted by 34. Consequently, the stringent bound of m>8×1018eVm>8\times 10^{-18}\ \mathrm{eV} should be regarded as provisional and subject to validation with future observations. Nevertheless, heavier regions (m>1018m>10^{-18} eV) of the broader wave dark matter parameter space remain of considerable interest, as does FDM itself in scenarios involving mixed dark matter models, partial ultralight dark matter fractions, or alternative scalar-field realizations (7; 19). Exploring these possibilities requires efficient and physically reliable SP simulation techniques across a wide range of initial conditions and resolutions.

Over the past decade, numerical simulations based on the SP equations have become indispensable for understanding nonlinear structure formation in FDM models (40; 37; 35; 41). However, these wave-based simulations remain computationally expensive because the de Broglie wavelength must be resolved throughout the simulation volume. Consequently, cosmological SP simulations are currently limited to relatively small box sizes compared to conventional CDM N-body simulations. Although hybrid approaches combining wave and fluid formulations have recently improved computational efficiency (24), achieving large-volume, high-resolution SP simulations remains challenging. As a result, there are far fewer high-resolution FDM simulations than their CDM counterparts, significantly limiting studies of small-scale structure formation and halo properties in wave dark matter models.

Deep learning techniques have shown considerable promise in accelerating cosmological simulations and emulation tasks (14; 8; 21). Super-resolution (SR) techniques using machine learning offer a promising prospect of overcoming the computational limitations of FDM numerical simulations. Originally developed for image processing, super-resolution methods use neural networks to reconstruct high-resolution (HR) features from low-resolution (LR) inputs. Recently, these methods have been adapted for cosmological simulations using deep generative models, particularly generative adversarial networks (GANs) conditioned on low-resolution simulations (23; 27; 42). Such approaches have successfully reproduced key statistical properties of CDM simulations, including the matter power spectrum and halo mass functions, while achieving speed-ups of several orders of magnitude relative to full high-resolution N-body simulations. However, these approaches have so far been explored primarily in the context of CDM, where the underlying dynamics are comparatively simpler and do not involve wave interference phenomena. Only limited work has considered FDM. For example, 42 developed a GAN for FDM super-resolution, but without training their model on FDM simulations that incorporate the full quantum pressure. In addition, the SR mapping remains an inherently ill-posed problem, as multiple high-resolution realizations can correspond to the same low-resolution simulation after downsampling. This ambiguity is further worsened for FDM when learning is performed solely in density space, since density is agnostic to phase of the FDM fields involved. Consequently, effective super-resolution for FDM requires learning strategies that exploit information beyond the density field alone.

Furthermore, standard neural networks often fail to preserve the underlying physical dynamics, leading to unphysical artifacts and poor generalization (28; 11). Physics-informed machine learning addresses these limitations by incorporating governing differential equations directly into the learning process. In our previous work, SPINN (36), we demonstrated for the first time that physics-informed neural networks (PINNs) can successfully model gravitational collapse governed by the SP equations and reproduce key features of wave dark matter dynamics. That work established the viability of physics-informed approaches for cosmological SP simulations.

Building on these developments, we extend these ideas toward generative cosmological emulation. In this work we present Cosmo-SPINN, a Schrödinger–Poisson informed generative framework for FDM simulations based on a U-Net architecture with a physics-informed loss function. The framework is applied to two tasks: (i) the evolution of cosmological fields from initial conditions to a specified scale factor and (ii) the super-resolution of FDM simulations. Unlike conventional emulators trained purely on data, our framework explicitly enforces SP dynamics during training, substantially reducing generative artifacts while improving data efficiency and generalization across realizations of the initial conditions. Furthermore, we demonstrate, for the first time, super-resolution FDM simulations generated from full SP evolutions using a physics-informed generative model. Our study focuses on redshifts within the Epoch of Reionization, where the suppression of small-scale structure by FDM can leave observable signatures (20), making efficient emulators particularly relevant for constraining FDM models. Our results show that physically informed generative approaches provide a promising pathway toward accelerated large-scale SP simulations. Our implementation leverages established machine learning libraries, notably PyTorch (39), enabling more efficient and accurate solutions.

This paper is structured as follows. In Section II, we present the governing equations for the FDM used in this work, provide an overview of the numerical scheme used to solve them and the framework of Physics Informed Generative Networks. In Section III, we describe the initial conditions, the SP simulations used for training and testing, and the Cosmo-SPINN framework, including the physics-informed Evolution and Super-Resolution models, their architectures, and optimization procedures. We present the results and discussion in Sections IV and V respectively before concluding in Section VI. Additional validation tests for the Evolution Model, including performance across redshifts (Appendix A), and generalization to unseen realizations of the initial conditions (Appendix B), are provided in the appendices.

II Theoretical Background

II.1 Governing Equations

Fuzzy DM consists of an ultralight boson with mass m30m\ll 30 eV resulting in a macroscopic de Broglie wavelength. An axion-like particle is one possible candidate for FDM. The axion ϕ\phi is a real angular field with a periodicity of f, f being an axion-decay constant. Taking a primordial value of order f, the axion transitions from being frozen early in the universe to oscillating in the late times, resulting in a relic density of (1; 32; 18):

Ωaxion0.1(f1017GeV)2(m1022eV)1/2\displaystyle\Omega_{\text{axion}}\sim 0.1\left(\frac{f}{10^{17}\text{GeV}}\right)^{2}\left(\frac{m}{10^{-22}\text{eV}}\right)^{1/2} (1)

Assuming non-relativisitic regime and t as the proper time, we introduce complex-valued scalar field or wavefunction ψ(𝒙,t)\psi(\bm{x},t)\in\mathbb{C} with 𝒙3\bm{x}\in\mathbb{R}^{3} that relates to the real axion field ϕ\phi as:

ϕ=3c2m(ψeimc2t+ψeimc2t)\displaystyle\phi=\sqrt{\frac{\hbar^{3}c}{2m}}\left(\psi e^{-i\frac{mc^{2}}{\hbar}t}+\psi^{*}e^{i\frac{mc^{2}}{\hbar}t}\right) (2)

where, \hbar is the reduced Planck’s constant and cc is the speed of light in vacuum. Under the condition |ψ˙|m|ψ||\dot{\psi}|\ll m|\psi|, and adopting the perturbed Friedmann-Lemaître-Robertson-Walker (FLRW) metric,

ds2=(1+2Vc2)c2dt2a(t)2(12Vc2)d𝒙2\displaystyle\textrm{d}s^{2}=\left(1+\frac{2V}{c^{2}}\right)c^{2}\textrm{d}t^{2}-a(t)^{2}\left(1-\frac{2V}{c^{2}}\right)\textrm{d}\bm{x}^{2} (3)

the Klein-Gordon equation for the axion ϕ\phi gives the following Schrödinger-Poisson equations:

itψ(𝒙,t)\displaystyle i\hbar\partial_{t}\psi(\bm{x},t) =22ma22ψ(𝒙,t)+maVψ(𝒙,t)\displaystyle=-\frac{\hbar^{2}}{2ma^{2}}\nabla^{2}\psi(\bm{x},t)+\frac{m}{a}V\psi(\bm{x},t) (4)
2V(𝒙,t)\displaystyle\nabla^{2}V(\bm{x},t) =4πGm(|ψ(𝒙,t)|2|ψ|2(t))\displaystyle=4\pi Gm(|\psi(\bm{x},t)|^{2}-\langle|\psi|^{2}\rangle(t)) (5)

where aa is the cosmological scale factor, VV is the Newtonian gravitational potential, the angle brackets in |ψ|2\langle|\psi|^{2}\rangle indicate the spatial average, and in the above equations, all the quantities and coordinates are in the “comoving” form which are related to “physical” quantities as:

𝒙=a1𝒙phys,=aphys,ψ=a3/2ψphys,V=aVphys\bm{x}=a^{-1}\bm{x}_{\text{phys}},\,\nabla=a\nabla_{\text{phys}},\,\psi=a^{3/2}\psi_{\text{phys}},\,V=aV_{\text{phys}}

Despite the appearance of Schrödinger equation, the wavefunction ψ\psi should be interpreted as a classical field. ψ\psi is subject to wave effects such as interference, similar to interference of waves in classical electromagnetism. It should be noted that the Eqs. (4 & 5) describes the evolution of a single macroscopic wavefunction of a Bose-Einstein condensate, with a mass density ρ=m|ψ|2\rho=m|\psi|^{2}, rather than the wavefunction of an individual particle. One can also introduce super-comoving time dt~=a2dtd\tilde{t}=a^{-2}dt (33) and V~=aV\tilde{V}=aV, to obtain the more familiar Schrödinger equation without scale factors:

iψt~=(22m2+mV~)ψi\frac{\partial\psi}{\partial\tilde{t}}=\left(-\frac{\hbar^{2}}{2m}\nabla^{2}+\frac{m}{\hbar}\tilde{V}\right)\psi (6)

This formulation can be useful because it removes scale factors in the denominator which makes controlling error at low redshifts very difficult.

The Schrödinger equation implies a conservation law described by the continuity equation

tρ+(ρ𝐯)=0,\partial_{t}\rho+\nabla\cdot(\rho\mathbf{v})=0, (7)

with the density current

ρ𝐯=2i(ψψψψ),(ρ=m|ψ|2).\rho\mathbf{v}=\frac{\hbar}{2i}\left(\psi^{*}\nabla\psi-\psi\nabla\psi^{*}\right),\qquad(\rho=m|\psi|^{2}). (8)

The (comoving) velocity field 𝐯\mathbf{v} dictates the peculiar velocity of matter at each point. Using the 31 transformation:

ψ=ρmeiS,\psi=\sqrt{\frac{\rho}{m}}\,e^{iS}, (9)

with absolute value ρ/m\sqrt{\rho/m} and phase S, where

ρ=a3ρphys=m|ψ|2\rho=a^{3}\rho_{\text{phys}}=m|\psi|^{2}

is indeed the same mass density as in Eq. (7). Inserting this into the expression for the current in Eq. (8) yields

𝐯=mS,\mathbf{v}=\frac{\hbar}{m}\nabla S, (10)

that is, the gradient of the wave function’s phase determines the velocity field. The wave function written using the Madelung transformation (Eq. 9) , can be used to rewrite the SP Equations yielding the continuity Eq. (7) along with a modified Euler equation:

t𝐯+1a2(𝐯)𝐯=Φ+22m2a2(2ρρ).\partial_{t}\mathbf{v}+\frac{1}{a^{2}}(\mathbf{v}\cdot\nabla)\mathbf{v}=-\nabla\Phi+\frac{\hbar^{2}}{2m^{2}a^{2}}\nabla\left(\frac{\nabla^{2}\sqrt{\rho}}{\sqrt{\rho}}\right). (11)

(cf. e.g. 37). This allows for a hydrodynamical interpretation of the density and velocity fields ρ\rho and 𝐯\mathbf{v}. When the quantum pressure term vanishes, which happens on large scales (3; 18), the Madelung equations recover the pressureless Euler–Poisson equations, similar to the Vlasov-Poisson equations governing CDM in the limit /m0\hbar/m\to 0 and before shell crossing. Despite the fact that the Madelung equations are highly non-linear, they become tractable with existing hydrodynamic codes. However, they are inherently ill-behaved due to the presence of quantum pressure term which blows up as ρ0\rho\to 0, which is common in the DM overdensity evolution where the density vanishes, especially in the voids between halos and filaments. Therefore we choose to evolve the SP-system of equations (4 & 5) instead of the Madelung formalism in our work, in particular with the super-comoving time formalism as it allows us to control the errors better at lower redshifts, permitting the long-time evolution.

It should be noted that Eqs.( 4 & 5 ) only have a single parameter given by the constant /m\hbar/m, which is related to the de Broglie wavelength as

λdB=2πmv.\lambda_{\mathrm{dB}}=\frac{2\pi\hbar}{m\text{v}}. (12)

Another important scale set by /m\hbar/m is the FDM Jeans length. In FDM, quantum pressure arising from the Heisenberg uncertainty principle counteracts gravitational collapse below a characteristic scale. As a result, at least to linear order the density perturbations larger than the Jeans length can grow gravitationally, while smaller perturbations remain oscillatory and do not collapse. The corresponding comoving Jeans wavenumber kJk_{J} at redshift zz (correspondingly at scale factor aa) is given by (16; 26):

kJ44.7Mpc(6aΩm00.3)1/4(H070kms1Mpc1m1022eV)1/2.k_{\mathrm{J}}\equiv\frac{44.7}{\mathrm{Mpc}}\left(6a\frac{\Omega_{m0}}{0.3}\right)^{1/4}\left(\frac{H_{0}}{70\,\mathrm{km\,s^{-1}}\textrm{Mpc}^{-1}}\frac{m}{10^{-22}\mathrm{eV}}\right)^{1/2}. (13)

II.2 Numerical Scheme for Simulations

The simulations are performed within a standard cosmological Λ\LambdaCDM background, where CDM is replaced by FDM inside a periodic cubic domain of side length LL. The simulation volume samples the large-scale matter distribution of the Universe and is initialized with the mean comoving matter density

ρ=Ωmρcrit=Ωm3H028πG.\langle\rho\rangle=\Omega_{m}\rho_{\mathrm{crit}}=\Omega_{m}\frac{3H_{0}^{2}}{8\pi G}. (16)

To evolve the system, we solve the Schrödinger–Poisson (SP) equations using the second-order unitary split-step pseudo-spectral method described in 37. The method combines operator splitting with Fast Fourier Transforms (FFT), allowing the kinetic and gravitational terms to be evolved independently while preserving unitary time evolution.

The formal evolution of the wavefunction over a timestep Δt\Delta t is given by

ψ(t+Δt,𝐱)\displaystyle\psi(t+\Delta t,\mathbf{x}) =𝒯exp[itt+Δt(2m1a(t)22\displaystyle=\mathcal{T}\exp\Bigg[-i\int_{t}^{t+\Delta t}\Bigg(-\frac{\hbar}{2m}\frac{1}{a(t^{\prime})^{2}}\nabla^{2}
+m1a(t)V(t,𝐱))dt]ψ(t,𝐱).\displaystyle\qquad\qquad\qquad+\frac{m}{\hbar}\frac{1}{a(t^{\prime})}V(t^{\prime},\mathbf{x})\Bigg)dt^{\prime}\Bigg]\psi(t,\mathbf{x}). (14)

where 𝒯\mathcal{T} denotes the time-ordering operator. Using the Baker–Campbell–Hausdorff expansion, the evolution operator is approximated to second-order accuracy by separating the kinetic and potential contributions,

ψ(t+Δt,𝐱)\displaystyle\psi(t+\Delta t,\mathbf{x})\approx\; eimΔt2a(t)V(t+Δt,𝐱)\displaystyle e^{-i\frac{m}{\hbar}\frac{\Delta t}{2a(t)}V(t+\Delta t,\mathbf{x})}
×ei2mΔta(t)22\displaystyle\times e^{\,i\frac{\hbar}{2m}\frac{\Delta t}{a(t)^{2}}\nabla^{2}}
×eimΔt2a(t)V(t,𝐱)ψ(t,𝐱).\displaystyle\times e^{-i\frac{m}{\hbar}\frac{\Delta t}{2a(t)}V(t,\mathbf{x})}\psi(t,\mathbf{x}). (15)

This decomposition corresponds to the standard “kick–drift–kick” scheme,

eimΔt2a(t)V(t+Δt,𝐱)kickei2mΔta(t)22drifteimΔt2a(t)V(t,𝐱)kick.\underbrace{e^{-i\frac{m}{\hbar}\frac{\Delta t}{2a(t)}V(t+\Delta t,\mathbf{x})}}_{\mathrm{kick}}\quad\underbrace{e^{\,i\frac{\hbar}{2m}\frac{\Delta t}{a(t)^{2}}\nabla^{2}}}_{\mathrm{drift}}\quad\underbrace{e^{-i\frac{m}{\hbar}\frac{\Delta t}{2a(t)}V(t,\mathbf{x})}}_{\mathrm{kick}}.

The potential “kick” updates are performed in configuration space, while the kinetic “drift” step is evaluated in Fourier space using FFT methods. Spatial derivatives are therefore computed spectrally, which improves numerical accuracy and computational efficiency.

At each timestep, the gravitational potential is obtained by solving the Poisson equation in Fourier space,

V=IFFT[1k2FFT(4πGm(|ψ|2|ψ|2))].V=\mathrm{IFFT}\left[-\frac{1}{k^{2}}\,\mathrm{FFT}\left(4\pi Gm\left(|\psi|^{2}-\langle|\psi|^{2}\rangle\right)\right)\right]. (16)

The numerical evolution over one timestep proceeds as follows: (i) compute the gravitational potential from the density field, (ii) apply a half-step potential update (kick), (iii) evolve the kinetic term for a full timestep in Fourier space (drift), (iv) recompute the gravitational potential, and (v) apply a second half-step potential update. The complete algorithm is summarized below.

Algorithm 1 Second-Order Spectral Method for the Schrödinger–Poisson Equations
1: Initialize wavefunction ψ\psi and compute initial potential V
2: while t<tfinalt<t_{\mathrm{final}} do
3:   Compute gravitational potential:
V=IFFT[1k2FFT(4πGm(|ψ|2|ψ|2))]V=\mathrm{IFFT}\left[-\frac{1}{k^{2}}\,\mathrm{FFT}\left(4\pi Gm(|\psi|^{2}-\langle|\psi|^{2}\rangle)\right)\right]
4:   Apply half-step potential update (kick):
ψexp[i(m)(Δt2aV)]ψ\psi\leftarrow\exp\left[-i\left(\frac{m}{\hbar}\right)\left(\frac{\Delta t}{2a}V\right)\right]\psi
5:   Apply full-step kinetic evolution (drift):
ψIFFT[exp(ik22ma2Δt)FFT(ψ)]\psi\leftarrow\mathrm{IFFT}\left[\exp\left(-i\frac{\hbar k^{2}}{2ma^{2}}\Delta t\right)\,\mathrm{FFT}(\psi)\right]
6:   Recompute gravitational potential:
V=IFFT[1k2FFT(4πGm(|ψ|2|ψ|2))]V=\mathrm{IFFT}\left[-\frac{1}{k^{2}}\,\mathrm{FFT}\left(4\pi Gm(|\psi|^{2}-\langle|\psi|^{2}\rangle)\right)\right]
7:   Apply second half-step potential update (kick):
ψexp[i(m)(Δt2aV)]ψ\psi\leftarrow\exp\left[-i\left(\frac{m}{\hbar}\right)\left(\frac{\Delta t}{2a}V\right)\right]\psi
8:   Advance time:
tt+Δtt\leftarrow t+\Delta t

This numerical scheme preserves second-order accuracy and unitary time evolution. The pseudo-spectral formulation efficiently computes spatial derivatives and gravitational interactions, making it well suited for simulations of wave-like dark matter and Bose–Einstein condensate systems. The kick operator acts locally in position space and only modifies the phase of the wavefunction. To avoid phase aliasing, the phase change per timestep is required to remain below 2π2\pi, giving

Δtkick<Ckick2πma|V|max,\Delta t_{\mathrm{kick}}<C_{\mathrm{kick}}\frac{2\pi\hbar}{m}\frac{a}{|V|_{\max}}, (17)

where |V|max|V|_{\max} is the maximum potential amplitude and Ckick1C_{\mathrm{kick}}\leq 1 is a numerical safety factor.

The drift operator is evaluated in Fourier space and contributes a phase proportional to k2k^{2}. Requiring the maximum phase change to remain below 2π2\pi gives

Δtdrift<Cdrift4mπa2Δx2,\Delta t_{\mathrm{drift}}<C_{\mathrm{drift}}\frac{4m}{\pi\hbar}a^{2}\Delta x^{2}, (34)

where Δx\Delta x is the grid spacing and kmax=π/Δxk_{\max}=\pi/\Delta x is the Nyquist wavenumber. The factor Cdrift1C_{\mathrm{drift}}\leq 1 is an empirical stability coefficient whose value depends on the implementation scheme and the specific application at hand.

The scaling ΔtΔx2\Delta t\propto\Delta x^{2} is characteristic of diffusion-type equations and corresponds to requiring that the maximum resolved velocity does not propagate more than one grid cell per timestep. This is the main reason why generating large scale FDM simulations are computationally extremely expensive and time consuming.

II.3 Physics Informed Generative Networks

Physics Informed Generative Networks (PIGNs) extend physics-informed machine learning frameworks by combining generative neural architectures with physical constraints derived from the governing equations of the system. Unlike traditional Physics Informed Neural Networks (PINNs), which directly learn the solution of differential equations through collocation points in space-time, PIGNs are designed to generate physically consistent realizations of complex fields while preserving the statistical and dynamical properties imposed by the underlying physics. Such approaches are particularly useful for high-dimensional cosmological simulations and super-resolution tasks, where reconstructing high-resolution fields from low-resolution inputs is an inherently ill-posed inverse problem. Physics-informed generative models address this ambiguity by generating realizations that satisfy the governing equations while reproducing the correct physical structures and statistical distributions.

In this work, the generative networks are trained to learn a physics-informed mapping between cosmological field realizations while being constrained by the governing SP equations. Depending on the task, the architecture is adapted to either predict the cosmological fields at a specified cosmological scale factor from the initial conditions (evolution model) or reconstruct high-resolution realizations from low-resolution inputs (super-resolution model). In both cases, the networks take as input the relevant field variables together with the scale factor and predict physically consistent realizations of the wavefunction and gravitational potential fields across the simulation domain. Physical information is incorporated through additional loss terms constructed from the residuals of the governing equations, thereby regularizing the learning process and promoting consistency with the underlying dynamics.

The general form of the governing differential equations can be written as

𝒟[G(X,θ);Λ]=f(X),XΩ,\displaystyle\mathcal{D}[G(X,\theta);\Lambda]=f(X),\quad X\in\Omega, (18)

with associated boundary and initial conditions,

[G(X,θ)]=g(X),XΩ,\displaystyle\mathcal{B}[G(X,\theta)]=g(X),\quad X\in\partial\Omega, (19)

where G(X,θ)G(X,\theta) denotes the generative neural network parameterized by θ\theta, 𝒟\mathcal{D} represents the non-linear differential operator governing the dynamics, Λ\Lambda denotes the physical parameters entering the equations, f(X)f(X) is the source term, and \mathcal{B} specifies the boundary or initial condition operator and g(X)g(X) specifies the corresponding prescribed boundary or initial condition over the computational domain Ωd+1\Omega\subset\mathbb{R}^{d+1} with boundary Ω\partial\Omega. In our case, the residuals for the SP equations would be:

i[t~+2m2mV~]ψ\displaystyle i\left[\frac{\partial}{\partial\tilde{t}}+\frac{\hbar}{2m}\nabla^{2}-\frac{m}{\hbar}\tilde{V}\right]\psi =0=f1(X)\displaystyle=0=f_{1}(X) (20)
2V(𝒙,t)4πGm(|ψ(𝒙,t)|2|ψ|2(t))\displaystyle\nabla^{2}V(\bm{x},t)-4\pi Gm(|\psi(\bm{x},t)|^{2}-\langle|\psi|^{2}\rangle(t)) =0=f2(X)\displaystyle=0=f_{2}(X) (21)

where ψ\psi is the complex wavefunction and VV is the gravitational potential. Periodic boundary conditions are expected to be learned purely from the data loss by the network.

The training objective of the PIGN combines the generative reconstruction loss with physics-based regularization terms. In addition to matching the target high-resolution realizations, the network is penalized for violating the SP equations and the imposed additional physical consistencies such as mass conservation and so on (if any). This enables the model to generate super-resolved realizations that remain consistent with the underlying cosmological dynamics while accurately reproducing the statistical properties of the simulated fields, whether for cosmological field evolution or super-resolution.

III Methods

III.1 Initial Conditions

Initial conditions are generated at z=127 (corrresponding to a scale factor of OPENa0.0078)a\approx 0.0078) using AxionCAMB (15) with an axion mass of m=2.5×1022m=2.5\times 10^{-22}eV, assuming all matter is axion dark matter. The resulting power spectra are passed to JaxPM11 1 https://github.com/DifferentiableUniverseInitiative/JaxPM, which generates particle positions and velocities using second-order Lagrangian Perturbation Theory (2LPT). A uniform-grid density field is then constructed via Cloud-in-Cell (CIC) interpolation of the displacement field. The 2LPT velocity field is used to initialise the phase of the wavefunction. Taking the divergence of Eq. (10) gives

2S=m𝐯,\nabla^{2}S=\frac{m}{\hbar}\nabla\cdot\mathbf{v}, (22)

which is a Poisson equation solved spectrally. The initial wavefunction is then fully determined by

|ψ(𝐱)|=ρm,|\psi(\mathbf{x})|=\sqrt{\frac{\rho}{m}}, (23)
arg(ψ(𝐱))=S=m𝐯(𝐱).\nabla\mathrm{arg}\left(\psi(\mathbf{x})\right)=\nabla S=\frac{m}{\hbar}\mathbf{v(x)}. (24)

III.2 Simulations

All our simulations were generated using the cosmological parameters Ωm=0.27\Omega_{m}=0.27, Ωb=0\Omega_{b}=0, ΩΛ=0.73\Omega_{\Lambda}=0.73, H0=100H_{0}=100 kms1Mpc1\textrm{km}\ \textrm{s}^{-1}\textrm{Mpc}^{-1} (h=1h=1; set to 1 so that units are in h1h^{-1}), and   σ8=0.8\sigma_{8}=0.8 with ICs as described in section III.1. Multiple realizations of the initial conditions at z = 127 were generated using different random seeds while fixing the underlying cosmology and initial matter power spectrum. The simulation box size is set to L=1h1MpcL=1\,h^{-1}\,\textrm{Mpc}, a scale at which contributions from the quantum pressure term are non-negligible and must be accounted for. All the simulations are generated using the Jaxion (38) code.

Normalization

The training of neural networks is significantly improved when the input variables are of order unity. As noted in several previous studies (43; 44; 4), the choice of normalization scheme plays a crucial role in accurately predicting cosmic fields and reproducing their statistical properties.

With ψ=R+iI\psi=\textrm{R}+i\,\textrm{I}, where R=Re(ψ)\textrm{R}=\operatorname{Re}(\psi) and I=Im(ψ)\textrm{I}=\operatorname{Im}(\psi), define D={R,I,V}D=\{\textrm{R},\textrm{I},V\} as the set of fields under consideration. Let DmaxD_{\mathrm{max}} and DminD_{\mathrm{min}} be the global maximum and minimum values computed over the entire dataset (training and test samples combined). We normalize each field through the following sequence of transformations:

D\displaystyle D sinh1(D),\displaystyle\rightarrow\sinh^{-1}(D), (25)
D\displaystyle D DDminDmaxDmin,\displaystyle\rightarrow\frac{D-D_{\mathrm{min}}}{D_{\mathrm{max}}-D_{\mathrm{min}}}, (26)
D\displaystyle D D0.50.5,\displaystyle\rightarrow\frac{D-0.5}{0.5}, (27)

such that the final normalized values satisfy D[1,1]D\in[-1,1].

Similarly, for the scale factor aa, we apply

a\displaystyle a log10(a),\displaystyle\rightarrow\log_{10}(a), (28)
a\displaystyle a aaminamaxamin,\displaystyle\rightarrow\frac{a-a_{\mathrm{min}}}{a_{\mathrm{max}}-a_{\mathrm{min}}}, (29)
a\displaystyle a a0.50.5,\displaystyle\rightarrow\frac{a-0.5}{0.5}, (30)

so that the normalized scale factor also lies in the interval [1,1][-1,1].

Training and Test split

For evolution task, a single realization of the initial condition was evolved from z = 127 (a0.0078a\approx 0.0078) to z = 5.36 (a0.1572a\approx 0.1572) with a Δa=105\Delta a=10^{-5} and the fine snapshots were stored only for the scale factors range a[0.149,0.157]a\in[0.149,0.157], which constitutes total of 796 snapshots out of which 20% (159 of them) are used for training and rest as the test samples. Thus, the training and test sets correspond to different scale factors from the same realization of the initial condition. Restricting the analysis to a narrow interval in scale factor allows the network to learn the local temporal evolution while providing a dense sampling of closely spaced states. Such a fine resolution is also essential for the simulations to produce a low enough (of the order 1) SP PDE residuals, in accordance with Eqs. (5 & 6). Each snapshot consists of the real and imaginary parts of the wavefunction ψ\psi along with a potential VV corresponding to a given scale factor aa.

For the super-resolution task, we create 80 different realizations of the initial FDM power spectrum. 80% of these are taken for training and 20 are reserved for testing. For each of those realization, the simulations were evolved from z = 127 to z= 11.45 (a0.0803a\approx 0.0803) with Δa=106\Delta a=10^{-6}, for improving the agreement of the numerical simulations with the PDE residuals, and the fine snapshots were stored only for a scale factors ranging amulti[0.0798,0.0803]a_{multi}\in[0.0798,0.0803] constituting 51 snapshots for each realization, giving us a total of 3264 snapshots for both training and test. Unlike the evolution task, the super-resolution model learns a mapping between low- and high-resolution fields at a fixed epoch rather than temporal evolution. Consequently, a large number of statistically independent realizations is more important than sampling a broad range of scale factors. The earlier redshift also reduces the computational cost associated with generating the high-resolution training data while retaining the characteristic FDM structures required for the reconstruction task. We evaluated several downsampling methods, each of which has its own limitations. The key consideration is to select one method and apply it consistently throughout the analysis. In our case, we use zoom22 2 SciPy ndimage.zoom documentation from scipy with order 1 and mode ‘nearest’.

III.3 Cosmo-SPINN

Refer to caption
Figure 1: Schematic of the Cosmo-SPINN framework applied to two tasks: (a) (left) Evolution Model, which predicts R,I,V (Re(Ψ)=R,Im(Ψ)=I\text{Re}(\Psi)=\text{R},\text{Im}(\Psi)=\text{I}) at a target scale factor a from the initial conditions, and (b) (right) Super-Resolution Model, which reconstructs high-resolution fields from low-resolution inputs at the same scale factor. In both cases, the outputs serve as approximate solutions to the SP system and are constrained through a combination of data and physics-informed losses. During training, the parameters θ\theta are iteratively optimized to obtain θ\theta^{*}, to generate the required cosmological cubes for wave function and the potential at the specified cosmological scale factor ‘aa

Here we introduce Cosmo-SPINN, a physics-informed generative framework for FDM inside the periodic cubic box of length L = 1h1\,h^{-1}Mpc. As illustrated in Fig. 1, the framework is applied to two related tasks: (i) the evolution of cosmological fields from initial conditions to a specified scale factor and (ii) the super-resolution of FDM simulations. In both cases, the network predicts the real and imaginary components of the wavefunction together with the gravitational potential while enforcing consistency with the underlying SP dynamics through a physics-informed loss function.

We use λ=/m\lambda=\hbar/m to simplify notation. Writing out the real and imaginary components of the wavefunction ψ\psi explicitly as ψ=Re(ψ)+iIm(ψ)=R+iI\psi=\text{Re}(\psi)+i\,\text{Im}(\psi)=\textrm{R}+i\,\textrm{I}, we can rewrite Eqs. (5 & 6) as:

t~R\displaystyle\partial_{\tilde{t}}\mathrm{R} =λ22I+1λV~I\displaystyle=-\frac{\lambda}{2}\nabla^{2}\mathrm{I}+\frac{1}{\lambda}\tilde{V}\,\mathrm{I} (31)
t~I\displaystyle\partial_{\tilde{t}}\mathrm{I} =λ22R1λV~R\displaystyle=\frac{\lambda}{2}\nabla^{2}\mathrm{R}-\frac{1}{\lambda}\tilde{V}\,\mathrm{R} (32)
2(V~/a)\displaystyle\nabla^{2}(\tilde{V}/a) =4πG(ρρ)\displaystyle=4\pi G(\rho-\langle\rho\rangle) (33)

As discussed in Section II.1, our choice to train the Cosmo-SPINN using the SP equations is motivated by their ability to capture the wave-like behavior inherent to FDM dynamics. Consequently, we adopt the SP formulation for training our physics-informed model. Specifically, we design the network to predict the real R\mathrm{R} and imaginary I\mathrm{I} components of the wavefunction Ψ\Psi, as well as the gravitational potential VV, which is treated as an auxiliary output rather than computed through direct numerical solution. This strategy can significantly reduce the computational cost with automatic differentiation by circumventing the need to solve Poisson’s equation at every training step, as this is typically solved with FFTs and computing the Fourier transform for an N×NN\times N grid requires 𝒪(N2logN)\mathcal{O}(N^{2}logN) operations and approximately 𝒪(N2)\mathcal{O}(N^{2}) memory, which can quickly be restrictive for larger grids such as in the super-resolution task. However, automatic differentiation requires the whole grid to be passed to the model which can be memory-intensive in case of a single GPU. As a result, we still resort to FFTs for derivatives’ calculations in our case.

We define a neural network G(X,θ)G(X;\theta) that predicts the real and imaginary components of the wavefunction together with the gravitational potential,

G(X,θ)=(Rθ(X),Iθ(X),Vθ(X)),\displaystyle G(X;\theta)=\left(\textrm{R}_{\theta}(X),\textrm{I}_{\theta}(X),V_{\theta}(X)\right), (34)

where ()θ(\cdot)_{\theta} denotes the approximation realized by the network parameters θ\theta. The precise form of the input XX depends on the task considered. For the evolution model, the input consists of the initial conditions together with a target scale factor,

Xevo=ψ(a0),V(a0),a,X_{\rm evo}={\psi(a_{0}),V(a_{0}),a},

and the network predicts the fields at scale factor aa. For the super-resolution model, the input consists of low-resolution fields and the corresponding scale factor,

XSR=ψLR(a),VLR(a),a,X_{\rm SR}={\psi_{\rm LR}(a),V_{\rm LR}(a),a},

and the network predicts the corresponding high-resolution fields. A schematic overview of both tasks is shown in Fig. 1. We predict real R\mathrm{R} and imaginary I\mathrm{I} parts of ψ\psi directly along with the potential VV. This approach ensures mass conservation and correct evolution, eliminating the need to explicitly implement a continuity equation.

The data loss is defined as the mean squared error (MSE) between the predicted and target fields,

data=1Nelemj=1Nelem(ypred,jytrue,j)2,\mathcal{L}_{\mathrm{data}}=\frac{1}{N_{\mathrm{elem}}}\sum_{j=1}^{N_{\mathrm{elem}}}\left(y_{{\rm pred},j}-y_{{\rm true},j}\right)^{2}, (35)

where y=(R,I,V)y=(\mathrm{R},\mathrm{I},V) contains the real and imaginary components of the wavefunction together with the gravitational potential, and NelemN_{\mathrm{elem}} is the total number of tensor elements (all spatial grid points and all field channels). The total loss is defined as

total=data+λwphysics,\mathcal{L}_{\mathrm{total}}=\mathcal{L}_{\mathrm{data}}+\lambda_{w}\,\mathcal{L}_{\mathrm{physics}}, (36)

where λw\lambda_{w} is a weighting coefficient, which is chosen such that both the losses contribute equally in the gradient space. We explore two formulations of the physics loss physics\mathcal{L}_{\mathrm{physics}}.

Method 1: PDE Residuals.

A batch of scale factors aa are drawn uniformly at random from the range spanned by the training data, namely a[0.149,0.157]a\in[0.149,0.157] for the evolution model and a[0.0798,0.0803]a\in[0.0798,0.0803] for the super-resolution model. The generator is queried at each sampled aa and at the corresponding a+Δaa+\Delta a, and the PDE residuals are evaluated from the predicted fields. For a (d+1)(d+1)-dimensional system, the residuals associated with Eqs. (31)–(33) are

R(X)\displaystyle\mathcal{R}_{\mathrm{R}}(X) =t~Rθ+λ2(i=1dxi2Iθ)aλVθIθ,\displaystyle=\partial_{\tilde{t}}\mathrm{R}_{\theta}+\frac{\lambda}{2}\!\left(\sum_{i=1}^{d}\partial_{x_{i}}^{2}\mathrm{I}_{\theta}\right)-\frac{a}{\lambda}V_{\theta}\,\mathrm{I}_{\theta}, (37)
I(X)\displaystyle\mathcal{R}_{\mathrm{I}}(X) =t~Iθλ2(i=1dxi2Rθ)+aλVθRθ,\displaystyle=\partial_{\tilde{t}}\mathrm{I}_{\theta}-\frac{\lambda}{2}\!\left(\sum_{i=1}^{d}\partial_{x_{i}}^{2}\mathrm{R}_{\theta}\right)+\frac{a}{\lambda}V_{\theta}\,\mathrm{R}_{\theta}, (38)
V(X)\displaystyle\mathcal{R}_{V}(X) =i=1dxi2Vθ4πG(ρρ).\displaystyle=\sum_{i=1}^{d}\partial_{x_{i}}^{2}V_{\theta}-4\pi G\left(\rho-\langle\rho\rangle\right). (39)

The Laplacians here are computed with the help of FFT methods and the time derivative is evaluated using first order finite difference method. The physics loss is then taken as the mean squared residual,

physics(1)=R2+I2+V2.\mathcal{L}_{\mathrm{physics}}^{(1)}=\left\langle\mathcal{R}_{\mathrm{R}}^{2}+\mathcal{R}_{\mathrm{I}}^{2}+\mathcal{R}_{V}^{2}\right\rangle. (40)
Method 2: Kick–Drift–Kick Approximation.

As in Method 1, a batch of scale factors aa are drawn uniformly at random from the corresponding training interval. The generator predicts a field at aa, which is then evolved forward by one step Δa\Delta a using a first-order approximation of the kick–drift–kick integrator. The generator is also queried directly at a+Δaa+\Delta a, and the physics loss is the residual between the two,

physics(2)=ψθ(a+Δa)Δa[ψθ(a)]2,\mathcal{L}_{\mathrm{physics}}^{(2)}=\left\langle\left\|\psi_{\theta}(a+\Delta a)-\mathcal{F}_{\Delta a}\!\left[\psi_{\theta}(a)\right]\right\|^{2}\right\rangle, (41)

where Δa\mathcal{F}_{\Delta a} denotes one step of the numerical integrator. Expanding each exponential operator in the KDK scheme to first order, eA^1+A^e^{\hat{A}}\approx 1+\hat{A}, the evolved wavefunction is approximated as

Δa[ψ]\displaystyle\mathcal{F}_{\Delta a}\!\left[\psi\right]\approx\; (1imΔt2aV(t+Δt,𝐱))\displaystyle\left(1-i\frac{m}{\hbar}\frac{\Delta t}{2a}V(t+\Delta t,\mathbf{x})\right)
×(1+i2mΔta22)\displaystyle\times\left(1+i\frac{\hbar}{2m}\frac{\Delta t}{a^{2}}\nabla^{2}\right)
×(1imΔt2aV(t,𝐱))ψ(t,𝐱).\displaystyle\times\left(1-i\frac{m}{\hbar}\frac{\Delta t}{2a}V(t,\mathbf{x})\right)\psi(t,\mathbf{x}). (42)

This linearisation yields a computationally tractable residual that enforces consistency between the generator output and the numerical integrator without requiring full operator exponentiation at training time. The solution is then realized by minimizing the total loss (data+λwphysics\mathcal{L}_{\textrm{data}}+\lambda_{w}\,\mathcal{L}_{\textrm{physics}}) through the optimization of the neural network defined by θ\theta:

θ=arg min𝜃(data+λwphysics)\displaystyle\theta^{*}=\underset{\theta}{\text{arg min}}\left(\mathcal{L}_{\textrm{data}}+\lambda_{w}\,\mathcal{L}_{\textrm{physics}}\right) (43)

We do not include any explicit constraints such as mass conservation, or periodic boundary conditions as these are obeyed when the network is sufficiently optimized.

The network training procedure largely follows that of conventional neural networks, employing automatic differentiation (2) to compute gradients and backpropagation (25) for parameter optimization. The key difference is the incorporation of an additional physics-informed loss term that enforces consistency with the governing equations.

Refer to caption Refer to caption
Figure 2: Training and test data losses (left) and normalized SP loss (right) for the evolution model. Training is performed using only the data loss for the first 250 epochs, after which the SP loss is added to the objective (vertical dotted line) and optimization continues for the remaining 2750 epochs. Solid and dashed curves denote the training and test losses (shown losses are smoothed with an exponential moving average to remove small-scale variability in the faint raw curves shown in the background), respectively, while the shaded regions indicate the train–test gap. Blue curves correspond to the data-only baseline, whereas orange curves correspond to the physics-informed model initialized from the same 250-epoch checkpoint. Incorporating the SP loss improves both the SP objective and the data reconstruction performance.

III.4 Architecture and Optimization

Both models share a common set of building blocks. Scalar conditions (scale factor aa) are encoded via a Fourier feature embedding,

γ(a)=[sin(2kπa),cos(2kπa)]k=0K12K,\gamma(a)=\left[\sin\!\left(2^{k}\pi\,a\right),\,\cos\!\left(2^{k}\pi\,a\right)\right]_{k=0}^{K-1}\in\mathbb{R}^{2K}, (44)

with K=8K=8, producing a 16-dimensional embedding that is passed through a two-layer MLP to yield a cc-dimensional conditioning vector (c = 64 for us). This vector is spatially broadcast and concatenated channel-wise to the input volume before the first convolution. Spatial feature extraction is performed by 3D ResNet blocks, each consisting of two 3×3×33\times 3\times 3 convolutions with LeakyReLU activations and a skip connection; when the number of channels changes, the skip connection uses a 1×1×11\times 1\times 1 convolution, otherwise it is the identity.

Evolution.

The evolution generator follows a U-Net-style encoder–decoder with skip connections. The input is a 3×6433\times 64^{3} field concatenated with the spatially expanded conditioning vector, giving a (3+c)×643(3+c)\times 64^{3} tensor. An initial 3×3×33\times 3\times 3 convolution projects this to 64 channels. The encoder applies one ResNet block at 64364^{3} resolution, followed by a strided convolution (stride=2\mathrm{stride}=2) to 32332^{3} with 128 channels, another ResNet block, a second strided convolution to 16316^{3} with 256 channels, and a final ResNet block. A two-block bottleneck at 16316^{3} further processes the feature map. The decoder mirrors the encoder: two transposed convolutions (stride=2\mathrm{stride}=2) progressively restore the resolution to 32332^{3} and 64364^{3}, with skip connections from the corresponding encoder stages concatenated channel-wise before each decoder ResNet block. A final ResNet block and 1×1×11\times 1\times 1 convolution produce a 3×6433\times 64^{3} correction δ\delta. The output is formed as a residual,

ψ^(a)=ψ(a0)+0.1δ,\hat{\psi}(a)=\psi(a_{0})+0.1\,\delta, (45)

so the network learns a small correction to the input field rather than predicting the full output from scratch.

Super-Resolution.

The super-resolution generator upsamples a low-resolution 3×3233\times 32^{3} input to 3×12833\times 128^{3}. The input is concatenated with the conditioning vector and projected to 64 channels by an initial convolution. Two ResNet blocks process the features at the input 32332^{3} resolution, after which two successive transposed convolutions (stride=2\mathrm{stride}=2) upsample to 64364^{3} and 1283128^{3}, each followed by two ResNet blocks at the new resolution. A 1×1×11\times 1\times 1 convolution produces the high-resolution residual, which is added to a trilinearly interpolated (×4\times 4) version of the low-resolution input,

ψ^HR=Interp×4[ψLR]+δHR,\hat{\psi}_{\mathrm{HR}}=\mathrm{Interp}_{\times 4}\!\left[\psi_{\mathrm{LR}}\right]+\delta_{\mathrm{HR}}, (46)

ensuring the coarse-scale structure is preserved while the network focuses on recovering fine-scale features.

Both networks are optimised using Adam (22) with a learning rate of 10410^{-4} and momentum parameters β1=0.9\beta_{1}=0.9, β2=0.999\beta_{2}=0.999. Evolution model is trained with a batch size of 16, while for the super-resolution network the 1283128^{3} output volume imposes significant memory demands, restricting training to a batch size of 2 on a single GPU. Both models are trained in two stages: an initial warm-up phase on the data loss data\mathcal{L}_{\mathrm{data}} alone, followed by a second phase in which the physics loss physics\mathcal{L}_{\mathrm{physics}} is added. For evolution network, the two stages span 250 and 2750 epochs respectively; for the super-resolution model, 20 and 60 epochs respectively.

IV Results

IV.1 Training Convergence and Physics Consistency of Models

Refer to caption Refer to caption
Figure 3: Evolution of the normalized physics loss for the super-resolution model. Left: physics loss based on the SP residual. Right: physics loss based on a first-order KDK approximation. Physics-informed training significantly reduces the losses on both the training and test sets. Solid and dashed lines denote the training and test sets, respectively (shown losses are smoothed with an exponential moving average with α\alpha= 0.1 to remove small-scale variability in the faint raw curves shown in the background). Blue curves correspond to models trained using only the data (MSE) loss, while orange curves correspond to models trained using the data loss together with the SP (left) or KDK (right) physics loss, introduced after epoch 20 (the first 20 epochs use only MSE data loss).

We first evaluate the convergence behaviour of the Evolution Model shown in Fig. 1 (left). Figure 2 shows the evolution of the training and test data losses (left panel) alongside the normalized SP loss (right panel). We consider two different traning strategies: (i) using only data loss, and (ii) using data loss and SP loss after epoch 250. After the physics-informed term is introduced at epoch 250, the optimization dynamics change as the network is required to satisfy both data fidelity and physical consistency. While the normalized SP loss decreases by nearly an order of magnitude for the physics-informed model, it remains nearly constant for the data-only baseline throughout the remainder of training, indicating that supervised optimization alone is insufficient to improve consistency with the underlying physical dynamics described by the SP equations. At the same time, both the training and test data loss continue to decrease while remaining comparable to those obtained using the data-only objective. Furthermore, the reduced train–test gap suggests that the SP constraint acts as a useful regularizer, guiding the model toward physically admissible solutions that also generalize better to unseen data.

The combined objective here is defined as

=data+α(t)λwSP,\displaystyle\mathcal{L}=\mathcal{L}_{\mathrm{data}}+\alpha(t)\,\lambda_{w}\,\mathcal{L}_{\mathrm{SP}}, (47)

where λw\lambda_{w} is an adaptive gradient-balancing factor that equalizes the gradient magnitudes of the data and SP losses, while α(t)\alpha(t) controls the overall strength of the physics constraint. Rather than introducing the physics loss abruptly, its contribution is gradually increased according to

α(t)=αmaxmin(1,tNramp),\displaystyle\alpha(t)=\alpha_{\max}\min\left(1,\frac{t}{N_{\mathrm{ramp}}}\right), (48)

where αmax=0.02\alpha_{\max}=0.02 and Nramp=1000N_{\mathrm{ramp}}=1000 epochs. This warm-up strategy allows the network to first learn an accurate data-driven representation before progressively enforcing the physical constraint, thereby avoiding the optimization instabilities associated with suddenly introducing a strong additional objective.

Although the adaptive weighting balances the optimization in gradient space, the SP loss remains a considerably stronger constraint since it is evaluated in physical space and directly enforces the underlying nonlinear dynamics. Moreover, the evolution model is trained using a single realization of the initial conditions, for which 796 simulation snapshots are available over the interval a[0.0798, 0.0803]a\in[0.0798,\,0.0803]. Only 20%20\% of these redshifts are used for supervised training, whereas the SP loss is evaluated on randomly sampled redshifts spanning the entire interval. Consequently, the physics objective constrains a substantially larger portion of the evolution than the supervised data loss. Without the additional scaling and gradual ramp-up, the optimization becomes biased toward satisfying the governing equations at the expense of accurately reconstructing the available training snapshots. We therefore set αmax=0.02\alpha_{\max}=0.02, which provides a suitable balance between physical consistency and data fidelity. Empirically, larger values of αmax\alpha_{\max} further reduce the SP residual and improve the test loss, but lead to a noticeable deterioration in the reconstruction of the training data.

Unlike first-order time-stepping constraints such as KDK, the SP loss directly constrains the underlying dynamics rather than enforcing agreement over a single numerical integration step. Our objective is therefore to incorporate the full physical dynamics into the learning process whenever possible. Nevertheless, the increased complexity of the SP constraint makes the optimization more challenging, motivating us to investigate alternative formulations of the physics loss for more demanding learning tasks.

Refer to caption
Figure 4: Evolution Model: Comparison of the ground-truth and predicted projected fields |R|z\langle|R|\rangle_{z}, |I|z\langle|I|\rangle_{z}, and density logρz10{}_{10}\langle\rho\rangle_{z} at scale factor a=0.156, obtained by averaging the corresponding 64364^{3} fields along the zz-axis. Columns show the initial condition, reference solution, neural-network prediction, and residual (prediction-truth). The predicted wavefunction components and density closely match the reference solution, with residuals primarily confined to dense filamentary structures and other small-scale features.

We therefore compare two different formulations of the physics loss for the super-resolution model shown in Fig. 1 (right): the SP residual and a first-order KDK approximation, as described in Section III.3. Unlike the evolution model, no additional scaling parameter α\alpha is introduced in this case. The super-resolution model is trained using all available redshifts, with the train–test split performed over independent realizations rather than temporal snapshots. Consequently, both the supervised and physics losses are evaluated over the same range of redshifts, eliminating the imbalance present in the evolution model. Our objective here is therefore to investigate whether an appropriate formulation of the physics loss can provide stable optimization without requiring an additional stabilization parameter such as α\alpha.

For this, the super-resolution model is first trained for the initial 20 epochs using only the MSE data loss before introducing the respective physics losses. A baseline model trained with only MSE objective (data loss) is also included to isolate the effect of the physical regularization, as illustrated in Fig. 3 with the blue curves. Figure 3 shows the evolution of the normalized SP (left panel) and KDK (right panel) losses for both the baseline model (blue curves) and the physics-informed model (orange curves), with training (solid) and test (dashed) curves shown for each. In both cases, the inclusion of the physics loss leads to a significant reduction in the normalized physics losses on both the training and test sets, demonstrating that the model learns solutions that better satisfy the underlying dynamics. However, the two formulations of the physics loss exhibit noticeably different convergence behaviour. For the SP-based loss, the training residual decreases steadily, but after approximately 40 epochs the test residual begins to diverge from the training residual, regardless of whether the physics loss is included. The primary effect of the physics loss in this case is to reduce the overall magnitude of the residual rather than eliminate the growing train–test gap. This behaviour likely reflects the increased complexity of the coupled SP equations. In contrast, the KDK-based constraint produces a much smoother and more stable convergence. The training and test residuals closely track one another throughout training, indicating improved stability and better generalization to unseen realizations and redshift slices. Although the final training loss is slightly higher than that obtained with the SP formulation, the smaller train–test gap suggests that the KDK approximation provides a more robust physics regularization for this super-resolution task.

Overall, both approaches improve the physical consistency of the generated fields relative to the data-only model. The SP residual achieves a larger reduction in the physics error, while the KDK formulation yields more stable training and better agreement between training and test performance.

IV.2 Assessment of the test samples (Visual inspection and power spectrum)

We now assess the performance of both models on unseen test data. We first examine the evolution model, evaluating its ability to reproduce the wavefunction and density fields. Additional results demonstrating its generalization to previously unseen realizations of the initial conditions are presented in Appendix B. We then consider the super-resolution model, which constitutes the primary contribution of this work, comparing reconstructions obtained using the SP-residual and KDK-based physics losses (throughout the remainder of this section, we denote the super-resolution model trained with the SP-residual loss as the SP model and the model trained with the KDK-based loss as the KDK model). All super-resolution results presented in this section are obtained using the model checkpoints selected according to the minimum physics test loss during training shown in Fig. 3. Note that, while all models used in this work were trained on the training set discussed in Section III.2, the snapshots presented here were taken from the reserved test set. That is, the simulation data used to produce the plots that follow were not used to train any of the models.

IV.2.1 Evolution Model

Evolution Test Samples

Figure 4 demonstrates that the evolution model accurately reproduces the projected wavefunction components, |R|z\langle|R|\rangle_{z} and |I|z\langle|I|\rangle_{z}, as well as the projected density field, log10(ρz)\log_{10}(\langle\rho\rangle_{z}), at a=0.156a=0.156. The predicted fields closely match the reference solution, successfully capturing the filamentary network and high-density structures. The residual maps show that the vast majority of pixels remain within a 5%\sim 5\% error level, while the largest deviations are confined to a small number of isolated pixels associated with dense, rapidly varying structures. Even in these regions, the residuals remain below 10%\sim 10\%. Such localized discrepancies are expected due to the nonlinear relation ρR2+I2\rho\propto\textrm{R}^{2}+\textrm{I}^{2} and the increased sensitivity of high-density regions to small prediction errors. Overall, the model preserves both the large-scale structure and the small-scale features of the underlying SP solution with high accuracy. Despite being trained on only 20%\sim 20\% of the available temporal snapshots, the model accurately reproduces the power spectrum across the full training redshift range. The mean relative power-spectrum error remains typically at the 151520%20\% level and below 30%\sim 30\% for most scale factors (Appendix A), indicating stable temporal interpolation and consistent recovery of the underlying dynamics. Further, when trained on multiple realizations, it accurately recovers large scale morphology for unseen test realizations as shown in Appendix B, Fig. (9) but suffers in reproducing the small-scale features for all high k modes.

Refer to caption
Figure 5: Examples of super-resolution density fields generated by the model trained with the SP physics loss for the unseen test realizations. The corresponding scale factors are (from top to bottom) a \approx 0.08039, 0.08042, 0.08043, and 0.08039. The input low-resolution fields (32332^{3}, LR), generated super-resolved fields (1283128^{3}, SR), and target high-resolution fields (1283128^{3}, HR) are shown as density projections along the z-axis on a logarithmic scale. Insets show zoomed-in regions. The right panels compare the dimensionless power spectra k3P(k)k^{3}P(k) of the LR, SR, and HR fields, while the lower panels show the fractional error (PSR/PHR1P_{SR}/P_{HR}-1). The vertical red line marks the Jeans-scale wavenumber. The model recovers small-scale structure beyond the input resolution and roughly reproduces the target power spectrum over a wide range of scales, except with some discrepancy at small scales
Refer to caption
Figure 6: Examples of super-resolution density fields generated by the model trained with the first-order KDK approx. for the unseen test realizations. The corresponding scale factors are (from top to bottom) aa\approx 0.08043, 0.08039, 0.08042, and 0.08039. The input low-resolution fields (32332^{3}, LR), generated super-resolved fields (1283128^{3}, SR), and target high-resolution fields (1283128^{3}, HR) are shown as density projections along the z-axis on a logarithmic scale. Insets show zoomed-in regions. The right panels compare the dimensionless power spectra k3P(k)k^{3}P(k) of the LR, SR, and HR fields, while the lower panels show the fractional error (PSR/PHR1P_{SR}/P_{HR}-1). The vertical red line marks the Jeans-scale wavenumber. The model recovers small-scale structure beyond the input resolution and roughly reproduces the target power spectrum over a wide range of scales, except with some discrepancy at small scales

IV.2.2 Super-Resolution Model

SR Test Samples

Figures 5 and 6 compare super-resolution (SR) reconstructions obtained using the SP physics loss and the first-order KDK approximation, respectively. The corresponding dimensionless power spectra, (OPENΔ(k)=k3P(k))\Delta(k)=k^{3}P(k)), are also shown for the considered test realizations at the selected redshift. The spectra are plotted up to the Nyquist frequency of the grid (402hMpc1\simeq 402\,\textrm{h}\,\mathrm{Mpc}^{-1}), including the LR fields. We also indicate the Jeans wavenumber computed using Eq. 13, (kJ240hMpc1k_{J}\simeq 240\,\textrm{h}\,\mathrm{Mpc}^{-1}), which marks the scale where quantum pressure becomes important. For (k<kJk<k_{J}), gravity dominates the evolution. The fundamental mode is (kf6hMpc1)(k_{f}\simeq 6\,\textrm{h}\,\mathrm{Mpc}^{-1}), implying that approximately 60% of the resolved modes (kf<k<kJk_{f}<k<k_{J}) lie in the gravity-dominated regime. Also, the linear power spectrum is constructed using the approximate transfer function T(K) given by 16:

T(k)=cosxJ31+xJ8T(k)=\frac{\cos{x_{J}^{3}}}{1+x_{J}^{8}}

where,

xJ=1.61m22kkJ,eq;kJ,eq=9m221/2Mpc1;\displaystyle x_{J}=1.61m_{22}\,\frac{k}{k_{J,eq}};k_{J,eq}=9m_{22}^{1/2}\,\textrm{Mpc}^{-1}\,;\,
m22=m/1022eV\displaystyle m_{22}=m/10^{-22}eV

where m=2.5m=2.5 in our implementation. Along with T(k), we also use the initial power spectrum PicP_{ic} and obtain the linear power spectrum at corresponding scale factor ‘aa’ as Plin=(a/a0)2T(k)2PicP_{lin}=(a/a_{0})^{2}\,T(k)^{2}\,P_{ic}. Both models recover small-scale structures absent from the low-resolution input and reproduce the large-scale morphology of the target high-resolution fields. However, several systematic differences emerge in both the reconstructed density fields and their statistical properties.

Visually, both models recover the main filamentary network, with good agreement in the locations of filaments, nodes, and voids. The SP model produces sharper filaments and higher-contrast density peaks, particularly around compact overdense regions. The zoomed-in regions also reveal a richer small-scale texture. Meanwhile, the KDK model yields smoother reconstructions, with broader filaments and less pronounced density fluctuations. This difference likely reflects the stronger physical constraints imposed by the full SP dynamics, which retain information associated with small-scale density gradients.

The power spectra provide a quantitative assessment of these visual differences. For both models, the SR spectra closely match the HR spectra over a broad range of wavenumbers, demonstrating successful recovery of power beyond the LR resolution limit. However, for the representative realizations shown here, the SP model provides a closer match at high-kk, remaining consistent with the HR spectrum up to scales approaching kJk_{J}. The KDK model exhibits a modest suppression of power at high-kk, consistent with the smoother appearance of the reconstructed fields. While the network accurately reconstructs the large-scale wavefunction, small errors in the real and imaginary components are amplified by the derivative-dependent quantum pressure term. Consequently, discrepancies become most apparent in the quantum-pressure-dominated regime, (kkJ)(k\gtrsim k_{J}), where the reconstructed spectra begin to deviate from the HR target.

Refer to caption Refer to caption
Figure 7: Mean fractional power-spectrum error, (PSR/PHR1)(P_{\rm SR}/P_{\rm HR}-1), across the test realizations at the mid-scale factor a0.08041a\approx 0.08041. The shaded regions denote the corresponding 1σ1\sigma scatter across realizations. Left: SR model trained with the SP-residual based physics loss. Right: SR model trained with the first-order KDK-based physics loss.

These observations can be interpreted in terms of the physics losses shown in Fig. 3. Although the SP model exhibits a larger test loss than the KDK model, it more accurately reproduces the high-kk power spectrum in the representative examples shown here. The two physics objectives emphasize different aspects of the reconstruction: the SP loss directly minimizes the square of the SP residual, whereas the KDK loss minimizes an MSE between the generated SR sample and its corresponding first-order KDK-evolved target. The latter yields smoother reconstructions, resulting in a modest suppression of power at the highest wavenumbers.

The fractional power-spectrum errors further highlight this difference. For the SP model, (PSR/PHR1)(P_{\rm SR}/P_{\rm HR}-1) remains close to zero over most of the resolved range, indicating little systematic bias. The KDK model instead shows a more pronounced negative bias at intermediate and high wavenumbers, corresponding to an underprediction of small-scale power. Such behaviour is expected when the reconstruction favours smoother solutions and suppresses high-frequency fluctuations.

The SP model also consistently exhibits small power-spectrum errors across the shown test realizations. The KDK model shows slightly larger realization-to-realization variation, suggesting that the weaker physical constraints allow greater sensitivity to individual field realizations.

Overall, the models produce physically plausible high-resolution density fields and recover most of the missing small-scale information. However, the SP-trained model consistently provides a closer match to the HR targets in consideration, yielding sharper structures, improved recovery of high-kk power, and smaller systematic errors. These results indicate that incorporating the full SP dynamics improves the reconstruction of small-scale features compared to the first-order KDK approximation.

Power-spectrum statistics across test realizations

Figure 7 shows the mean fractional power-spectrum error, (PSR/PHR1P_{SR}/P_{HR}-1), averaged over the test realizations, together with the corresponding 1σ\sigma scatter. Both models reproduce the target power spectrum accurately over a broad range of wavenumbers, with mean errors remaining close to zero on large and intermediate scales. The scatter increases toward high-kk, reflecting the increasing difficulty of reconstructing structures below the resolution limit of the LR input.

The SP-based model (left panel) exhibits a small positive bias at high wavenumbers, indicating a tendency to slightly overpredict small-scale power. This behaviour is accompanied by a larger realization-to-realization scatter, suggesting that the model reconstructs additional high-frequency structure whose amplitude varies between realizations. By comparison, the KDK-based model (right panel) remains closer to zero over most of the resolved range and shows a smaller systematic bias, although it develops a mild suppression of power at intermediate scales before rising at the highest kk.

A notable difference is the dispersion of the error curves. The SP model displays a broader distribution at high wavenumbers, whereas the KDK model exhibits a more compact scatter. Unlike the representative samples shown in Figs. 5 and 6, which illustrate individual realizations where the SP model more closely matches the high-kk power spectrum, the ensemble statistics reveal that the SP model exhibits both a larger positive bias and greater realization-to-realization variance across the full test set. This behaviour is consistent with the optimization histories shown in Fig. 3. The SP-residual loss is more challenging to optimize, resulting in a larger test physics loss throughout training. The increased optimization difficulty is reflected in the ensemble power-spectrum statistics through larger bias and variability in the reconstructed small-scale power. By comparison, the KDK loss provides a more stable optimization objective, yielding smoother reconstructions with smaller bias and reduced variance across the test set.

Overall, both models recover the target power spectrum with good accuracy up to k100hMpc1k\simeq 100\,\textrm{h}\,\mathrm{Mpc}^{-1} . The SP model captures more small-scale power but at the cost of larger variance between realizations, whereas the KDK model yields slightly more stable predictions while tending to smooth the smallest resolved structures.

V Discussion and Future Directions

V.1 Validity of Initial Conditions

In most FDM simulations, initial conditions are generated exactly as described in this paper: first, the power spectrum is constructed using AxionCAMB for the given axion mass, then the initial conditions are usually obtained from the N-body particle distribution via density assignment such as the cloud-in-cell algorithm. The second step is especially convenient due to the availaibility of public codes (such as JaxPM for our case) for an arbitrary power spectrum.

However, this is not an ideal way to generate the initial conditions for field-based simulations. The reasons are twofold: first, the velocities of these N-body particles are typically computed using 2LPT method or Zeldovich approximation which are suited for CDM perturbations and secondly, converting from positions and velocities to fields incur some mesh error for FDM simulations. In this study, we nevertheless adopt this conventional particle-based initialization procedure because of its straightforward implementation and because we wanted to evaluate the performance of the ML models used here in regard to the inclusion of physics loss. In future work, we plan to generate more reliable initial conditions, following the methodology presented in the appendix of 30.

V.2 Unsupervised Learning

The approach adopted in this work is semi-supervised, combining simulation-derived ground-truth data with physics-based constraints during training. A natural question is whether accurate cosmological simulations can be learned solely from the governing physical laws, without any supervised data. For relatively simple systems, such as gravitational evolution of a single Fourier-mode density perturbation, our previous work on SPINN demonstrated that fully physics-driven learning is feasible. However, extending this approach to realistic cosmological settings, characterized by complex initial conditions, an expanding background, and long evolutionary timescales, remains challenging. In these regimes, the optimization landscape becomes highly non-convex, and current optimization strategies are often insufficient for training fully unsupervised PINNs. An autoregressive framework that predicts the system evolution one step at a time using only physical constraints could be a promising alternative, though controlling the accumulation of errors over long time horizons would be a significant challenge.

V.3 Alternative super-resolution training

Our implementation of the super-resolution task relies on high-resolution (HR) FDM numerical simulations for the training objective. However, these simulations become prohibitively computationally expensive with increasing box sizes. An alternative is to train a generative model using only the physics loss (without any data loss), which leaves the solution space largely unconstrained and allows the network to generate multiple high-resolution realizations that satisfy the governing physics, rather than converging to a unique solution. Including a low-resolution data loss would further constrain the admissible solution space by requiring the generated high-resolution fields, when downsampled, to agree with the corresponding low-resolution inputs. The primary challenge is that these two losses often define competing optimization objectives, resulting in conflicting gradient updates that can hinder convergence and lead to suboptimal solutions.

VI Conclusion

In this work, we present the first physics-informed generative framework for FDM simulations that explicitly incorporates the underlying physical dynamics during training. The framework addresses two complementary tasks: the evolution of cosmological fields from initial conditions to a target scale factor and the super-resolution of FDM simulations. Across both tasks, incorporating physics-informed losses consistently improves the physical fidelity of the generated fields.

For the evolution task, the model predicts the wavefunction and gravitational potential at a target redshift from realistic cosmological initial conditions in a 1h1Mpc1\,h^{-1}\,\mathrm{Mpc} periodic cosmological box. We demonstrate that incorporating the SP physics loss substantially reduces the amount of training data required while accurately reproducing the reference simulations generated using a second-order KDK pseudo-spectral solver. The model remains stable throughout the trained redshift interval despite being trained on only 20% of the available snapshots within the corresponding redshift range. An important advantage of the evolution model is that it eliminates the need to store the densely sampled intermediate snapshots of FDM simulations, which can require several terabytes of storage for large-scale simulations.

For the super-resolution task, we trained generative models using both the SP-residual and KDK-based physics losses. Both models accurately recover the target power spectrum up to k100hMpc1k\simeq 100\,h\,\mathrm{Mpc}^{-1}, with mean power-spectrum errors below 20% for most Fourier modes on previously unseen test realizations. While the SP model more faithfully preserves small-scale power and wave-interference structures, the KDK model produces smoother and more stable reconstructions at the expense of suppressing the smallest resolved scales. These results demonstrate that physics-informed training substantially improves the physical fidelity of generative super-resolution models for FDM.

Extending the present framework to larger simulation volumes and longer evolutionary times constitutes a natural next step. However, large-scale FDM simulations are unavailable because pseudo-spectral SP solvers require increasingly high spatial resolution to accurately resolve small-scale wave dynamics. While the inclusion of physics-informed losses appears to improve the quality of the reconstruction with limited high-resolution training data, further investigation is needed to determine whether this dependence can be eliminated entirely. Achieving this would enable low-resolution pseudo-spectral simulations to serve as the training data, with the generative model recovering the unresolved small-scale structure through the governing SP physics.

Looking beyond the current framework, neural operators provide a promising direction for further improving the scalability of physics-informed FDM emulators. In particular, autoregressive neural operator architectures, combined with appropriate physical constraints, may provide an efficient framework for learning the evolution of cosmological fields directly from the initial conditions while maintaining physical consistency. Future work will therefore investigate the integration of neural operators with physics-informed generative modeling, together with physically consistent cosmological initial conditions, to extend Cosmo-SPINN to substantially larger spatial domains and longer evolutionary times.

Acknowledgments

The authors acknowledge financial support from the SNSF under the Starting Grant project Deep Waves (218396). The authors thank Philip Mocz for his valuable discussions during the project, especially for the generation of initial conditions. This work was supported by the use of the facilities of the Swiss National Supercomputing Centre (CSCS) under project sk029, and by the Swiss State Secretariat for Education, Research and Innovation (SERI) through the Swiss SKA Regional Centre (SKACH) Consortium.

Code Availability

All models are implemented in PyTorch (39), and are trained separately on a single NVIDIA Grace Hopper GH200 GPU. Code for this work (along with the scripts to produce the plots) is publicly available on Github at the following address: (DeepWaves.Cosmo-SPINN).

References

  • Arvanitaki et al. (2010) A. Arvanitaki, S. Dimopoulos, S. Dubovsky, N. Kaloper, and J. March-Russell String axiverse. Phys. Rev. D 81 (12), pp. 123530. External Links: Document, 0905.4720 Cited by: §I, §II.1.
  • Baydin et al. (2018) A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind Automatic differentiation in machine learning: a survey. Journal of Machine Learning Research 18 (153), pp. 1–43. External Links: Link Cited by: §III.3.
  • Bernardeau et al. (2002) F. Bernardeau, S. Colombi, E. Gaztañaga, and R. Scoccimarro Large-scale structure of the Universe and cosmological perturbation theory. Physics Reports 367 (1-3), pp. 1–248. External Links: Document, astro-ph/0112551 Cited by: §II.1.
  • Bernardini et al. (2022) M. Bernardini, R. Feldmann, D. Anglés-Alcázar, M. Boylan-Kolchin, J. Bullock, L. Mayer, and J. Stadel From ember to fire: predicting high resolution baryon fields from dark matter simulations with deep learning. Monthly Notices of the Royal Astronomical Society 509 (1), pp. 1323–1341. External Links: ISSN 0035-8711, Document, Link, https://academic.oup.com/mnras/article-pdf/509/1/1323/41146951/stab3088.pdf Cited by: §III.2.
  • Chen et al. (2017) S. Chen, H. Schive, and T. Chiueh Jeans analysis for dwarf spheroidal galaxies in wave dark matter. Monthly Notices of the Royal Astronomical Society 468 (2), pp. 1338–1348. External Links: ISSN 0035-8711, Document, Link, https://academic.oup.com/mnras/article-pdf/468/2/1338/11126918/stx449.pdf Cited by: §I.
  • Cirelli et al. (2024) M. Cirelli, A. Strumia, and J. Zupan Dark Matter. arXiv e-prints, pp. arXiv:2406.01705. External Links: Document, 2406.01705 Cited by: §I.
  • Crumrine et al. (2026) W. Crumrine, D. Pang, E. O. Nadler, A. Benson, and V. Gluscevic Mixed Dark Matter: Limits from the Milky Way Satellite Galaxies. arXiv e-prints, pp. arXiv:2606.10006. External Links: Document, 2606.10006 Cited by: §I.
  • Dai and Seljak (2021) B. Dai and U. Seljak Learning effective physical laws for generating cosmological hydrodynamics with lagrangian deep learning. Proceedings of the National Academy of Sciences 118 (16), pp. e2020324118. External Links: Document, Link, https://www.pnas.org/doi/pdf/10.1073/pnas.2020324118 Cited by: §I.
  • De Martino et al. (2020) I. De Martino, T. Broadhurst, S.-H. Henry Tye, T. Chiueh, and H. Schive Dynamical evidence of a dark solitonic core of 109m⊙ in the milky way. Physics of the Dark Universe 28, pp. 100503. External Links: ISSN 2212-6864, Document, Link Cited by: §I.
  • Eberhardt and Ferreira (2025) A. Eberhardt and E. G. M. Ferreira Ultralight fuzzy dark matter review. arXiv e-prints, pp. arXiv:2507.00705. External Links: Document, 2507.00705 Cited by: §I.
  • Faroughi et al. (2022) S. A. Faroughi, N. Pawar, C. Fernandes, M. Raissi, S. Das, N. K. Kalantari, and S. Kourosh Mahjour Physics-Guided, Physics-Informed, and Physics-Encoded Neural Networks in Scientific Computing. arXiv e-prints, pp. arXiv:2211.07377. External Links: Document, 2211.07377 Cited by: §I.
  • Ferreira (2021) E. G. M. Ferreira Ultra-light dark matter. A&A Rev. 29 (1), pp. 7. External Links: Document, 2005.03254 Cited by: §I.
  • Goldstein et al. (2022) I. S. Goldstein, S. M. Koushiappas, and M. G. Walker Viability of ultralight bosonic dark matter in dwarf galaxies. Phys. Rev. D 106 (6), pp. 063010. External Links: Document, 2206.05244 Cited by: §I.
  • He et al. (2019) S. He, Y. Li, Y. Feng, S. Ho, S. Ravanbakhsh, W. Chen, and B. Póczos Learning to predict the cosmological structure formation. Proceedings of the National Academy of Sciences 116 (28), pp. 13825–13832. External Links: Document, Link, https://www.pnas.org/doi/pdf/10.1073/pnas.1821458116 Cited by: §I.
  • Hlozek et al. (2015) R. Hlozek, D. Grin, D. J. E. Marsh, and P. G. Ferreira A search for ultralight axions using precision cosmological data. Phys. Rev. D 91 (10), pp. 103512. External Links: Document, 1410.2896 Cited by: §III.1.
  • Hu et al. (2000) W. Hu, R. Barkana, and A. Gruzinov Fuzzy cold dark matter: the wave properties of ultralight particles. Phys. Rev. Lett. 85, pp. 1158–1161. External Links: Document, Link Cited by: §II.1, §IV.2.2.
  • Hui et al. (2017) L. Hui, J. P. Ostriker, S. Tremaine, and E. Witten Ultralight scalars as cosmological dark matter. Phys. Rev. D 95 (4), pp. 043541. External Links: Document, 1610.08297 Cited by: §I.
  • Hui (2021) L. Hui Wave Dark Matter. ARA&A 59, pp. 247–289. External Links: Document, 2101.11735 Cited by: §I, §II.1, §II.1.
  • Johnston et al. (2026) S. C. Johnston, S. May, T. Dome, S. Bose, A. Basden, C. Baugh, A. Fialkov, and A. Tocher Halo mass functions in mixed cold and fuzzy dark matter models. arXiv e-prints, pp. arXiv:2606.06599. External Links: Document, 2606.06599 Cited by: §I.
  • Jones et al. (2021) D. Jones, S. Palatnick, R. Chen, A. Beane, and A. Lidz Fuzzy Dark Matter and the 21 cm Power Spectrum. ApJ 913 (1), pp. 7. External Links: Document, 2101.07177 Cited by: §I.
  • Kaushal et al. (2022) N. Kaushal, F. Villaescusa-Navarro, E. Giusarma, Y. Li, C. Hawry, and M. Reyes NECOLA: toward a universal field-level cosmological emulator. The Astrophysical Journal 930 (2), pp. 115. External Links: Document, Link Cited by: §I.
  • Kingma and Ba (2014) D. P. Kingma and J. Ba Adam: A Method for Stochastic Optimization. arXiv e-prints, pp. arXiv:1412.6980. External Links: Document, 1412.6980 Cited by: §III.4.
  • Kodi Ramanah et al. (2020) D. Kodi Ramanah, T. Charnock, F. Villaescusa-Navarro, and B. D. Wandelt Super-resolution emulator of cosmological simulations using deep physical models. MNRAS 495 (4), pp. 4227–4236. External Links: Document, 2001.05519 Cited by: §I.
  • Kunkel et al. (2024) A. Kunkel, H. Y. Jowett Chan, H. Schive, H. Huang, and P. Liao A Hybrid Scheme for Fuzzy Dark Matter Simulations Combining the Schrödinger and Hamilton-Jacobi-Madelung Equations. arXiv e-prints, pp. arXiv:2411.17288. External Links: Document, 2411.17288 Cited by: §I.
  • Lecun et al. (2015) Y. Lecun, Y. Bengio, and G. Hinton Deep learning. Nature 521 (7553), pp. 436–444 (English (US)). Note: Publisher Copyright: © 2015 Macmillan Publishers Limited. All rights reserved. External Links: Document, ISSN 0028-0836 Cited by: §III.3.
  • Li et al. (2019) X. Li, L. Hui, and G. L. Bryan Numerical and perturbative computations of the fuzzy dark matter model. Phys. Rev. D 99 (6), pp. 063509. External Links: Document, 1810.01915 Cited by: §II.1.
  • Li et al. (2021) Y. Li, Y. Ni, R. A. C. Croft, T. Di Matteo, S. Bird, and Y. Feng AI-assisted superresolution cosmological simulations. Proceedings of the National Academy of Science 118 (19), pp. e2022038118. External Links: Document, 2010.06608 Cited by: §I.
  • Linka et al. (2022) K. Linka, A. Schäfer, X. Meng, Z. Zou, G. E. Karniadakis, and E. Kuhl Bayesian physics informed neural networks for real-world nonlinear dynamical systems. Computer Methods in Applied Mechanics and Engineering 402, pp. 115346. Note: A Special Issue in Honor of the Lifetime Achievements of J. Tinsley Oden External Links: ISSN 0045-7825, Document, Link Cited by: §I.
  • Lujan et al. (2025) N. Lujan, K. Gebhardt, R. Anantua, O. Chase, M. H. Debski, C. Finley, L. V. Gomez, O. Gupta, A. J. Lawson, I. Marron, Z. Martinez, C. A. Painter, Y. Sklansky, and H. West Modeling the “dark-matter dominated” dwarf galaxy segue 1 with a supermassive black hole. The Astrophysical Journal Letters 992 (2), pp. L25. External Links: Document, Link Cited by: §I.
  • Luu et al. (2025) H. N. Luu, P. Mocz, M. Vogelsberger, A. Pozo, T. Broadhurst, S.-H. H. Tye, T. Liu, L. W. H. Fung, G. F. Smoot, R. Emami, and L. Hernquist Diverse dark matter haloes in two-field fuzzy dark matter. Phys. Rev. D 111 (12), pp. L121302. External Links: Document, 2408.00827 Cited by: §V.1.
  • Madelung (1927) E. Madelung Quantentheorie in hydrodynamischer Form. Zeitschrift fur Physik 40 (3-4), pp. 322–326. External Links: Document Cited by: §II.1.
  • Marsh (2015) D. J. E. Marsh Axion Cosmology. arXiv e-prints, pp. arXiv:1510.07633. External Links: Document, 1510.07633 Cited by: §II.1.
  • Martel and Shapiro (1998) H. Martel and P. R. Shapiro A convenient set of comoving cosmological variables and their application. Monthly Notices of the Royal Astronomical Society 297 (2), pp. 467–485. External Links: ISSN 0035-8711, Document, Link, https://academic.oup.com/mnras/article-pdf/297/2/467/3104721/297-2-467.pdf Cited by: §II.1.
  • May et al. (2025) S. May, N. Dalal, and A. Kravtsov Updated bounds on ultra-light dark matter from the tiniest galaxies. arXiv e-prints, pp. arXiv:2509.02781. External Links: Document, 2509.02781 Cited by: §I.
  • May and Springel (2021) S. May and V. Springel Structure formation in large-volume cosmological simulations of fuzzy dark matter: impact of the non-linear dynamics. MNRAS 506 (2), pp. 2603–2618. External Links: Document, 2101.01828 Cited by: §I.
  • Mishra and Tolley (2025) A. K. Mishra and E. Tolley SPINN: Advancing Cosmological Simulations of Fuzzy Dark Matter with Physics Informed Neural Networks. ApJ 988 (1), pp. 114. External Links: Document, 2506.02957 Cited by: §I.
  • Mocz et al. (2017) P. Mocz, M. Vogelsberger, V. H. Robles, J. Zavala, M. Boylan-Kolchin, A. Fialkov, and L. Hernquist Galaxy formation with becdm – i. turbulence and relaxation of idealized haloes. Monthly Notices of the Royal Astronomical Society 471 (4), pp. 4559–4570. External Links: ISSN 0035-8711, Document, Link, https://academic.oup.com/mnras/article-pdf/471/4/4559/19609125/stx1887.pdf Cited by: §I, §II.1, §II.2.
  • Mocz (2025) Jaxion External Links: Document, Link Cited by: §III.2.
  • Paszke et al. (2019) A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Köpf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala PyTorch: An Imperative Style, High-Performance Deep Learning Library. arXiv e-prints, pp. arXiv:1912.01703. External Links: Document, 1912.01703 Cited by: §I, Code Availability.
  • Schive et al. (2014) H. Schive, T. Chiueh, and T. Broadhurst Cosmic structure as the quantum interference of a coherent dark wave. Nature Physics 10 (7), pp. 496–499. External Links: Document, 1406.6586 Cited by: §I, §I.
  • Schive (2026) H. Schive Fuzzy dark matter simulations. Living Reviews in Computational Astrophysics 12 (1), pp. 1. External Links: Document, 2509.23231 Cited by: §I.
  • Sipp et al. (2023) M. Sipp, P. LaChance, R. Croft, Y. Ni, and T. Di Matteo Towards super-resolution simulations of the fuzzy dark matter cosmological model. MNRAS 525 (2), pp. 1807–1813. External Links: Document, 2210.12907 Cited by: §I.
  • Thiele et al. (2020) L. Thiele, F. Villaescusa-Navarro, D. N. Spergel, D. Nelson, and A. Pillepich Teaching neural networks to generate fast sunyaev–zel’dovich maps. The Astrophysical Journal 902 (2), pp. 129. External Links: Document, Link Cited by: §III.2.
  • Wadekar et al. (2021) D. Wadekar, F. Villaescusa-Navarro, S. Ho, and L. Perreault-Levasseur HInet: generating neutral hydrogen from dark matter with neural networks. The Astrophysical Journal 916 (1), pp. 42. External Links: Document, Link Cited by: §III.2.

Appendix A Evolution model stability across redshifts

Here we test the stability of evolution model across redshifts. This is particularly important because the training set contains only 20% of the redshifts considered in the full dataset. The results are shown in Figure (8).

We find that the model remains stable over most of the sampled interval, but its performance deteriorates near the boundaries. This behavior is expected. During training, redshift samples are randomly drawn between the minimum and maximum scale factors of the dataset. For points in the interior of the interval, training samples exist on both sides, allowing the network to effectively interpolate. In contrast, boundary points have neighboring samples only on one side, making interpolation more challenging. In addition, random sampling naturally results in denser coverage of the interior than the edges of the interval. Furthermore, the finite-difference approximation used to evaluate derivatives near the boundaries effectively pushes the problem into a mild extrapolation regime, where the PDE residuals alone do not provide sufficiently strong constraints. These effects together lead to the increased prediction errors observed at the boundaries.

Refer to caption
Figure 8: Mean absolute relative error in the predicted power spectrum, |Ppred/Ptrue1|\langle|\textrm{P}_{\textrm{pred}}/\textrm{P}_{\textrm{true}}-1|\rangle as a function of the scale factor a. The shaded vertical bands indicate the boundaries of the full data interval. The prediction error is minimized within the central region and increases toward the edges of the sampled range.

Appendix B Generalization of the Evolution Model to Unseen Initial Conditions

We extended the evolution model, where the network takes the initial condition and outputs the wavefunction and the gravitational potential at the specified scale factor, to multiple realizations of the initial conditions just as we did for the super-resolution task. This constitutes a more challenging learning problem than super-resolution, since the network does not receive a low-resolution approximation of the target field. Instead, it must learn the full dynamical evolution from the initial conditions and generalize this mapping across unseen realizations.

The training and test data are split in an exactly same way as described for the super-resolution case, but with 100 realizations in total instead of 80. The architecture has been kept the same, and the network outputs the residual δ\delta where:

ψ^(a)=ψ(a0)+δ,\hat{\psi}(a)=\psi(a_{0})+\,\delta, (B1)

The factor of 0.1 previously included in Eq. (45) was removed, as it produced predicted fields with excess power relative to the reference fields. Empirically, removing this scale factor yielded better performance while also proving effective for the super-resolution task. We keep the rest of the neural network architecture, optimizer, and all hyperparameters identical to the setup used for the evolution model used for single realization training.

Refer to caption
Figure 9: Examples of density fields generated by evolution model the unseen test realizations. The generated fields (64364^{3}, Gen), and target density fields (64364^{3}, Real) are shown as density projections along the z-axis on a logarithmic scale. Insets show zoomed-in regions. The right panels compare the dimensionless power spectra k3P(k)k^{3}P(k) of the Gen, and Real fields, while the lower panels show the fractional error (PGen/PReal1P_{Gen}/P_{Real}-1). The model recovers roughly the target power spectrum over a wide range of scales, except with some discrepancy at small scales

Fig.(9) shows the generated fields and the and the corresponding dimensionless power spectra (OPENΔ(k)=k3P(k))\Delta(k)=k^{3}P(k)) predicted by the evolution model trained using the SP physics loss. The spectra are plotted up to the Nyquist frequency of the grid (402hMpc1\simeq 402\,\textrm{h}\,\mathrm{Mpc}^{-1}). As before, the fundamental mode is (kf6hMpc1)(k_{f}\simeq 6\,\textrm{h}\,\mathrm{Mpc}^{-1}), implying that approximately 60% of the resolved modes (kf<k<kJk_{f}<k<k_{J}) lie in the gravity-dominated regime. We see that even in this case of generalization of initial conditions, the model can correctly recover the large scales of the target fields. However, discrepancies persist on small scales, primarily because learning the wavefunction phase is particularly challenging. The physics-informed loss alone admits multiple solutions that satisfy the governing equations but differ in phase from the training data, allowing the network to converge to physically consistent yet phase-shifted solutions.