Flow matching speeds up sampling for Bayesian inverse problems

Flow Matching for Fast Posterior Sampling in Bayesian Inverse Problems

Machine Learning

Summary

Bayesian inverse problems involve figuring out hidden causes from observed effects, but this process usually requires heavy computation and slow sampling methods. The authors study a new technique called conditional flow matching that learns a map to quickly generate good guesses of hidden causes without repeating complex calculations. This method produces independent samples fast after training and can even be combined with traditional methods to ensure exact results. They tested this on examples like electrical imaging and ecological models, showing it works efficiently while providing ways to measure how accurate the guesses are.

What this means in practice

  • For medical imaging engineers: Generate fast and independent samples for imaging reconstructions like electrical impedance tomography to speed up diagnoses.
  • For ecological modelers: Obtain rapid approximate posterior samples for complex ecological systems without resorting to costly likelihood evaluations.

Authors

Jan Blechschmidt, Oliver G. Ernst, Moritz Poguntke, Björn Sprungk

Abstract

Sampling from the posterior is the central task of computational Bayesian inverse problems. The standard workhorse in Bayesian inference - Markov chain Monte Carlo (MCMC) - is sequential, yields correlated samples, and must be rerun for each observation. Conditional flow matching offers an amortized alternative: a transport map, trained once on joint samples of parameter and data, that yields independent approximate posterior samples for any observation at negligible online cost, without new likelihood evaluations. We give a careful, MCMC-literate assessment of flow matching for PDE-based inverse problems with function-valued parameters. Exploiting the flow's tractable density, we derive computable accuracy estimates of the underlying approximate posterior in total-variation distance and Kullback-Leibler divergence and, moreover, propose a hybrid sampler that is asymptotically exact by Metropolization. We validate the accuracy estimates and demonstrate the amortization in several numerical examples, including electrical impedance tomography and a likelihood-free Lotka-Volterra model.