Differentiable Cosmological Simulation with Adjoint Method

Yin Li, Chirag Modi, Drew Jamieson, Yucheng Zhang, Libin Lu +3 more
11/18/2022
astro-ph.IMastro-ph.CO

Official code: eelregit/pmwd (96 stars, Python, BSD-3-Clause, JAX, last commit 2026-06-12).

Abstract

Rapid advances in deep learning have brought not only myriad powerful neural networks, but also breakthroughs that benefit established scientific research. In particular, automatic differentiation (AD) tools and computational accelerators like GPUs have facilitated forward modeling of the Universe with differentiable simulations.

Show full abstract

Based on analytic or automatic backpropagation, current differentiable cosmological simulations are limited by memory, and thus are subject to a trade-off between time and space/mass resolution, usually sacrificing both. We present a new approach free of such constraints, using the adjoint method and reverse time integration. It enables larger and more accurate forward modeling at the field level, and will improve gradient based optimization and inference. We implement it in an open-source particle-mesh (PM) $N$-body library pmwd (particle-mesh with derivatives). Based on the powerful AD system JAX, pmwd is fully differentiable, and is highly performant on GPUs.

View on arXivView PDF

Code Implementations(1)

eelregit/pmwdOfficial100%
JAXBSD-3-Clause

Differentiable Cosmological Forward Model

9625PythonAug 30, 20215 months agoBSD-3-Clause
cosmologydifferentiableforward-modeljaxn-body+2 more

Similar Papers

Cite this paper

@article{li2022differentiable,
  title  = {Differentiable Cosmological Simulation with Adjoint Method},
  author = {Yin Li and Chirag Modi and Drew Jamieson and Yucheng Zhang and Libin Lu and Yu Feng and François Lanusse and Leslie Greengard},
  year   = {2022},
  eprint = {2211.09815},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.09815}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.09815.svg)](https://codeofpaper.com/paper/2211.09815)

Discussion