Source-Guided Flow Matching
Authors: Zifan Wang
Alice Harting
Matthieu Barreau
Michael M. Zavlanos
Karl Henrik Johansson
Venue: ICLR 2026 Poster (2026)
Keywords: Flow matching
conditional generation
guided flow
Primary area: probabilistic methods (Bayesian methods, variational inference, sampling, UQ, etc.)

Abstract: Guidance of generative models is typically achieved by modifying the probability flow vector field through the addition of a guidance field. In this paper, we instead propose the Source-Guided Flow Matching (SGFM) framework, which modifies the source distribution directly while keeping the pre-trained vector field intact. This reduces the guidance problem to a well-defined problem of sampling from the source distribution. We theoretically show that SGFM recovers the desired target distribution exactly. Furthermore, we provide bounds on the Wasserstein error for the generated distribution when using an approximate sampler of the source distribution and an approximate vector field. The key benefit of our approach is that it allows the user to flexibly choose the sampling method depending on their specific problem. To illustrate this, we systematically compare different sampling methods and discuss conditions for asymptotically exact guidance. Moreover, our framework integrates well with optimal flow matching models since the straight transport map generated by the vector field is preserved. Experimental results on synthetic 2D benchmarks, physics-informed generative tasks, and imaging inverse problems demonstrate the effectiveness and flexibility of the proposed framework.

Published as a conference paper at ICLR 2026
SOURCE-GUIDED FLOW MATCHING
Zifan Wang'
Alice Harting*
KTH Royal Institute of Technology zi sifanwekth. se
KTH Royal Institute of Technology ahart woartingkkt... se
Matthieu Barreau
Michael M. Zavlanos
KTH Royal Institute of Technology barreaukkth.c
Duke University mi micheel www. navlanos@dukke.eo edd:
Karl H. Johansson
KTH Royal Institute of Technology
kalle j@ktj...h...
ABSTRACT
Guidance generative models is typically achieved by modifying the probability flow vector field through the addition of guidance field. In this paper, we instead propose the Source-Guided Flow Matching (SGFM) framework, which modifies the source distribution directly while keeping the pre-trained vector field intact, This reduces the guidance problem to a well-defined problem of sampling from the source distribution. We theoretically show that SGFM recovers the desired target distribution exactly. Furthermore, we provide bounds on the Wasserstein error for the generated distribution when using an approximate sampler of the source distribution and an approximate vector field. The key benefit of our approach is that allows the user to flexibly choose the sampling method depending on their specific problem. To illustrate this, systematically compare different sampling methods and discuss conditions for asymptotically exact guidance. Moreover, our framework integrates well with optimal flow matching models since the straight transport map generated by the vector field is preserved. Experimental results on synthetic 2D benchmarks, physics-infen innfrrs-informed generative tasks, and imaging inverse problems demonstrate the effectiveness and flexibility of the proposed framework.
INTRODUCTION
Flow matching (Lipman et al. 2022) is a generative modeling framework to learn vector field that drives the probability flow from source distribution qo target distribution qı in some fixed time. It has demonstrated state-of-the-art computational efficiency and sample quality across a range of applications, from image generation (Lipman al. 2022) and molecular structure generation (Chen and Lipman| 2023) to decision-makin making tasks (Zheng et al. 2023). In particular, optimal flow matching (Tong al. 2023) trains the vector field by leveraging the optimal transport (OT) solution between go and qı- The resulting optimal vector field moves each sample along straight-line trajec- tory with constant velocity, corresponding the Wasserstein geodesic between the distributions. In practice, these straight trajectories lead to stable training and faster inference, since generative sampling can then reach the target distribution with few integration steps.
The guidance of flow matching refers to directing the probability flows toward outcomes with de- sired properties (Venkatraman et al. 2025 Dhariwal and Nichol 2021: Du et al., 2023, Graikos et al.) 2022; Ho and Salimans 2022] Song et al.) 2020). In this context, sample generation aims not only to approximate the data distribution but also to satisfy additional properties, such as condi- tioning on auxiliary information or optimizing
energy ansrey-based objective. Training-based guidance methods (Ho and Salimans 2022 Song et al. 2020) address this by training a specialized model for
First authors have equal contribution.

---

Published as a conference paper at ICLR 2026
given conditioning scenario. While effective, these methods require retraining for every new
ditioning scenario, which incurs significant cost and therefore limits their flexibility. Thus, a variety of training-fite free approaches have emerged for both diffusion models (Chung et al.
2022: Song al.
2023
Ye et al. 2024 Uehara et al.
2024 Tang 2024) and flow matching models (Ben- Hamu et al,
2024
Wang et al. 2024 Liu al.
2023 Domingo-Enrich et al. 2024 Feng al.
2025).
Among these methods, exact guidance is achieved by Uehara et al. (2024): lang (2024): Domingo
Enrich et al. (2024); [Feng et al. (2025). Specifically, [Uchara al. (2024) Tang (2024) reformulate
guidance as stochastic optimal control (SOC) problem and achieve exactness by modifying both
the source distribution and the vector field. Additionally. [Domingo-Enrinn Enrich et al. (2024) shows that
exact guidance is possible by modifying only the vector field, given suitable noise schedule. How- ever, these methods require solving an SOC problem for every new conditioning scenario, which computationally expensive. Recently, |eng et al. (2025) proposed a framework for exact guidance including various adjustments of the vector field. However, exactness is only proved for a specific class of pre-trained vector fields, thereby having limited generality. Moreover, shared feature of all of these methods that the vector field is transformed. For optimal flow matching models, this means that the desirable property of straight-ling line transport is not preserved when guidance is applied.
In this work, we show that exact guidance can instead be achieved by appropriately modifying the source distribution while keeping the original vector field unchanged. We introduce the Source- Guided Flow Matching (SGFM) framework, which reduces guidance to the well-defined task of sampling from the modified source distribution. We prove that sampling from the modified source distribution and driving the flow along the exact vector field precisely recovers the desired target distribution. Furthermore, we provide bounds on the Wasserstein error of the target distribution when using an approximate sampler of the source distribution and an approximate vector field.
The key effective implementation of SGFM is accurate and efficient sampling of the modified source distribution. SGFM gives the user the flexibility to tune the procedure by customizing the sampling method according their specific problem. Such methods include importance sampling, Hamiltonian Monte Carlo, and optimization-based sampling. We discuss the asymptotic exactness of SGFM with these methods. Interestingly, SGFM with optimization- incides with the heuristic formulation in Ben-Hamu al. (2024). In the context of our framework, this method is equivalent to recovering the mode the modified source distribution. this way, we offer new view of to other sampling methods. Experiments on synthetic 2D datasets, physics informed generative tasks, and imaging inverse problems demonstrate the effectiveness and flexibility that SGFM offers compared to other methods.
sampling method co-
al. (2024) with theoretical justification that also naturally extends
2 BACKGROUND
Throughout this paper, we consider generative modeling framework defined on data space in Rd The generative model is characterized by a source distribution qo and a target distribution (1- The source distribution is an arbitrary distribution from which samples can be drawn, while the target distribution represents an empirical data distribution given by a finite set of samples.
2.1 PROBABILITY FLOW AND FLOW MATCHING
The goal of a flow- generative model is to sample from the target distribution qı by trans- forming samples from the source distribution qo- Specifically, the model defined by vector field ux(x): [0, 1] x Rd + Rd, which transports particles according to the ordinary differential equation (ODE) dr ue (ar)dt. Integration yields the transport map (Mo), which maps the initial point To to the solution 2, at time f. Applying & to a distribution of particles Po induces probability flow where the density at time is given by the pushforward measure p. & [[x] (Po), where [ol
is defined by the property f fxx d( [g) (z) = -f o g(x) dp(x) with f o g((z)) & fx)()) for every integrable function f (Figalli and Glaudo 2021). Equivalently, Pt can be characterized as the probability flow arising from the continuity equation d.p. V (p.u,) = 0 (Villani et al.) 2008
In this view, the flow matching problem is to find a vector field un that induces a probability flow Pt such that Po do and p1 Q1- While exact vector field u, is often inaccessible, it can be
2

---

Published as a conference paper at ICLR 2026
approximated by neural network of and trained using the conditional flow matching objective
(0) = (x00)( I1o2 ((1 -)) tzı - (æ1 -zo)ll
(1)
where the joint distribution π E [' 91).
with I'(oo, g1) being the set of all joint distributions with marginals qo and Qi (Lipman al. 2022). For example, can select (10,, 21) = qo (zo) qu (x1).
((ggo.g).
2.2 OPTIMAL TRANSPORT AND OPTIMAL FLOW MATCHING
There are many possible transport plans between 4o and 01 among these, the optimal transport (OT) plan is defined as the minimizer of the total cost of transportation. This is quantified by the 2- 2-Wasserstein distance, which is expressed in Kantorovich or Monge formulations respectively as
W (qu. 91)
min (eo
||
yll dr da( v)
min T:T=00
{
11 T(x) (0(z)) dæ.
RdXRd
As shown Villani (2021) | Figalli and Glaudo (2021) these optimization problems admit unique minimizers xt and T which are related by π [Id, T #qu- Of particular interest to our case is the dynamic OT formulation, which defined by the optimization problem:
{ / (x)) (c(x) dr
Ö.p. V (p,ug) 0, ")
W go: 91) = inf
(2)
(pr.us)
Po = 20, T
which seeks the vector field un that induces a probability flow pt that transports the source distribu- tion Po = 4o to the target distribution pl = with minimal total kinetic energy. The relation be- tween the static and dynamic OT solutions is simply given as u (11t)xo+++ (xo)) = (To) Thus, 2i gives rise to linear trajectory
17 (zo) + (1 ()ar for every initial point zo.
Among the infinitely many choices of vector fields that solve the flow-matching problem, the unique solution ut to the dynamic OT formulation in equation is associated with particularly efficient inference and fast generation. This is because ug is independent of t, so ODE integration along this field simply yields straight-line paths, which lead to lower discreticttinntionn errors and improved computational efficiency (Kornilvv et al. 2024 Liu et al. 2022). To approximate u," via equation [ has cubic computational complexity in the number of samples, which is challenging for large datasets. A solution is to instead approximate nt using mini-batch data (Tong et al., (023), alternatively to use entropic OT solvers (Pooladian
is necessary to choose π π However, computing
ett al,, (023). Another approach is to train flow matching models on class of vector fields that guarantee straight trajectories (Kornilov et al. 2024).
2.3 FLOW MATCHING GUIDANCE
Given a pre-trained flow matching model that transforms the source distribution 4o the target distribution Qı, consider the conditional generation problem where the task is to generate sam- ples that satisfy additional constraints. When the constraints encoded by an energy function J. which attains its minimum when the constraints are satisfied, the likelihood of constraint sat- isfaction can be expressed in canonical form e-)() In this case, the target distribution becomes of (211
(1(21) X (J(a), It can be shown that of is the solution of the variational problem &f = arg ming [[(]))[((()))) divergence between q and qı (Uehara et al. 2024). In this view, conditional generation is fine- tuning problem: the distribution is shifted to reduce the task-specific loss J while staying close to the original data distribution Q1-
KL (LL()))))) where KL(q (q1) denotes the Kullback-Leibhe
FLOW MATCHING
Suppose that we have pre-trained flow matching model that transports the source distribution Yo to the target distribution Q1- Consider the conditional generation task in which the new target distribution is of the form o' (xz) x qı (1(1) e where is a given loss function. The problem considered in this paper is how generate samples from 41- To that end, one could, in principle, modify the source distribution and/or the vector field. Here, we explore how to to generate a flow that arrives at of by modifying only the source distribution while retaining the vector field.
3

---

Published as a conference paper at ICLR 2026
3.1 EXACT GUIDANCE UNDER AN EXACT TRANSPORTATION MAP
Consider the ideal case where the pre-trained vector field exactly transports go Q1- In this case, we derive a closed-form expression for the modified source distribution. We show that trans- porting samples from the modified source distribution along i precisely yields the desired target distribution. This result is formally stated in the following theorem and proven in Appendix A..
Theorem 1. Let qo and qı be the source and target distributions, respectively. Let Uz R- - R2 be a vector field whose flow map Oe satisfies (
q1. For any measurable function J: R IR
define the new larget distribution of (ar1) = z, 91 (x1) e=(()) and new source distribution (1o) = Zo 4o (0)))) e- (z)o)(zo), where T = =$1, and Zo. Z1 are normalizing constants. Then, the same flow de Le., (01)#% -1-
transports % L..
Theorem indicates that, if Fo d and evolves as dr,- = 21 ddt, then
Algorithm 1: Source- Flow Matching
I1 T(xo) ~ g.. In other words, ex-
1: Input: Source samples Zo 9o. target data
samples 21 ~ Q1, loss function J
act guidance is achieved. Inspired by this
2: Train the vector field of that transforms To q1
theorem, we propose the SGFM frame-
3: Sample 20 ~ 46
work, presented in Algorithmm] [I] First, we
d 4: Integrate over ODE बi = =f((x)
learn a vector field oy by minimizing the flow matching loss in equation [ Then,
Output: samples 3
we draw samples zo ~ 66. using an ap- propriate sampling strategy such as those discussed Section Finally, each sample zo is transported
along the learned vector field of by integrating the associated ODE, yielding guided samples xT,
3.2 ERROR ANALYSIS UNDER VECTOR FIELD AND SOURCE SAMPLING APPROXIMATIONS
Learning an exact vector field is inherently difficult, particularly in high- nighdimenssionl spaces. In addition, exact sampling from the desired source distribution d may not be possible. In this section, we analyze how these errors jointly influence the quality of the generated samples. Specifically, quantify how deviations in both the vector field and the source distribution contribute to the divergence between the target and generated distributions.
To that end, let (z) denote the exact vector field, and let vf (z) denote the learned vector field with flow of (æ), such that di di (a:) v. (o (a:). We derive upper bound on the error of the condi- tionally generated distribution in terms of the two error sources; the proof is given in Appendix A.2
Theorem 2. Assume that [|0](x) of (x) S, and the learned flow vf (x) is L.-Lisschitz con- tinuous in x. Suppose that the sampling method returns samples of distribution qu. Then, the gener- ated samples of distribution [o"1+90 satisfy Wz(dh. [o'] qu) S ee'-WWllo 9o) + cce'..
To interpret Theorem the first term reflects the distributional discrepancy introduced by ap- proximate sampler of the source distribution scaled by e/v,, the Lipschitz constant of the flow map o9. Intuitively, any deviation in the initial distribution can be amplified by at most a factor of this Lipschitz constant during transport. The second term captures the accumulated effect of errors in the learned vector field over the trajectory. This contribution arises from integrating bounded drift perturbation e over an L flow, where L, controls local error growth along trajectories. Thus, Ly characterizes the sensitivity of the generative process to errors both source distribution and vector field. When the vector field is perfectly learned (c 0), exact guidance is feasible. From we conclude that our guidance method is particularly effective when Ly small.
Theorem 2
3.3 IMPROVED GUIDANCE WITH THE OPTIMAL. VECTOR FIRL.
To encourage a small Li Lipschitz constant Lyp we employ methods designed learn the optimal vector field or (Tong et al. 2023); see Table [ for more details and experimental support. The optimal vector field oi also improves efficiency, as it induces straight trajectories with constant velocity, thereby reducing the number of discretization steps needed to integrate the ODE over ł E [0, 1] to obtain the flow map T Φ1. In addition to accelerating particle transportation. this also lowers the cost of sampling from the modified source distribution (2n) (0(o)) (oT) since this
4

---

Published as a conference paper at ICLR 2026
to 90 90(-)xxebro
g 91 (
90
(a) Optimal vector field.
(b) Guidance with optimal vector field.
Figure 1: Illustration SGFM
(a) q1
(b) Q
(c) g-MC
(d) Our method
Figure 2: Illustration of flow guidance in 2D example. The method g-MC (Feng al. 2025 modifies the vector field, resulting in curved trajectories. contrast, our proposed method maintains the optimal vector field and modifies the source distribution, leading to straight trajectories. (d), each ball's radius indicates the relative weight of the corresponding source sample.
requires evaluating the flow map T by definition. Theoretically, the flow map under og coincides with the optimal Monge map T (Figalli and Glaudo 2021 Theorem 4.1.3).
Our method is illustrated in Figure In the prior model, of" induces straight- map from each source sample Zig Qo its corresponding target sample 21 91- Sampling from the conditional target of by minimizing J reduces to selecting the subset of the source samples that flows to of under vr- Theorem shows that this subset follows the distribution (6(x)) ε 4o (0()))e=Joo "xoT"(xx) (zo), where T* is the flow map at f = Because our guidance method modifies only the source distribution, the straightness of vt is preserved in conditional generation, ensuring inference speed and integration stability. By contrast, guidance methods modifying the vector field (e.g.. Feng et al. (2025)) yield curved trajectories, illustrated in Figure 2 requiring finer discretization maintain accuracy.
Modifying the source distribution in Rd versus modifying the vector field in Rd [0, 1]: In conditional generation, several existing methods (Song et al. 2023 Feng et al. 2025) augment the original vector field v, with guidance term gt. typically approximated via Monte Carlo sampling. Since generation involves evaluating the augmented vector field at numerous intermediate times t [0, 1]. where each evaluation demands many samples, the whole process requires extensive sampling. In contrast, our approach leaves the vector field unchanged, and transforms the task into sampling from a modified source distribution
single time. This enabled by an instantiation of formula (see also Venkatraman et al. (2025)), formalized in The- orem [ Our framework naturally decomposes the error into just two distinct sources, whose scaling factors directly motivate using optimal transport-basee based models for superior accuracy (Theorem)
the classical lhange-of-variabee
SAMPLING FROM THE MODIFIED SOURCE DISTRIBUTION
Given the pre-trained optimal vector field vi, the guidance problem is reduced to drawing samples from the modified source distribution. Thus, the key effective implementation of method accurate and efficient sampling from (zu)
The choice of the sampling method depends on the properties of the cost function J and the dimensionality of the sample space. Whenever the sampling method generates sequence of approximate distributions (a* )220 such that W3 (a* %6) k xe, method of guided flow matching is asymptotically exact, as
5

---

Published as a conference paper at ICLR 2026
follows from Theorem 2 In this section, we discuss asymptotically exact samplers and efficient, optimization- based approximations, including their connection to D-Flow et al. 2024). Additional relevant sampling methods are described in Appendix B.2
4.1 ASYMPTOTICALLY EXACT SAMPLING METHODS
Importance Sampling: In www-dimensional spaces, importance sampling (IS) (Chopin and Pa- paspiliopoulos 2020) offers fast and gradient-free sampling method. Given an unnormalized tar- get distribution an initial set of particles is generated using a proposal distribution m such that supp(g) C supp(m). Samples are then drawn from this set according to weights determined by their relative probability in the target versus proposal distribution W =(X")
(x where w(x) x m(x)*
g(x)
The approximate distribution (x) & > target distribution y when N oo (Chopin and Papaspiliopoulos] 2020). Assuming q defined on a closed and bounded subset of IR: this implies that ( .g) 0 as N + 0o (Villani 2009 Theorem 6.9). When q % and m = go. we have w(xo) = e e-Jo"" Note that this method does not require J to be differentiable. For a detailed outline of the algorithm, see Appendix B.2.1
m= W (z)), with X ~ m. converges weakly to the
Hamiltonian Monte Carlo: IS suffers from the curse of dimensionality, making Hamiltonian Monte Carlo (HMC) (Neal et al. (0TT) a popular alternative in high-dimensional state spaces. HMC is gradient-based Markov chain Monte Carlo method for unnormalized, continuous densities. In particular, HMC generates proposal samples by propagating the target variable, representing position in space, and an auxiliary momentum variable using Hamiltonian dynamics, achieving extensive exploration while maintaining high acceptance probabilities. For more details, see Appendix BB2.3
HMC typically returns ergodic Markov chain, which means that it converges asymptotically to the target distribution (Neal et al.] 2011). When the negative log-likelihood - -ing is twice differentiable, strongly convex and has Lipschitz-contiuuuus gradients, and the integration of the dynamics is sufficiently accurate, the law of the Markov chain after N steps q approximates the target distribution q up to arbitrarily small Wasserstein precision W22 (π") .9) for a sufficiently large N (Chen and Vempala 2019 Theorem 5).
In case, the negative log likelihood is - In -n (3a) - In go + J T ("o), where T generally prevents global convexity. However, since T is learned while encouraging straight- line transport, we might expect that the composition J T approximately preserves the convexity of locally. To escape local modes, various strategies exist, e.g., tempering (Neal et al. 2011
4.2 OPTIMIZATION-BASST SAMPLING
While HMC offers strong theoretical guarantees, its computational cost can become prohibitive for highly non-concave target densities. An approximate and more efficient alternative is to dispense with the momentum variable and acceptance step, and instead directly search for high-probability regions of the target distribution through the optimization problem:
min In (x0)
min - In (x + J (mp). 30p
(3)
In this formulation, the term J o T (2x) introduces task-specific loss via the OT map T", while the term - In (xog acts as a regularizer. This regularizer, however, attracts 2i toward the most probable fixed points, rather than toward regions of high probability. For example, when the source distribution is Gaussian zo ~ = Ia), the optimization problem in equation 3 becomes
min || /2 c Jo (To))
zo
in which the regularizer In go = ||ا0| 12 /2 + would guide the sample toward the unique mode at 2g = 0 and lead to mode collapse.
To mitigate this issue, the regularizer can be replaced by alternative that better promotes sample diversity. For the Gaussian source distribution, we have || x². where x" is the chi-square distribution with d degrees of freedom. Instead of regularizing with the probability of the sample, one might instead use the probability of the norm of the sample, In p23 (I]=al1²). This means that

---

Published as a conference paper at ICLR 2026
the unique prior mode at zo 0 is replaced by the sphere f2o ||00|| arg max, Px2(2)
max(d- 2. 0)). The resulting optimization problem is
min - In Px3 (1 2 + T (zo) + min - (d - 2) log | + | /2+ J JoT (5)
Zi
Zg
which coincides with heuristic formulations in Ben-Hamu et al. (024)) (see discussion below).
Relation to D-Flow (Ben-Hamu et al., 2024]: In D-Flow, sampling is heuristically reformulated as an optimization problem with various forms of regularization, where representative instances coincide with equation 4 and equation
5 Since our formulation guarantees fidelity to the ground we explicitly clarify the role of the regularization term, thus providing foundational support. Therefore, D-Flow can be regarded as a special case of SGFM.
truth target distribution via Theorem I
An extension of this idea is to more explicitly target high-density regions of the prior. Since ||||2||| 2| = d, Var[I || = 2d, and Px3 is unimodal, we observe that the prior density con- centrates in the hyperspherical shell |||00|| - S v2d. Motivated by this, we propose a new method within the optimization-based sampling family for Gaussian source distributions given by
min J (ra) s.t. ||| d| S 2d. s0
In practice, the constrained problem in equation 6 can be addressed either by incorporating reg- ularizer of the form ([|=o]] d)², or by applying projected gradient descent onto the feasible set. The implementation details be found in Appendix B.2.4 [
From Theorem it follows that ensuring that zu lies in high-density regions of go implies that the corresponding sample I1 will also lie in high-density regions of g' justifying equation equation as sampling methods in our framework. In practice, we can design specific optimization objectives to sample from % depending on the problem structure and source distribution (Appendix (.2.5).
The optimization- based sampling method is typically suitable when the target distribution resembles Dirac distribution, when we are interested in obtaining representative sample of the distribution. However, it risks leading to mode collapse: under perfect optimization, the global mode is consistently returned. In practice, some diversity among the sam- ples can still be seen if the optimizer is randomly initialized and the objective function has multiple local maxima from which it struggles to escape. Then, the samples concentrate around these optima, resulting in "local" mode collapse. We illustrate this with an example below.
prtbbbbbbbbbtty sample rather than
Example of mode collapse in optimization- based sampling: Consider set of particles locations (x', ,x²) uniformly dis- tributed over an 'S' -shape structure. To encourage 21 and 22 to be close, introduce a soft penalty J = ||ا." - x² to guide gen- eration. As shown in Figure 3 applying equation 3 or equivalently D-Flow, leads an excessive concentration of the particles around the line = x2. Therefore, optimization-bart sampling fails to capture the inherent diversity of the true conditional distribution.
S
Figure 3: Mode collapse in optimization-bar sampling
EXPERIMENTS
In this section, SGFM is evaluated on toy 2D ex-
Wagserstein Dettnce
amples, physics-informed generative tasks, and in-
0.5
verse imaging problems. Our framework is bench-
0.4
marked against its closest counterparts: D-Flow (Ben- Hamu et al. 2024). top-performing methods in Feng et al. (2055) and PnP-flow (Martin et al. 2024).
0.3
0.2
D-Flow
5.1
ToY 2D EXAMPLE
10-3
10-1
10"
Running Time
We begin the evaluation on a two-dimensional synthetic dataset, consisting of uniform source distribution with
Figure 4: Comparison of guidance pre- cision and running time in 2D example.
7

---

Published as a conference paper at ICLR 2026
an 8- Gaussian target distribution. Since the source is non-
4.-
Gaussian, diffusion-basee guidance cannot be applied. We use importance sampling (SGFM-IS) and evaluate performance in terms of guidance precision, measured by the empirical Wasserstein distance between the true guided distribution and the generated distribution, relative to inference time, as controlled by the number of function evaluations (NFEs). As shown in Figure 4 our method consistently achieves better guidance precision. More- over, reducing NFEs (which lowers runtime), has only small effect on precision. This observation aligns with the prior findings that the optimal vector field produces straight trajectories that require fewer integration steps.
a5-
Ciil Souve
Vazzerstein Datance
(wltmm - Biauesin
0.-
0.0
Number of Samples
Figure 5: Asymptotic exactness
Next, we evaluate the exactness of SGFM, in terms of how guidance precision evolves as the number of IS samples increases. As shown in Figure [ for each of three pairs of two-dimensional source and target distributions, the guidance precision consistently improves as the IS samples increase. Hence, this low-dimensional experiment shows that SGFM-IS achieves asymptotic exactness.
We evaluate the impact of pre-trained vector fields guidance performance by training the vector fields in equation [ using two different coupling strategies: an independent coupling π = 4o 69 q and the optimal coupling n², referred to as the independent vector field and optimal vector field, respectively. The Lipschitz constant Ly for each field is empirically approximated using autodif- ferentiation. Guidance performance is quantified using the Wasserstein distance between the true target distribution and the generated distribution. As shown in Table [ the optimal vector field is associated with a smaller Lipschitz constant and achieves a lower guidance error. This result aligns with Theorem 2 confirming that a smaller Lipschitz constant is associated with reduced sensitivity and improves generation performance.
Guidance performance and approximated Lipschitz parameters for two pre-trained vector fields. The optimal vector field consistently demonstrates superior performance with lower Lipschitz constants, consistent with Theorem 2.
Table 1:
8gaussian + moon
uniform - 8gaussian
Lap
Guidance error
Guidance error
Independent vector field Optimal vector field
20.1
0.125 + 0.186
16.8
0.124 = 0.023
11.9
0.066 + 0.047
11.1
0.067 + 0.019
5.2 PDE INVERSE PROBLEM
We next consider a high-dimensional inverse problem with multi-modal posterior distribution based on the Darcy flow equations (Bastek et al., [024] Jacobsen et al. (025). Darcy flow is an elliptic PDE describing fluid flow though porous medium with permeability field K and pressure field p. The flow matching model is trained to sample pairs of K and p occurring as discretized
solutions square domain with resolution 64 64. The dataset (Bastek et al.) 2024 is obtained by solving the PDE using finite differences. For more details, see Appendix C.2. C.2.2
The conditional sampling problem is generate permeability fields consistent with a partially ob- served pressure field. We define the family of valid solutions as the target distribution. The validity of an inverse estimate K is measured by ((p ). where computes the target reconstruction error and P& is the truc pressure field corresponding K. Since P& is inaccessible, the sampling guid- ance cost is J (f), where ý is the pressure field sampled jointly with K. We assess the performance of SGFM using HMC and two variants of optimization based sampling, SGFM-OPT-I (equation 4 and SGFM-OPT- (cquation(5). 55. the latter equivalent to
et al. (2024) with preferred regu- larization, and compare with A-,, g-covG (Feng et al.) 2025) and PnP flow (Martin et al. 2024).
Figure shows the target pressure and P& corresponding a single outcome of İ for each method. SGFM-OPT-2 obtains the best target reconstruction, closely followed by SGFM-HMC. In compar- ison, SGFM-OPT-I and baseline methods suffer from large biases. Additional samples are shown
8

---

Published as a conference paper at ICLR 2026
Target
SGFM-HMC
SGFM-OPT-1
SGFM-OPT-2
g-covÁ
g:covG
PnP
Pressure
PR
lp PM
Permeablliyy 03
Figure 6: Solutions to the inverse problem of the Darcy flow equations. Top: target pressure and true solution Pæ corresponding to inverse estimate K; middle: target reconstruction error; bottom: inverse estimate K of the permeability field generated by conditional sampling.
in Appendix C.2.3 To further analyse the performance, the validity J(pk). ) guidance cost J(p), and physical consistency |p - pll of 25 samples are shown in Table 2 reported as the median and interquartile range. SGFM-OPT-2 achieves the best validity, followed by SGFM-HMC. In com- parison, SGFM-OPT-1 and baseline methods do not perform significantly better than unconditional sampling, Although g-cov achieves the lowest guidance cost, it compromises physical consistency, leading to poor validity. Similarly, SGFM-OPT-I has worse validity than SGFM-HMC despite achieving lower guidance cost. In contrast, both SGFM-HMC and 3GFM-OPT-2 maintain physi- cal consistency while SGFM-OPT-2 achieves lower guidance cost, resulting in the best validity. The poor performance of PnP can be attributed its difficulty in handling the target's multi-modalityy by interpolating gradient step with random noise followed by denoising, this method jumps between different modes rather than converging consistently single one, resulting in degraded accuracy.
Due to the complex source distribution, the SGFM methods require longer runtimes compared to g-covA, which limits the number of samples that can be evaluated. While this constrains our ability to assess how well the methods capture the whole family of solutions, we show that SGFM-HMC performs best in this regard for an example in lower dimension Appendix C.5
Table 2: Performance of guidance methods in the Darey flow inverse problem
Method
Validity of Inverse Estimate (1)
Guidance Cost (L)
Physical Consistency (L)
SGFM-HMC
0.591 [0.532, 0.654]
0.281 |0.248, 0.335]
0.188 [0. 10,168, 0.228]
SGFM-OPT-1
0.907 [0.503, 1.875]
0.206 [0.149 14,, 0.294]
0.421 [0. 0.770]
SGFM-OPT-2
0.474 [0.416, 0.562]
0.187 [0.131, 0.218]
0.194 [0.157, 0.215]
g-covA
0.992 [0.857, 1.293]
0.030 (0.028, 0.052]
0.289 [0.247, 0.351]
g-covGi
0.955 [0.814, 1.201]
0.242 163, 0.388]
0.245 190, 0.285
PnP
1.055 [0.950, 1.204]
0.610 [0.590, 0.632]
0.116 [0.099, 0.1
Unconditional sampling
1.006 [0.860, 1.269]
1.051 [0.905, 1.289]
0.214 (0.167, 0.274)
5.3
IMAGING INVERSE PROBLEM ON CELERA
We evaluate SGFM on various imaging inverse problems using the high-dimensional CelebA dataset (R 12xx1288 YYang et al., 2015). considering five distinct tasks: denoising, deblurring, super- resolution, random inpainting, and box inpainting. Since the target distribution for these inverse problems is typically Dirac highly concentrated,
apply optimization-basee sampling within our SGFM framework. We index the SGFM-OPT variants by 1-6, where OPT-1 corresponds to equation and OPT-2 to equation 5 (Ben-Hamu et al. (2024)) before, and OPT-(3-5), OPT-6 correspond to equuation@impllemene with different regularizers and projected gradient descent, re- spectively (Table 3). Our methods benchmarked against strong baselines, including top methods

---

Published as a conference paper at ICLR 2026
g-covA and g-covG from Feng et al. (2025) and PnP flow (Martin al. 2024). For details of the SGFM variants, implementation, and visualizations of the generated images, see Appendix C.3
Table 3: Regularizer constraint for variants of optimization-based sampling.
Method
Regularizer in ming, R(xo) + Jo T (2o) constraint
SGEM-OPT-I equation
Ri (xn)
1 1
SGFM-OPT-2 equation
R2(xn) = In
(1=0013)) = - -(d add-20 log |ooll + |
SGFM-OPT-3 equation
Ra(mn) = (||=0
d)2
SGFM-OPT-4 equation
(ao) = ||200| -d
SGFM-OPT-5 equation Rs( = (1/=0) - vd)²
SGFM-OPT-6 equation
Constraint: ||| 1| d 2d
The results in Table 4 show that SGFM variants achieve state-of-the-ar performance. Specifically, they outperform g g-covA A and g-covG in all tasks. Our method is competitive with PnP-flow in most tasks and ranks one class below in deblurring; however, we note that PnP is specifically designed for imaging inverse problems, while our method is more general. The results demonstrate that SGFM with optimization- based samplers is an effective and flexible method for imaging inverse problems.
Table 4: PSNR (t) comparison of methods for inverse problems on CelebA
Method
Denoising
Deblurring
Super-res
Rand inpaint
Box inpainting
g-covA
26.73
29.72
18.45
19.61
24.88
g-covG
30.35
29.50
24.18
25.49
26.
PnP
32.14
38.74
31.33
33.87
29.92
SGFM-OPT-T
28.51
35.12
33.30
34.02
28.51
SGEM-ORE -FPE--P--2-- (D-Flow)
28.95
35.23
33.32
34.01
28.43
SGFM-OPT-3
31.51
35.21
33.28
34.05
30.09
SGFM-OPT-4
31.60
35.27
33.31
34.03
30.12
SGFM-OPT-5
28.94
35.22
33.33
34.06
28.55
SGFM-OPT-6
31.54
32.60
32.10
32.36
29.19
We evaluate the sensitivity of the method to the optimality of the vector field. Recall that, while our method requires no straightness assumptions (Theorems 1-2 hold for arbitrary vector fields), this motivated by practical considerations: increased straightness enables lower NFEs and thus faster inference without sacrificing performance. In practice, mini-batch OT training (Tong et al., (023) yields sufficiently straight vector fields to enable effective guidance: shown in Table[5] increasing NFE beyond NFE = 3 has little to no benefit on SGFM performance in the CelebA experiment.
Table 5: PSNR (1) SGFM-OPT-2 performance using increasing NFEs CelebA
NFE
Denoising
Deblurring
Super-res
Rand inpaint
Box inpainting
NFE- =
21.33
34.71
32.65
31.57
29.83
NFE 3
28.64
35.38
32.95
32.92
29.61
NFE 6
29.16
34.53
32.59
32.72
30.21
NFE-
29.31
34.43
32.30
32.69
30.57
CONCLUSION
We presented a framework for guided flow matching with theoretical guarantees. The framework re- duces the guidance problem to problem of sampling from a modified source distribution. Examples on 2D benchmarks, physics-informed generative tasks, and imaging inverse problems demonstrated the effectiveness and flexibility of the framework. We acknowledge that sampling from the source distribution may present its challenges, especially for complex, digh-dimensional distributions. Nevertheless, the proposed method offers users the flexibility to select a sampling strategy that bal- ances their desired trade-offss between accuracy and computational cost.
10

---

Published as a conference paper at ICLR 2026
ACKNOWLEDGMENTS
This work was supported in part by the Swedish Research Council Distinguished Professor Grant (2017-01078), Knut and Alice Wallenberg Foundation Wallenberg Scholar Grant, Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation, and Swedish Strategic Research Foundation SUCCESS Grant FUS21-0026. Compu- tational resources were provided by the National Academic Infrastructure for Supercomputing in Sweden (NAISS) at C3SE, partially funded by the Swedish Research Council under Grant Agree- ment No. 2022-06725.
REFERENCES
Jan-Hendrik Bastek, WaiChing Sun, and Dennis Kochmann, Physics-informed diffusion models. arXiv preprint arXiv:2403. /4404, 2024.
Heli Ben-Hame Omri Puny, Itai Gat. Brian Karrer, Uriel Singer, and Yaron Lipman. D-flow: Differentiating through flows for controlled generation. arXiv preprint arXiv:2402.14017 2024.
Joe Benton, George Deligiannidis, and Arnaud Doucet. Error bounds for flow matching methods.
arXiv preprint arXiv:2305.16866 2023.
Julius Berner, Lorenz Richter, and Karen Ullrich. An optimal control perspective on diffusion-based generative modeling. arXiv preprint arXiv:221 1.01164, 2022.
Joan Bruna and Jiequn Han. Provable posterior sampling with denoising oracles via tilted transport. Advances in Neural Information Processing Systems, 37:82863-82894, 2024.
Ricky TQ Chen and Yaron Lipman. Flow matching on general geometries. arXiv preprint arXiv:2302.0366 036660 2023.
Zongchen Chen and Santosh S Vempala. Optimal convergence rate of Hamiltonian Monte Carlo for strongly logconcave distributions. arXiv preprint
2019.
Nicolas Chopin and Omiros Papaspillopoolos. Importance Sampling, pages 81-103. Springer Inter- national Publishing, Cham, 2020. ISBN 978-3-030-44845-22 doi: 10.1007/978-3-000-478555
8. URL htt.l:ttp:///ooo http://oi..rg//./////// http://o..........11.00007733330
Hyungjin Chung. Jeongsol Kim, Michael T Mccann, Mare L Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209. 14687, 2022.
Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis, Advances in neural information processing systems, 34:8780-8794, 2021.
Carles Samingo-Enrichh Michal Drozdzal, Brian Karrer, and Ricky TQ Chen. Adjoint matching: Fine-tuning flow and diffusion generative models with memoryless stochastic optimal control. arXiv preprint arXiv:2409.08861, 2024.
Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Sussman Grathwohl. Reduce, reuse, recycle: Compositional generation with mergy-based diffusion models and meme. In International con- ference on machine learning, pages 8489-8516 PMLR, 2023.
Ruiqi Feng, Tailin Wu, Chenglei Yu, Wenhao Deng, and Peiyan Hu. On the guidance of flow matching, arXiv preprint arXiv:2502.02150, 2025.
Alessio Figalli and Federico Glaudo. An invitation optimal transport, Wasserstein distances, and gradient flows. EMS, 2021.
Alexandros Graikos, Nikolay Malkin, Nebojsa Jojic, and Dimitris Samaras. Diffusion models as plug-and-play priors. Advances in Neural Information Processing Systems, 35:14715-14728, 2022.
Yingqing Guo, Hui Yuan, Yukang Yang, Minshuo Chen, and Mengdi Wang. Gradient guidance for diffusion models: An optimization perspective. arXiv preprint arXiv:2404. 14743, 2024.
11

---

Published as a conference paper at ICLR 2026
Jonathan Ho and Tim Salimans. WwXi::2207.12998 2022.
Classifier-free
diffusion
guidance.
arXiv preprint
Christian Jacobsen, Yilin Zhuang, and Karthik Duraisamy. Cocogen: Physically consistent and conditioned score-based generative models for forward and inverse problems. SIAM Journal on Scientific Computing, 47(2):C39-C4425 2025.
Korrawe Karunratanakul, Konpat Preechakul, Emre Aksan, Thabo Beeler, Supasorn Suwajanakorn, and Siyu Tang. Optimizing diffusion noise can serve universal motion priors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1334-1345 1345, 2024.
Nikita Kornilov, Petr Mokrov, Alexander Gasnikov, and Aleksandr Korotin. Optimal flow match- ing: Learning straight trajectories in just one step. Advances in Neural Information Processing Systems, 37:1041 80-1044204 2024.
Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le. Flow matching for generative modeling. arXiv preprint arXiv:2210.027477 2022.
Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning generate and transfer data with rectified flow. arXiv preprint arXiv:2209.0300 2022.
Xingchao Liu, Lemeng Wu, Shujian Zhang, Chengyue Gong, Wei Ping, and Qiang Liu. Flow- grad: Controlling the output of generative odes with gradients. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24335-24344, 2023.
Ségolène Martin, Anne Gagneux, Paul Hagemann, and Gabriele Steidl. Pnp-flow: Plug-and-play image restoration with flow matching. arXiv preprint arXiv:2410.02423, 2024.
Radford M Neal et al. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2011.
Zachary Novack, Julian McAuley, Taylor Berg- Borg-Kirkpatrick, and Nicholas Bryan. Ditto: Diffusion inference-time t-optimization for music generation. arXiv preprint arXiv:2401.12179 2024.
Pooladian, Heli Ben-Hamu, Carles Domingo-Eninn Ennich, Brandon Amos. Yaron Lip- man, and Ricky T. Q. Chen. Multisample flow matching: straightening flows with minibatch couplings. In Proceedings of the 40th International Conference Machine Learning. ICML'23. JMLR.org. 2023.
Christian P Robert, George Casella, and George Casella. Monte Carlo statistical methods, volume 2. Springer, 1999.
Filippo Santambrogio. Optimal transport for applied mathematicians, volume 87. Springer, 2015,
Jiaming Song, Qinsheng Zhang, Hongxu Yin, Morteza Mardani, Ming Yu Liu, Jan Kautz, Yongxin Chen, and Arash Vahdat. Loss-guided diffusion models for plug-and-play controllable generation. In International Conference on Machine Learning, pages 32483-3222 -3498.. PMLR, 2023.
Yang Song, Jascha Sohl-Dickstein, Diederik Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13455. 2020.
Wenpin Tang. Fine-tuning of diffusion models via stochastic control: entropy regularization and beyond. arXiv preprint arXiv:2403.06277 2024.
Zhiwei Tang, Jiangweizhi Peng, Jiasheng Tang, Mingyi Hong, Fan Wang, and Tsung-Hui Chang- Inference-time alignment of diffusion models with direct noise optimization. arXiv preprint arXiv:2405.18881. 2024.
Alexander Tong. Kilian Fatras, Nikolay Malkin, Guillaume Huguet. Yanlei Zhang, Jarrid Rector- Brooks, Guy Wolf, and Yoshua Bengio. Improving and generalizing flow- kow-based generative models with minibatch optimal transport. TMLR, 2023.
12

---

Published as a conference paper at ICLR 2026
Masatoshi Uehara, Yulai Zhao, Kevin Black, Ehsan Hajiramezanali, Gabriele Scalia, Nathaniel Lee Diamant, Alex M Tseng, Tommaso Biancalani, and Sergey Levine. Fine-tuming of continuous- time diffusion models as vatropy-regulanie
control. arXiv preprint
2024.
Siddarth Venkatraman, Mohsin Hasan, Minsu Kim, Luca Scimeca, Marcin Sendera, Yoshua Bengio, Glen Berseth, and Nikolay Malkin. Outsourced diffusion sampling: Efficient posterior inference in latent spaces of generative models. arXiv preprint arXiv:2502.06999, 2025.
Cédric Villani. The Wasserstein distances, pages 93 111. Springer Berlin Heidelberg, Berlin, Heidelberg, 2009. ISBN 978-3-540-71050-9, doi: 10.10077978-33554-70000--
URL
https://doo http:///ooo.rg./..1110 1007 540 11150-9966
Cédric Villani. Topics in optimal transportation, volume 58. American Mathematical Soc., 2021.
Cédric Villani et al. Optimal transport: old and new, volume 338. Springer, 2008.
Bram Wallace, Akash Gokul, Stefano Ermon, and Nikhil Naik. End-to-end diffusion latent optimiza- tion improves classifier guidance. Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7280-7290, 2023.
Luran Wang, Chaoran Cheng, Yizhen Liao, Yanru Qu, and Ge Liu. Training free guided flow matching with optimal control. arXiv preprint arXiv:2410.18077 2024.
Luhuan Wu, Brian Trippe, Christian Naesseth, David Blei, and John P Cunningham. Practical and asymptotically exact conditional sampling diffusion models. Advances in Neural Information 2023.
Processing Systems, 36:31372-31
Xingyu Xu and Yuejie Chi. Provably robust score-based diffusion posterior sampling for plug-and- play image reconstruction. arXiv preprint ExXi::2403.17042 2024.
Shuo Yang, Ping Luo, Chen-Change Loy, and Xiaoou Tang. From facial parts responses to face detection: A deep learning approach. In Proceedings of the IEEE international conference computer vision, pages 3676-3684, 2015.
Haotian Ye, Haowei Lin, Jiaqi Han, Minkai Xu, Sheng Liu, Yitao Liang, Jianzhu Ma, James Y Zou, and Stefano Ermon. Tfg: Unified training- free guidance for diffusion models. Advances Neural Information Processing Systems, 37:22370-22411, 2024.
Qinqing Zheng, Matt Le, Neta Shaul, Yaron Lipman, Aditya Grover, and Ricky TQ Chen. Guided flows for generative modeling and decision making. arXiv preprint arXiv:2311. 1..:23431,,344, 2023.
13

---

Published as a conference paper at ICLR 2026
A PROOFS
A. PROOF OF THEOREM 1
Recall that T Φ1 Since the transport map I'' pushes qo q1, according to Villani 2009 we have
go (x1)) @ (ar) (0)) det VT-
The resulting pushforward distribution of % under the transport map T is then
(x1)) 40 (x(T
q1 (1x1) J(z))
(#1) de (T)
of (x1),
Z (x))
Z
where the second equality follows from the definition of do and third equality follows from equa- tion 7
The proof is complete.
We note that the extension to discrete state spaces,
a (x1) = T2)) = Σ
qo (z()));
#6ET (ET-)(as) (2s)
is straightforward: By defining again (x0)) = Zo (20) (o))(())) the modified proof follows as
(=16(11)=
Σ
do(oo) &
Σ
(o ((oo))-JoT(ro) JoT(ro) x (1()))e s(m))
J((r)) x g (x1)-
ZoET-I(a)) (m1)
ToET-1 (01)
A.2 PROOF OF THEOREM 2
Before the proof of Theorem we give a useful lemma.
Lemma 1. Suppose that f(x) is L-Lipschitz continuous in æ. Then, we have
Wa(f#n S LW2(u,).
(9)
Proof. The 2- Wassersteii definition gives
inf Wf(f x(E((anaa) B(r(a)))))) llf(x) f(
Denote (f x f) y) = ((f(z), f(v)). For every x' E T(f#,, f41), we have a corresponding
F), that satisfies -" (f f. Then, have
W2( f4v)= = inf Eiawyarr [1((x) - f(y)11
*ET(uN)
< 1,2 inf Beewwar || y/1
reN(uv)
L v),
(10)
where the inequality follows from the Lipschitz property of f. Taking the square root on both sides of equation 10 completes the proof.
Now we are ready prove Theorem 2
By virtue the triangle inequality for the Wasserstein distance (Santambrogio 2015 Lemma 5.3), we have
W2(g', (o)) = W2(Ldrlæg6 (oil )o)
(11)
< W2(lol] [o go) + W2 (20l09499 [o))
(12)
Since the learned vector field has uniform error bound e and is L. Lipschitt continuous, by virtue of Theorem in Benton al. (2023), the first term can be bounded by
Wa (2(01]] # (091# cetiv.
(13)
14

---

Published as a conference paper at ICLR 2026
In what follows, analyze the Lipschitz property of of. Recall that of is the flow of the learned vector field uf. Let 24 and ye be the solutions of the ODEs
dæ = of dtt
To =
dy:- of )
yo yo.
respectively. Define A, = || well Then, we have
dA, 2(xr - Vt. di di
dx
dyt 2xx - yr, 22 (x+) - - (xxe) s 2L. |2: - =vel²² -2L, A..
di
Integrating from 0 to gives
A I Ao + 2hy / A,
By virtue of Grönwall's inequality, we have
A 5 By taking the square root, have that (x) is e -iisschit continuous in æ. In particular, at t t= 1, of (x) eh Lipschitz continuous. Then, it follows from Lemma that the second term is bounded by
1100 voll² 2hat
W2(1o]1+0o (0) S Se We"WWe 90).
(14)
Substituting equation 13 and equation 14 into equation 11 we have the desired result. The proof is complete.
B ADDITIONAL DISCUSSIONS
B.1 RELATED WORKS
Diffusion guidance:
Conditional sampling has been widely studied in diffusion models (Chung al. 2022; Song et al. 2023 Ye al. 20244 Guo et al.) 2024, Wu al. 2023 Xu and Chi
2024
Bruna and Han (024). However, the diflusion model requires the source distribution to be Gaussian, and cannot handle general source distributions. Therefore, these guidance methods cannot be applied here.
Flow matching guidance: The flow guidance methods can be divided into two groups: training- based guidance and training-free guidance. Training-based guidance (Zheng et al. 2023) requires retraining when we have a different conditioning. Therefore, this paper focuses on training- guidance (Ben-Hamu et al. [224]] Feng et al.] (2025). One closely related training-frree guidance method is D-Flow (Ben-Hamu et al. 2024). which proposes to optimize the source samples via regularized optimization problem. However, its optimization objective is heuristic, whereas framework provides the missing theoretical foundation. Besides, Feng et al.] (2025) proposed a training-free guidance method that keeps the original source distribution and modifies the vector field. Such an approach generates curved vector fields and, therefore, requires a large number of discretization steps integrate the ODE. Moreover, the exactness of this guidance method applies to limited class of pre-trained vector fields and lacks generality.
Guidance via stochastic optimal control (SOC): Optimal control methods have been used to guide generative models (Uehara et al. 2024 Tang 2024 Wang et al. 2024) Domingo-Earich et al., 2024]. Specifically, Wang et (2024) augments the vector field with an additional control term, obtained by solving a SOC problem. However, Wang et al. (2024) does not connect the generated distribution with the target distribution, and there is a bias between these two distributions. The works|Ueharrs et al.) (2024): 'Tang (2024) cancel out this bias by both modifying the vector field and shifting the initial distribution. More recently, DDoiiooooonnnnn Enrich et al. (2024) showed that solely ad- justing the vector field is able to remove the bias if the noise schedule appropriately selected. Our method is orthogonal to the guidance methodology of Domingo-Emmnn Enrich et al. (2024): we remove the bias by solely shifting the source distribution. Moreover, whenever have new guidance energy function, COC-based guidance methods have to re-solve the SOC problem, which is computationally expensive.
15

---

Published as a conference paper at ICLR 2026
Guidance by optimizing the source distribution:
Conditional generation by optimizing the
source distribution has been explored in
et al. 2 Wallace et al. (2023); |: Tang et al.
(2024); Novack et al. (2024); Karunratanakul et al. (2024) These works propose propagate the gradient from the target criteria through the whole generation process to update the initial noise. However, their optimization objectives are heuristically designed without theoretical justification.
One exception is Venkatraman et al. (2025). which provides a justification for achieving exact guid- ance by modifying only the source distribution. We extend this line of work by giving an error analysis that explicitly delineates when such approaches are effective. Moreover, whereas Venkatra- man et al. (2025) emphasizes training-basee guidance, our focus is on training- free methods.
B.2 SAMPLING ALGORITHMS
A key strength of SGFM is that it reduces guidance well-defined sampling problem, enabling users to flexibly choose the most suitable method for their specific problem. For low-dimensional problems, importance sampling is simple and asymptotically exact method, described in Sec- tion 4.1 For more complex distributions where gradient information is available and a minor bias acceptable, the Unadjusted Langevin Algorithm (ULA) (Robert et al. 1999] offers efficient op- tion. If asymptotic exactness is required and the computational budget is larger, a better alternative is MetropolissAAjjusted Langevin Algorithm (MALA) (Robert al. 1999), which corrects ULA's bias. For extensive exploration of complex, high-dimensional distributions, HMC would be pre- ferred. In the most complex cases, we may use aptimization-basee approximate samplers as de- scribed in Section 4 Below, we give further details on some of these methods. Beyond classical methods, promising approaches to approximate sampling include variational inference and recent ciitusion-basedd samplers (Berner et al., (022). cf. Venkatraman et al. (2025). Implementation of these is left for future work.
B.2.1 IMPORTANCE SAMPLING
Following the discussion importance sampling (IS) in Section a de- tailed outline of the method with target density q gí and proposal den- sity m
go is given in Algorithm (Chopin and Papaspiliopoulos 2020
Algorithm 2: Importance Sampling
1: Input: samples from 4о ~ qo
2: Set w--) A (-(-)
(-(-) e JoT'
3: Compute weights W w
(
4: Sample <6 from {xā} with probabilities {W"}
5: Output: sample z/ from %
B.2.2 UNADIUSTED AND METROPOLIS ADJUSTED LANGEVIN ALGORIHHS
The Unadjusted Langevin Algorithm (ULA) Robertt et al.
1999 generates approximate samples
from target distribution with density (ι)) x exp( exp(-U(ar (x)) by discretizing the Langevin stochastic differential equation (SDE). Specifically, given step-size П) > the ULA update
1t++
F4 (U(x)) /21R, Ex,
(15)
where & -N I) are independent Gaussian noise. Due to discretization errors, ULA introduces sampling bias.
The Metropolis Adjusted Langevin Algorithm (MALA) (Robert et al. 1999 improves upon ULA by incorporating a Metropolis- Hastingss correction step to ensure exact sampling from the target distribution (xx). Given a current state Wk. MALA proposes candidate x' via
d'= 2 (xx)) + 22m, En.
(16)
and accepts it with probability: a(zx, x²) min { (an')a(zs (an) ) where q(+l.) denotes the tran- )(zz)g(a"
sition density induced by the proposal step. If rejected, the chain remains at Zg. This correction guarantees that the stationary distribution matches exactly the target distribution =(r).
16

---

Published as a conference paper at ICLR 2026
Algorithm 3: Leapfrog integrator 1,,,L
1: Input: initial state (ro, Uo);
Po U0 2 (V())))
for m
L do
Em-1 = Im eUmi
Um+1 vm <Vu(mm+))
UL UL + (UL)) 2: Output: (Zi,, U1.)
B.2.3 HAMILTONIAN MONTE CARLO
Hamiltonian Monte Carlo (HMC) (Neal et al. malized continuous densities on Ra where partial derivatives of the log density exist. By associating the target variable with the position of a particle in space and the density with its potential energy, the method introduces an auxiliary momentum variable and implements Hamiltonian dynamics to achieve extensive exploration while maintaining a high acceptance probability.
2011) is an accept-reject MCMC method for unnor-
Specifically, the unnormalized target density @ is expressed in canonical form g(x) xx e e-U(w), where U(r) - - In (x)) represents the potential energy. The momentum variable gives the kinetic energy K(u) ||ell" This forms the Hamiltonian H(x, v) U(x)+ + K(v) with the associated joint
2
distribution x (2:, v) -(V(=)+((v)) where x and considered independent with marginals and the standard Gaussian distribution respectively. HMC generates samples from æ with MCMC, where each chain iteration starts by resampling the momentum, v' ~ (O, I), while keeping the position unchanged, x' x. Then, Metropolis update step is implemented by generating proposals using Hamiltonian dynamics
dr du
dt = dt
V
(17)
to propagate (z',e') along trajectories of constant energy to (x", v*) and accepting the new state with probability a r(x .x²
Integrating equation 17 with the leapfrog method (Algorithm ensures a as H is approxi- mately constant and the transformation is volume-preservive Still, the integration may move x to positions with very different marginal density (xx). The resampling step prevents the marginal U from being constrained by the initial value of H. Thus, the momentum variable is critical for effi- cient exploration of space. Algorithm implements HMC when q = 46- initializing the process by 40-
HMC can tuned by appropriately choosing the step size and the number of leapfrog steps (Neal al.) 2011). It is generally advised choose the parameters such that the empirical acceptance rate iS around the optimal value of 65%. One may also randomly select these parameters from fairly small intervals at each Markov chain iteration to ensure that both big steps and fine-tuning steps can be taken at various points in the chain.
B.2.4 OPTIMIZATION-BASID SAMPLING
To solve equation or equation 5 we can use any preferred optimization algorithm such as stochastic gradient descent (SGD) or Limited-memory
(L-BFGS), Using the torchdiffeq package, the gradient the objective can computed via automatic differentiation.. With access the gradient, iteratively refine the initial sample using a standard update rule. (0) the update takes the form
Starting from an initial 2n
(k+1) = OPT (*) T
where OPT Alg denotes the chosen optimization routine. We can feed the final x into T to generate the sample .1 7 (x
17

---

Published as a conference paper at ICLR 2026
Algorithm 4: Hamiltonian Monte Carlo
1: Input: samples from Zo ~ 9o:
for 0 to N do
(0,
(x 00) = (e,, u/);
Q= (o(="))((')) (((.))(K)))
Draw u 1(0,
u < then
L In+1 x²
else
L Zn+1 In
2: Set z/p IN
3: Output: sample on from %
B.2.5 REGULARIZERS FOR NON- GAUSSIAN SOURCE DISTRIBUTIONS IN SAMPLING
OPTIMIZATION
We first note for clarity that our theory (Theorems 1-2) holds for non-Gaussian source distributions qu- While the regularization expressions we exemplify in the main paper are specific the standard Gaussian distribution, the design procedure naturally extends to other choices of source distribution. Specifically, we formulate the optimization problem as min, ((T())) + R(x)., where the regular-
ization term R(x) should be small when a lies in high density region of 40- Table 6 summarizes possible designs of R(x) corresponding to non-Gaussian source distributions.
Table 6: Example designs of R(x) beyond Gaussian source distributions
Source distribution
Regularizer R(x)
Intuition
Gaussian
(||=] rr)
Keeps samples around shell with radius
Anisotropic Gaussian (000 Σ)
(Væ (V E-
Keeps samples around high- density ellipsoid.
Mixture of Gaussians Laplace
mina (x- m4x) B([|=]11 - s)²
T "xx" 'xx(x--0 -Tr()))
Union of component shells Keeps samples around a typical I1-norm magnitude
Uniform (bounded support)
dist(2; B)²
Keeps samples close the sup- port
Manifold prior
dist(z, M)²
Keeps samples in or close to the manifold.
C ADDITIONAL EXPERIMENTAL DETAILS
C. 2D EXPERIMENTS
In this section, we present more details the 2D example in Section 5.1 including implementation details and additional experimental results. All experiments were run on a single NVIDIA A.00 GPU.
C.1.1 IMPLEMENTATION DETAILS
Flow matching model: The vector field is approximated using time- varying multilayer per- ceptron (MLP) adopted from Tong et al. (2023). We train a standard vector field model using an independent coupling distribution do 9 and an optimal vector field model using the optimal
18

---

Published as a conference paper at ICLR 2026
joint distribution x² in equation employing the Adam optimizer.
| Each model is trained for 20,000 epochs with batch size of 256,
Conditional sampling: We consider three pairs of source and target distributions: (i) 8-Gaussian to Moon, (ii) Uniform to 8-Gaussian, and (iii) Circle to S-Curve. For these three tasks, we respec- + + and J(x) = 5| x [2]
tively select loss functions J(x) ((x12))2)/0 /0.4, J(x) +|z[1]+ where z = (z[1], x22)).
Implementation of D-Flow in Ben-BBn-amma et al. (2024): Among several choices regularization terms in D-Flow, employ -I. qı, which ensures the generated samples stay close to the target distribution Q1- Although 9ı generally lacks an explicit form, in this 2D experiment, we approximate it using kernel density estimation. For the pre-trained vector fields used in D-Flow, evaluate two variants: a standard model trained with an independent и = go X X and an optimal vector field model trained with n² in equation I We refer these variants as D-Flow and D-Flow-OP respectively. In the optimization process, we use 60 optimization steps and employ SGD as the optimizer.
Implementation of methods in Feng et al. (2025): Among several training-fret free methods in Feng et al. (2025), we select two of the best methods g-sim-MC and g-MC, which perform well in low- dimensional settings. We use 100 and 50 Monte Carlo samples for g-sim-MC and g-MC, respec- tively. For both methods, the pre-trained model is selected as the optimal vector field.
We evaluate SGFM with four sampling methods: IS, ULA, MALA, and HMC. For ULA, MALA, and HMC, we run 100 sampling iterations. In both MALA and HMC, the proposal step-size is tuned to target an acceptance rate of 60%. Besides, each HMC iteration employs L leapfrog steps.
Implementation of SGFM:
Evaluation metric:
The sample quality is measured using the empirical 1- I-Wasserstein distance between the generated and ground truth distributions. In Figure the generated distribution is esti- mated using 2000 samples, while the ground truth distribution estimated using 10, 000 samples. In Figure 5 the generated distribution is instead estimated using an increasing number of samples as indicated by the z-axis. All experiments were conducted ten times, with solid lines and shaded areas representing the mean and standard deviation.
C.1.2 IMPACT OF TRE-TRAINED VECTOR FIELDS ON GUIDANCE PERFORMANCE
In Section 5.1 we evaluate the impact of pre-trained vector fields on guidance performance. We provide more details here. The Lipschitz constant L, for each of the fields is empirically approx- imated by evaluating the derivative at 50000 uniformly selected points using autodifferenniation. Here, X' is the domain of the source and target samples. The guidance performance evaluated using the Wasserstein distance between the true target distribution and the generated distribution. We use 10,000 samples from the target distribution as ground truth and gen- erate 2,000 guided samples for evaluation. The guidance error (Wasserstein distance) is reported as mean standard deviation over 20 runs.
the domain [0, 1] x X
1.1.3 ADDITIONAL RESULTS
We conduct an extensive comparison across different source and target distributions. The generated distributions are visualized in Figure 7 In the first experiment (8-Gaussian to moon), we observe that all the baseline methods and most Langevin-based algorithms struggle. The key reason is the highly multimodal landscape of this task, which makes the sampler easy to get trapped in local min- ima. However, SGFM-IS successfully navigates the posterior distribution. In the second experiment (circular to S-curve), many guidance methods perform well, but D-Flow tends to overemphasize minimizing the loss J/ and loses sample diversity. In the third experiment (uniform to S-curve), we observe that D-Flow fails to generate a satisfactory conditional distribution, and g-MC exhibits slight deterioration in sample quality. Across every experiment, SGFM-IS consistently delivers high-quality, diverse samples, with SGFM-MALA and SGFM-HMC providing strong alternatives the latter two tasks.
19

---

Published as a conference paper at ICLR 2026
Q1
S
c (ground truth)
D-Flow
D-Flow-OT
g-sim-MC
g-MC
SGFM-IS
SGFM-ULA
SGEM-MALA
SGEM-HMC
Figure 7: Results of synthetic datasets with different source distributions (marked in blue) and target distributions (marked in red).
20

---

Published as a conference paper at ICLR 2026
We provide additional experiments that evaluate the sample quality with other pairs of source and target distributions. Since the distributions are simple and -ow-dimensional, we adopt IS as the sampling method and refer to guidance method SGFM-IS. Figure & presents the generation results with an 8-Gaussian source distribution and a moon target distribution. We observe that SGFM-IS achieves superior sample quality across varying running times. However, both baseline methods perform poorly and more running time did not help. The primary reason for failure is the multi-modal structure of this generation task, which makes samplers trapped in local optima, as illustrated in Figure / These results underscore the flexibility of our guidance framework, which allows for the tailored selection of advanced sampling strategies to suit different tasks.
1.6
1.4
Wasserstein Distance
1.2
1.0
0.8
0.6
D-Flow
0.4
g-mc
SGFM-S
0.2
10
10
Running Time
Figure 8: Comparison of sample quality and running time in 2D example, with an 8-gaussian source distribution and moon target distribution.
Figure presents the generation results with a circle source distribution and an S-curve target dis- tribution. We observe that D-Flow performs even worse with increasing running time. As shown in Figure 7 D-Flow tends to overly transport points to the line x[1] = 222). indicating that D-Flow overemphasizes minimizing the loss / and loses sample diversity.
0.7
Wasserstein Distance
0.6
SGFM-15
0.3
10-2
10
10"
10
Running Time
Figure 9: Comparison of sample quality and running time in 2D example, with circle source distribution and an S-curve target distribution.
21

---

Published as a conference paper at ICLR 2026
C.2 PDE INVERSE PROBLEM
In this section, we provide more details on the physics-informed inverse problem in Section 5.2 including an outline of the Darcy flow equations, implementation details, and additional sample outcomes.
C.2.1 DARCY FLOW EQUATIONS
Darcy flow is an elliptic PDE describing fluid flow through a porous medium,
u(x) = --((x) Vp(x), E Ω
Vu(x) f(xx.
x(x) ii(x) = O,
E an
(18)
[ (xx)dx= O, 8
where K is the permeability field, f is a source function, and is the resulting pressure field. In alignment with Bastek et al. (2024); Jacobsen et al. (2025), consider the equations on square domain f = [0. 1J with resolution 64 x 64 and let be a constant function. In this setting, a dataset of pairwise solutions (K,p) p) is offered by |Bastek al. (2024), which is generated by translating equation 18 to a linear system using finite difference approximations of the derivatives, and then solving this system.
C.2.2 IMPLEMENTATION DETAILS
The vector field defining the flow-matching model is approximated using a U-Net architecture adopted from Tong et al. (2023). The source distribution is standard Gaussian distribution. In addition to the flow matching objective, the loss is regularized by the physics-residual DaattnngBatekk data-space estimate and we select Σ. = _= and c = 10-2. The model trained on 10* samples
Flow matching model:
following Basttek et al. 2024). The residual is computed using こ from (Feng et al. 2025 Eq. 4) as
for 200 epochs using the Adam optimizer with an initial learning rate n = 10 which decays exponentially with a factor 0.99.
Conditional sampling: All methods are initialized by the same set of samples from the unmodi- fied source distribution. To balance the scale of the cost function J and the prior probability log go- the cost is scaled by a factor where À 10-3 To simulate setting where true solutions unavailable, all methods were tuned before observing the validity scores the outcomes.
Implementation of SGFM-HMC: SGFM-HMC implemented by rumning the HMC algorithm for NHMC = 100 steps with I. 3 leapfrog steps, where the step size is randomly selected in each Markov chain iteration as e = x (10-1 the chi-squared distribution with two degrees of freedom. We found that this setting gives good acceptance ratios while allowing for a significant number of HMC iterations to be performed without having too long runtimes. The transport map is obtained by integrating the neural ODE associated with the vector field for two steps using the Dormand-Prinn (Dopri5) method. We use the same transportation map both for the density computation in the HMC iterations and map the sampled source point to the target space.
10-3) where Ç X 22) with x²( being
Implementation of SGFM-OPT-I and SGFM-OPT-2: SGFM-OPT-I (equation 4 and SGFM- OPT-2 (equation 55) are implemented using L-BFGS optimization with learning rate 7) 1, maxi- mum iterations of 20, and history size 100. The method is allowed to run for the same amount of runtime HMC (which corresponds approximately 15 optimization steps), but usually converges before that. The transport map is designed as SGFM-HMC.
Implementation of g-covA: g-covA (Feng et al. 2025) is implemented using a linear schedule X = 10 x X. We found that Agovy X not sufficient to observe significant change in the guidance cost, while this choice achieves the lowest guidance cost all methods. The ODE is integrated for three steps with the Dopri5 method, additional steps had effect performance.
22

---

Published as a conference paper at ICLR 2026
C.2.3 ADDITIONAL SAMPLES
To elaborate on the results in Figure we present the pressure sampled jointl with K for each of the outcomes Figure 6 (where instead the true pressure P& corresponding to K is shown) in Figure I0 Note that P serves as basis for the guidance signal since Pæ is considered inaccessible. We observe that á generally aligns well with the target, while Figure 6 many methods struggle with a large mismatch of Pk to target. This is because the process is driven to improbable pairs
(p, K). leading the mismatch between Pε and p. This is also reflected by poor validity score despite a low guidance cost. Finally, we present additional outcomes of Pk and K in Figure
Target
SGFM-HMC
SGFM-OPT-1
SGFM-OPT-2
g-CovA
g-covG
PnP
Pressure
Ip A
Permeability (i
Figure 10: Solutions the inverse problem of the Darcy flow equations. Top: target pressure and sampled pressure á (which sampled jointly with inverse estimate K and serves as basis for the guidance signal); middle: target reconstruction error; bottom: inverse estimate K of the permeability field generated by conditional sampling.
23

---

Published as a conference paper at ICLR 2026
SGFM-HMC
SGFM-OPT-1
Pk
SGFM-OPT-2
g-CovA
Px
K
g-covG
pk
PnP
pk
Figure 11: Solutions to the inverse problem of the Darcy flow equations additional outcomes following the target in Figure 6 Top: true solution P& corresponding to inverse estimate K; bottom: inverse estimate K of the permeability field generated by conditional sampling.
24

---

Published as a conference paper at ICLR 2026
C.3 IMAGE INVERSE PROBLEM ON CELEBA
C.3.1 IMPLEMENTATION DETAILS
The regularizers or constraints used in different variants of aptimization-basee sampling were sum- marized in 3 For regularization based methods, we introduce weighting coefficient and tune it to achieve optimal performance. For the constraint-based method, we project the solution onto the hyperspherical shell after each update.
25

---

Published as a conference paper at ICLR 2026
C.3.2
GENERATED CELEBA SAMPLES
Depided
RARK 9:10
PALL
PAX 1A0
PAXK FL.
PAR
PWwC PA37
SOPM OPEL
MAN 21D
FUm
3300
PAL
SSPH OPT2
MAN FLAT
FOR XUM
PARK
PAYK 2004
SOH OPTO
MAX JA-
FUR FAMM
PARK 63.72
PARK
COPNOPTT
Figure 12: Comparison of image restoration methods on CelebA.
26

---

Published as a conference paper at ICLR 2026
C.4 MNIST IMAGE GENERATION
C.4.1 CONDITIONAL GENERATION ON MNIST
We perform conditional image generation experiments the MNIST dataset, where the generated samples are con- ditioned provided labels. Given target label, the loss function corresponds to the negative log-likeldood of the label computed via classifier. We select ULA our sampling method and benchmark its performance against the baseline method g-covA in Feng et al. 20255).
Method Accuracy FID
SGFM-ULA 87.6%
g-covA 98.5%
46.7
57.1
Table 7: The label accuracy (higher is better) and FID (lower is better).
Performance is evaluated using the Fréchet Inception Distance (FID) and label accuracy. A separate classifier determines accuracy avoid overconfidence. The experimental results, detailed in Table indicate that while our proposed method yields relatively lower label accuracy, achieves superior FID score. Figure 13 presents illustrative examples of generated images from both methods. We observe that although g-covA consistently generates images corresponding to the correct digits, the generated samples exhibit limited diversity, characterized by uniformly thick strokes and similar visual styles. In contrast, the ground ground-truth MNIST distribution inherently comprises digits exhibiting diverse shapes, styles, and stroke widths. Our approach demonstrates improved sample diversity over g-covA (although with some degradation in quality compared to ground truth). This gives better covariance match between the empirically generated distribution and the real data distribution, resulting in lower FID score.
1333333111131 55 01
555
5 5
5
5
5
5555
5 5 56
5 55555 5
5
5
4: 5
S 5 5 5 55555
3 5 00005555
5 5
555 555555555
6
5
5
5
555555555
7 5
5
55555555
5 S
5 5
555 5555555555
7 5
5
5
5 3
5
5
5 5555555555
5
5 $ 5 5 5 5 5
(a) Ground truth
(b) g-covA
(c) SGEM-ULA
Figure 13: MNIST sample generation conditioned on digit 5.
C.4.2 IMPLEMENTATION DETAILS
Pre-trained models: For the classifier used for guidance, we train convolutional neural network classifier on MNIST, which achieves accuracy of 96.8% on the standard test set. For the classifier used for evaluating the accuracy of generated samples, we adopt an independent pre-trained Vision Transformer " which achieves higher robustness with accuracy of 98. 7% the testing distribution. Following Tong et al. (2023), the vector field model used in our experiments trained using a U-Net architecture initialized from Gaussian distribution. It was trained for three epochs, each consisting of 468 iterations.
Conditional generation: The objective of this task is generate images conditioned speci- fied label and stay close to the original dataset. The guidance for this conditional generation utilizes loss function J defined the negative log-probability of the targeted label
(xx = - log (olllmmx(hh((())))
where hxx) represents the logits returned by pre-trained classifier. To balance the scale of the cost function and the probability density function, we scale the loss function / by with À = 10
27

---

Published as a conference paper at ICLR 2026
Implementation of the method in Feng et al. (2025): We select g-covA as the baseline method
Feng et al. (2025). which shows superior performance in image problems. We use a constant schedule X A The ODE is integrated for 100 steps using the DopriS method.
Implementation of SGFM-ULA: SGFM-ULA is implemented by running the ULA algorithm over maximum of 150 steps with batch size of 16. The step size in each iteration selected as 5 x 10 X Ç. where Ç ~ (2) with (2) being the chi-squared distribution with two degrees of freedom. Each batch takes about 218 seconds to process.
Evaluation metric: We assess the quality of generated images using the Fréchet Inception Dis- tance (FID), which measures the similarity between two distributions based on their means and covariances. The reference images used in the FID calculation subsets of the MNIST training dataset corresponding to each target label, and evaluations are performed using 400 samples.
28

---

Published as a conference paper at ICLR 2026
C.5 ODE FORWARD PROBLEM
In this section, present another example of conditional generation in the context of physics- informed generative modeling. Instead of the Darey flow equations (equation T8), we consider an ODE with truncated solution trajectories. Compared to the problem in Section 5.2 this example has lower dimension which allows us to further explore how well the SGFM framework and benchmark methods approximate the target distribution.
C.5.1 CONDITIONAL GENERATION OF ODE TRAJECTORIES VIA FLOW MATCHIING
Consider the ODE
+(1) = -00x(())- + 0, sin(O =<0) -, x(1) ER
(19)
where a flow matching model is trained to sample from the joint distribution of the ODE parameters (0a, Ob. 0w] - 0 u(113) and the set of corresponding discretized solutions E 1R000 The source distribution a standard Gaussian distribution for the parameters and a Gaussian Process with zero mean and squared exponential kernel for Ie to encourage smooth solutions.
The conditional sampling problem is to generate solution trajectories consistent with a partial observation of the ODE parameters [0 0g -]. which defines a family of admissible solutions fzeg,0r.- [(1.3) The cost function is the reconstruction error of the target parameters, [[,,, xz) = + 12 |0, - 0 112. This corresponds to soft constraint on 0g and 0,. since the marginal target distributions for 0₂ and 0, then behave like posteriors with uniform priors and Gaussian likelihoods. Figure 14uure|44shorr shows samples from the unconditional model and conditional samples using SGFM- HMCC SGFM-OPT (Ben- ren-Hamuu al. 2024) corresponding to equation and g-covA (Feng al. 2025
110.-0 -0
Unconditional sampling
SGFM-HMC
SGFM-OPT (D-Flow)
gov
Thue Sampled
Sampled
Sampled
Sampled
Figure 14: Solutions to the forward ODE problem. Samples [0, xz) E R20S consist of ODE parame- ters 8 ~ (1, 3)3 and corresponding solution trajectories xg R foo, The conditioning set consists of partial observation of the ODE parameters, [0", 0%. -l, which yields a family of admissible solu- tions (20g.00, )..
We evaluate the methods by generating 10sh samples and assessing both their physical consistency and how well the empirical distribution approximates the target distribution. The latter evalu- ated by comparing the parameter outcomes to equal-tailed credible intervals derived from the target distribution, which are obtained by MCMC simulation. The results in Figure 15 show that SGFM- based methods generate samples of higher physical consistency compared to g- Furthermore, SGFM-HMC achieves the most representative distribution over the parameters. In contrast, SGFM- OPT collapses the modes for the conditioned parameters 0,, 0, and importantly fails to capture the full admissible range of the unconditioned parameter Ow, g-covA, on the other hand, captures the full range of admissible 0. but excessively generates values outside of the credible intervals, some- times outside of the training data distribution. Thus, we conclude that SGFM- HMM best approxi- mates the target distribution. Together with the PDE inverse problem in Section 5.2 this illustrates the trade-off between asymptotic exactness and computational complexity that the methods within SGFM can balance: SGFM-HMC yields more accurate empirical distribution, while SGFM-OPT methods are faster at the expense of local mode collapse.
In this example, the source distribution is not directly compatible with equation 4 equation However, cquation 3 remaiin applicable, which reflects the hase implementation in D-Flow.
29

---

Published as a conference paper at ICLR 2026
Physical consistency
Outcomes of ODE parameters
700
SGFM-OP OPT (D-flow) gow-A
value
Raquency.
500
300
9, Iconditioned)
[conditioned]
Bu (unconditiened)
100
99% crecible interval
8.00
0.25
0.50
0.75
1.00
1.25
1.50
1.75
2.00
SGFM-HIMC
SGFM-OP1 (D-Flowl
geti
eerror
Method
Figure 15: Physical consistency of samples and closeness of the empirical distribution to the target distribution. The physical consistency is measured by the relative 1,a error between the sampled tra- jectory and the true trajectory under the jointly sampled ODE parameters. Each method's ability to capture the target distribution is then assessed by analyzing the empirical distribution of the sampled ODE parameters. In the ideal case, 99% of the samples fall within the credible interval indicated by the dashed lines. The true marginal target distributions for the conditioned parameters 0a. As behave like posteriors with a uniform prior and Gaussian likelihood, so the outcomes are expected to distribute smoothly across the bounds. Similarly, the true marginal target distribution for the un- conditioned parameter O,, is a uniform distribution, so the outcomes are expected be distributed uniformly across the bound.
C.5.2 IMPLEMENTATION DETAILS
Flow matching model: The vector field defining the flow-matching model is approximated using an MLP similar to Tong al. (2023) with four hidden layers of size 256 and SELU activation functions, Furthermore, we add a Gaussian smoothing filter with non-learnable parameters on the last layer to encourage smooth solutions. The source distribution is standard Gaussian distribution for the ODE parameters and a Gaussian process with zero mean and squared exponential kernel having length scale / 1. The dataset consists of 10* samples which generated by sampling 0 ~ (11,3) and integrating equation 19 for & E [0, 5) using the Fuler method with A/ = 0.05. The model is trained for 10 epochs using the Adam optimizer with learning rate 17 10-3
Conditional sampling: All methods are initialized by the same set of samples from the unmodi- fied source distribution. To balance the scale of the cost function J and the prior probability log 4o- the cost is scaled by a factor where À = 5 x 10-2
Implementation of SGFM-HMC: SGFM-HMC is implemented by running the HMC algorithm for NHMC = 200 steps with L = 50 leapfrog steps, where the step size randomly selected each x 15) where
Markov chain iteration as 10-1(11 distribution with two degrees of freedom. We found that this setting gives good acceptance ratios while allowing for significant number of HMC iterations to be performed without having too long runtimes. The transport map is obtained by integrating the neural ODE associated with the vector field for two steps using the Dormand-Prince (Dopri5) method. We use the same transportation map both for the density computation in the HMC iterations and to map the sampled source point to the target space.
(1 +
x" (2) with (2) being the chi-squared
Implementation of SGFM-OPT: SGEM-OPT is implemented using L-BFGS optimization with learning rate 17 maximum iterations of 20, and history size 100. The method is allowed to run for approximately the same amount of runtime as HMC (which corresponds to 160 optimization steps), but usually converges before that. The transport map is designed as in SGFM-HMC. We use the same transportation map both for the density computation in the D-Flow iterations and to map the sampled source point the target space.
Implementation of gocov: g-covA (Feng et al. 2025) is implemented using a constant schedule X X. This choice cancels out the loss scaling factor x and other alternatives either degrade
30

---

Published as a conference paper at ICLR 2026
physical consistency impose weak constraints on the conditioned parameters. The ODE is inte- grated for three steps using the DopriS method, additional steps had no effect on performance.
D LIMITATIONS AND FUTURE WORK
Similar to other guidance methods that optimize the source samples, one limitation of our method lies in the long runtime due to the need to backpropagate through the ODE. Consequently, it would be interesting to incorporate efficient backpropagation optimal vector field requires access the OT coupling, which becomes particularly challenging in high-dimensional settings. Although we can approximate π using mini-batch data or entropic OT solvers, these approximations can introduce bias and may scale well. Developing a more efficient and scalable approach to training the optimal vector field is another important avenue for future research.
our framework. Additionally, training the
This paper employs Large Language Models (LLMs) exclusively for the purpose of polishing written text.
31


Reviews:
[{"review_id": "tnpKSvZzBf", "reviewer": "Reviewer_3Ext", "summary": "This paper introduces Source-Guided Flow Matching (SGFM), a novel framework that guides generative models by modifying the source distribution rather than the vector field. The key motivation is to keep the pre-trained vector field intact while only adjusting the source distribution to achieve conditional generation. Specifically, this approach transforms the guidance problem into a well-defined task of sampling from a modified source distribution. This work also demonstrates that this approach precisely recovers the desired target distribution under ideal conditions and provides Wasserstein error bounds for cases involving approximate samplers and vector fields.", "questions": "N/A", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "1. The core methodology is grounded in a theoretical result, Theorem 1, which states that if a vector field with flow map transports a source distribution to a target distribution, then for a desired new target distribution, there exists a modified source distribution that is precisely transported to the target one by the *same* vector field. This theorem provides the foundation for SGFM.\n\n2. The framework also provides theoretical guarantees to ensure the quality of generated samples. Besides, the practical implementation of SGFM hinges on accurately and efficiently sampling from the modified source distribution. The paper emphasizes the flexibility to choose sampling methods based on problem specifics.  Experimental evaluations on synthetic 2D datasets demonstrate SGFM-IS's superior sample quality (lower Wasserstein distance) and asymptotic exactness.", "weaknesses": "I am not familiar with the field. Here are a few comments:\n\n1. Practical experimental setup: while this work provides solid theoretical derivations guaranteeing the quality of generated samples, all experiments were conducted on relatively small datasets. For large-scale datasets, such as the class-to-image task on ImageNet with vanilla diffusion model, i.e. DiT and SiT, it remains to be seen whether this work can also achieve high-quality generated samples. I hope the authors can provide implementation results on this task, and it is suggested to report gFID and gIS metrics.\n\n2. How to obtain the value of $J$: How should this parameter be handled in practice, given its critical impact on the modified target distribution?\n\n3. The paper clearly notes that optimization-based methods (like D-Flow) can suffer from mode collapse, but does not propose a general solution beyond using more advanced samplers like HMC.\n\n4. The theory assumes access to an optimal or near-optimal vector field. In practice, learning such a field is non-trivial, especially in high dimensions.\n\n5. While the method is general, most experiments use Gaussian source distributions. More analysis on complex source distributions would be beneficial.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "t5C0yk8qmU", "reviewer": "Reviewer_T7yj", "summary": "The paper presents an approach for guided sampling using flow matching by changing the source distribution while keeping the pretrained vector field intact. The authors theoretically derive the form of such a source distribution. Building on this, the authors derive the bound for the Wasserstein error in generative modeling and show that it is linear in terms of the error in sampling from the source distribution. Based on this finding, the authors propose various strategies for accurately sampling from the source distribution. Through empirical analysis on 2d synthetic, physics-based Darcy flow, and natural image datasets, they show the effectiveness of their approach compared to the baselines.", "questions": "1. In line 91, please define the composition operator $\\circ$.\n\n2. For Darcy flow data, how was the conditional sampling done based on a partial pressure field? Did the authors use masking in the ODE reverse process to achieve this?\n\n3. Please explain the usefulness of the \"validity of the inverse estimate\" metric when it is observed that the joint sampling matches closely with the target pressure field.", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "I appreciate the thorough theoretical analysis in presenting the method. The writing is clear, and all the theory was backed by intuition. The idea of modifying the source distribution through the constraint function is interesting and has not been explored as far as I am aware.", "weaknesses": "I am not very familiar with the baselines that have been compared with. The main weakness of this method is the weak empirical performance on the Darcy flow data. The promise of this method, as I see it, is in enforcing constraints (differentiable) in the generative modeling. Therefore, physical consistency is an important metric in which the method falls short compared to PnP. This is not a major weakness; however, I would request the authors to add a discussion on this.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "FooBS2zFtJ", "reviewer": "Reviewer_Tm1L", "summary": "This paper presents the Source-Guided Flow Matching (SGFM) framework that modifies the source distribution directly to incorporate the guidance for flow matching. This framework is backed by the theorem that sampling from the modified source distribution and driving the flow along the exact vector field precisely recovers the desired target distribution. Based on this, the paper also provides the Wasserstein convergence guarantee. The framework is open for different sampling methods to sample from the modified source distribution. Finally, the paper experiments on synthetic 2D benchmarks, physics-informed generative tasks and imaging inverse problems to demonstrate the effectiveness and flexibility of the proposed method.", "questions": "•\tIs it possible to address the mode collapse issue with annealed sampling or add some other types of regularization term to equation (4) similar to (5)? What kind of regularization term should we use when the source distribution is not Gaussian?\n\n•\tThe proposed method requires additional sampling procedure from the modified target distribution compare to the standard flow matching method. What is the benefit of the proposed method compared to the guided flow matching methods like [1] that does not require the additional sampling procedure?\n\n•\t[1] Xie, T., Zhu, Y., Yu, L., Yang, T., Cheng, Z., Zhang, S., ... & Zhang, C. (2024). Reflected flow matching. arXiv preprint arXiv:2405.16577.", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "•\tThe paper is well-written and clearly-organized. The center of the proposed method based on modifying the source distribution is focused with in-depth discussion.\n\n•\tThe framework is flexible to combine with different types of sampling methods based on the characteristics of the target distribution. The pros and cons of different methods are discussed in Section 4.\n\n•\tThe experiments are selected from low to high dimensional problems, which is comprehensive.", "weaknesses": "•\tThe clarity of the notations could be improved. For example, it would be better to denote samples from $q’_0$ by $x’_0$ rather than $x_0$ in Algorithm 1 to reduce ambiguity.\n\n•\tEven though the framework is flexible to incorporate different types of sampling methods, the mode collapse issue when the target distribution is highly non-concave still remains. In addition, the remedy to mitigate the mode collapse issue in line 309 only adapts to the Gaussian source distribution, it remains unknown whether it could extend to general source distributions.\n\n•\tIt would be beneficial to add the variance interval in Table 2 similar to Table 1.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "VnQ7C1z70A", "reviewer": "Reviewer_wX5E", "summary": "The paper proposes an interesting method to do guidance in conditional generation of flow matching, by modifying the source distribution instead of training the velocity neural network. The method has rigorous theoretical guarantee and various sampling algorithms can be utilized to sample from the modified source distribution, but this process can be very computationally expensive. Experimental comparisons with previous methods demonstrate the effectiveness of the proposed method.", "questions": "Please see weakness part.", "limitations": "", "rating": 4, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "The paper is well organized and easy to follow, motivated by an interesting theorem that to modify the source distribution can also achieve guidance. Building on this, the authors discuss several sampling algorithms to sample from the modified source distribution. Extensive experiments are also conducted to verify the the efficiency of the proposed framework.", "weaknesses": "1. The major concern is how to sample from $q_0'\\propto q_0\\cdot\\exp(-J\\circ T^* )$ efficiently? \nThe authors mention HMC and optimization-based methods, but all of these methods require gradient computation of the potential function $J\\circ T^* $, where  $ T^* $  is the FM model. This requires backpropagatio through an ODE trajectory, which is super computationally expensive and impractical.\n\n2. Following the question above, what if the potential function $J$ is not differentiable or to compute the gradient of $J$ is very expensive? In this case, only importance-sampling based algorithms can be used and the convergence is very slow. Will the proposed method be more efficient than fine-tuning velocity neural network using, say, reinforcement learning methods?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)