AG-2025.02-030·astro-ph.CO·cross-listed: astro-ph.IM
Differentiable Cosmological Hydrodynamics for Field-Level Inference and High Dimensional Parameter Constraints
Authors
- Benjamin Horowitz
- Zarija Lukic
Abstract
Hydrodynamical simulations are the most accurate way to model structure formation in the universe, but they often involve a large number of astrophysical parameters modeling subgrid physics, in addition to cosmological parameters. This results in a high-dimensional space that is difficult to jointly constrain using traditional statistical methods due to prohibitive computational costs. To address this, we present a fully differentiable approach for cosmological hydrodynamical simulations and a proof-of-concept implementation, diffhydro. By back-propagating through an upwind finite volume scheme for solving the Euler Equations jointly with a dark matter particle-mesh method for Poisson equation, we are able to efficiently evaluate derivatives of the output baryonic fields with respect to input density and model parameters. Importantly, we demonstrate how to differentiate through stochastically sampled discrete random variables, which frequently appear in subgrid models. We use this framework to rapidly sample sub-grid physics and cosmological parameters as well as perform field level inference of initial conditions using high dimensional optimization techniques. Our code is implemented in JAX (python), allowing easy code development and GPU acceleration.
Submitted
4 February 20251 year ago
Version
v1
License
CC-BY-4.0
DOI
10.48550/arXiv.2502.02294
Summary
Researchers made cosmological simulations differentiable—you can now efficiently calculate how input parameters affect the simulated universe by working backwards through the equations—enabling faster constraint of both cosmology and subgrid physics from observations.
- Differentiable simulations let you compute how changes in parameters ripple through complex physics, replacing brute-force trial-and-error with gradient-based optimization that's orders of magnitude faster.
- The method handles stochastic (random) processes in subgrid models, which represent poorly understood physics like supernovae feedback, by differentiating through discrete random variables—a technical advance that unlocks previously intractable inference problems.
- Running on GPU via JAX makes it practical to jointly constrain dozens of parameters (cosmological properties and subgrid recipe details) simultaneously, something impossible with traditional methods due to computational expense.
curious · generated by claude-haiku-4-5
Chat with this PDF
Ask questions, probe assumptions, request a plain-English summary. Answers cite sections from the preprint itself.
Community
Questions and answers about this paper from other readers. No formal peer review — just a place to think out loud.