arXiv:2610.02377math.NAOct 2026

Manuscript Offprint

arXiv:2610.02377

Flow Matching for Fast Posterior Sampling in Bayesian Inverse Problems

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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

October 5, 2026

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.

1. Introduction

For the past three decades Markov chain Monte Carlo (MCMC) has been the workhorse for sampling from posterior distributions in Bayesian inference and Bayesian inverse problems. Modern variants — dimension-robust proposals such as preconditioned Crank-Nicolson [Cot+13; HSV14], likelihood-informed [CLM16; RS18] and adaptive [Haa+06; HST01] schemes — are well understood theoretically and remarkably reliable in practice. Their cost profile, however, is fixed by design: the Markov chain is sequential, its samples are correlated, every step requires at least one evaluation of the forward model, and the entire computation must be repeated from scratch for each new observation. In applications where the same inverse problem is solved again and again for a stream of measurements — electrical impedance tomography (EIT) being a prototypical example — this per-observation cost is the dominant obstacle to online or real-time uncertainty quantification.

A different paradigm, going back to El Moselhy and Marzouk [EM12] and systematically developed in [Par15; Mar+17], is to construct a transport map pushing a simple reference distribution forward to the posterior: once the map is available, we can generate, in parallel, arbitrarily many independent samples from (an approximation to) the posterior. If the transport map is of block-triangular structure and trained to generate the joint distribution of unknown parameters and observable data, then a classical disintegration argument in [Mar+17, Sec. 7] shows that this transport map reproduces the posterior for (almost) all possible observations. Hence, transport-based sampling for Bayesian inverse problems is amortized: after an offline training phase approximate posterior samples for any new observation are available at negligible online cost (= evaluation of the transport map), and no further likelihood evaluations are needed. These are substantial promises, in particular for PDE-based Bayesian inverse problems with computationally expensive likelihoods.

For the construction and training of suitable transport maps, generative machine learning has supplied several flexible and scalable approaches in recent years. In the foundational works [EM12;

Par15; Mar+17] the authors focused on monotone triangular transport maps motivated by the classical Knothe-Rosenblatt rearrangement. More recently, Baptista et al. [Bap+24] use monotone generative adversarial networks (GANs) [Goo+14] for learning suitable transport maps and Wang et al. [Wan+25] employ continuous-time normalizing flows in the form of neural ordinary differential equations [Che+18; Gra+19] to derive conditional optimal transport maps. Score-based diffusion models [Son+21] have been applied to Bayesian inverse problems as well, e.g., in [Chu+23; Bal+23]. Closely related to these is the flow matching approach to learn a neural ODE-based transport map [Lip+23; LGL23; ABV23]. Its significant advantage over [Che+18; Gra+19] is that expensive likelihood-based training is replaced by a simple least-squares regression that requires no ODE solves during training, reducing training cost by orders of magnitude. Bayesian flow matching, i.e., flow matching for sampling conditional distributions, has been derived and discussed in detail in [Che+25; Hag25; WS25] but demonstrated primarily on low-dimensional benchmarks and imaging-type applications. Very recently, [Krü+26] compare three different machine learning approaches for transport sampling of posteriors in Bayesian inverse problems — GANs, invertible neural networks, and Bayesian flow matching — and found Bayesian flow matching to be the “clear winner”. Moreover, due to the likelihood-free training, flow matching can also be used for simulation-based inference [Wil+23; CBL20] where the likelihood is either unknown or computationally intractable — and, hence, classical MCMC methods, which rely on likelihood evaluations, are not applicable.

Thus, flow matching seems to be one of the most promising approaches for transport-based sampling of conditional distributions. What is missing so far in the literature, in our view, is a careful, MCMC-literate assessment of the performance of flow matching for PDE-based Bayesian inverse problems — not compared to other transport-based approaches but rather to competitive gold-standard MCMC algorithms and done on Bayesian inverse problems of increasing difficulty. Furthermore, this paper aims to provide computable a-posteriori bounds, both lower and upper, of the accuracy of the learned flow matching posteriors. These bounds are derived by means of (Markov chain) Monte Carlo theory and exploit a combination of flow matching and the independent Metropolis–Hastings algorithm, which yields a computationally efficient, asymptotically unbiased flow matching-based sampler outperforming standard MCMC samplers in some challenging Bayesian inverse problems. In this regard, we also mention previous works on the combination of transport maps and MCMC, namely, Parno and Marzouk [PM18], in which monotone triangular transport maps were exploited for posterior-adapted proposals accelerating MCMC and Grenioux et al. [Gre+23], in which discrete-time normalizing flows were also studied as proposals within independent Metropolis–Hastings. Moreover, we also refer to [BDD24] for a-priori error bounds for unconditional flow matching in Wasserstein distance which, however, are not computable in practice.

References (57)