                           Importance Corrected Neural JKO Sampling


                                        Johannes Hertrich 1 2 Robert Gruhlke 3


                        Abstract                                    the underlying stochastic differential equation follows the
     In order to sample from an unnormalized probabil-              Wasserstein-2 gradient flow of the reverse KL divergence
     ity density function, we propose to combine con-               F(µ) = KL(µ, ν). Over the last years, generative models
     tinuous normalizing flows (CNFs) with rejection-               like normalizing flows (Rezende & Mohamed, 2015) or dif-
     resampling steps based on importance weights.                  fusion models (Ho et al., 2020; Song et al., 2021) became
     We relate the iterative training of CNFs with reg-             more popular for sampling, see, e.g., (Phillips et al., 2024;
     ularized velocity fields to a JKO scheme and                   Vargas et al., 2023a). Also these methods are based on the
     prove convergence of the involved velocity fields              reverse KL divergence as a loss function. While genera-
     to the velocity field of the Wasserstein gradient              tive models have successfully been applied in data-driven
     flow (WGF). The alternation of local flow steps                setups, their application to the problem of sampling from
     and non-local rejection-resampling steps allows                arbitrary unnormalized densities is not straightforward. This
     to overcome local minima or slow convergence                   difficulty arises from the significantly harder nature of the
     of the WGF for multimodal distributions. Since                 problem, even in moderate dimensions, particularly when
     the proposal of the rejection step is generated by             dealing with target distributions that exhibit phenomena
     the model itself, they do not suffer from common               such as concentration effects, multimodalities, heavy tails,
     drawbacks of classical rejection schemes. The                  or other issues related to the curse of dimensionality.
     arising model can be trained iteratively, reduces              In particular, the reverse KL is non-convex in the Wasser-
     the reverse Kullback-Leibler (KL) loss function                stein space as soon as the target density ν is not log-concave
     in each step, allows to generate iid samples and               which is for example the case when ν consists of multi-
     moreover allows for evaluations of the generated               ple modes. In this case generative models often collapse
     underlying density. Numerical examples show                    to one or a small number of modes. We observe that for
     that our method yields accurate results on various             continuous normalizing flows (CNFs, Chen et al., 2018;
     test distributions including high-dimensional mul-             Grathwohl et al., 2019) this can be prevented by regular-
     timodal targets and outperforms the state of the               izing the L2 -norm of the velocity field as proposed under
     art in almost all cases significantly.                         the name OT-flow by (Onken et al., 2021). In particular,
                                                                    this regularization converts the objective functional into a
                                                                    convex one. However, the minimizer of the regularized loss
1. Introduction                                                     function is no longer given by the target measure ν but by
                                                                    the Wasserstein proximal mapping of the objective func-
We consider the problem of sampling from an unnormal-
                                                                    tion applied onto the latent distribution. Considering that
ized probability density function. That is, we are given an
                                                                    the Jordan-Kinderlehrer-Otto (JKO) scheme (Jordan et al.,
integrable function g : Rd → R>0 and we aim to generate
                                                                    1998) iteratively applies the Wasserstein proximal mapping
samples from the probability distribution ν given by the
                                                                    and converges to the Wasserstein gradient flow, several pa-
densityRq(x) = g(x)/Zg , where the normalizing constant
                                                                    pers proposed to approximate the steps of the scheme by
Zg = Rd g(x)dx is unknown. Many classical sampling
                                                                    generative models, see (Altekrüger et al., 2023; Alvarez-
methods are based on Markov chain Monte Carlo (MCMC)
                                                                    Melis et al., 2022; Fan et al., 2022; Lambert et al., 2022;
methods like the overdamped Langevin sampling, see, e.g.,
                                                                    Mokrov et al., 2021; Vidal et al., 2023; Xu et al., 2024). We
(Welling & Teh, 2011). The generated probability path of
                                                                    will refer to this class of method by the name neural JKO.
  *
    Equal contribution 1 Université Paris Dauphine - PSL            Even though this approximates the same gradient flow of
2
 University College London 3 FU Berlin. Correspondence to:          the Langevin dynamics these approaches have usually the
Johannes Hertrich <johannes.hertrich@dauphine.psl.eu>, Robert       advantage of faster inference (once they are trained) and
Gruhlke <r.gruhlke@fu-berlin.de>.
                                                                    additional possibly allow for density evaluations.
Proceedings of the 42 nd International Conference on Machine        However, already the time-continuous Wasserstein gradi-
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025
by the author(s).
                                                                    ent flow suffers from the non-convexity of the reverse KL

                                                                1
                                         Importance Corrected Neural JKO Sampling

loss function by getting stuck in local minima or by very            malized densities are often based on Markov Chain Monte
slow convergence times. In particular, it is well-known that         Carlo (MCMC) methods, see e.g. (Gilks et al., 1995). In
Langevin-based sampling methods often do not distribute              particular first order based variants, such as the Hamilto-
the mass correctly onto multimodal target distributions. As          nian Monte Carlo (HMC) (Betancourt, 2017; Hoffman &
a remedy, (Neal, 2001) proposed importance sampling, i.e.,           Gelman, 2014) and the Metropolis Adjusted Langevin Algo-
to reweight the sample based on quotients of the target dis-         rithm (MALA Girolami & Calderhead, 2011; Rossky et al.,
tribution and its current approximation which leads to an            1978; Roberts & Tweedie, 1996) are heavily used in practice,
unbiased estimator of the Monte Carlo integral. However,             see (Andrieu et al., 2003) for an overview. The viewpoint of
this estimator may lead to highly imbalanced weights be-             these samplers as sample space description of gradient flows
tween these samples and the resulting estimator might have           defined in a metricized probability space then allows for ex-
a large variance. Moreover, the density of the current ap-           tensions such as interacting particle systems (Chen et al.,
proximation has to be known up to a possible multiplicative          2023; Eigel et al., 2024; Garbuno-Inigo et al., 2020; Wang
constant, which is not the case for many MCMC methods                & Li, 2022). However, since these algorithms are based on
like Langevin sampling or Hamiltonian Monte Carlo. In                local transformations of the samples, they are unable to dis-
(Del Moral et al., 2006) the authors propose a scheme for al-        tribute the mass correctly among different modes, which can
ternating importance sampling steps with local Monte Carlo           partially be corrected by importance sampling (Neal, 2001)
steps. However, the corresponding importance sampling                and sequential Monte Carlo samplers (SMC) (Del Moral
step generates non-iid samples, that de-correlate over time          et al., 2006) as described above. In contrast to our model,
by construction.                                                     SMC approximates the density of the approximation by as-
                                                                     signing “inverse Markov kernels” to certain MCMC kernels,
Contributions In this paper, we propose a sampling
                                                                     which might lead to propagating errors. Furthermore, the
method which combines neural JKO steps based on CNFs
                                                                     generation of additional samples requires to rerun the whole
with importance based rejection steps. While the CNFs
                                                                     procedure which can be very costly. Other approaches ap-
adjust the position of the generated samples locally, the
                                                                     proximate the target density by combination of transport
rejection steps readjust the inferred distribution non-locally
                                                                     maps and low-rank models such as tensor trains (Eigel et al.,
based on the quotient of generated and target distribution.
                                                                     2022) yielding efficient access to posterior statistics.
Then, in each rejection step we resample the rejected points
based on the current constructed generative model. We                In the last years, generative models became very popular,
illustrate this procedure in Figure 1.                               including VAEs (Kingma & Welling, 2014), normalizing
                                                                     flows (Rezende & Mohamed, 2015), diffusion models (Ho
Our method generates independent samples and allows to
                                                                     et al., 2020) or flow-matching (Lipman et al., 2022) which
evaluate the density of the generated distribution. In our
                                                                     is also known as rectified flow (Liu et al., 2022). In con-
numerical examples, we apply our method to common test
                                                                     trast to our setting, they initially consider the modeling
distributions up to the dimension d = 1600 which are par-
                                                                     task, i.e., they assume that they are given samples from the
tially highly multimodal. We show that our importance
                                                                     target measure instead of an unnormalized density. How-
corrected neural JKO sampling (neural JKO IC) achieves
                                                                     ever, there are several papers, which adapt these algorithms
significantly better results than the comparisons1 .
                                                                     for the sampling task. For normalizing flows, this mostly
From a theoretical side, we prove that the velocity fields           amounts to changing the loss function (Hoffman et al., 2019;
from a sequence of neural JKO steps strongly converge to             Marzouk et al., 2016; Qiu & Wang, 2024). Very recently,
the velocity field of the corresponding Wasserstein gradi-           there appeared also a flow-matching variant for the sampling
ent flow and that the reverse KL loss function decreases             task (Woo & Ahn, 2024) based on (Akhound-Sadegh et al.,
throughout the importance-based rejection steps.                     2024). For diffusion (and stochastic control) models this
                                                                     was done based on variational approaches (Blessing et al.,
Outline In Section 2, we recall the fundamental concepts
                                                                     2024; Phillips et al., 2024; Vargas et al., 2023a;b; Zhang
which will be required. Afterwards, we consider neural
                                                                     & Chen, 2021) or by computing the score by solving a
JKO schemes more detail in Section 3. We introduce our
                                                                     PDE (Richter & Berner, 2024; Sommer et al., 2024). These
importance-based rejection steps in Section 4. Finally, we
                                                                     methods usually provide much faster sampling times than
evaluate our model numerically and compare it to existing
                                                                     MCMC methods and are often used in combination with
methods in Section 5. Conclusions are drawn in Section 6.
                                                                     some conditioning parameter for inverse problems, where
Additionally, proofs, further numerical and technical details
                                                                     a (generative) prior is combined with a known likelihood
are presented in Appendix A- E.
                                                                     term (Ardizzone et al., 2019; Altekrüger & Hertrich, 2023;
Related Work Common methods for sampling of unnor-                   Andrle et al., 2021; Denker et al., 2024). Combinations of
   1
                                                                     generative models with stochastic sampling steps were con-
   The code is available at https://github.com/
                                                                     sidered in the literature for generative modeling under the
johertrich/neural_JKO_ic


                                                                 2
                                           Importance Corrected Neural JKO Sampling
     Latent distribution                 After Step 1                            After Step 2                       After Step 3



                                                                                                                                       rejection
                                                                                                                                           +
                            CNF                             CNF                                     CNF                               resampling




        After Step 4                     After Step 5                            After Step 6                   Final Approximation



                           rejection                       rejection
                               +                               +
                           resampling                      resampling                                ···




Figure 1: Iterative application of neural JKO steps and rejection steps for a shifted mixture target distribution. The orange
samples are rejected in the next following rejection step and the blue samples are the resampled points. The latter approach
enables for the correction of wrong mode weights introduced by the underlying WGF. See Figure 3 for more steps.


name stochastic normalizing flows (Hagemann et al., 2023;                   2.1. Curves in Wasserstein Spaces
2022; Noé et al., 2019; Wu et al., 2020) and for sampling
                                                                            Wasserstein Distance Let P(Rd ) be the space of prob-
under the name annealed flow transport Monte Carlo (Arbel
                                                                            ability measures    on Rd and denote by P2 (Rd ) := {µ ∈
et al., 2021; Matthews et al., 2022). (Gabrié et al., 2022)                      d
                                                                            P(R ) : Rd ∥x∥2 dµ(x) < ∞} the subspace of proba-
                                                                                       R
use normalizing flows to learn proposal distributions in an
Metropolis-Hastings algorithm. These generative models                      bility measures with finite second moment. Let P2ac (Rd )
can be adapted to follow a Wasserstein gradient flow, by                    be the subspace of absolutely continuous measures from
mimicking a JKO scheme with generative models or directly                   P2 (Rd ). Moreover, we denote for µ, ν ∈ P2 (Rd ) by
following the velocity field of a kernel-based functional.                  Γ(µ, ν) := {π ∈ P2 (Rd × Rd ) : P1# π = µ, P2# π = ν}
Such approaches were proposed for generative modeling                       the set of all transport plans with marginals µ and ν, where
(Fan et al., 2022; Hagemann et al., 2024; Hertrich et al.,                  Pi : Rd × Rd → Rd defined by Pi (x1 , x2 ) = xi is the pro-
2024; Liutkus et al., 2019; Vidal et al., 2023; Xu et al.,                  jection onto the i-th component for i = 1, 2. Then, we equip
2024), sampling (Fan et al., 2022; Lambert et al., 2022;                    P2 (Rd ) with the Wasserstein-2 metric defined by
Liu & Wang, 2016a; Mokrov et al., 2021) or other tasks                                                   Z
                                                                                    2
(Altekrüger et al., 2023; Arbel et al., 2019; Alvarez-Melis                      W2 (µ, ν) = inf                 ∥x − y∥2 dπ(x, y).
                                                                                                π∈Γ(µ,ν)   Rd ×Rd
et al., 2022). Gradient flows of the reverse KL divergence
with respect to different metric were considered in (Liu &
                                                                            If µ ∈ P2ac (Rd ), the above problem has always a unique
Wang, 2016b) under the name Stein variational gradient de-
                                                                            minimizer.
scent. Moreover, Lu et al. (2019) study gradient flows in the
Wasserstein-Fisher-Rao metric which can be implemented                      Absolutely Continuous Curves A curve γ : I → P2 (Rd )
via birth-death processes.                                                  on the interval I ⊆ R is called absolutely continuous if
                                                                                                                          d           d
After the first version of our paper appeared, several re-                  Rthere exists a Borel velocity field v : R × I → R with
                                                                               I
                                                                                 ∥v(·, t)∥L2 (γ(t),Rd ) dt < ∞ such that the continuity equa-
lated preprints were released, including (Albergo & Vanden-
                                                                             tion
Eijnden, 2024; Chen et al., 2025; He et al., 2025; Wu & Xie,
                                                                                              ∂t γ(t) + ∇ · (v(·, t)γ(t)) = 0             (1)
2024).
                                                                            is fulfilled on I × Rd in a weak sense. Then, any velocity
2. Preliminaries                                                            field v solving the continuity equation (1) for fixed γ char-
                                                                            acterizes γ as γ(t) = z(·, t)# γ(t0 ), where z is the solution
In this section, we provide a rough overview of the required                of the ODE ż(x, t) = v(z(x, t), t) with z(x, t0 ) = x and
concepts for this paper. To this end, we first revisit the basic            t0 ∈ I. It can be shown that for an absolutely continuous
definitions of Wasserstein gradient flows, e.g., based on                   curve there exists a unique solution of minimal norm which
(Ambrosio et al., 2005). Afterwards we recall continuous                    is equivalently characterized by the so-called regular tangent
normalizing flows with OT-regularizations.                                  space Tγ(t) P2 (Rd ), see Appendix A for details. An abso-

                                                                        3
                                               Importance Corrected Neural JKO Sampling

lutely continuous curve is a geodesic if there exists some                  Theorem 2.2 (Ambrosio et al., 2005, Thm 11.2.1). Let
c > 0 such that W2 (γ(s), γ(t)) = c|s − t|.                                 F : P2 (Rd ) → (−∞, +∞] be proper, lsc, coercive, and
                                                                            λ-convex along generalized geodesics, and let µ0 ∈ dom F.
The following theorem formulates a dynamic version of the
                                                                            Then the curves γ̃τ defined via the minimizing movement
Wasserstein distance based minimal energy curves in the
                                                                            scheme (4) converge for τ → 0 locally uniformly to a locally
Wasserstein space.
                                                                            Lipschitz curve γ : (0, +∞) → P2 (Rd ) which is the unique
Theorem 2.1 (Benamou & Brenier, 2000). Assume that                          Wasserstein gradient flow of F with γ(0+) = µ0 .
µ, ν ∈ P2ac (Rd ). Then, W22 (µ, ν) is equal to
                           Z 1Z                                             2.2. Continuous Normalizing Flows and OT-Flows
                                                     2
            inf                        ∥v(z(x, t), t)∥ dµ(x)dt.             The concept of normalizing flows first appeared in (Rezende
     v : Rd ×[0,1]→Rd ,     0     Rd
    ż(x,t)=v(z(x,t),t),                                                    & Mohamed, 2015). It follows the basic idea to approxi-
   z(x,0)=x, z(·,1)# µ=ν
                                                                            mate a probability distribution ν by considering a simple
                                                                            latent distribution µ0 (usually a standard Gaussian) and to
Moreover, there exists a unique minimizing velocity field v
                                                                            construct a diffeomorphism Tθ : Rd → Rd depending on
and the curve defined by γ(t) = z(·, t)# µ with t ∈ [0, 1]
                                                                            some parameters θ such that ν ≈ Tθ # µ0 . In practice, the
and ż(x, t) = v(z(x, t), t), z(x, 0) = x is a geodesic which
                                                                            diffeomorphism can be approximated by coupling-based
fulfills the continuity equation ∂t γ(t)+∇·(v(·, t)γ(t)) = 0.
                                                                            neural networks (Dinh et al., 2016; Kingma & Dhariwal,
Let τ > 0. Then, by substitution of t by t/τ and rescaling                  2018), residual architectures (Behrmann et al., 2019; Chen
v in the time variable, this is equal to                                    et al., 2019; Hertrich, 2023) or autoregressive flows (De Cao
                                                                            et al., 2020; Durkan et al., 2019; Huang et al., 2018; Pa-
                         Z τZ
                                                                            pamakarios et al., 2017). In this paper, we mainly fo-
           inf         τ          ∥v(z(x, t), t)∥2 dµ(x)dt.                 cus on continuous normalizing flows proposed by (Chen
     v : Rd ×[0,τ ]→Rd ,    0      Rd
    ż(x,t)=v(z(x,t),t),                                                    et al., 2018; Grathwohl et al., 2019), see also (Ruthotto
  z(x,0)=x, z(·,τ )# µ=ν
                                                                            & Haber, 2021) for an overview. Here the diffeomor-
                                                                  (2)
                                                                            phism Tθ is parameterized as neural ODE. To this end let
Wasserstein Gradient Flows An absolutely continuous                         vθ : Rd × R → Rd be a neural network with parameters
curve γ : (0, ∞) → P2 (Rd ) with velocity field vt ∈                        θ and let zθ : Rd × [0, τ ] → Rd for fixed τ > 0 be the
Tγ(t) P2 (Rd ) is a Wasserstein gradient flow with respect to               solution of żθ = vθ , with initial condition zθ (x, 0) = x.
F : P2 (Rd ) → (−∞, ∞] if vt ∈ −∂F(γ(t)), for a.e. t > 0,                   Then, we define Tθ via the solution zθ as Tθ (x) = zθ (x, τ ).
where ∂F(µ) denotes the reduced Fréchet subdiffential at                    The density pθ of Tθ # µ0 can be described by the change-of-
µ, see Appendix A for a definition.                                         variables formula pθ (x) = p0 (x)/|det(∇Tθ (x))|, where p0
                                                                            is the density of the latent distribution µ0 . In the case of con-
To compute Wasserstein gradient flows numerically, we                       tinuous normalizing flows, it can be shown that the denom-
can use the generalized minimizing movements or Jordan-                     inator can be computed as log(|det(∇Tθ (x))|) = ℓθ (x, τ )
Kinderlehrer-Otto (JKO) scheme (Jordan et al., 1998). To                    with ∂t ℓθ (x, t) = trace(∇vθ (zθ (x, t), t)) and ℓθ (·, 0) = 0.
this end, we consider the Wasserstein proximal mapping                      In order to train a normalizing flow, one usually uses the
defined as                                                                  Kullback-Leibler divergence. If ν is given by a density
                                                                            q(x) = g(x)/Zg , where Zg is an unknown normalizing
     proxτ F (µ̂) = arg min 21 W22 (µ, µ̂) + τ F(µ) .
                            
                     µ∈P2 (Rd )                                             constant, then this amounts to the reverse KL loss function

Then, define as µkτ for k ∈ N the steps of the minimizing                        L(θ) = KL(Tθ # µ0 , ν)
movements scheme, i.e.,                                                                = Ex∼µ0 [− log(q(Tθ (x))) + log(pθ (x))]
                                                                                       = Ex∼µ0 [− log(g(Tθ (x))) − ℓθ (x, τ )] + C,
            µ0τ = µ0 ,          µk+1
                                 τ   = proxτ F (µkτ ).            (3)
                                                                            for some constant C independent of θ.
We denote the piecewise constant interpolations
γ̃τ : [0, ∞) → P2 (Rd ) of the minimizing movement                          In order to stabilize and accelerate the training, (Onken
scheme by                                                                   et al., 2021) propose to regularize the velocity field vθ by
                                                                            its expected squared norm. More precisely,
                                                                                                                Rτ        they propose
              γ̃τ (kτ + tτ ) = µkτ ,       t ∈ [0, 1).            (4)       to add the regularizer R(θ) = τ 0 ∥vθ (zθ (x, t), t)∥2 dt
                                                                            to the loss function. This leads to straight trajectories in
Then, the following convergence result holds true. We recall                the ODE such that adaptive solvers only require very few
the necessary definitions of coercivity and λ-convexity in                  steps to solve them. Following Theorem 2.1, the authors
Wasserstein spaces in Appendix A.                                           of (Onken et al., 2021) note that for β > 0 the functional

                                                                        4
                                         Importance Corrected Neural JKO Sampling

L(θ) + βR(θ) has the same minimizer as the functional                (3). This leads to µk+1
                                                                                         τ   = zτk (·, τ )# µkτ , where
L(θ) + βW22 (µ0 , Tθ # µ0 ), which relates to the JKO scheme
as pointed out by (Vidal et al., 2023).                                 (vτ,k , zτ,k ) ∈                 arg min              Eµkτ (z, v),    (5)
                                                                                                    v : Rd ×[0,τ ]→Rd
                                                                                             ż(x,t)=v(z(x,t),t), z(x,0)=x
3. Neural JKO Scheme
                                                                     where Eµkτ (z, v) is given by the dynamic formulation (2) as
In the following, we learn the steps (3) of the JKO scheme
by neural ODEs. While similar schemes were already sug-                1
                                                                           Z τZ
gested in several papers (Altekrüger et al., 2023; Alvarez-                             ∥v(z(x, t), t)∥2 dµkτ (x)dt + F(z(·, τ )# µkτ ).
                                                                       2    0      Rd
Melis et al., 2022; Fan et al., 2022; Lambert et al., 2022;
Mokrov et al., 2021; Vidal et al., 2023; Xu et al., 2024),
we are particularly interested in the convergence properties         Finally, we concatenate the velocity fields of all steps by
of the corresponding velocity fields. In Subsection 3.1, we          vτ |(kτ,(k+1)τ ] = vτ,k and obtain the ODE
introduce the general scheme and derive its properties. Af-
terwards, in Subsection 3.2, we describe the corresponding                      żτ (x, t) = vτ (zτ (x, t), t),         zτ (x, 0) = x.
neural network approximation. Throughout this section, we
                                                                     As a straightforward observation, we obtain that the curve
consider the following assumptions on the objective func-
                                                                     defined by the velocity field vτ is the geodesic interpolation
tional F and our initialization µ0 .
                                                                     between the points from JKO scheme (3). We state a proof
                                                                     in Appendix B.2.
Assumption 3.1. Let F : P2 (Rd ) → R ∪ {∞} be proper,                Corollary 3.2. Under Ass. 3.1 the following holds true.
lower semi-continuous with respect to narrow conver-
gence, coercive, λ-convex along generalized geodesics and             (i) It holds that
bounded from below. Moreover, assume that dom(|∂F|) ⊆                                              Z τZ
P2ac (Rd ) and that F has finite metric derivative |∂F|(µ0 ) <             W22 (µkτ , µk+1
                                                                                       τ   )=τ                 ∥vτ,k (zτ,k (x, t), t)∥2 dµkτ (x)dt,
                                                                                                     0    Rd
∞ at the initialization µ0 ∈ P2ac (Rd ).
                                                                           i.e., vτ,k is the optimal velocity field from Theorem 2.1.

This assumption is fulfilled for many important divergences          (ii) The curve γτ (t) := z(·, t)# µ0 fulfills γτ (kτ + tτ ) =
and loss functions F. We list some examples in Ap-                        ((1 − t)I + tTτk )# µkτ for t ∈ [0, 1], where Tτk is the
pendix B.1. We will later pay particular attention to the                 optimal transport map between µkτ and µk+1  τ   .
reverse Kullback-Leibler   divergence F(µ) = KL(µ, ν) =
R          
             p(x)
                                                                    (iii) vτ and γτ solve the continuity equation
  p(x) log q(x) dx, where ν is a fixed target measure and
p and q are the densities of µ and ν respectively. This                                   ∂t γτ (t) + ∇ · (vτ (·, t)γ(t)) = 0.
functional fulfills Assumption 3.1 if − log(q) is λ-convex.
We stress the fact that the λ-convexity property is assumed          Analogously to Theorem 2.2 one can show that also the
for some λ ∈ R, which explicitly includes negative values.           curves γτ are converging locally uniformly to the unique
Consequently, the theoretical results are also applicable for        Wasserstein gradient flow (see, e.g., the proof of Ambrosio
target densities which are not log-concave.                          et al., 2005, Thm 11.1.6). In the next subsection, we will
                                                                     approximate the velocity fields vτ,k by neural networks.
Additionally, (Ambrosio et al., 2005, Lem 9.2.7) states that         In order to retain the stability of the resulting scheme, the
                        1
the functional G(µ) = 2τ  W22 (µ, µkτ ) + F(µ) is (λ + τ1 )-         next theorem states that also the velocity fields vτ converge
convex along geodesics. In particular, for τ < λ1 , the              strongly towards the velocity field from the Wasserstein
functional G is strongly convex such that we expect that             gradient flow. The proof is given in Appendix B.3.
optimizing it with a generative model is much easier than
optimizing F, see also Appendix F.1 for a discussion how             Theorem 3.3. Suppose that Assumption 3.1 is fulfilled and
this can prevent mode collapse.                                      let (τl )l ⊆ (0, ∞) with τl → 0. Then, (vτl )l converges
                                                                     strongly to the velocity field v̂ ∈ L2 (γ, Rd × [0, T ]) of
3.1. Piecewise Geodesic Interpolation                                the Wasserstein gradient flow γ : (0, ∞) → P2 (Rd ) of F
                                                                     starting in µ0 .
In order to represent the JKO scheme by neural ODEs, we
first reformulate it based on Theorem 2.1. To this end, we           In some cases the limit velocity field v can be stated explic-
insert the dynamic formulation of the Wasserstein distance           itly, even though its direct computation is intractable. For
in the Wasserstein proximal mapping defining the steps in            details, we refer to Appendix B.1.

                                                                 5
                                                  Importance Corrected Neural JKO Sampling

3.2. Neural JKO Sampling                                                       4. Importance-Based Rejection Steps
In the following, we learn the velocity fields vτ,k as neural                  While a large number of existing sampling methods rely on
ODEs in order to sample from a target measure ν given by                       Wasserstein gradient flows with respect to some divergences,
the density q(x) = Z1g g(x) with unknown normalization                         it is well known that these loss functions are non-convex.
                                                                               This leads to very slow convergence or only convergence to
                 R
constant Zg = Rd g(x)dx. To this end, we consider the
Wasserstein gradient flow with respect to the reverse KL loss                  suboptimal local minima. In particular, if the target distri-
function F(µ) = KL(µ, ν) which has the unique minimizer                        bution is multimodal the modes often do not have the right
µ = ν. Note that similar derivations were done in (Vidal                       mass assigned. In this section, we derive a novel rejection
et al., 2023; Xu et al., 2024) for the application of generative               step that corrects such imbalanced mass assignments. Re-
modeling instead of sampling.                                                  markably, we will see in Theorem 4.2, that it is possible to
                                                                               access the density after these rejection steps. This observa-
Then, due to (5) the loss function L(θ) from the JKO steps                     tion is crucial, since it allows for the iterative combination
for the training of the velocity field vθ reads as                             of several rejection and neural JKO steps, leading to the
    Z τZ                                                                       proposed importance corrected neural JKO sampling.
1
                  ∥vθ (zθ (x, t), t)∥2 dµkτ (x)dt + F(zθ (·, τ )# µkτ ),       Importance Sampling As a remedy, many sampling algo-
2       0    Rd
                                                                               rithms from the literature are based on importance weights,
where zθ is the solution of żθ (x, t) = vθ (zθ (x, t), t) with                see, e.g., sequential Monte Carlo samplers (Del Moral
zθ (x, 0) = x. Now, following the derivations of continuous                    et al., 2006) or annealed importance sampling (Neal, 2001).
normalizing flows, cf. Section 2.2, the second term of L can                   That is, we assign to each generated sample xi a weight
                                                                                        q(xi )
be rewritten (up to an additive constant) as                                   wi = p(x    i)
                                                                                               , where p is some proposal density and q is
                                                                               the density of the target distribution ν. Then, PN for any ν-
F(zθ (·, τ )# µkτ ) ∝ Ex∼µkτ [− log(g(zθ (x, τ ))) − ℓθ (x, τ )],              integrable function f : Rd →  R R it holds that  i=1 wi f (xi )
                                                                               is an unbiased estimator of Rd f (x)dν(x). Note that impor-
where ℓθ solves ℓ̇θ (x, t) = trace(∇vθ (zθ (x, t), t)) with                    tance sampling is very sensitive with respect to the proposal
ℓθ (·, 0) = 0. Moreover, we can rewrite the first term of                      p which needs to be designed carefully and problem adapted.
L based on                                                                     Rejection Steps Inspired by importance sampling, we
 Z τZ                                                                          propose to use importance-based rejection steps. More pre-
           ∥vθ (zθ (x, t), t)∥2 dµkτ (x)dt = Ex∼µkτ [ωθ (x, τ )],              cisely, let µ be a proposal distribution where we can sample
    0       Rd
                                                                               from with density p(x) = f (x)/Zf and denote by ν the
                                                                               target distribution with density q(x) = g(x)/Zg . In the fol-
where ωθ is the solution of ω̇θ (x, t) = ∥vθ (zθ (x, t), t)∥2 .
                                                                               lowing, we assume that we have access to the unnormalized
Hence, we can represent L up to an additive constant as
                                                                               densities f and g, but not to the normalization constants
                                                                               Zf and Zg Then, for a random variable X ∼ µ, we now
L(θ) = Ex∼µkτ [− log(g(zθ (x, τ ))) − ℓθ (x, τ ) + ωθ (x, τ )],
                                                           (6)                 generate a new random variable X̃ by the following proce-
where (zθ , ℓθ , ωθ ) solves the ODE system                                    dure: First, we compute the            o basednacceptance
                                                                                                            n importance                  o
                                                                                                                 q(X)                g(X)
                                                                               probability α(X) = min 1, c̃p(X)          = min 1, cf   (X) ,
                                              
      żθ (x, t)           vθ (zθ (x, t), t)                                   where c > 0 is a positive hyperparameter and c̃ = cZf /Zg .
     ℓ̇θ (x, t)  =  trace(∇vθ (zθ (x, t), t))  ,                 (7)       Then, we set X̃ = X with probability α(X) and choose
      ω̇θ (x, t)          ∥vθ (zθ (x, t), t)∥2                                 X̃ = X ′ otherwise, where X ′ ∼ µ and X are independent.
                                                                               Remark 4.1. This is a one-step approximation of the classi-
with initial conditions zθ (x, 0) = x, ℓθ (x, 0) = 0 and                       cal rejection sampling scheme (Von Neumann, 1951), see
ωθ (x, 0) = 0. In particular, the loss function L can be eval-                 also (Andrieu et al., 2003) for an overview. More precisely,
uated and differentiated based on samples from µkτ . Once                      we arrive at the classical rejection sampling scheme by
the parameters θ are optimized, we can evaluate the JKO                        choosing c̃ > supx q(x)/p(x) and redo the procedure when
steps in the same way as standard continuous normalizing                       X is rejected instead of choosing X̃ = X ′ .
flows. We summarize training and evaluation of the JKO
steps in Algorithm 3 and 4 in Appendix D.1. In practice,                       Similarly to importance sampling, the rejection sampling al-
the density values are computed and stored in log-space for                    gorithm is highly sensitive towards the proposal distribution
numerical stability. Additionally, note that the continuous                    p. In particular, it suffers from the curse of dimensionality,
normalizing flows can be replaced by other normalizing                         in case of a non-tailored proposal p. We will tackle this
flow architectures, see Appendix F.2 and Remark F.3 for                        problem later in the section by choosing p already close to
details.                                                                       the target density q.

                                                                           6
                                         Importance Corrected Neural JKO Sampling

The following theorem describes the density of the distribu-         Remark 4.4 (Choice of c). We choose the hyperparameter
tion µ̃ of X̃. Moreover, it ensures that the KL divergence           c such that a constant ratio r > 0 of the samples will be
to the target distribution decreases. We include the proof in        resampled, i.e., that E[α(X)] ≈ 1 − r. To this end, we
Appendix C.1                                                         assume that we are given samples x1 , ..., xN from X and
Theorem 4.2. Let µ̃ be the distribution of X̃. Then, the             approximate
following holds true.                                                               N              N                
                                                                                 1 X            1 X          g(xi )
                                                                       E[α(X)] ≈       α(xi ) =       min 1,           .
 (i) µ̃ admits the density p̃ given by p̃(x) = p(x)(α(x) +                       N i=1          N i=1        cp(xi )
     1 − E[α(X)]). In particular, we have p̃(x) = f˜(x)/Zf˜
                                                                     Note that the right side of this formula depends mono-
     with f˜(x) = f (x)(α(x) + 1 − E[α(X)]).                         tonically on c such that we can find c > 0 such that
(ii) It holds that KL(µ̃, ν) ≤ KL(µ, ν).                             E[α(X)] = 1 − r by a bisection search. In our numeri-
                                                                     cal experiments, we set r = 0.2. We summarize the choice
                                                                     of c in Algorithm 5 in Appendix D.1.
The application of a single importance-based rejection step
is summarized in Algorithm 1 and illustrated in Figure 2
                                                                     Algorithm 2 Importance corrected neural JKO sampling
in the appendix. Note that the value E[α(X)] can easily                       
be estimated based on samples during the training phase.                      
                                                                                 • unnormalized target density g,
Indeed, given N iid           X1 , ..., XN of X, we obtain                     • initial measure µ0 with density p ,
                     Pcopies
                                                                              
                                                                                                                   0
                        N
that E[α(X)] ≈ N1 i=1 α(XN ) is an unbiased estimator                  Input:
                                                                               • Number N ∈ N of samples,
fulfilling the error estimate from the following corollary.
                                                                              
                                                                              
                                                                                  • Number K ∈ N of total steps.
                                                                              
The proof is a direct consequence of Hoeffding’s inequality
and given in Appendix C.2.                                             Output: Sample generator {xi }N    i=1 ∼ ν̂ ≈ ν = g · λ.
                                                                             0            0    0
Corollary 4.3. Let X1 , ..., XN be iid copies of X. Then, it           Let x1 , . . . , xN ∼ µ .
holds                                                                  for k = 1, . . . , K do
                                                                         Define µk with density pk and draw samples
                                 # √
                                                                         xk1 , . . . , xkN ∼ µk either by
  "                 N                                 
                1 X                      2π          1
 E E[α(X)] −            α(XN ) ≤       √    ∈O     √      .              • neural JKO step by solving the ODE (7) or
                N i=1                    N           N
                                                                         • importance based rejection by Alg. 1.
                                                                         (details in Alg. 3, 4 resp. Alg. 1, 5)
                                                                       end for
Algorithm 1 Sampling and density propagation for                       Set ν̂ = µK with density pK .
importance-based rejection steps
            - samples xk1 , ..., xkN of µk with density pk ,
         
  Input:                                                             Neural JKO Sampling with Importance Correction Fi-
            - hyperparameter c (see Remark 4.4).
                                                                     nally, we combine the neural JKO scheme from the previ-
               - can draw samples from µk ,
           
  Assume:                                                            ous section with our rejection steps to obtain a sampling
               - can evaluate the unnormalized density g.            algorithm. More precisely, we start with a simple latent dis-
  for i = 1, ..., N do                                               tribution µ0 with known density and which we can sample
                              n
                                   g(xk )
                                             o                       from. In our numerical experiments this will be a standard
    1. Compute αk (xki ) = min 1, cpk (xi k ) .
                                            i                        Gaussian distribution. Now, we iteratively generate distribu-
     2. Draw u uniformly
                    (      from [0, 1] and x′ from µkτ .             tions µk , k = 1, ..., K by applying either neural JKO steps
                        k
                      xi , if u ≤ α(xki ),                           as described in Algorithm 3 and 4 or importance-based re-
     3. Set xk+1
             i   =                                                   jection steps as described in Algorithm 5 and 1. We call
                      x′     if u > α(xki ).
                                     n
                                           g(xk+1 )
                                                      o              the resulting model an importance corrected neural JKO
     4. Compute αk (xk+1
                      i    ) =   min  1,      i
                                         cpk (xk+1  )
                                                       .             model, which we summarize in Algorithm 2. During the
                                                i
     5. Define the density value                                     sampling process we can maintain the density values pk (x)
                                                                     of the density pk of µk for the generated samples by the
      pk+1 (xk+1
             i   ) = pk (xk+1
                          i   )(αk (xk+1
                                     i   ) + 1 − E[αk (Xk )]).       Algorithms 4 and 1. Moreover, we can also use Theorem 4.2
                                                                     to evaluate the density pk at some arbitrary point x ∈ Rd .
  end for                                                            We outline this density evaluation process in Appendix D.2.
            (
                - Samples xk+1  , ..., xk+1 of µk+1 .                Remark 4.5 (Runtime Limitations). The sampling time of
                            1           N       τ
  Output:                          k+1     k+1 N
                                                                     our importance corrected neural JKO sampling depends
                - Density values pτ (xi ) i=1 .                      exponentially on the number of rejection steps since in each
                                                                     rejection step we resample a constant fraction of the samples.

                                                                 7
                                                            Importance Corrected Neural JKO Sampling

Table 1: Energy distance. We run each method 5 times and state the average value and corresponding standard deviations.
The rightmost column shows the reference sampling error, i.e., the lower bound magnitude of the average energy distance
between two sets of different samples drawn from the ground truth. A smaller energy distance indicates a better result.

                                                                                            Sampler
  Distribution             MALA                       HMC                        DDS                       CRAFT                    Neural JKO            Neural JKO IC (ours)     Sampling Error
    Mustache       4.6 × 10−2 ± 1.6 × 10−3    1.7 × 10−2 ± 4.3 × 10−4   6.9 × 10−2 ± 1.8 × 10−3     9.2 × 10−2 ± 9.9 × 10−3   1.8 × 10−2 ± 2.0 × 10−3   2.9 × 10−3 ± 4.4 × 10−4     8.6 × 10−5
 shifted 8 Modes   5.3 × 10−3 ± 4.9 × 10−4    4.1 × 10−5 ± 3.3 × 10−5   1.2 × 10−2 ± 4.1 × 10−3     5.2 × 10−2 ± 1.1 × 10−2   1.3 × 10−1 ± 3.8 × 10−3   1.2 × 10−5 ± 5.1 × 10−6     2.6 × 10−5
 shifted 8 Peaky   1.3 × 10−1 ± 3.2 × 10−3    1.2 × 10−1 ± 2.4 × 10−3   1.1 × 10−2 ± 3.4 × 10−3     5.2 × 10−2 ± 2.2 × 10−2   1.3 × 10−1 ± 2.2 × 10−3   3.4 × 10−5 ± 8.2 × 10−6     2.4 × 10−5
      Funnel       1.2 × 10−1 ± 3.1 × 10−3   3.1 × 10−3 ± 3.2 × 10−4    2.6 × 10−1 ± 2.6 × 10−2     7.4 × 10−2 ± 2.8 × 10−3   4.6 × 10−2 ± 1.6 × 10−3    1.4 × 10−2 ± 8.2 × 10−4    3.4 × 10−4
    GMM-10         1.2 × 10−2 ± 5.5 × 10−3    1.2 × 10−2 ± 5.2 × 10−3   3.7 × 10−3 ± 1.6 × 10−3     1.8 × 10−1 ± 6.6 × 10−2   1.1 × 10−2 ± 5.6 × 10−3   5.3 × 10−5 ± 1.7 × 10−5     4.6 × 10−5
    GMM-20         9.1 × 10−3 ± 2.8 × 10−3    9.1 × 10−3 ± 2.7 × 10−3   5.0 × 10−3 ± 1.5 × 10−3     5.4 × 10−1 ± 1.4 × 10−1   1.0 × 10−2 ± 2.8 × 10−3   1.1 × 10−4 ± 3.4 × 10−5     6.4 × 10−5
    GMM-50         2.4 × 10−2 ± 7.5 × 10−3    2.4 × 10−2 ± 7.5 × 10−3   2.3 × 10−2 ± 1.1 × 10−2      1.8 × 100 ± 1.7 × 10−1   2.7 × 10−2 ± 7.8 × 10−3   1.0 × 10−4 ± 4.6 × 10−5     1.1 × 10−4
    GMM-100        3.6 × 10−2 ± 1.6 × 10−2    3.7 × 10−2 ± 1.7 × 10−2   3.9 × 10−2 ± 2.1 × 10−2     2.8 × 10+1 ± 1.0 × 10−1   4.7 × 10−2 ± 2.2 × 10−2   6.0 × 10−4 ± 3.4 × 10−4     1.5 × 10−4
    GMM-200        6.4 × 10−2 ± 2.1 × 10−2    6.6 × 10−2 ± 1.9 × 10−2   9.8 × 10−2 ± 3.1 × 10−2      3.9 × 100 ± 1.6 × 10−1   8.9 × 10−2 ± 2.7 × 10−2   3.3 × 10−3 ± 1.9 × 10−3     2.0 × 10−4



Table 2: Estimated log(Z). We run each method 5 times and state the average value and corresponding standard deviations.
The DDS values for LGCP are from (Vargas et al., 2023a). Higher values of log(Z) estimates correspond to better results.

                                                                                            Sampler
                       Distribution                DDS                       CRAFT                       Neural JKO              Neural JKO IC (ours)         Ground Truth
                        Mustache         −1.5 × 10−1 ± 2.7 × 10−2   −6.5 × 10−2 ± 5.5 × 10−2       −3.0 × 10−2 ± 2.6 × 10−3   −7.3 × 10−3 ± 8.2 × 10−4               0
                     shifted 8 Modes     −5.7 × 10−2 ± 2.0 × 10−2   −1.2 × 10−2 ± 1.4 × 10−3       −3.4 × 10−1 ± 3.1 × 10−3   +5.1 × 10−6 ± 2.4 × 10−3               0
                     shifted 8 Peaky     −1.2 × 10−1 ± 2.2 × 10−2   −1.8 × 10−3 ± 2.6 × 10−3       −3.5 × 10−1 ± 3.1 × 10−3   −2.1 × 10−3 ± 3.2 × 10−3               0
                          Funnel         −1.8 × 10−1 ± 6.8 × 10−2   −1.2 × 10−1 ± 7.9 × 10−3       −1.4 × 10−1 ± 1.6 × 10−3   −7.1 × 10−3 ± 1.9 × 10−3               0
                        GMM-10           −2.3 × 10−1 ± 1.0 × 10−1   −8.5 × 10−1 ± 1.7 × 10−1       −4.3 × 10−1 ± 5.1 × 10−2   +3.5 × 10−3 ± 2.0 × 10−3               0
                        GMM-20           −5.1 × 10−1 ± 6.0 × 10−2    −1.5 × 100 ± 1.7 × 10−1       −6.3 × 10−1 ± 2.7 × 10−2   +6.4 × 10−3 ± 3.8 × 10−3               0
                        GMM-50            −1.3 × 100 ± 3.3 × 10−1    −2.3 × 100 ± 1.5 × 10−3       −9.3 × 10−1 ± 4.6 × 10−2   +1.1 × 10−2 ± 3.9 × 10−3               0
                        GMM-100           −3.0 × 100 ± 7.3 × 10−1    −2.3 × 100 ± 8.6 × 10−2        −1.8 × 100 ± 9.6 × 10−2   −3.9 × 10−2 ± 7.8 × 10−3               0
                        GMM-200           −9.4 × 100 ± 7.2 × 10−1    −6.3 × 100 ± 1.5 × 10−1        −5.2 × 100 ± 2.5 × 10−1   −5.6 × 10−2 ± 1.3 × 10−2               0
                          LGCP                 503.0 ± 7.7 × 10−1         507.6 ± 3.2 × 10−1             499.9 ± 1.7 × 10−1         508.2 ± 1.0 × 10−1         not available




However, due to the moderate exponential base of 1 + r we                                            the rejection steps by reporting values for the same a neural
will see in the numerical part that we are able to perform a                                         JKO scheme without rejection steps (neural JKO).
significant number of rejection steps in a tractable time.
                                                                                                     For evaluating the quality of our results, we use two different
In our numerics, we build our importance corrected neural                                            metrics. First, we evaluate the energy distance (Székely,
JKO model by first applying n1 ∈ N neural JKO steps                                                  2002). It is a kernel metric which can be evaluated purely
followed by n2 ∈ N blocks consisting out of one neural JKO                                           based on two sets of samples from the model and the ground
step and three importance-based rejection steps, where n1                                            truth. Moreover it encodes the geometry of the space such
and n2 are hyperparameters given for each model separately                                           that a slight perturbation of the samples only leads to a slight
in Table 6. For the neural JKO steps, we choose an initial                                           change in the energy distance. Second, we estimate the log-
step size τ0 > 0 as a hyper-parameter and then increase the                                          normalizing constant which is equivalent to approximating
step size exponentially by τk+1 = 4τk . Note that one could                                          the reverse KL loss of the model. A higher estimate of
alternatively use adaptive step sizes similar to (Xu et al.,                                         the log-normalizing constant corresponds to a smaller KL
2024). However, for our setting, we found that the simple                                            divergence between generated and target distribution and
step size rule is sufficient.                                                                        therefore to a higher similarity of the two measures. Since
                                                                                                     this requires the density of the model, this approach is not
                                                                                                     applicable for MALA and HMC.
5. Numerical Results
                                                                                                     The results are given in Table 1 and 2. Our importance
We compare our method with classical Monte Carlo sam-                                                corrected neural JKO sampling significantly outperforms
plers like a Metropolis adjusted Langevin sampling (MALA)                                            the comparison for all test distributions. In particular, we
and Hamiltonian Monte Carlo (HMC), see e.g., (Betancourt,                                            observe that for shifted 8 modes, shifted 8 peaky and GMM-
2017; Roberts & Tweedie, 1996). Additionally, we com-                                                d the energy distance between neural JKO IC and ground
pare with two recent deep-learning based sampling algo-                                              truth samples is in the same order of magnitude as the energy
rithms, namely denoising diffusion samplers (DDS, Vargas                                             distance between to different sets of ground truth samples.
et al., 2023a) and continual repeated annealed flow transport                                        This implies that the distribution generated by neural JKO
Monte Carlo (CRAFT, Matthews et al., 2022). We evaluate                                              IC is indistinguishable from the target distribution in the
all methods on a set of common test distributions which is                                           energy distance. For these examples, the log(Z) esitmate
described in detail in Appendix E.1. Moreover, we report                                             is sometimes slightly larger than the ground truth, which
the error measures for our importance corrected neural JKO                                           can be explained by numerical effects, see Remark E.1 for
sampler (neural JKO IC), see Appendix E.5 for implementa-                                            a detailed discussion. We point out to a precise description
tion details. Additionally, we emphasize the importance of

                                                                                               8
                                         Importance Corrected Neural JKO Sampling

of the metrics, the implementation details and additional            project number 530824055 and by the EPSRC programme
experiments and figures in Appendix E.                               grant The Mathematics of Deep Learning with reference
                                                                     EP/V026259/1. RG acknowledges support by the DFG
6. Conclusions                                                       MATH+ project AA5-5 (was EF1-25) - Wasserstein Gradi-
                                                                     ent Flows for Generalised Transport in Bayesian Inversion.
Methodology We proposed a novel and expressive gen-
erative method that enables the efficient and accurate sam-          References
pling from a prescribed unnormalized target density which
is empirically confirmed in numerical examples. To this              Akhound-Sadegh, T., Rector-Brooks, J., Joey Bose, A., Mit-
end, we combine local sampling steps, relying on piece-                tal, S., Lemos, P., Liu, C.-H., Sendera, M., Ravanbakhsh,
wise geodesic interpolations of the JKO scheme realized by             S., Gidel, G., Bengio, Y., et al. Iterated denoising en-
CNFs, and non-local rejection and resampling steps based               ergy matching for sampling from boltzmann densities.
on importance weights. Since the proposal of the rejection             In Proceedings of the 41st International Conference on
step is generated by the model itself, they do not suffer from         Machine Learning, pp. 760–786, 2024.
the curse of dimensionality as opposed to classical variants
of rejection sampling. The proposed approach provides                Albergo, M. S. and Vanden-Eijnden, E.     Nets: A
the advantage that we can draw independent samples while               non-equilibrium transport sampler. arXiv preprint
correcting imbalanced mode weights, iteratively refine the             arXiv:2410.02711, 2024.
current approximation and evaluate the density of the gener-         Altekrüger, F. and Hertrich, J. WPPNets and WPPFlows:
ated distribution. This is a consequence of the density value          The power of Wasserstein patch priors for superresolution.
propagation through CNFs and Theorem 4.2 and enables                   SIAM Journal on Imaging Sciences, 16(3):1033–1067,
possible further post-processing steps that require density            2023.
evaluations of the approximated sample process.
                                                                     Altekrüger, F., Hertrich, J., and Steidl, G. Neural Wasser-
Outlook Our method allows for the pointwise access to
                                                                       stein gradient flows for maximum mean discrepancies
the approximated target density and the log normalization
                                                                       with Riesz kernels. In International Conference on Ma-
constant. These quantities can be used for the error moni-
                                                                       chine Learning, pp. 664–690. PMLR, 2023.
toring during the training and hence provide guidelines for
the adaptive design of the emulator in terms of CNF -or              Alvarez-Melis, D., Schiff, Y., and Mroueh, Y. Optimizing
rejection/resampling steps and provide a straightforward               functionals on the space of probabilities with input convex
stopping criterion. The importance-based rejection steps               neural networks. Transactions on Machine Learning
can also be used in other domains like fine-tuning of score-           Research, 2022. ISSN 2835-8856.
based diffusion models for downstream tasks, see Denker
et al. (2025).                                                       Ambrosio, L., Gigli, N., and Savare, G. Gradient Flows in
                                                                      Metric Spaces and in the Space of Probability Measures.
Limitations In the situation, when the emulator is realized
                                                                      Lectures in Mathematics ETH Zürich. Birkhäuser, Basel,
through a stack of underlying rejection/resampling steps, the
                                                                      2005.
sample generation process time is negatively affected, see
Remark 4.5. In order to resolve the drawback we plan to uti-         Andrieu, C., De Freitas, N., Doucet, A., and Jordan, M. I.
lize diffusion models for the sample generation. This is part         An introduction to MCMC for machine learning. Machine
of ongoing and future work by the authors. Finally, the use           Learning, 50:5–43, 2003.
of continuous normalizing flows comes with computational
challenges, which we discuss in detail in Appendix F.2.              Andrle, A., Farchmin, N., Hagemann, P., Heidenreich, S.,
                                                                       Soltwisch, V., and Steidl, G. Invertible neural networks
                                                                      versus MCMC for posterior reconstruction in grazing in-
Impact Statement
                                                                       cidence X-ray fluorescence. In International Conference
This paper studies a general problem from the field of statis-         on Scale Space and Variational Methods in Computer
tics and machine learning. There are many potential societal          Vision, pp. 528–539. Springer, 2021.
consequences of our work, none which we feel must be
specifically highlighted here.                                       Arbel, M., Korba, A., Salim, A., and Gretton, A. Maximum
                                                                       mean discrepancy gradient flow. Advances in Neural
                                                                       Information Processing Systems, 32, 2019.
Acknowledgements
                                                                     Arbel, M., Matthews, A., and Doucet, A. Annealed flow
JH acknowledges funding by the German Research Foun-                   transport Monte Carlo. In International Conference on
dation (DFG) within the Walter-Benjamin Programme with                 Machine Learning, pp. 318–330. PMLR, 2021.

                                                                 9
                                         Importance Corrected Neural JKO Sampling

Ardizzone, L., Kruse, J., Wirkert, S., Rahner, D., Pellegrini,         Del Moral, P., Doucet, A., and Jasra, A. Sequential Monte
  E. W., Klessen, R. S., Maier-Hein, L., Rother, C., and                 Carlo samplers. Journal of the Royal Statistical Society
  Köthe, U. Analyzing inverse problems with invertible                   Series B: Statistical Methodology, 68(3):411–436, 2006.
  neural networks. In International Conference on Learn-
  ing Representations, 2019.                                           Denker, A., Vargas, F., Padhy, S., Didi, K., Mathis, S., Du-
                                                                         tordoir, V., Barbano, R., Mathieu, E., Komorowska, U. J.,
Behrmann, J., Grathwohl, W., Chen, R. T. Q., Duvenaud,                   and Lio, P. DEFT: Efficient finetuning of conditional
  D., and Jacobsen, J.-H. Invertible residual networks. In               diffusion models by learning the generalised h-transform.
  International Conference on Machine Learning, pp. 573–                 arXiv preprint arXiv:2406.01781, 2024.
  582. PMLR, 2019.                                                     Denker, A., Padhy, S., Vargas, F., and Hertrich, J. Itera-
                                                                         tive importance fine-tuning of diffusion models. arXiv
Benamou, J.-D. and Brenier, Y. A computational fluid me-
                                                                         preprint arXiv:2502.04468, 2025.
  chanics solution to the Monge-Kantorovich mass transfer
  problem. Numerische Mathematik, 84(3):375–393, 2000.                 Dinh, L., Sohl-Dickstein, J., and Bengio, S. Density esti-
                                                                         mation using real NVP. In International Conference on
Betancourt, M. A conceptual introduction to Hamiltonian                  Learning Representations, 2016.
  Monte Carlo. arXiv preprint arXiv:1701.02434, 2017.
                                                                       Durkan, C., Bekasov, A., Murray, I., and Papamakarios, G.
Blessing, D., Jia, X., Esslinger, J., Vargas, F., and Neumann,           Neural spline flows. Advances in Neural Information
  G. Beyond ELBOs: A large-scale evaluation of varia-                   Processing Systems, 2019.
  tional methods for sampling. In International Conference
  on Machine Learning, 2024.                                           Eigel, M., Gruhlke, R., and Marschall, M. Low-rank tensor
                                                                         reconstruction of concentrated densities with application
Brenier, Y. Décomposition polaire et réarrangement mono-                 to bayesian inversion. Statistics and Computing, 32(2):
  tone des champs de vecteurs. Comptes Rendus de                         27, 2022.
  l’Académie des Sciences Paris Series I Mathematics, 305              Eigel, M., Gruhlke, R., and Sommer, D. Less interaction
  (19):805–808, 1987.                                                    with forward models in Langevin dynamics: Enrichment
                                                                         and homotopy. SIAM Journal on Applied Dynamical
Chen, J., Richter, L., Berner, J., Blessing, D., Neumann,
                                                                         Systems, 23(3):1870–1908, 2024.
  G., and Anandkumar, A. Sequential controlled Langevin
  diffusions. In The Thirteenth International Conference               Fan, J., Zhang, Q., Taghvaei, A., and Chen, Y. Variational
  on Learning Representations, 2025.                                     Wasserstein gradient flow. In International Conference
                                                                         on Machine Learning, pp. 6185–6215. PMLR, 2022.
Chen, R. T. Q. torchdiffeq, 2018. URL https://
  github.com/rtqichen/torchdiffeq.                                     Flamary, R., Courty, N., Gramfort, A., Alaya, M., Bois-
                                                                         bunon, A., Chambon, S., Chapel, L., Corenflos, A., Fa-
Chen, R. T. Q., Rubanova, Y., Bettencourt, J., and Duvenaud,             tras, K., Fournier, N., et al. POT: Python optimal trans-
  D. K. Neural ordinary differential equations. Advances                 port. Journal of Machine Learning Research, 22(78):1–8,
  in Neural Information Processing Systems, 31, 2018.                    2021.

Chen, R. T. Q., Behrmann, J., Duvenaud, D. K., and Ja-                 Gabrié, M., Rotskoff, G., and Vanden-Eijnden, E. Adaptive
  cobsen, J.-H. Residual flows for invertible generative                 Monte Carlo augmented with normalizing flows. Pro-
  modeling. Advances in Neural Information Processing                    ceedings of the National Academy of Sciences, 119(10):
  Systems, 32, 2019.                                                     e2109420119, 2022.
                                                                       Garbuno-Inigo, A., Nüsken, N., and Reich, S. Affine in-
Chen, Y., Huang, D. Z., Huang, J., Reich, S., and Stuart,
                                                                         variant interacting Langevin dynamics for Bayesian infer-
  A. M. Sampling via gradient flows in the space of proba-
                                                                         ence. SIAM Journal on Applied Dynamical Systems, 19
  bility measures. arXiv preprint arXiv:2310.03597, 2023.
                                                                         (3):1633–1658, 2020.
Cuturi, M. Sinkhorn distances: Lightspeed computation                  Gilks, W. R., Richardson, S., and Spiegelhalter, D. Markov
  of optimal transport. Advances in Neural Information                   chain Monte Carlo in practice. CRC press, 1995.
  Processing Systems, 26, 2013.
                                                                       Girolami, M. and Calderhead, B. Riemann manifold
De Cao, N., Titov, I., and Aziz, W. Block neural autore-                 Langevin and Hamiltonian Monte Carlo methods. Jour-
  gressive flow. In Uncertainty in Artificial Intelligence, pp.          nal of the Royal Statistical Society: Series B (Statistical
 1263–1273. PMLR, 2020.                                                  Methodology), 73(2):123–214, 2011.

                                                                  10
                                         Importance Corrected Neural JKO Sampling

Grathwohl, W., Chen, R. T. Q., Bettencourt, J., Sutskever, I.,        Hutchinson, M. A stochastic estimator of the trace of the
  and Duvenaud, D. Ffjord: Free-form continuous dynam-                  influence matrix for Laplacian smoothing splines. Com-
  ics for scalable reversible generative models. In Interna-            munications in Statistics-Simulation and Computation,
  tional Conference on Learning Representations, 2019.                 18(3):1059–1076, 1989.

Hagemann, P., Hertrich, J., and Steidl, G. Stochastic nor-            Jordan, R., Kinderlehrer, D., and Otto, F. The variational for-
  malizing flows for inverse problems: a Markov chains                  mulation of the Fokker–Planck equation. SIAM Journal
  viewpoint. SIAM/ASA Journal on Uncertainty Quantifi-                  on Mathematical Analysis, 29(1):1–17, 1998.
  cation, 10(3):1162–1190, 2022.
                                                                      Kingma, D. P. and Dhariwal, P. Glow: Generative flow
Hagemann, P., Hertrich, J., and Steidl, G. Generalized nor-             with invertible 1x1 convolutions. Advances in Neural
  malizing flows via Markov chains. Cambridge University                Information Processing Systems, 31, 2018.
  Press, 2023.                                                        Kingma, D. P. and Welling, M. Auto-encoding variational
Hagemann, P., Hertrich, J., Altekrüger, F., Beinert, R.,                Bayes. In International Conference on Learning Repre-
  Chemseddine, J., and Steidl, G. Posterior sampling based              sentations, 2014.
  on gradient flows of the MMD with negative distance                 Lambert, M., Chewi, S., Bach, F., Bonnabel, S., and Rigol-
  kernel. In International Conference on Learning Repre-                let, P. Variational inference via Wasserstein gradient flows.
  sentations, 2024.                                                     Advances in Neural Information Processing Systems, 35:
He, J., Du, Y., Vargas, F., Zhang, D., Padhy, S., OuYang,               14434–14447, 2022.
  R., Gomes, C. P., and Hernández-Lobato, J. M. No trick,             Lipman, Y., Chen, R. T. Q., Ben-Hamu, H., Nickel, M., and
  no treat: Pursuits and challenges towards simulation-free             Le, M. Flow matching for generative modeling. arXiv
  training of neural samplers. In Frontiers in Probabilistic            preprint arXiv:2210.02747, 2022.
  Inference: Learning meets Sampling, 2025.
                                                                      Liu, Q. and Wang, D. Stein variational gradient descent: A
Hertrich, J. Proximal residual flows for Bayesian inverse               general purpose Bayesian inference algorithm. Advances
  problems. In International Conference on Scale Space                  in Neural Information Processing Systems, 29, 2016a.
  and Variational Methods in Computer Vision, pp. 210–
  222. Springer, 2023.                                                Liu, Q. and Wang, D. Stein variational gradient descent: A
                                                                        general purpose Bayesian inference algorithm. Advances
Hertrich, J., Wald, C., Altekrüger, F., and Hagemann, P.                in Neural Information Processing Systems, 29, 2016b.
  Generative sliced MMD flows with Riesz kernels. In
                                                                      Liu, X., Gong, C., and Liu, Q. Flow straight and fast:
  International Conference on Learning Representations,
                                                                        Learning to generate and transfer data with rectified flow.
  2024.
                                                                        arXiv preprint arXiv:2209.03003, 2022.
Ho, J., Jain, A., and Abbeel, P. Denoising diffusion prob-            Liutkus, A., Simsekli, U., Majewski, S., Durmus, A., and
  abilistic models. In Advances in Neural Information                   Stöter, F.-R. Sliced-wasserstein flows: Nonparametric
 Processing Systems, volume 33, pp. 6840–6851. Curran                   generative modeling via optimal transport and diffusions.
 Associates, Inc., 2020.                                                In International Conference on Machine Learning, pp.
Hoeffding, W. Probability inequalities for sums of bounded              4104–4113. PMLR, 2019.
  random variables. Journal of the American Statistical               Lu, Y., Lu, J., and Nolen, J. Accelerating Langevin sampling
 Association, 58(301):13–30, 1963.                                      with birth-death. arXiv preprint arXiv:1905.09863, 2019.
Hoffman, M., Sountsov, P., Dillon, J., Langmore, I., Tran,            Marzouk, Y., Moselhy, T., Parno, M., and Spantini, A. Sam-
  D., and Vasudevan, S. Neutra-lizing bad geometry in                  pling via measure transport: An introduction. Handbook
  Hamiltonian Monte Carlo using neural transport. arXiv                of uncertainty quantification, 1:2, 2016.
  preprint arXiv:1903.03704, 2019.
                                                                      Matthews, A., Arbel, M., Rezende, D. J., and Doucet, A.
Hoffman, M. D. and Gelman, A. The no-u-turn sampler:                   Continual repeated annealed flow transport Monte Carlo.
  adaptively setting path lengths in Hamiltonian Monte                 In International Conference on Machine Learning, pp.
  Carlo. Journal of Machine Learning Research, 15(1):                  15196–15219. PMLR, 2022.
 1593–1623, 2014.
                                                                      Midgley, L. I., Stimper, V., Simm, G. N. C., Schölkopf,
Huang, C.-W., Krueger, D., Lacoste, A., and Courville, A.              B., and Hernández-Lobato, J. M. Flow annealed impor-
  Neural autoregressive flows. In International Conference             tance sampling bootstrap. In The Eleventh International
  on Machine Learning, pp. 2078–2087. PMLR, 2018.                      Conference on Learning Representations, 2023.

                                                                 11
                                        Importance Corrected Neural JKO Sampling

Mokrov, P., Korotin, A., Li, L., Genevay, A., Solomon, J. M.,        Ruthotto, L. and Haber, E. An introduction to deep genera-
 and Burnaev, E. Large-scale Wasserstein gradient flows.               tive modeling. GAMM-Mitteilungen, 44(2):e202100008,
 Advances in Neural Information Processing Systems, 34:                2021.
 15243–15256, 2021.
                                                                     Santambrogio, F. Optimal transport for applied mathemati-
Møller, J., Syversveen, A. R., and Waagepetersen, R. P.                cians. Birkäuser, NY, 55(58-63):94, 2015.
 Log gaussian cox processes. Scandinavian Journal of
                                                                     Sejdinovic, D., Sriperumbudur, B., Gretton, A., and Fuku-
 Statistics, 25(3):451–482, 1998.
                                                                       mizu, K. Equivalence of distance-based and RKHS-based
Neal, R. M. Annealed importance sampling. Statistics and               statistics in hypothesis testing. The Annals of Statistics,
  computing, 11:125–139, 2001.                                         41(5):2263 – 2291, 2013.

Neal, R. M. Slice sampling. The Annals of Statistics, 31(3):         Sommer, D., Gruhlke, R., Kirstein, M., Eigel, M., and
  705–767, 2003.                                                       Schillings, C. Generative modelling with tensor train
                                                                       approximations of Hamilton–Jacobi–Bellman equations.
Noé, F., Olsson, S., Köhler, J., and Wu, H. Boltzmann gener-           arXiv preprint arXiv:2402.15285, 2024.
  ators: Sampling equilibrium states of many-body systems
                                                                     Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Er-
  with deep learning. Science, 365(6457):eaaw1147, 2019.
                                                                       mon, S., and Poole, B. Score-based generative modeling
Onken, D., Fung, S. W., Li, X., and Ruthotto, L. OT-                   through stochastic differential equations. In International
  flow: Fast and accurate continuous normalizing flows                 Conference on Learning Representations, 2021.
 via optimal transport. In AAAI Conference on Artificial             Székely, G. E-statistics: The energy of statistical samples.
 Intelligence, volume 35, pp. 9223–9232, 2021.                         Techical Report, Bowling Green University, 2002.
Papamakarios, G., Pavlakou, T., , and Murray, I. Masked              Vargas, F., Grathwohl, W., and Doucet, A. Denoising dif-
  autoregressive flow for density estimation. Advances in              fusion samplers. International Conference on Learning
  Neural Information Processing Systems, pp. 2338–2347,                Representations, 2023a.
  2017.
                                                                     Vargas, F., Padhy, S., Blessing, D., and Nüsken, N. Trans-
Peyré, G. and Cuturi, M. Computational optimal transport:              port meets variational inference: Controlled Monte Carlo
  With applications to data science. Foundations and Trends            diffusions. arXiv preprint arXiv:2307.01050, 2023b.
  in Machine Learning, 11(5-6):355–607, 2019.
                                                                     Vidal, A., Wu Fung, S., Tenorio, L., Osher, S., and
Phillips, A., Dau, H.-D., Hutchinson, M. J., De Bortoli, V.,           Nurbekyan, L. Taming hyperparameter tuning in continu-
  Deligiannidis, G., and Doucet, A. Particle denoising dif-            ous normalizing flows using the JKO scheme. Scientific
  fusion sampler. In International Conference on Machine               Reports, 13(1):4501, 2023.
  Learning, 2024.
                                                                     Von Neumann, J. Various techniques used in connection
Qiu, Y. and Wang, X. Efficient multimodal sampling via                 with random digits. Applied Math Series, 12(36-38):1,
  tempered distribution flow. Journal of the American Sta-             1951.
  tistical Association, 119(546):1446–1460, 2024.
                                                                     Wang, Y. and Li, W. Accelerated information gradient flow.
Rezende, D. and Mohamed, S. Variational inference with                Journal of Scientific Computing, 90:1–47, 2022.
  normalizing flows. In International Conference on Ma-              Welling, M. and Teh, Y. W. Bayesian learning via stochastic
  chine Learning, pp. 1530–1538. PMLR, 2015.                          gradient Langevin dynamics. In International Conference
Richter, L. and Berner, J. Improved sampling via learned              on Machine Learning, pp. 681–688, 2011.
  diffusions. In International Conference on Learning Rep-           Woo, D. and Ahn, S. Iterated energy-based flow matching
  resentations, 2024.                                                 for sampling from Boltzmann densities. arXiv preprint
                                                                      arXiv:2408.16249, 2024.
Roberts, G. O. and Tweedie, R. L. Exponential convergence
  of Langevin distributions and their discrete approxima-            Wu, D. and Xie, Y. Annealing flow generative model to-
  tions. Bernoulli, 2(4):341–363, 1996.                               wards sampling high-dimensional and multi-modal distri-
                                                                      butions. arXiv preprint arXiv:2409.20547, 2024.
Rossky, P. J., Doll, J. D., and Friedman, H. L. Brownian
  dynamics as smart Monte Carlo simulation. The Journal              Wu, H., Köhler, J., and Noé, F. Stochastic normalizing flows.
  of Chemical Physics, 69(10):4628–4633, 1978. doi: 10.               Advances in Neural Information Processing Systems, 33:
 1063/1.436415.                                                       5933–5944, 2020.

                                                                12
                                       Importance Corrected Neural JKO Sampling

Xu, C., Cheng, X., and Xie, Y. Normalizing flow neural net-
  works by JKO scheme. Advances in Neural Information
  Processing Systems, 36, 2024.
Zhang, Q. and Chen, Y. Path integral sampler: a stochas-
  tic control approach for sampling. arXiv preprint
  arXiv:2111.15141, 2021.




                                                              13
                                           Importance Corrected Neural JKO Sampling

A. Background on Wasserstein Spaces
We give some theoretical background on Wasserstein gradient flows extending Section 2. In what follows we refer to
L2 (µ) := L2 (µ, Rd ) as the set of square integrable measurable functions on Rd with respect to a given measure µ ∈ P(Rd ).
For an absolutely continuous curve γ, there exists a unique minimal norm solution vt of the continuity equation (1) in the
sense that any solution ṽ of (1) fulfills ∥ṽ(·, t)∥L2 (γ(t)) ≥ ∥v(·, t)∥L2 (γ(t)) for almost every t. This is the unique solution of
(1) such that v(·, t) is contained in the regular tangent space
                                                                                                      L2 (µ)
                             Tµ P2 (Rd ) := {λ(T − Id) : (Id, T )# µ ∈ Γopt (µ, T# µ), λ > 0}                  .

An absolutely continuous curve γ : (0, ∞) → P2 (Rd ) with velocity field vt ∈ Tγ(t) P2 (Rd ) is a Wasserstein gradient flow
with respect to F : P2 (Rd ) → (−∞, ∞] if
                                                vt ∈ −∂F(γ(t)),            for a.e. t > 0,
where ∂F(µ) denotes the reduced Fréchet subdiffential at µ defined as
                                                                                                                               
                   
                                                                  Z                                                            
                                                                                                                                
        ∂F(µ) :=       ξ ∈ L2 (µ) : F(ν) − F (µ) ≥       inf              ⟨ξ(x), y − x⟩ dπ(x, y) + o(W2 (µ, ν)) ∀ν ∈ P2 (Rd )       .
                   
                                                    π∈Γopt (µ,ν)                                                               
                                                                                                                                
                                                                 Rd ×Rd

 The norm ∥vt ∥L2 (γ(t)) of the velocity field of a Wasserstein gradient flow coincides for almost every t with the metric
derivative
                                                               F(µ) − F(ν)
                                               |∂F|(µ) = inf                 .
                                                          ν→µ    W2 (µ, ν)

For the convergence result from Theorem 2.2, we need two more definitions. First, we need some convexity assumption.
For λ ∈ R, F : P2 (Rd ) → R ∪ {+∞} is called λ-convex along geodesics if, for every µ, ν ∈ dom F := {µ ∈ P2 (Rd ) :
F(µ) < ∞}, there exists at least one geodesics γ : [0, 1] → P2 (Rd ) between µ and ν such that
                           F(γ(t)) ≤ (1 − t) F(µ) + t F(ν) − λ2 t(1 − t) W22 (µ, ν),                t ∈ [0, 1].
To ensure uniqueness and convergence of the JKO scheme, a slightly stronger condition, namely being λ-convex along
generalized geodesics will be in general needed. Based on the set of three-plans with base σ ∈ P2 (Rd ) given by
                  Γσ (µ, ν) := α ∈ P2 (Rd × Rd × Rd ) : (π1 )# α = σ, (π2 )# α = µ, (π3 )# α = ν ,
                                

the so-called generalized geodesics γ : [0, ϵ] → P2 (Rd ) joining µ and ν (with base σ) is defined as
                                      γ(t) := (1 − ϵt )π2 + ϵt π3 # α,
                                                                  
                                                                            t ∈ [0, ϵ],                                                 (8)

where α ∈ Γσ (µ, ν) with (π1,2 )# α ∈ Γopt (σ, µ) and (π1,3 )# α ∈ Γopt (σ, ν), see Definition 9.2.2 in (Ambrosio et al.,
2005). The plan α may be interpreted as transport from µ to ν via σ. Then a function F : P2 (Rd ) → (−∞, ∞] is called
λ-convex along generalized geodesics (see Ambrosio et al., 2005, Definition 9.2.4), if for every σ, µ, ν ∈ dom F, there
exists at least one generalized geodesics γ : [0, 1] → P2 (Rd ) related to some α in (8) such that
                           F(γ(t)) ≤ (1 − t) F(µ) + t F(ν) − λ2 t(1 − t) Wα2 (µ, ν),                t ∈ [0, 1],
where                                                    Z
                                        Wα2 (µ, ν) :=                     ∥y − z∥22 dα(x, y, z).
                                                           Rd ×Rd ×Rd
Every function being λ-convex along generalized geodesics is also λ-convex along geodesics since generalized geodesics
with base σ = µ are actual geodesics. Second, a λ-convex functional F : P2 (Rd ) → R ∪ {+∞} is called coercive, if there
exists some r > 0 such that                               Z
                                     inf{F(µ) : µ ∈ P2 (Rd ),             ∥x∥2 dµ(x) ≤ r} > −∞,
                                                                    Rd
see (Ambrosio et al., 2005, eq. (11.2.1b)). In particular, any functional which is bounded from below is coercive.
If F is proper, lower semicontinuous, coercive and λ-convex along generalized geodesics, one can show that the proxτ F (µ)
is non-empty and unique for τ small enough (see Ambrosio et al., 2005, page 295).

                                                                   14
                                         Importance Corrected Neural JKO Sampling

B. Proofs and Examples from Section 3
B.1. Examples fulfilling Assumption 3.1
Assumption 3.1 is fulfilled for many important divergences and loss functions F. We list some examples below. While it
is straightforward to check that they are proper, lower semicontinuous, coercive and bounded from below, the convexity
is non-trivial. However, the conditions under which these functionals are λ-convex along generalized geodesics are well
investigated in (Ambrosio et al., 2005, Section 9.3). In the following we denote the Lebesgue measure as µLeb . For a
measure µ ∈ P ac (Rd ), we denote by dµ/dµLeb the Lebesgue density of µ if it exists.

   - Let ν ∈ P2ac (Rd ) with Lebesgue density q and define the forward Kullback-Leibler (KL) loss function
                                        (R                     
                                                           q(x)
                                              d q(x) log   p(x)   dx, if ∃dµ/dµLeb = p and dν/dµLeb = q,
                   F(µ) = KL(ν, µ) :=       R
                                          +∞                          otherwise.

     By (Ambrosio et al., 2005, Proposition 9.3.9), we obtain that F fulfills Assumption 3.1.

   - We can also derive a functional, be reversing the arguments in the KL divergence. Then, we arrive at the reverse KL
     loss function given by
                                         (R                    
                                                           p(x)
                                              d p(x) log   q(x)   dx, if ∃dµ/dµLeb = p and dν/dµLeb = q,
                   F(µ) = KL(µ, ν) :=       R
                                           +∞                         otherwise.

     Given that − log(q) is λ-convex, we obtain that F fulfills Assumption 3.1, see (Ambrosio et al., 2005, Proposition
     9.3.2).

   - Finally, we can define F based on the Jensen-Shannon divergence. This results into the function
                                                      1
                                                        KL µ, 12 (µ + ν) + KL ν, 12 (µ + ν) .
                                                                                          
                               F(µ) = JS(µ, ν) :=
                                                      2
     Assume µ and ν admit Lebesgue densities p and q respectively. Then, combining the two previous statements, this
     fulfills Assumption 3.1 whenever − log(p) and − log(q) are λ-convex.

All of these functionals are integrals of a smooth Lagrangian functional, i.e., there exists some smooth F : Rd × R × Rd → R
such that                                   (R
                                               Rd
                                                  F (x, p(x), ∇p(x))dx, if ∃dµ/dµLeb = p,
                                  F(µ) =
                                              ∞                            otherwise.
In this case, the limit velocity field from Theorem 2.2 (which appears as a limit in Theorem 3.3) can be expressed analytically
as the gradient of the so-called variational derivative of F, which is given by

                               δF
                                    (x) = −∇ · ∂3 F (x, p(x), ∇p(x)) + ∂2 F (x, p(x), ∇p(x))
                              δγ(t)

where ∂i F is the derivative of F with respect to the i-th argument and γ is the Wasserstein gradient flow, see (Ambrosio
et al., 2005, Example 11.1.2). For the above divergence functionals, computing these terms lead to a (weighted) difference
of the Stein scores of the input measure γ(t) and the target measure ν which is a nice link to score-based methods. More
precisely, denoting the density of γ(t) by pt , we obtain the following limiting velocity fields.
                                                                                         
                                                                                   q(x)                                       q(x)
   - For the forward KL loss function we have that F (x, y, z) = q(x) log           y         . Thus, we have that δF
                                                                                                                   δµ (x) = − p(x) .
                                            δF
     Hence, the velocity field v(·, t) = ∇ δγ(t) is given by

                                   q(x) ∇pt (x)    q(x) ∇q(x)    q(x)
                       v(x, t) =                 −             =        (∇ log(pt (x)) − ∇ log(q(x))) .
                                   pt (x) pt (x)   pt (x) q(x)   pt (x)

                                                               15
                                            Importance Corrected Neural JKO Sampling
                                                                                         
                                                                                      y
   - For the reverse KL loss function the Lagrangian is given by F (x, y, z) = y log q(x)   . Thus, we have that δF
                                                                                                                 δµ (x) =
              
     log p(x)                                                                           δF
           q(x) + 1 = log(p(x)) − log(q(x)) + 1. Hence, the velocity field v(·, t) = ∇ δγ(t) is given by


                                                v(x, t) = ∇(log(pt )(x)) − ∇(log(q)(x)).
                                                                                                                
                                                                                               2y             2q(x)
   - For the Jensen-Shannon divergence the Lagrangian is given by F (x, y, z) = 21 y log y+q(x)       + q(x) y+q(x)    .
                                               
                                          p(x)
     Thus, we have that δF       1                                                        δF
                        δµ (x) = 2 log p(x)+q(x) . Hence, the velocity field v(·, t) = ∇ δγ(t) is given by


                                        1 pt (x) + q(x) ∇pt (x)(pt (x) + q(x)) − pt (x)(∇pt (x) + ∇q(x))
                            v(x, t) =
                                        2     pt (x)                      (pt (x) + q(x))2
                                        1 ∇pt (x)q(x) − pt (x)∇q(x)
                                      =
                                        2     (pt (x) + q(x))pt (x)
                                                                              
                                               q(x)         ∇pt (x) ∇q(x)
                                      =                             −
                                        2(pt (x) + q(x)) pt (x)        q(x)
                                               q(x)
                                      =                   [∇(log(pt )(x)) − ∇(log(q)(x))] .
                                        2(pt (x) + q(x))

Note that computing the score ∇ log(pt ) of the current approximation is usually intractable, such that these limits cannot be
inserted into a neural ODE directly.

B.2. Proof of Corollary 3.2
Using similar arguments as in (Altekrüger et al., 2023; Mokrov et al., 2021; Onken et al., 2021; Xu et al., 2024), let
v : Rd × [0, τ ] → Rd such that the solution of

                                               ż(x, t) = v(z(x, t), t),     z(x, 0) = x,

fulfills z(·, τ )# µkτ = µk+1
                          τ   . Since (vτ,k , zτ,k ) is a minimizer of (5), we obtain that

                                    1 τ
                                      Z Z
                                                ∥vτ,k (zτ,k (x, t), t)∥2 dµkτ (x)dt + F(zτ,k (·, τ )# µkτ )
                                    2 0 Rd
                                    1 τ
                                      Z Z
                                 ≤              ∥v(z(x, t), t)∥2 dµkτ (x)dt + F(z(·, τ )# µkτ ).
                                    2 0 Rd

Observing that F(zτ,k (·, τ )# µkτ ) = F(z(·, τ )# µkτ ) = F(µk+1  τ  ), we obtain that
                       Z τZ                                              Z τZ
                     τ             ∥vτ,k (zτ,k (x, t), t)∥2 dµkτ (x) ≤ τ         ∥v(z(x, t), t)∥2 dµkτ (x)dt.
                            0    Rd                                          0      Rd

Since v was chose arbitrary, we obtain that vτ,k is the optimal velocity field from the theorem of Benamou-Brenier, which
now directly implies part (ii) and (iii).                                                                              □

B.3. Proof of Theorem 3.3
In order to prove convergence of the velocity fields vτ , we first introduce some notations. To this end, let Tτk be the optimal
transport maps between µkτ and µk+1
                                  τ    and define by vτk = (Tτk − I)/τ the corresponding discrete velocity fields. Then, the
velocity fields vτ can be expressed as

                                          vτ (x, kτ + tτ ) = vτk (((1 − t)I + tTτk )−1 (x)).                                (9)

Further, we denote the piece-wise constant concatenation of the discrete velocity fields by

                                                 ṽτ (x, kτ + tτ ) = vτk ,       t ∈ (0, 1).

                                                                   16
                                                Importance Corrected Neural JKO Sampling

Note that for any τ it holds that vτ ∈ L2 (γτ , Rd × [0, T ]) and ṽτ ∈ L2 (γ̃τ , Rd × [0, T ]). To derive limits of these velocity
fields, we recall the notion of convergence from (Ambrosio et al., 2005, Definition 5.4.3) allowing that the iterates are not
defined on the same space. In this paper, we stick to square integrable measurable functions defined on finite dimensional
domains, which slightly simplifies the definition.
Definition B.1. Let Ω ⊆ Rd be a measurable domain, assume that µk ∈ P2 (Ω) converges weakly to µ ∈ P2 (Ω) and let
fk ∈ L2 (µk , Ω) and f ∈ L2 (µ, Ω). Then, we say that fk converges weakly to f , if
                             Z                           Z
                                ⟨ϕ(x), fk (x)⟩dµk (x) → ⟨ϕ(x), f (x)⟩dµ(x), as k → ∞
                                       Ω                                         Ω

for all test functions ϕ ∈ Cc∞ (Ω). We say that fk converges strongly to f if

                                                         lim sup ∥fk ∥L2 (µk ,Ω) ≤ ∥f ∥L2 (µ,Ω) .                                                    (10)
                                                          k→∞


Note that (Ambrosio et al., 2005, Theorem 5.4.4 (iii)) implies that formula (10) is fulfilled with equality for any strongly
convergent sequence fk to f . Moreover it is known from the literature that subsequences of the piece-wise constant velocity
admit weak limits.
Theorem B.2 (Ambrosio et al., 2005, Theorem 11.1.6). Suppose that Assumption 3.1 is fulfilled for F. Then, for any
µ0 ∈ dom(F) and any sequence (τl )l ⊂ (0, ∞), there exists a subsequence (again denoted by (τl )l ) such that

   - The piece-wise constant curve γ̃τl (t) narrowly converges to some limit curve γ̂(t) for all t ∈ [0, ∞).

   - The velocity field ṽτl ∈ L2 (γ̃τl (t), Rd × [0, T ]) weakly converges to some limit v̂ ∈ L2 (γ̂(t), Rd × [0, T ]) according to
     Definition B.1 for any T > 0.

   - The limit v̂ fulfills the continuity equation with respect to γ̂, i.e.,

                                                              ∂t γ̂(t) + ∇ · (v̂τl (·, t)γ̂(t)) = 0.

In order to show the desired result, there remain the following questions, which we answer in the rest of this section:

   - Does Theorem B.2 also hold for the velocity fields vτl defined in (9) belonging to the geodesic interpolations?

   - Can we show strong convergence for the whole sequence vτl ?

   - Does the limit v̂ have the norm-minimizing property that ∥v̂(·, t)∥L2 (γ̂(t)) = |∂F|(γ̂(t))?

To address the first of these questions, we show that weak limits of ṽτ and vτ coincide. The proof is a straightforward
computation. A similar statement in a slightly different setting was proven in (Santambrogio, 2015, Section 8.3).
Lemma B.3. Suppose that Assumption 3.1 is fulfilled and let (τl )l ⊆ (0, ∞) be a sequence with τl → 0 as l → ∞ such
that ṽτl ∈ L2 (γ̃τl , Rd × [0, T ]) converges weakly to some v̂ ∈ L2 (γ̂, Rd × [0, T ]). Then, also vτl ∈ L2 (γτl , Rd × [0, T ])
converges weakly to v̂.

Proof. Let ϕ ∈ Cc∞ (Rd × [0, T ]). In particular, ϕ is Lipschitz continuous with some Lipschitz constant L < ∞. Then, it
holds that
                 Z                                  Z
                                  ⟨ϕ, vτl ⟩dγτl −                    ⟨ϕ, v⟩dγ̂
                  Rd ×[0,T ]                        Rd ×[0,T ]
                 Z                                  Z                                    Z                                Z
             ≤                    ⟨ϕ, vτl ⟩dγτl −                    ⟨ϕ, ṽτl ⟩dγ̃τl +                ⟨ϕ, ṽτl ⟩dγ̃τl −                ⟨ϕ, v⟩dγ̂ .
                     Rd ×[0,T ]                         Rd ×[0,T ]                       Rd ×[0,T ]                       Rd ×[0,T ]



                                                                                 17
                                                                 Importance Corrected Neural JKO Sampling

Since ṽτl converges weakly to v̂, the second term converges to zero as l → ∞. Thus in order to show that also vτl converges
weakly to v̂, it remains to show that also the first term converges to zero. By using the notations Tl = min{kτl : kτl ≥
T, k ∈ Z≥0 } and Kl = ⌈ τTl ⌉ = Tτll , we can estimate

                         Z                                            Z
                                             ⟨ϕ, vτl ⟩dγτl −                            ⟨ϕ, ṽτl ⟩dγ̃τl
                           Rd ×[0,T ]                                      Rd ×[0,T ]
                         Z T Z                                                                   Z                                         
                =                             ⟨ϕ(x, t), vτl (x, t)⟩dγτl (t)(x) −                          ⟨ϕ(x, t), ṽτl (x, t)⟩dγ̃τl (t)(x) dt
                             0           Rd                                                         Rd
                         Z Tl Z                                                                 Z
                ≤                          ⟨ϕ(x, t), vτl (x, t)⟩dγτl (t)(x) −                          ⟨ϕ(x, t), ṽτl (x, t)⟩dγ̃τl (t)(x) dt
                          0      Rd                                                               Rd
                         K
                         Xl −1 Z  (k+1)τl               Z                                                      Z
                ≤                                                ⟨ϕ(x, t), vτl (x, t)⟩dγτl (t)(x) −                   ⟨ϕ(x, t), ṽτl (x, t)⟩dγ̃τl (t)(x) dt
                         k=0         kτl                    Rd                                                   Rd
                             K
                             X l −1 Z 1           Z
                = τl                                       ⟨ϕ(x, kτl + tτl ), vτl (x, kτl + tτl )⟩dγτl (kτl + tτl )(x)
                             k=0         0            Rd
                                                  Z
                                           −            ⟨ϕ(x, kτl + tτl ), ṽτl (x, kτl + tτl )⟩dγ̃τl (kτl + tτl )(x) dt.
                                                  Rd



By denoting with Tτkl the optimal transport map from µkτl to µk+1
                                                              τl , we have for t ∈ (0, 1) that



                                           γτl (kτl + tτl ) = ((1 − t)I + tTτkl )# µkτl ,                          γ̃τl (kτl + tτl ) = µkτl ,


and the velocity fields satisfy


                             vτl (x, kτl + tτl ) = vτkl (((1 − t)I + tTτkl )−1 (x)),                                ṽτl (x, kτl + tτl ) = vτkl (x).


Then, the above term becomes

                         K
                         Xl −1 Z 1            Z
                    τl                                ⟨ϕ(x, kτl + tτl ), vτkl (((1 − t)I + tTτkl )−1 (x))⟩d((1 − t)I + tTτkl )# µkτl (x)
                          k=0        0         Rd
                                              Z
                                         −             ⟨ϕ(x, kτl + tτl ), vτkl (x)⟩dµkτl (x) dt
                                                  Rd
                          K
                          Xl −1 Z 1           Z
               = τl                                    ⟨ϕ((1 − t)x + tTτkl (x)), kτl + tτl ), vτkl (x)⟩dµkτl (x)
                           k=0        0           Rd
                                              Z
                                         −             ⟨ϕ(x, kτl + tτl ), vτkl (x)⟩dµkτl (x) dt
                                                  Rd
                          K
                          Xl −1 Z 1 Z

               ≤ τl                                    ⟨ϕ((1 − t)x + tTτkl (x)), kτl + tτl ) − ϕ(x, kτl + tτl ), vτkl (x)⟩ dµkτl (x)dt.
                           k=0        0        Rd



Using Hölders’ inequality and we obtain that this is smaller or equal than

                    Kl −1 Z                                                                                                                             1/2
                            1
                     X        Z                                                                                               Z
                                                                       k                                              2   k               k     2  k
               τl                             ∥ϕ((1 − t)x + tTτ (x)), kτl + tτl ) − ϕ(x, kτl + tτl )∥ dµτ (x)                           ∥vτ (x)∥ dµτ (x)     dt
                                                                       l                                                   l               l        l
                    k=0          0       Rd                                                                                        Rd




                                                                                               18
                                                  Importance Corrected Neural JKO Sampling

                                                                                         Tτk −I
By the Lipschitz continuity of ϕ and inserting the definition of vτkl =                    l
                                                                                           τl   this is smaller or equal than

                              K l −1 Z 1                                                         1/2
                                     L2
                              X          Z                           Z
                         τl                  t2
                                            ∥T k
                                                 (x) − x∥ 2
                                                            dµk
                                                                 (x)      ∥T  k
                                                                                (x) − x∥2
                                                                                          dµk
                                                                                               (x)     dt
                                     τl2 Rd τl                τl
                                                                       Rd
                                                                             τl             τl
                        k=0 0
                        K
                        Xl −1 Z 1      Z                            
                     =L            tdt       ∥Tτkl (x) − x∥2 dµkτl (x)
                               k=0       0            Rd

                            l K −1
                          L X
                     =        W22 (µkτl , µk+1
                                           τl )
                          2
                               k=0
                           ∞
                          LX
                     ≤               W22 (µkτl , µk+1
                                                  τl )
                          2
                              k=0

Finally, we have by the definition of the minimizing movements scheme that

                                                   1
                                                     W 2 (µk , µk+1 ) ≤ F(µkτl ) − F(µk+1
                                                                                      τl ).
                                                  2τl 2 τl τl

Summing up for k = 0, 1, ... we finally arrive at the bound
                      Z                                  Z                                                             
                                      ⟨ϕ, vτl ⟩dγτl −                     ⟨ϕ, v⟩dγ̂ ≤ τl L F(µ0 ) −          inf    F(µ) .
                         Rd ×[0,T ]                          Rd ×[0,T ]                                µ∈P2 (Rd )


Since F is bounded from below the upper bound converges to zero as l → ∞. This concludes the proof.

Finally, we employ the previous results to show Theorem 3.3 from the main part of the paper. That is, we show that for any
(τl )l ⊆ (0, ∞) with τl → 0 the whole vτl converges strongly to v.
Theorem B.4 (Theorem 3.3). Suppose that Assumption 3.1 is fulfilled and let (τl )l ⊆ (0, ∞) with τl → 0. Then, (vτl )l
converges strongly to the velocity field v̂ ∈ L2 (γ, Rd × [0, T ]) of the Wasserstein gradient flow γ : (0, ∞) → P2 (Rd ) of F
starting in µ0 .

Proof. We show that any subsequence of τl admits a subsequence converging strongly to v̂. Using the sub-subsequence
criterion this yields the claim.
By Theorem B.2 and Lemma B.3 we know that any subsequence of τl admits a weakly convergent subsequence. In an abuse
of notations, we denote it again by τl and its limit by ṽ. Then, we prove that the convergence is indeed strong and that ṽ = v̂.
                             RT
Step 1: Bounding lim sup 0 ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt from above. Since λ-convexity with λ ≥ 0 implies λ-convexity
                      l→∞                                l

with λ = −1, we can assume without loss of generality that λ < 0. Then, by (Ambrosio et al., 2005, Lemma 9.2.7, Theorem
4.0.9), we know that for any τ > 0 it holds
                                                                                                       
                                                           (1 + 2|λ|tτ )|∂F|(µ0 )         log(1 + λτ )
              W2 (γ̃τ (t), γ(t)) ≤ τ C(τ, t),  C(τ, t) =        √                 exp −                t ,
                                                                  2(1 + λτ )                    τ

where tτ = min{kτ : kτ ≥ t, k ∈ N0 }. For simplicity, we use the notations τmax = max{τl : l ∈ N0 }, Kl = ⌈ τTl ⌉ and
Tmax = T + τmax . Since λ < 0, we have that C(τ, t) ≤ C(τ, Tmax ) =: C(τ ) for all t ∈ [0, Tmax ]. Moreover, we have
                          |∂F |(µ0 )
that C(τ ) → (1+2|λ|Tmax
                      √
                        2
                                     exp(−λTmax ) as τ → 0, such that the sequence (C(τl ))l is bounded. In particular, there
exists a C > 0 such that
                                       W2 (γ̃τl (t), γ(t)) ≤ τl C, for all t ∈ [0, Tmax ].
Inserting t = kτl for k = 0, ..., Kl gives

                                             W2 (µkτl , γ(kτl )) ≤ τl C,          for all k = 0, ..., Kl .                      (11)

                                                                             19
                                                   Importance Corrected Neural JKO Sampling

Now, we can conclude by the theorem of Benamou-Brenier that
                               Z T                                                Z Kl τl
                                     ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt ≤                       ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt
                                                             l                                                       l
                                 0                                                 0
                                                                                  K
                                                                                  Xl −1 Z (k+1)τl

                                                                              =                            ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt
                                                                                                                                   l
                                                                                  k=0        kτl
                                                                                  K
                                                                                  Xl −1

                                                                              =             W22 (µkτl , µk+1
                                                                                                         τl ).
                                                                                  k=1

Now applying the triangular inequality for any k = 1, . . . , Kl − 1

                                                                                                        k+1 2
              W22 (µkτl , µk+1         k
                                                                                                            
                           τl ) ≤ W2 (µτl , γ(τl k)) + W2 (γ(τl k), γ(τl (k + 1)) + W2 (γ(τl (k + 1)), µτl )

and the estimate from (11) yields
                              Z T                                               K
                                                                                Xl −1
                                                                                                                                              2
                                     ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt ≤                  (2τ C + W2 (γ(τl k), γ(τl (k + 1)))
                                                         l
                                0                                                 k=0

By Jensens’ inequality the right hand side can be bounded from above by
                                                                                                      !1/2
                                            K l −1                                                                  Kl −1
                    2     2
                                            X         1                                                             X
            4Kl τ C + 2τ Kl C                           W 2 (γ(τl k), γ(τl (k + 1)))                          +              W22 (γ(τl k), γ(τl (k + 1)))
                                                      Kl 2
                                             k=0                                                                    k=0

                                                                                                             R (k+1)τl
Finally, again Benamou-Brenier gives that W22 (γ(τl k), γ(τl (k + 1))) ≤                                      kτl
                                                                                                                             ∥v̂(·, t)∥2L2 (γ(t)) dt such that the above
formula is smaller or equal than

                                                         Z K l τl                                    !1/2         Z Kl τl
                                            p
                        4Kl τl2 C 2 + 2τl       Kl C                      ∥v̂(·, t)∥2L2 (γ(t)) dt             +                ∥v̂(·, t)∥2L2 (γ(t)) dt.
                                                                 0                                                  0


                                                                                  RT
Since Kl τl → T and τl → 0 as l → ∞ this converges to                              0
                                                                                       ∥v̂(·, t)∥2L2 (γ(t)) dt such that we can conclude
                                                 Z T                                                 Z T
                                     lim sup           ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt ≤                    ∥v̂(·, t)∥2L2 (γ(t)) dt.
                                                                          l
                                       l→∞        0                                                    0


Step 2: Strong convergence. By (Ambrosio et al., 2005, Theorem 8.3.1, Proposition 8.4.5) we know that for any v fulfilling
the continuity equation
                                          ∂t γ(t) + ∇ · (v(·, t)γ(t)) = 0,
it holds that ∥v(·, t)∥L2 (γ(t),Rd ≥ ∥v̂(·, t)∥L2 (γ(t),Rd . Since ṽ fulfills the continuity equation by Theorem B.2, this implies
that           Z    T                          Z             T                           Z                               T
                        ∥ṽ(·, t)∥2L2 (γ(t),Rd dt ≥                  ∥v̂(·, t)∥2L2 (γ(t),Rd dt = lim sup                     ∥vτl (·, t)∥2L2 (γτ (t),Rd ) dt.
                                                                                                                                                  l
                0                                        0                                                 l→∞       0

In particular, vτl ∈ L2 (γτl , Rd × [0, T ]) converges strongly to ṽ such that by (Ambrosio et al., 2005, Theorem 5.4.4 (iii)) it
holds equality in the above equation, i.e.,
                                            Z T                                             Z T
                                                  ∥ṽ(·, t)∥2L2 (γ(t),Rd dt =                      ∥v̂(·, t)∥2L2 (γ(t),Rd dt
                                             0                                               0

Using again (Ambrosio et al., 2005, Theorem 8.3.1, Proposition 8.4.5) this implies that ṽ = v̂.

                                                                                       20
                                                     Importance Corrected Neural JKO Sampling

C. Proofs from Section 4
C.1. Proof of Theorem 4.2
  i) Let A ⊂ Rd Lebesgue-measurable set. We denote by accept and reject the measurable set of accepted and rejected
     draws of X respectively. By the law of total probability, we have
                                 P(X̃ ∈ A) = P(X̃ ∈ A and X was accepted) + P(X̃ ∈ A and X was rejected).
    Since it holds X̃ = X if X is accepted and X̃ = X ′ if X is rejected this can be reformulated as
                                              P(X̃ ∈ A) = P(X ∈ A, accept) + P(X ′ ∈ A, reject)
    Now it holds
                                                            Z
                                 P(X ∈ A, accept) =                 α(x)p(x) dx
                                                              A
                                                                                                Z            
                                      ′                              ′
                                 P(X ∈ A, reject) = P(X ∈ A) · P(reject) =                             p(x) dx (1 − E[α(X)]) ,
                                                                                                   A
                                                 ′
    where we used the fact that X, X ∼ µ are independent. As a consequence, we obtain

                                                            Z                      Z                 
                                          P(X̃ ∈ A) =               α(x)p(x)dx +                p(x)dx (1 − E[α(X)])
                                                            ZA                              A

                                                        =           p(x) (α(x) + 1 − E[α(X)]) dx.
                                                                A

    Thus, p̃(x) = p(x)(α(x) + 1 − E[α(X)]) is the density of X̃.
(ii) Note, since X ∼ p, we have                  Z                          Z
                                                        p(x)α(x)                        p(x)α(x)
                                                                 dx =              R                dx = 1,
                                                     R E[α(X)]
                                                      d                       Rd       Rd
                                                                                         p(y)α(y)dy
    in particular p(x)α(x)                                         d
                   E[α(X)] defines a density. Now let η ∈ P2 (R ) be the corresponding probability measure. Then, it holds
    by part (i) that µ̃ = E[α(X)]η + (1 − E[α(X)])µ. We will show that KL(η, ν) ≤ KL(µ, ν). Due to the convexity of
    the KL divergence in the linear space of measures this implies the claim.
    We denote Z = E[α(X)] = Rd min(p(x), q(x)
                                  R
                                                    c̃ )dx. Then it holds
                               Z                                
                                    p(x)α(x)          p(x)α(x)
                  KL(η, ν) =                   log                 dx
                                Rd     Z                Zq(x)
                                    min(p(x), q(x)                                             min(p(x), q(x)
                                                                         
                                                 c̃ )                                                      c̃ )
                               Z                                                           Z
                                                             c̃p(x)α(x)
                            =                          log                   dx − log(Zc̃)                      dx
                                Rd         Z                     q(x)                       Rd       Z
                                    min(p(x), q(x)
                                                                             
                                                 c̃ )
                               Z
                                                                     c̃p(x)
                            =                          log min              ,1     dx − log(Z) − log(c̃)
                                Rd         Z                          q(x)
                                                                                  !
                                           min(p(x), q(x)
                                                                           
                                                         c̃ )
                               Z
                                                                     c̃p(x)
                            =       min                       log              , 0 dx − log(Z) − log(c̃).
                                Rd                 Z                  q(x)


                            
                    c̃p(x)
    Since log        q(x)        ≤ 0 if and only if p(x) ≤ q(x)/c̃ this can be reformulated as
                                             Z                         
                                                      p(x)       c̃p(x)
                                                 min       log            , 0 dx − log(Z) − log(c̃)
                                              Rd       Z          q(x)
                                             Z                            
                                                                 c̃p(x)
                                           ≤     min p(x) log             , 0 dx − log(Z) − log(c̃),                             (12)
                                              Rd                  q(x)

                                                                             21
                                          Importance Corrected Neural JKO Sampling

                                                                       rejection at k-th layer

                                                                                      yes
        previous layer            xki                         accepted?                               xk+1
                                                                                                       i
                                                                                                                          next layer

        CNF/ rejection                                                no                            yields              CNF/ rejection

                                                                                    resample
                                                                                    xk
                                                                                     i ∼ µ
                                                                                           k




Figure 2: Illustration of a single sample within a rejection layer. The independent sample xki is either accepted directly or
else resampled once, and then used to define xk+1
                                                i    as input for the next layer.


     where the inequality comes from the fact that Z = E[α(X)] ∈ [0, 1]. Moreover, it holds by Jensen’s inequality that
                                                               Z                          
                                                                                 q(x)
                           − log(Z) = − log(E[α(X)]) = − log         p(x) min           , 1 dx
                                                                  Rd            c̃p(x)
                                                           Z                             
                                                                                 q(x)
                                                       ≤−      p(x) log min             ,1      dx
                                                            Rd                  c̃p(x)
                                                           Z                           
                                                                                 q(x)
                                                       =−      p(x) min log                , 0 dx
                                                            Rd                  c̃p(x)
                                                           Z                            
                                                                                 c̃p(x)
                                                       =       p(x) max log                 , 0 dx
                                                            Rd                    q(x)
                                                           Z                            
                                                                                 c̃p(x)
                                                       =       max p(x) log                 , 0 dx.
                                                            Rd                    q(x)
     Thus, we obtain that (12) can be bounded from above by
                   Z                                  Z                        
                                         c̃p(x)                              c̃p(x)
                        min p(x) log             , 0 dx +     max p(x) log           , 0 dx − log(c̃)
                    Rd                    q(x)             Rd                 q(x)
     which equals        Z                                                Z                            
                                              c̃p(x)                                               p(x)
                               p(x) log                    dx − log(c̃) =           p(x) log                  dx = KL(µ, ν).
                          Rd                   q(x)                         Rd                     q(x)
     In summary, we have KL(η, ν) ≤ KL(µ, ν), which implies the assertion.

                                                                                                                                         □

C.2. Proof of Corollary 4.3
                      PN
Let Y = E[α(X)]− N1 i=1 α(XN ) denote the random variable representing the error. Since α(XN ) ∈ [0, 1], Hoeffding’s
                                                                                2
inequality (Hoeffding, 1963) yields that P (Y > t) ≤ 2 exp(− N2t ). Consequently, we have that
                                      Z ∞                   Z ∞                     √
                                                                        N t2
                                                                            
                                                                                      2π
                             E[Y ] =        P (Y > t)dt ≤ 2     exp −          dt = √ .
                                       0                     0           2             N
                                                                                                                                         □

D. Algorithms
D.1. Training and Evaluation Algorithms
We summarize the training and evaluation procedures for the neural JKO steps in Algorithm 3 and 4 and the parameter
selection for the importance-based rejection steps in Algorithm 5. The evaluation of the importance-based rejection steps is
summarized in Algorithm 1 in the main text.

                                                                     22
                                          Importance Corrected Neural JKO Sampling


Algorithm 3 Training of neural JKO steps
  Input: Samples xk1 , ..., xkN of µk .
  Minimize the loss function θ 7→ L(θ) from (6) using the Adam optimizer.
  Output: Parameters θ.



Algorithm 4 Sampling and density propagation for neural JKO steps
            - Samples xk1 , ..., xkN of µk ,
         
  Input:
            - Density values pk (xk1 ), ..., pk (xkN ).
  for i = 1, ..., N do
    1. Solve the ODE (7) for x = xki .
    2. Set xk+1
             i     = zθ (xki , τ ).
                               pk (xk )
    3. Set pk+1 (xk+1
                  i   ) = exp(ℓ (xik ,τ )) .
                                  θ   i
  end for

              - Samples xk1 , ..., xkN of µk+1 ,
           
  Output:
              - Density values pk+1 (xk+1 1  ), ..., pk+1 (xk+1
                                                            N ).




Algorithm 5 Parameter selection for importance-based rejection steps
            - Samples xk1 , ..., xkN of µk with corresponding densities
         
  Input:
            - desired rejection rate r, unnormalized target density g
  Choose c by bisection search such that
                                                N                                        
                                            1 X                                     g(x)
                                  1−r =           αk (xki ),        αk (x) = min 1, k       .
                                            N i=1                                  cp (x)

  Output: Rejection parameter c and estimate of E[α(Xτk )] ≈ 1 − r.



Algorithm 6 Density Evaluation of Importance Corrected Neural JKO Models
  Input: x ∈ Rd , model (X0 , ..., XK )
  if K = 0 then
     Return latent density p0 (x).
  else if the last step is a rejection step then
     1. Evaluate pK−1 (x) by applying this algorithm for (X0 , ..., XK−1 ).
     2. Return pK (x) = pK−1 (αk (x) + 1 − E[αk (Xk−1 )])
  else
                                                                                                     last step is a neural JKO step
     1. Solve the ODE system (with vθ from the neural JKO step)
                                                                                                          
                         żθ (x, t)           vθ (zθ (x, t), t)                     zθ (x, τ )               x
                                     =                                ,                              =               .
                         ℓ̇θ (x, t)       trace(∇vθ (zθ (x, t), t))                 ℓθ (x, τ )               0

    2. Set x̃ = zθ (x, 0).
    3. Evaluate pK−1 (x̃) by applying this algorithm for (X0 , ..., XK−1 ).
    4. Return pK (x) = pK−1 (x̃) exp(ℓθ (x, 0)).
  end if
  Output: Density pK (x)


                                                               23
                                        Importance Corrected Neural JKO Sampling

D.2. Density Evaluation of Importance Corrected Neural JKO Models
Let (X0 , ..., XK ) be an importance corrected neural JKO model. We aim to evaluate the density pK of XK at some given
point x ∈ Rd . Using Theorem 4.2, this can be done recursively by Algorithm 6. Note that the algorithm always terminates
since K is reduced by one in each call.

E. Additional Numerical Results and Implementation Details
E.1. Test Distributions
We evaluate our method on the following test distributions.

   - Mustache: The two-dimensional log-density is given as log N (0, Σ) ◦ T with Σ = [1, σ; σ, 1] and T (x1 , x2 ) =
     (x1 , (x2 − (x21 − 1)2 )). Note that det(∇T (x)) = 1 for all x. In particular, we obtain directly by the transformation
     formula that the normalization constant is one. Depending on σ ∈ [0, 1) close to 1, this probability distribution has very
     long and narrow tails making it hard for classical MCMC methods to sample them. In our experiments we use σ = 0.9.

   - Shifted 8 Modes: A two-dimensional Gaussian mixture model with 8 equal weighted modes and covariance matrix
     1 × 10−2 I. The modes are placed in a circle with radius 1 and center (−1, 0). Due to the shifted center classical
     MCMC methods have difficulties to distribute the mass correctly onto the modes.

   - Shifted 8 Peaky: This is the same distribution as the shifted 8 Modes with the difference that we reduce the width of
     the modes to the covariance matrix 5 × 10−3 I. Since the modes are disconnected, it becomes harder to sample from
     them.

   - Funnel:         We consider the (normalized) probability density function given by q(x)                         =
     N (x1 |0, σf2 )N (x2:10 |0, exp(x1 )I), where σf2 = 9. This example was introduced by (Neal, 2003). Similarly
     to the mustache example, this distribution has a narrow funnel for small values x1 which can be hard to sample.

   - GMM-d: A d-dimensional Gaussian mixture model with 10 equal weighted modes with covariance matrix 1 × 10−2 I
     and means drawn randomly from a uniform distribution on [−1, 1]d . This leads to a peaky high-dimensional and
     multimodal probability distribution which is hard to sample from.

   - GMM40-50D: Another Gaussian mixture model, which was used as an example in (Blessing et al., 2024; Chen et al.,
     2025) based on (Midgley et al., 2023). It is a 50 dimensional GMM with 40 equally weighted modes with the identity
     as covariance matrix, where the means are drawn uniformly from [−40, 40]d . We use the same seed for drawing the
     modes as in (Chen et al., 2025).

   - LGCP: This is a high dimensional standard example taken from (Arbel et al., 2021; Matthews et al., 2022; Vargas
     et al., 2023a). It describes a Log-Gaussian Cox process on a 40 × 40 grid as arising from spatial statistics (Møller
     et al., 1998). This Q leads to a 1600-dimensional probability distribution with the unnormalized density function
     q(x) ∝ N (x|µ, K) i∈{1,...,40}2 exp(xi yi − a exp(xi )), where µ and K are a fixed mean and covariance kernel, yi
     is some data and a is a hyperparameter. For details on this example and the specific parameter choice we refer to
     (Matthews et al., 2022).

E.2. Error Measures
We use the following error measures.

   - The energy distance was proposed by (Székely, 2002) and is defined by
                                               Z Z
                                             1
                                D(µ, ν) = −            ∥x − y∥d(µ − ν)(x)d(µ − ν)(y).
                                             2 Rd Rd

     It is the maximum mean discrepancy with the negative distance kernel K(x, y) = −∥x − y∥ (see Sejdinovic et al.,
     2013) and can be estimated from below and above by the Wasserstein-1 distance (see Hertrich et al., 2024). It is a
     metric on the space of probability measures. Consequently, a smaller energy distance indicates a higher similarity of the

                                                              24
                                                            Importance Corrected Neural JKO Sampling

Table 3: We report the expected squared empirical Wasserstein-2 distance (W22 ) and its standard deviation between generated
and ground truth samples of size N = 5000 for the different methods and for all examples where the ground truth
model is known. A smaller value of W22 indicates a better result. Note that the curse of dimensionality present in the
sample complexity, might limit the reliability of the results for the high-dimensional examples. In particular for the funnel
distribution, we observe that the expected empirical Wasserstein-2 distance between two independent sets of ground truth
samples is higher than the observed W22 values.

                                                                                           Sampler
  Distribution             MALA                       HMC                       DDS                     CRAFT                    Neural JKO            Neural JKO IC (ours)    Sampling Error
    Mustache       4.7 × 10+1 ± 1.3 × 10+1   2.8 × 10+1 ± 4.2 × 100    5.2 × 10+1 ± 2.0 × 100    5.4 × 10+1 ± 1.2 × 10+1   3.0 × 10+1 ± 1.3 × 10+1   1.7 × 10+1 ± 6.0 × 100    1.2 × 10+1
 shifted 8 Modes   5.5 × 10−2 ± 6.9 × 10−3   4.7 × 10−3 ± 3.6 × 10−3   8.7 × 10−2 ± 3.1 × 10−2   2.4 × 10−1 ± 2.4 × 10−3   5.6 × 10−1 ± 1.6 × 10−2   6.5 × 10−3 ± 2.1 × 10−3   7.4 × 10−3
 shifted 8 Peaky   5.8 × 10−2 ± 2.4 × 10−2   5.6 × 10−1 ± 1.4 × 10−2   1.0 × 10−1 ± 2.5 × 10−2   2.5 × 10−1 ± 1.1 × 10−1   5.9 × 10−1 ± 1.7 × 10−2   7.2 × 10−3 ± 1.3 × 10−3   5.6 × 10−3
      Funnel       5.5 × 10+2 ± 1.2 × 10+2   7.4 × 10+2 ± 5.6 × 10+2   5.3 × 10+2 ± 7.5 × 10+1   7.9 × 10+2 ± 4.4 × 10+2   9.4 × 10+2 ± 9.3 × 10+2   8.5 × 10+2 ± 3.9 × 10+2   1.0 × 10+3
    GMM-10         3.8 × 100 ± 4.2 × 10−1    3.8 × 100 ± 3.9 × 10−1    3.8 × 10−1 ± 1.1 × 10−1   2.4 × 100 ± 1.0 × 100     6.3 × 10−1 ± 1.4 × 10−1   1.4 × 10−1 ± 2.3 × 10−2   1.4 × 10−1
    GMM-20         8.9 × 100 ± 4.0 × 10−1    9.0 × 100 ± 3.9 × 10−1    8.8 × 10−1 ± 1.0 × 10−1   7.9 × 100 ± 1.5 × 100     1.2 × 100 ± 2.0 × 10−1    3.7 × 10−1 ± 5.0 × 10−2   3.7 × 10−1
    GMM-50         2.7 × 10+1 ± 1.0 × 100    2.7 × 10+1 ± 9.8 × 10−1   3.6 × 100 ± 8.9 × 10−1    2.6 × 10+1 ± 2.6 × 100    4.4 × 100 ± 7.9 × 10−1    1.2 × 100 ± 1.3 × 10−1    1.2 × 100
    GMM-100        5.7 × 10+1 ± 1.2 × 100    5.7 × 10+1 ± 1.3 × 100    9.9 × 100 ± 2.9 × 100     5.6 × 10+1 ± 1.1 × 100    1.1 × 10+1 ± 2.7 × 100    2.9 × 100 ± 4.7 × 10−1    2.8 × 100
    GMM-200        1.2 × 10+2 ± 2.8 × 100    1.2 × 10+2 ± 2.8 × 100    2.4 × 10+1 ± 4.0 × 10+1   1.1 × 10+2 ± 3.0 × 100    2.4 × 10+1 ± 3.9 × 100    7.8 × 100 ± 6.9 × 10−1    5.9 × 100




       input distributions. By discretizing the integrals it can be easily evaluated based on N ∈ N samples x = (xi )i ∼ µ⊗N ,
       y = (yi )i ∼ ν ⊗N as
                                                               N                              N                    N
                                                               X                          1 X                  1 X
                                             D(x, y) =                 ∥xi − yj ∥ −               ∥xi − xj ∥ −         ∥yi − yj ∥.
                                                              i,j=1
                                                                                          2 i,j=1              2 i,j=1

       We use N = 50000 samples in Table 1.
   - We also evaluate the squared Wasserstein-2 distance which is defined in Section 2. To this end, we use the Python
     Optimal Transport package (POT, Flamary et al., 2021). Note that computing the Wasserstein distance has complexity
     O(n3 ) where n is the number of points. Hence, we evaluate the Wasserstein distance based on fewers samples
     compared to the case of other metrics. We use N = 5000 samples in Table 3. In addition, we want to highlight that
     the expected Wasserstein distance evaluated on empirical measures instead of its continuous counterpart suffers from
     the curse of dimensionality. In particular, its sample complexity scales as O(n−1/d ) (Peyré & Cuturi, 2019, Chapter
     8.4.1). Consequently, the sample-based Wasserstein distance in high dimensions can differ significantly from the true
     Wasserstein distance of the continuous distributions. Indeed, we can see in Table 3 that the sampling error has often the
     same order of magnitude as the reported errors. Overall we can draw similar conclusions from this evaluation as for the
     energy distance in Table 1.
   - We estimate the log normalizing constant (short log(Z) estimation) which is used as a benchmark standard in various
     references (e.g., in Arbel et al., 2021; Matthews et al., 2022; Phillips et al., 2024; Vargas et al., 2023a). More precisely,
     for the generated distribution µ with normalized density p and target measure ν with density q(x) = g(x)/Zg we
     evaluate the term
                                                                            
                                       g(x)                                 p(x)
                        Ex∼µ log                = log(Zg ) − Ex∼µ log                  = log(Zg ) − KL(µ, ν).
                                        p(x)                                q(x)

       Due to the properties of the KL divergence, a higher log(Z) estimate implies a lower KL divergence between µ and
       ν and therefore a higher similarity of generated and target distribution. In our experiments we compute the log(Z)
       estimate based on N = 50000 samples. The results are given in Table 2.
   - To quantify how well the mass is distributed on different modes for the mixture model examples (shifted 8 Modes,
     shifted 8 Peaky, GMM-d), we compute the mode weights. That is, we generate N = 50000 samples and assign each
     generated samples to the closest mode of the GMM. Afterwards, we compute for each mode the fraction of samples
     which is assigned to each mode. To evaluate this distribution quantitatively, we compute the mean square error (MSE)
     between the mode weights of the generated samples and the ground truth weights from the GMM. We call this error
     metric the mode MSE, give the results are in Table 4.

Remark E.1 (Bias in log(Z) Computation). In the cases, where the importance corrected neural JKO sampling fits the target
distribution almost perfectly, we sometimes report in Table 2 log(Z) estimates which are slightly larger than the ground
truth. This can be explained by the fact that the density evaluation of the continuous normalizing flows uses the Hutchinson

                                                                                           25
                                                         Importance Corrected Neural JKO Sampling

Table 4: We report the mode MSEs for the different methods for all examples which can be represented as mixture model. A
smaller mode MSE indicates a better result.

                                                                                                    Sampler
     Distribution               MALA                       HMC                         DDS                         CRAFT                 Neural JKO              Neural JKO IC (ours)
    shifted 8 Modes     3.2 × 10−3 ± 1.3 × 10−4   1.9 × 10−5 ± 1.1 × 10−5     8.8 × 10−3 ± 2.2 × 10−3    3.2 × 10−2 ± 6.1 × 10−3   8.3 × 10−2 ± 1.0 × 10−3     1.3 × 10−5 ± 4.4 × 10−6
    shifted 8 Peaky     8.3 × 10−2 ± 3.7 × 10−4   7.8 × 10−2 ± 9.9 × 10−4     7.9 × 10−3 ± 2.2 × 10−3    3.3 × 10−2 ± 1.3 × 10−2   8.4 × 10−2 ± 6.7 × 10−4     1.5 × 10−5 ± 3.2 × 10−6
       GMM-10           1.2 × 10−2 ± 5.5 × 10−3   1.0 × 10−2 ± 5.8 × 10−3     3.6 × 10−3 ± 1.9 × 10−3    1.4 × 10−1 ± 4.7 × 10−2   1.1 × 10−2 ± 5.6 × 10−3     2.1 × 10−5 ± 3.0 × 10−6
       GMM-20           6.6 × 10−3 ± 2.2 × 10−3   6.6 × 10−3 ± 2.4 × 10−3     3.6 × 10−3 ± 1.5 × 10−3    3.8 × 10−1 ± 3.9 × 10−2   7.3 × 10−3 ± 2.8 × 10−3     2.4 × 10−5 ± 9.8 × 10−6
       GMM-50           1.0 × 10−2 ± 3.8 × 10−3   9.8 × 10−3 ± 3.6 × 10−3     9.6 × 10−3 ± 4.9 × 10−3    9.0 × 10−1 ± 6.4 × 10−5   1.2 × 10−2 ± 4.4 × 10−3     2.6 × 10−5 ± 6.0 × 10−6
       GMM-100          1.1 × 10−2 ± 5.4 × 10−3   1.1 × 10−2 ± 5.4 × 10−3     1.1 × 10−2 ± 5.8 × 10−3    9.0 × 10−1 ± 4.8 × 10−8   1.4 × 10−2 ± 7.0 × 10−3     1.5 × 10−4 ± 8.5 × 10−5
       GMM-200          1.4 × 10−2 ± 5.1 × 10−3   1.4 × 10−2 ± 4.6 × 10−3     2.2 × 10−2 ± 8.6 × 10−3    9.0 × 10−1 ± 5.8 × 10−8   1.9 × 10−2 ± 6.3 × 10−3     6.8 × 10−4 ± 4.0 × 10−4



Table 5: We report the mode Sinkhorn distance for the different methods for the GMM40-50D example. A smaller mode
Sinkhorn distance indicates a better result. The comparison values are taken from (Chen et al., 2025).

                                                                                         Sampler
                                        SMC                 DDS                 CRAFT                   PIS            CMCD-LV              SCLD          Neural JKO IC (ours)
            Sinkhorn distance     46370.34 ± 137.79   5435.18 ± 172.20      28960.70 ± 354.89   10405.75 ± 69.41    4258.57 ± 737.15   3787.73 ± 249.75      3025.61 ± 418.10




trace estimator for evaluating the divergence and a numerical method for solving the ODE. Therefore, we have a small
error in the density propagation of the neural JKO steps. This error is amplified by the rejection steps since samples with
underestimated density are more likely to be rejected than samples with overestimated density.
We would like to emphasize that this effect only appears for examples, where the energy distance between generated and
ground truth samples is in the same order of magnitude like the average distance between two different sets of ground truth
samples (see Table 1). This means that in the terms of the energy distance the generated and ground truth distribution are
indistinguishable. At the same time the bias in the log(Z) estimate appears at the third or fourth relevant digit meaning that
it is likely to be negligible.

E.3. Additional Comparison
We additionally compare our importance corrected neural JKO model with several other methods on the example of a 50
dimensional Gaussian mixture model as used in (Midgley et al., 2023). We follow the setting of Table 3 in Chen et al. (2025)
and evaluate the Sinkhorn distance (Cuturi, 2013) with entropic regularization parameter 10−3 based on 2000 generated
and ground truth samples. Moreover we average the results over 5 training runs with 25 evaluations from each run. We
compare our results with sequential Monte Carlo (SMC, Del Moral et al., 2006), denoising diffusion sampler (DDS, Vargas
et al., 2023a), continual repeated annealed flow transport Monte Carloe (CRAFT, Matthews et al., 2022), path integral
sampler (PIS, Zhang & Chen, 2021), controlled Monte Carlo Diffusion (CMCD, Vargas et al., 2023b) and sequential
controlled Langevin diffusion (SCLD, Chen et al. (2025)). For CMCD, we consider the log-variance (LV) variant considered
in (Chen et al., 2025) since it gives better results. The hyperparameters used for our importance corrected neural JKO
scheme are given in Table 6. Similar as most comparison methods, we use a normal distribution with a larger variance as
initial distribution µ0 and use a gradient flow on the negative log-density prior to the learned CNF and rejection steps, see
Remark E.2 for details.
The results are given in Table 5, where the values for the comparison are taken from (Chen et al., 2025). We observe that
neural JKO IC significantly outperforms the comparisons on this example.

E.4. Additional Figures and Evaluations
Additionally to the results from the main part of the paper, we provide the following evaluations.

Visualization of the Rejection Steps In Figure 1 and with involved steps in Figure 3, we visualize the different steps of
our importance corrected neural JKO model on the shifted 8 Peaky example. Due to the shift of the modes, the modes on the
right attract initially more mass than the ones on the left. In the rejection layers, we can see that samples are mainly rejected
in oversampled regions such that the mode weights are equalized over time. This can also be seen in Figure 4, where we plot
the weights of the different modes over time. We observe, that these weights are quite imbalanced for the latent distribution
but are equalized over the rejection steps until they reach the ground truth value.

                                                                                            26
                                         Importance Corrected Neural JKO Sampling

(Marginal) Plots of Generated Samples Despite the quantitative comparison of the methods in the Tables 1, 2 and 4,
we also plot the first to coordinates of generated samples for the different test distributions for all methods for a visual
comparison.
In Figure 5, we plot samples of the shifted 8 Modes example. We can see that all methods roughly cover the ground truth
distribution even though CRAFT and DDS have slight and the uncorrected neural JKO scheme has a severe imbalance in the
assigned mass for the different modes.
For the shifted 8 Peaky example in Figure 6, we see that this imbalance increases drastically for CRAFT, HMC, MALA and
the uncorrected neural JKO. Also DDS has has a slight imbalance, while the importance corrected neural JKO scheme fits
the ground truth almost perfectly.
The Funnel distribution in Figure 7 has two difficult parts, namely the narrow but high-density funnel on the left and the
wide moderate density fan on the right. We can see that DDS does cover none of them very well. Also MALA, CRAFT and
the uncorrected neural JKO do not cover the end of the funnel correctly and have also difficulties to cover the fan. HMC
covers the fan well, but not the funnel. Only our importance corrected neural JKO scheme covers both parts in a reasonable
way.
For the Mustache distribution in Figure 8, the critical parts are the two heavy but narrow tails. We observe that CRAFT and
DDS are not able to cover them at all, while HMC and MALA and uncorrected neural JKO only cover them only partially.
The importance corrected neural JKO covers them well.
Finally, for the GMM-d example we consider the dimensions d = 10 and d = 200 in the Figures 9 and 10. We can see that
CRAFT mode collapses, i.e., for d = 10 it already finds some of the modes and for d = 200 it only finds one mode. DDS,
HMC, MALA and the uncorrected neural JKO find all modes but do not distribute the mass correctly onto all modes. While
this already appears for d = 10 it is more severe for d = 200. The importance corrected neural JKO sampler finds all modes
and distributes the mass accurately.
Note that the distributions generated by MALA and the neural JKO are always similar. This is not surprising since both
simulate a Wasserstein gradient flow with respect to the KL divergence and only differ by the time-discretization and the
Metropolis correction in MALA.

Development of Error Measures over the Steps We plot how the quantities of interest decrease over the application
of the steps of our model. The results are given in the Figure 11. It can be observed that the different steps may optimize
different metrics. While the rejection steps improve the log(Z) estimate more significantly, the JKO steps focus more on the
minimization of the energy distance. Overall, we see that in all figures the errors decrease over time.

E.5. Implementation Details
To build our importance corrected neural JKO model, we first apply n1 ∈ N JKO steps followed by n2 ∈ N blocks consisting
out of a JKO step and three importance-based rejection steps. The velocity fields of the normalizing flows are parameterized
by a dense three-layer feed-forward neural network. For the JKO steps, we choose an initial step size τ0 > 0 and then increase
the step size exponentially by τk+1 = 4τk . The choices of n1 , n2 , τ0 and the number of hidden neurons from the networks
is given in Table 6 together with the execution times for training and sampling. For evaluating the density propagation
through the CNFs, we use the Hutchinson trace estimator with 5 Rademacher distributed random vectors whenever d > 5
and the exact trace evaluation otherwise. Note that we redraw the Rademacher vectors in every step of the ODE solver such
that errors average out throughout the trajectory. We observed that the estimator of the divergence already has a sufficiently
small variance, particularly, since the trajectories are almost straight due to the norm penalty of the velocity field, see also
Appendix F.2. For implementing the CNFs, we use the code from Ffjord (Grathwohl et al., 2019) and the torchdiffeq
library by (Chen, 2018). We provide the code online at https://github.com/johertrich/neural_JKO_ic.
For the MALA and HMC we run an independent chain for each generated sample and perform 50000 steps of the algorithm.
For HMC we use 5 momentum steps and set the step size to 0.1 for 8Modes and Funnel and step size 0.01 for mustache. To
stabilize the first iterations of MALA and HMC we run the first iterations with smaller step sizes (0.01 times the final step
size in the first 1000 iterations and 0.1 times the final step size for the second 1000 iterations). For MALA we use step size
0.001 for all examples. For DDS and CRAFT we use the official implementations. In particular for the test distributions such
as Funnel and LGCP we use the hyperparameters suggested by the original authors. For the other examples we optimized
them via grid search.

                                                              27
                                                     Importance Corrected Neural JKO Sampling

Table 6: Parameters, training and sampling times for the different examples. For the sampling time we draw N = 50000
samples once the method is trained. The execution times are measured on a single NVIDIA RTX 4090 GPU with 24 GB
memory.

                                                                                            Distribution
           Parameter              Mustache   shifted 8 Modes   shifted 8 Peaky   Funnel   GMM-10     GMM-20    GMM-50   GMM-100   GMM-200   GMM40-50D   LGCP
           Dimension                 2              2                2             10       10          20       50        100      200        50        1600
    Number n1 of flow steps          6              2                2             6         4           4        4          4        5         4          3
  Number n2 of rejection blocks      6              4                4             6         6           6        7         8        8          7          6
       Initial step size τ0        0.05           0.01             0.01            5      0.0025      0.0025   0.0025    0.0025    0.001        1          5
        Latent scaling c             1              1                1             1         1           1        1         1        1         40          1
   Gradient Flow Initialization      -              -                -              -        -           -        -          -        -         3          -
        Hidden neurons              54             54               54            256       70          90       150       250      512        256       1024
            batch size             5000           5000             5000          5000      5000        5000     5000      5000     2000       5000       500
    Required GPU memory            5 GB           5 GB             5 GB          5 GB      5 GB        5 GB     5 GB      5 GB     6 GB       6 GB      11 GB
      Training time (min)           38             20               21            107       33          34       44         53       80        34         163
      Sampling time (sec)           15              2                3             79       22          23       72        129      473        550        535




Remark E.2 (Initializations). To deal with target distributions living on different scales, we consider initial distributions
µ0 = N (0, c2 Id), where c2 is a scaling parameter. The choice of c for each target distribution is givein in Table 6 in the row
“latent scaling”. Moreover, it is beneficial in some cases to choose the velocity field in the first CNF not by learning it, but by
fixing it to vt (x) = ∇x log(g(x)) = ∇x log(q(x)). We report the final time T of this first gradient flow step in Table 6 in
the row “gradient flow initialization” with value - if we do not use a gradient flow step. This initialization is closely related
to Langevin preconditioning, which is used in most neural sampling methods, see (He et al., 2025) for a detailed study.

During the training of vθk+1 , we do not draw in each training step a new batch from µk . Instead, we maintain a dataset
of N = 50000 samples of µk and draw batches from it. After the training is completed, we generate a new dataset of N
samples by applying the learned CNF onto N new drawn samples from µk . To avoid overfitting effects, we redraw our
dataset after each CNF step.

F. Computational Aspects of Normalizing Flows
In this appendix, we give some more details about the computational aspects of the normalizing flows in our model. First, we
discuss the relation between multimodal target distributions, mode collapse and non-convex loss functions of normalizing
flows. Afterwards, we discuss some computational aspects of continuous normalizing flows like ODE discretizations and
density evaluations with trace estimators. Finally, we run some standard normalizing flow networks on our numerical
example distributions and compare them with our importance corrected neural JKO sampling.

F.1. Multimodalities, Mode Collapse and Non-Convex Loss Functions
For the sampling application, normalizing flows are usually trained with the reverse KL loss function F(µ) = KL(µ, ν), see,
e.g., (Marzouk et al., 2016). More precisely, a normalizing flow aims to learn the parameters θ of a family of diffeomorphisms
Tθ such that Tθ # µ0 ≈ ν by minimizing F(Tθ # µ0 ). In the case that ν is multimodal it can be observed that this training
mode collapses. That is, the approximation T# µ0 covers not all of the modes of ν but instead neglects some of them.
Examples of this phenomenon can be seen in the numerical comparison in Appendix F.3. One reason for this effect is that
the functional F is convex if and only if ν is log-concave and therefore unimodal, see (Ambrosio et al., 2005, Prop. 9.3.2).
In particular, for multimodal ν, the functional F is non-convex. In the latter case of, then the mode collapses can correspond
to the convergence to a local minimum, as the following example shows.
Example F.1. We consider the case d = 1 and the target distribution

                                                         ν = 12 N (− 21 , 0.052 ) + 12 N ( 12 , 0.052 ).

As latent distribution µ0 we choose a standard Gaussian. Then, we parametrize the normalizing flow Tθ = (1 − θ)T0 + θT1
for θ ∈ [0, 1], where T0 is the optimal transport map between µ0 and ν and T1 is the optimal transport map between µ0
and N ( 12 , 0.052 ). In particular, Tθ # µ0 perfectly recovers the target distribution for θ = 0 and produces a mode collapsed
version of it for θ = 1. Now, we plot the reverse KL loss function L(θ) = KL(Tθ # µ0 , ν) and the densities of the generated
distributions Tθ # µ0 in Figure 12. We observe that it has two local minima for θ = 0 and θ = 1 (for θ outside of [0, 1], T is
no longer invertible), where θ = 0 is the perfectly learned parameter and θ = 1 is the mode collapsed version. At the same

                                                                                    28
                                          Importance Corrected Neural JKO Sampling

time, we note that the curve θ 7→ Tθ # µ0 is a geodesic in the Wasserstein space. In particular, the non-convexity of L is a
direct consequence of the fact that F(µ) = KL(µ, ν) is geodesically non-convex.
Remark F.2 (Motivation of Wasserstein Regularization). This connection between the non-convexity of the loss function
F and mode collapse also motivates the Wasserstein regularization from Section 3. By considering the loss function
                  1
G(µ) = F(µ) + 2τ     W22 (µ, µkτ ) for τ > 0 small enough instead of F, we obtain a loss function which is convex in the
Wasserstein space, see (Ambrosio et al., 2005, Lem. 9.2.7). Even though this does not imply that the map θ 7→ G(Tθ # µ0 ) is
convex, we can expect that the training does not get stuck in local minima as long as the architecture of Tθ is expressive
enough.
Theoretically, we need for λ-convex F that τ ≤ λ1 to ensure that G is geodesically convex. However, if µk is already close
to a minimum of F, then it can be sufficient that the functional G is convex locally around µk . In this case, the distribution
generated by the CNF will stay in this neighborhood. Note that in practice the constant λ is unknown such that we start with
a small step size τ0 and increase it over time as outlined at the end of Section 4 and in Appendix E.5.

F.2. Computational Limitations of (Continuous) Normalizing Flows
Similar to the literature on neural JKO schemes (Vidal et al., 2023; Xu et al., 2024), our implementation of the neural JKO
scheme relies on continuous normalizing flows (Chen et al., 2018). This comes with some limitations and challenges, which
were extensively discussed in (Chen et al., 2018). Since they are relevant for our method, we give a synopsis below.

Derivatives of ODE Solutions For the training phase we need the derivative of the solution of an ODE. For this, we
use the torchdiffeq package (Chen, 2018). In particular, this package does not rely on backpropagation through the
steps from the forward solver. Instead, it overwrites the backward pass of the ODE by solving an adjoint ODE. This avoids
expensive tracing in the automatic differentiation process within the forward pass and keeps the memory consumption low.
Moreover, the quadratic regularization of the velocity field leads to straight paths such that the adaptive solvers only require a
few steps for solving the ODE, see (Onken et al., 2021) for a detailed discussion. Indeed, we use in our numerical examples
the dopri5 solver from torchdiffeq, which is an adaptive Runge-Kutta method. However, we still have to solve two
ODEs during the training time. This still can be computational costly, in particular when the underlying model is large.

Trace Estimation for Density Computations In order to evaluate the (log-)density of our model, we have to compute the
divergence div vθ = trace(∇vθ (zθ (x, t), t)) of the learned vector field vθ (and integrate it over time), see (7). Computing
the trace of the Jacobian of vθ becomes computationally costly in high dimensions. As a remedy, we consider the Hutchinson
trace estimator (Hutchinson, 1989), which states that for any matrix A and a random vector z with mean zero and identity
covariance matrix it holds that E[z T Az] = trace(A). Applying this estimator to the divergence, we obtain that the
divergence coincides with E[z T ∇vθ (zθ (x, t), t)z]. The integrand is now again a Jacobian-vector product which can be
computed efficiently. Finally, we estimate the trace by empirically discretizing the expectation by finitely many realizations
of z.
In our numerics, we choose z to be Rademacher random vectors, i.e. each entry is with probability 12 either −1 or 1. For the
training of the continuous normalizing flow, an unbiased low-precision estimator is sufficient, such that we discretize the
expectation with one realization of z. During evaluation, we require a higher precision and use 5 realizations instead.

Initialization In order to find a stable initialization of the model, we initialize the last layer of the velocity field vθ with
zeros such that it holds vθ (x, t) = 0 for all x ∈ Rd , t ∈ [0, τ ]. In this case, the solution zθ of the ODE żθ = vθ with initial
condition zθ (x, 0) = x is given by zθ (x, t) = x for all t. In particular, we have that the transport map Tθ = zθ (x, τ ) is the
identity such that the generated distribution Tθ # µ0 coincides with the latent distribution for the initial parameters.
Remark F.3 (Other Normalizing Flow Architectures). In general any architecture Tθ of normalizing flows can Rbe considered
in the neural JKO scheme. To this end, we can replace the velocity field regularization in (5) by the penalizer Rd ∥Tθ (x) −
x∥2 dµkτ . By Brenier’s theorem (Brenier, 1987) this is again equivalent to minimizing the Wasserstein distance. However,
while discrete-time normalizing flows like coupling-based networks (Dinh et al., 2016; Kingma & Dhariwal, 2018) and
autoregressive flows (De Cao et al., 2020; Durkan et al., 2019; Huang et al., 2018; Papamakarios et al., 2017) are often faster
than CNFs, this is not generally true in our setting, since their evaluation time does not benefit from the OT-regularization.
Additionally, we observed numerically that the expressiveness of discrete-time architectures scales much worse to high
dimensions and that these architectures are less stable to train. Nevertheless, their evaluation can be cheaper since these
architectures do not have to deal with trace estimators within the density evaluation. Residual architectures (Behrmann

                                                               29
                                                     Importance Corrected Neural JKO Sampling

Table 7: Comparison of neural JKO IC with normalizing flows trained with the reverse KL loss function. We evaluate
the energy distance (smaller values are better), the log(Z)-estimation (larger values are better) and the expected squared
empirical Wasserstein distance (smaller values are better).

                                   Energy distance                                   log(Z)-estimation                              squared Wasserstein-2
  Distribution     continuous NF    coupling NF      neural JKO IC   continuous NF     coupling NF       neural JKO IC   continuous NF   coupling NF   neural JKO IC
    Mustache       2.1 × 10−2       4.9 × 10−3       2.9 × 10−3      −7.1 × 10−2       −2.2 × 10−2       −7.3 × 10−3     3.8 × 10+1      3.1 × 10+1    1.7 × 10+1
 shifted 8 Modes   4.1 × 10−1       4.1 × 10−2       1.2 × 10−5      −1.4 × 100        −4.3 × 10−1       +5.1 × 10−6     1.4 × 100       2.2 × 10−1    6.5 × 10−3
 shifted 8 Peaky   5.7 × 10−1       5.8 × 10−1       3.4 × 10−5      −2.1 × 100        −2.1 × 100        −2.1 × 10−3     1.8 × 100       1.8 × 100     7.2 × 10−3
      Funnel       1.9 × 10−1       2.2 × 10−3       1.4 × 10−2      −9.4 × 10−1       −2.8 × 10−2       −7.1 × 10−3     3.8 × 10+2      8.1 × 10+2    8.5 × 10+2
    GMM-10         5.4 × 10−1       5.3 × 10−1       5.2 × 10−5      −2.3 × 100        −2.3 × 100        +3.5 × 10−3     3.4 × 100       3.5 × 100     1.4 × 10−1
    GMM-20         1.1 × 100        1.1 × 100        1.1 × 10−4      −2.4 × 100        −2.3 × 100        +6.4 × 10−3     9.5 × 100       9.4 × 100     3.7 × 10−1




et al., 2019; Chen et al., 2019) are at least similar to continuous normalizing flows, but they are very expensive to train and
evaluate, and additionally rely on trace estimators for computing the density of the generated samples.

F.3. Numerical Comparison
Finally, we compare our neural JKO IC scheme with standard normalizing flows trained with the reverse KL loss function as
proposed in (Marzouk et al., 2016). In particular, we aim to demonstrate the benefits of our neural JKO IC scheme to avoid
mode collapse.
To this end, we train two architectures of normalizing flows for our examples using the reverse KL loss function as proposed
in (Marzouk et al., 2016). First, we use a continuous normalizing flow with the same architecture as used in the neural JKO
(IC). That is, we parameterize the velocity field vθ by a dense neural network with three hidden layers and the same hidden
dimensions as in Table 6. Second, we compare with a coupling network with 5 Glow-coupling blocks (Kingma & Dhariwal,
2018), where the coupling blocks have two hidden layers with three times the hidden dimension as in Table 6. We found
numerically that choosing larger architectures does not bring significant advantages.
We plot some generated distributions of the continuous and coupling normalizing flows as well as the neural JKO IC scheme
in Figure 13. As we have already seen in the previous examples, the neural JKO IC scheme is able to recover multimodal
distributions almost perfectly. On the other hand, the normalizing flow architectures always collapse to one or a small
number of modes. We additionally report the error measures in Table 7. We can see that neural JKO IC performs always
better than the normalizing flow architectures (note that for the Funnel distribution all W22 -values are below the sampling
error reported in Table 3). For multimodal distributions, the normalizing flow approximations are by several orders of
magnitude worse than neural JKO IC, while they work quite well for unimodal distributions (Mustache and Funnel).




                                                                              30
                                                   Importance Corrected Neural JKO Sampling




Figure 3: Visualization of the steps of the importance corrected neural JKO model for the shifted 8 Peaky example. We
start at the top left with the latent distribution and apply in each image one step from the model. The orange color indicates
samples which are rejected in the next step and the blue color marks the resampled points.




                                                            Mode weight convergence - 8 Peaky
                                                                                                mode 1
                                    0.30                                                        mode 2
                                                                                                mode 3
                                                                                                mode 4
                                                                                                mode 5
                                    0.25                                                        mode 6
                                                                                                mode 7
                                                                                                mode 8
                                    0.20                                                        rejection layer
                      weight mass




                                                                                                normalizing flow layer
                                                                                                truth = 0.125
                                    0.15


                                    0.10


                                    0.05

                                           0   2      4      6         8         10      12      14        16            18
                                                                           # layer

Figure 4: Plot of the mode weights for the 8 Peaky example over the different layers of the importance corrected neural JKO
model. We observe that the weights are mainly changed by the rejection steps and not by the neural JKO steps.
                                                                           31
                                      Importance Corrected Neural JKO Sampling




Figure 5: Sample generation with various methods for shifted 8 Modes example with ground truth samples and generated
samples for each associated method. While most methods recover the distribution well, we can see a imbalance in the modes
for the uncorrected neural JKO, CRAFT and DDS.




Figure 6: Sample generation with various methods for shifted 8 Peaky mixtures with ground truth samples and generated
samples for each associated method. We can see a severe imbalance among the modes for HMC, MALA, CRAFT and
neural JKO. Also DDS has a slight imbalance between the modes.

                                                           32
                                       Importance Corrected Neural JKO Sampling




Figure 7: Marginalized sample generation with various methods for the d = 10 funnel distribution with ground truth samples
and generated samples for each associated method. We observe that only the importance corrected neural JKO covers the
thin part of the funnel well.




                                                           33
                                    Importance Corrected Neural JKO Sampling




Figure 8: Sample generation with various methods for the d = 2 mustache distribution with ground truth samples and
generated samples for each associated method. We can see that MALA, CRAFT and DDS have difficulties to model the
long tails of the distribution properly.




                                                       34
                                     Importance Corrected Neural JKO Sampling




Figure 9: Marginalized sample generation with various methods for the GMM-10 distribution with ground truth samples
and generated samples for each associated method. We observe that CRAFT mode collapses and that only the importance
corrected neural JKO model distributes the mass correctly onto the modes.




Figure 10: Marginalized sample generation with various methods for the GMM-200 distribution with ground truth samples
and generated samples for each associated method. We observe that CRAFT mode collapses and that only the importance
corrected neural JKO model distributes the mass correctly onto the modes.

                                                         35
                                                  Importance Corrected Neural JKO Sampling

                                                                                       Mustache
                                                           rejection layer                        102                                            rejection layer
              10 1                                         normalizing flow layer                                                                normalizing flow layer
                                                           energy distance                        101                                            log Z estimation error

                                                                                                  100

              10 2                                                                                10 1

                                                                                                  10 2
                        0       5       10       15           20             25         30               0       5       10            15           20         25             30
                                             # layer                                                                               # layer
                                                                                  shifted 8 Modes
              10 1                                         rejection layer                                                                       rejection layer
                                                           normalizing flow layer                 101                                            normalizing flow layer
                                                           energy distance                                                                       log Z estimation error
              10 2                                                                                100
              10 3                                                                                10 1
              10 4                                                                                10 2
              10 5
                        0   2       4   6    8        10      12        14        16    18               0   2       4   6         8        10      12    14        16        18
                                             # layer                                                                               # layer
                                                                                  shifted 8 Peaky
                                                           rejection layer                        102                                            rejection layer
              10 1                                         normalizing flow layer                                                                normalizing flow layer
                                                           energy distance                        101                                            log Z estimation error
              10 2
                                                                                                  100
              10 3                                                                                10 1

              10 4                                                                                10 2

                        0   2       4   6    8        10      12        14        16    18               0   2       4   6         8        10      12    14        16        18
                                             # layer                                                                               # layer
                                                                                        Funnel
                                                           rejection layer                                                                       rejection layer
                                                           normalizing flow layer                                                                normalizing flow layer
                                                           energy distance                        100                                            log Z estimation error
              10 1
                                                                                                  10 1


                                                                                                  10 2
              10 2
                        0       5       10       15           20             25         30               0       5       10            15           20         25             30
                                             # layer                                                                               # layer
                                                                                       GMM-10
                                                           rejection layer                         102                                             rejection layer
             10 1                                          normalizing flow layer                                                                  normalizing flow layer
                                                           energy distance                         101                                             log Z estimation error
             10 2
                                                                                                   100
             10 3                                                                                 10 1
                                                                                                  10 2
             10 4
                                                                                                  10 3
                                                                                                  10 4
                    0           5       10        15               20             25                     0           5        10            15           20              25
                                             # layer                                                                                   # layer

Figure 11: We plot the energy distance (left) and log(Z) estimate (right) over the steps of our importance corrected neural
JKO method for different examples. The error measures decrease in the beginning and then saturate at some values.

                                                                                             36
                                                             Importance Corrected Neural JKO Sampling


                                                        Non-convex loss function L(θ) = KL(Tθ # µ0 , ν)
                                                                                                     20




                                                                         Loss function KL(T # 0, )
                                                                                                     15


                                                                                                     10


                                                                                                     5


                                                                                                     0
                                                                                                           0.0         0.2    0.4       0.6           0.8          1.0
                                                                                                                              parameter



                                                              Density of Tθ # µ0 for different values of θ
    8                                              8                                                                                8                                                      8
    7                                              7                                                                                7                                                      7
    6                                              6                                                                                6                                                      6
    5                                              5                                                                                5                                                      5
    4                                              4                                                                                4                                                      4
    3                                              3                                                                                3                                                      3
    2                                              2                                                                                2                                                      2
    1                                              1                                                                                1                                                      1
    0                                              0                                                                                0                                                      0
        0.6   0.4   0.2   0.0    0.2   0.4   0.6       0.6   0.4   0.2         0.0                        0.2    0.4    0.6               0.6   0.4         0.2    0.0   0.2   0.4   0.6       0.6   0.4   0.2   0.0   0.2   0.4   0.6


                          θ=0                                            θ = 13                                                                                   θ = 23                                         θ=1

Figure 12: Illustration of the loss function [0, 1] ∋ θ 7→ L(θ) = KL(Tθ # µ0 , ν) and the densities of the generated
distributions Tθ # µ0 from Example F.1. Both values θ = 0 and θ = 1 correspond to local minima (note that L(1) > 0 =
L(0)). In particular θ = 1 corresponds to the case of mode collapse.




                                8 Modes                                  8 Peaky                                                                       GMM-10                                        GMM-20

Figure 13: Marginalized sample generation for a single normalizing flow compared with neural JKO IC for different example
distributions with ground truth samples and generated samples for each associated method. We observe that the standard
normalizing flow architectures always collapse to one or few modes while neural JKO IC recovers all modes correctly.
                                                                                                                               37
