Fitting the Universe, a tutorial
Probabilistic Programming for Cosmology
đźš§ This tutorial is in progress
Decision theory
“You see, in this world there’s two kinds of events, my friend: those we get to observe, and those we do not.” We care about some events we do observe, typically because they provide information about events we care but do not observe. And we care about some events we do not observe, typically because they are future outcomes of some decisions we can perform now, or because they influence the outcomes of such decisions. In other words, we care about influencing the environment in our favour, performing the right connections between what we are certain about the environment, and what we are uncertain about. This is the principle behind what we would call rational thinking under uncertainty, namely decision theory.
In the following, I will explain how to perform the inference of the unobserved from the observed using a Programming Probabilistic Language. I had the opportunity to present this tutorial at the GDR CoPhy (French Cosmology Research Group), and a supporting notebook can be found here.
Field-Level Inference
In Field-Level Inference, the latent space include the Universe initial conditions, and we typically want to infer them jointly with cosmological parameters. This allows to model complex observable like the galaxy density field observed by redshift survey like DESI, and exploit fully its information at the considered resolution. The resolution is set by the discretization of the fields into tiny volume cells alias voxels, typically into $10^6$ to $10^9$ of them.
This poses the numerical challenge of exploring such high-dimensional space, whether to find its most probable solution (posterior mode) or to sample its full posterior distribution. A key ingredient is to build field-level model that are differentiable, meaning we can differentiate its output (the observable field) with respect to its input (the initial conditions). The gradient obtained from such model is able to guid numerical methods like optimizer and MCMCs to guide the inference in the vastness of high-dimensional worlds.
Differentiable N-body
As an example, let us consider the evolution of the Universe through gravity, a complex system where the expansion of the Universe compete with gravitational collapse, typically described as a set of N bodies interacting each with each other. It provably does not admit any closed-form solution as soon as $N \geq 3$, and is therefore solved numerically by the use of N-body codes.
We are not limited to modeling the N-body evolution of a single field. We can for instance assume 3 particle fields, that we will call redons, bluons, and greenons, evolving independently from independent initial conditions. This allows to model RGB image as the result of N-body interaction. Let us take for instance BaoBan, the coyote ambassador of the DESI collaboration.
This is obviously an untypical observation from a Universe evolved from random Gaussian initial conditions, but nothing prevents use from analysing it as we would do for a truly observed galaxy density field.
Once we have a differentiable N-body simulator, we can easily search with a simple gradient descent for the most probable initial conditions given this observation. This yields the posterior mode of the initial conditions, that we can then evolve as a posterior mode on the full N-body evolution, which plays as: