Bridging Simulators with Conditional Optimal Transport
Justine Zeghal, Benjamin Remy,
Yashar Hezaveh, François Lanusse, Laurence Perreault-Levasseur







Fast simulations
Full N-body
O(ms) runtime
differentiable
O(ms) runtime -> O(days)
differentiable
✅
✅
✅
❌
❌
❌
realistic
❌
realistic
✅
Cosmological simulations
e.g. log-normal, LPT, PM
e.g. full nbody, hydro, etc.


Wrong models generate biases

Full field inference from WL convergence maps


Wrong models generate biases

Full field inference from WL convergence maps


How to learn
the correction ?
Learning a mapping between simulations


log-normal
from N-body
we seek a minimal transformation so that
the initial conditions and the cosmology are conserved
Convergence maps
Flow matching for mapping distributions

Flow matching enables us to transport probability distributions in high dimension, using probability flow ODEs
Flow matching for mapping distributions

Flow matching enables us to transport probability distributions in high dimension, using probability flow ODEs
It can be seen as a continuous normalizing flow but much easier to train:


Flow matching with optimal transport
Optimal Transport Flow Maching
Independent coupling
Minibatch OT
OT pairs are found minimizing a quadratic cost


Flow matching with optimal transport
Optimal Transport Flow Maching
Minibatch OT
This coupling solve the problem
i.e. minimizes the path for all trajectories between and
Flow matching with optimal transport
OT Flow Matching is helpful because we only care about learning a correction!


Conserving the initial conditions
Flow matching with optimal transport
OT Flow Matching is helpful because we only care about learning a correction!








Dataset 1
Dataset 2
Conserving the initial conditions
Flow matching with optimal transport
Optimal
Transport Plan






Dataset 1
Dataset 2
OT Flow Matching is helpful because we only care about learning a correction!


Conserving the initial conditions
How to correct while conserving the cosmology?
Flow matching with
conditional optimal transport


Log-normal
N-body
We aim to transport
to
, i.e. conserving the cosmology
OT FM enables us to transport
to
We have two unpaired datasets of
We have two unpaired datasets of


Log-normal
N-body
We aim to transport conditionals
to
, conserving the cosmology
Flow matching with
conditional optimal transport


Log-normal
N-body
Kerrigan et al. 2024: triangular velocity field
finding OT mini-batches by minimizing the joint cost
We have two unpaired datasets of
We aim to transport conditionals
to
, conserving the cosmology
Flow matching with
conditional optimal transport
Fast simulations
Emulated Full N-body
O(ms) runtime
differentiable
O(ms) runtime -> O(days)
differentiable
✅
✅
✅
realistic
❌
realistic
✅
Cosmological simulations emulation
e.g. log-normal, LPR, PM
e.g. full nbody, hydro, etc.


Learned
correction
✅
✅
✅


Validating the emulated maps
Power spectrum


LogNormal
Emulated

Challenge simulation
Validating the emulated maps
Beyond summary statistics: coverage tests


COT, Cosmostat Journal Club
By Benjamin REMY
COT, Cosmostat Journal Club
- 13