  We present two neural network approaches that approximate the solutions of
static and dynamic conditional optimal transport (COT) problems. Both
approaches enable conditional sampling and conditional density estimation,
which are core tasks in Bayesian inference$\unicode{x2013}$particularly in the
simulation-based ("likelihood-free") setting. Our methods represent the target
conditional distributions as transformations of a tractable reference
distribution and, therefore, fall into the framework of measure transport.
Although many measure transport approaches model the transformation as COT
maps, obtaining the map is computationally challenging, even in moderate
dimensions. To improve scalability, our numerical algorithms use neural
networks to parameterize COT maps and further exploit the structure of the COT
problem. Our static approach approximates the map as the gradient of a
partially input-convex neural network. It uses a novel numerical implementation
to increase computational efficiency compared to state-of-the-art alternatives.
Our dynamic approach approximates the conditional optimal transport via the
flow map of a regularized neural ODE; compared to the static approach, it is
slower to train but offers more modeling choices and can lead to faster
sampling. We demonstrate both algorithms numerically, comparing them with
competing state-of-the-art approaches, using benchmark datasets and
simulation-based Bayesian inverse problems.
