Learning Optimal Flows for Non-Equilibrium Importance Sampling
Abstract
Many applications in computational sciences and statistical inference require the computation of expectations with respect to complex high-dimensional distributions with unknown normalization constants, as well as the estimation of these constants.
Here we develop a method to perform these calculations based on generating samples from a simple base distribution, transporting them by the flow generated by a velocity field, and performing averages along these flowlines.
This nonequilibrium importance sampling (NEIS) strategy is straightforward to implement and can be used for calculations with arbitrary target distributions.
On the theory side, we discuss how to tailor the velocity field to the target and establish general conditions under which the proposed estimator is a perfect estimator with zerovariance.
We also draw connections between NEIS and approaches based on mapping a base distribution onto a target via a transport map.
On the computational side, we show how to use deep learning to represent the velocity field by a neural network and train it towards the zero variance optimum.
These results are illustrated numerically on benchmark examples (with dimension up to 10 ), where after training the velocity field, the variance of the NEIS estimator is reduced by up to 6 orders of magnitude lower than that of a vanilla estimator.
We also compare the performances of NEIS with those of Neal’s annealed importance sampling (AIS).
Introduction
Given a potential function U 1 : Ω → R on the domain Ω ⊆ R d , the main goal of this paper is to evaluate
[Equation]
The calculations of such integrals arise in many applications from several scientific fields.
For instance,
Z 1 is known as the partition function in statistical physics [21], where it is used to characterize the thermodynamic properties of a system with energy U and as the evidence in Bayesian statistics, where it is used for model selection [12].
When the dimension d of the domain Ω is large, standard numerical quadrature methods are inapplicable to (1) and the method of choice to estimate Z 1 is Monte-Carlo sampling [22, 8].
This requires expressing Z 1 as an expectation, which can be done e.g. by realizing that
[Equation]
where E 0 denotes expectation with respect to the probability density function ρ 0 > 0 .
If ρ 0 is both known (i.e. we can evaluate it pointwise in Ω , normalization factor included) and simple to sample from, we can build an estimator for Z 1 by replacing the expectation on the right hand side of (2) by the empirical average of e − U 1 /ρ 0 over samples drawn from ρ 0 .
Unfortunately, finding a density ρ 0 that has the two properties above is hard: unless ρ 0 is well-adapted to e − U 1 , the estimator based on (2) is terrible in general, with a standard deviation that is typically much larger than its mean or even infinite.
A similar issue arises if we want to estimate the expectation E 0 f of some function f : Ω → R , and the two problems are in fact connected when f > 0 since the second reduces to (2) for U 1 = − log( fρ 0 ) .
These difficulties have prompted the development of importance sampling strategies [14] whose aim is to produce estimators with a reasonably low variance for Z 1 or E 0 f .
These include for example umbrella sampling [43, 41], replica exchange (aka parallel tempering)
[14, 23], nested sampling [37, 38], etc., in which the estimation of Z 1 is factorized into the calculation of several expectations of the type (2), but with better properties, that can then be recombined using thermodynamic integration [17] or Bennett acceptance ratio method [6].
Complementary to these equilibrium techniques, non-equilibrium sampling strategies have also been introduced for the calculation of (1).
For example, Neal’s annealed importance sampling (AIS) [26] based on the Jarzynski equality [15, 16, 1] calculates Z 1 using properly weighted averages over sequences of states evolving from samples from ρ 0 , without requiring that the kernel used to generate these states be in detailed-balance with respect to either ρ 0 , or ρ 1 :=
e − U 1 / Z 1 , or any density interpolating between these two.
Instead the weight factors are based on the probability distribution of the sequence of states in path space.
Other non-equilibrium sampling strategies in this vein include bridge and path sampling [13], and sequential Monte Carlo (SMC) sampling [24, 2].
In this paper, we analyze another non-equilibrium importance sampling (NEIS) method, originally introduced in [33].
NEIS is based on generating samples from a simple base density ρ 0 , then propagating them forward and backward in time along the flowlines of a velocity field, and computing averages along these trajectories—the basic idea of the method is to use the flow induced by this velocity field to sweep samples from ρ 0 through regions in Ω that contribute most to the expectation.
As shown in [33] and recalled below, this procedure leads to consistent estimators for the calculation of Z 1 or E 0 f via a generalization of (2).
One advantage of the method, which is a rare feature among importance sampling strategies, is that it leads to estimators that always have lower variance than the vanilla estimator based on (2)
The question we investigate in this paper is how low their variance can be made, both in theory and in practice.
Our main contributions are:
• Under mild assumptions on U 1 and ρ 0 , we show that if the NEIS velocity field is the gradient of a potential that satisfies a Poisson equation, the NEIS estimator for Z 1 has zero variance.
• Under the same assumptions, we show that this optimal flow can be used to construct a perfect transport map from ρ 0 to ρ 1 .
This allows us to compare NEIS with importance sampling strategies involving transport maps like normalizing flows (NF) that have recently gained popularity [32, 19, 30], and highlight some potential advantages of the former over the latter.
• On the practical side, we derive variational problems for the optimal velocity field in NEIS, and show how to solve these problems by approximating the velocity by a neural network and optimizing its parameters using deep learning training strategies, similar to what is done with neural ODE [9].
• We illustrate the feasibility and usefulness of this approach by testing it on numerical examples.
First we consider Gaussian mixtures in
up to 10 dimensions.
In this context
we show that training the velocity used in NEIS allows to reduce the variance of a vanilla estimator using a standard Gaussian distribution as ρ 0 by up to 6 orders of magnitude.
Second
we study Neal’s
10 dimensional funnel distribution [27, 2] for which the variance of the vanilla importance sampling method is infinity; training a linear dynamics with 2 parameters in NEIS can lead to an estimator with empirical variance less than 1 .
In these examples we also show that after training NEIS leads to estimators with lower variance than AIS [26].
Related works.
The idea of transporting samples from ρ 0 to lower the variance of the vanilla estimator based on (2) is also at the core of importance sampling strategies using normalizing flows (NF) [40, 39, 32, 19, 30, 46, 45, 29, 25].
The type of transport used in NF-based method is however different in nature from the one used in NEIS.
With NF, one tries to construct a map that transforms each sample from ρ 0 into a sample from the target ρ 1 = e − U 1 / Z 1 .
In contrast, NEIS uses samples from ρ 0 as initial conditions to generate trajectories, and uses the data along these entire trajectories to build an estimator.
Intuitively, this means that samples likely on ρ 0 must become likely on ρsometime along these trajectories rather than at a given time specified beforehand, which is easier to enforce.
NEIS bears similarities with Neal’s AIS [26], except that in NEIS the sampling is done once from ρ 0 to generate deterministic trajectories to gather data for the estimator, whereas AIS uses random trajectories.
There are some methods based on AIS that optimize the transition kernel: for instance, stochastic normalizing flows (SNF) proposed in [46] incorporates NF between annealing steps; and annealed flow transport (AFT) in [2] combines NF with the sequential Monte Carlo method to provide optimized flow transport.
These approaches require learning several maps along the annealed transition, whereas the NEIS herein only needs to learn a single flow dynamics.
A time-discrete version of NEIS termed NEO was proposed in [42].
The current implementation of NEO iterates on a map that needs to be prescribed beforehand, but this map could perhaps be optimized using a strategy similar to the one proposed here.
From a practical standpoint, the idea of optimizing the velocity field in NEIS using a neural network approximation for this field can be viewed as an application of neural ODEs [9] that uses the variance of the NEIS estimator as the objective function to minimize.
The nature of this objective poses specific challenges in the training procedure, which we investigate here.
Notations.
For symmetry, we will denote ρ 0 ( x ) =
e − U 0 ( x ) with U
= − log ρ 0 : Ω → R and
Z 0 = (cid:82) Ω e − U 0 ( x ) d x = 1 .
We denote a d -dimensional vector filled with zeros as 0 d and the d × d identity matrix as I d . ⟨· , ·⟩ is the Euclidean inner product in R d .
We assume that the domain Ω is either an open and connected subset of R d with smooth boundary or a d -dimensional torus (without boundary).
We denote by N ( µ, Σ) the multivariate Gaussian density with mean µ and covariance matrix Σ .
For two functions f, g : D
→ R where D is a domain of interest, the notation f ≲ g means that there exists a constant C > 0 such that f ( x ) ≤ Cg ( x ) for any x ∈ D .
Suppose T : Ω → R d is a map and µ is a distribution, then the pushforward distribution of µ by the map T is denoted as T # µ .
The notation |·| is the usual ℓ 2 norm for vectors and ∥·∥ is the matrix norm or functional norm.
Flow-based NEIS method
Here we recall the main ingredients of the non-equilibrium importance sampling (NEIS) method proposed in [33].
Let b : Ω → R d be a velocity field which we assume belongs to the vector space
[Equation]
where n is the normal vector at the boundary ∂ Ω .
Define the associated flow map X t : Ω → Ω via
[Equation]
and let J t ( x ) be the Jacobian of this map:
[Equation]
Finally, let us denote
[Equation] [Equation]
for k ∈ { 0 , 1 } , x ∈ Ω and t ∈ R .
NEIS is based on the following result, proven in Appendix B.1:
Proposition 2.1.
If b ∈ B , then for any −∞ < t − < t + < ∞ , we have
[Equation]
7) where
[Equation]
In addition, if
[Equation]
exists for almost all x ∼ ρ 0 , then
[Equation]
When b = 0 d , or t − ↑ 0 and t + ↓ 0 , (7) reduces to (2).
The aim, however, is to choose b so that the estimator based on (7) has a lower variance than the one based (2): we will show below that this can indeed be done.
For now, note that Jensen’s inequality implies that an estimator based on (10) for any b has lower variance than the one based (2); see [33] or Proposition H.3 below for details.
Note also that, if one allows the magnitude of the flow b to be arbitrarily large, the finite-time
NEIS will behave like the infinite-time NEIS; such a relation will be discussed and elaborated in
Appendix B.4.
Finally note that the estimator (10) based on (9) is invariant with respect to the parametrization of the flowlines generated by the dynamics b , as shown by the following result proved in Appendix B.2:
Proposition 2.2 (An invariance property) .
Suppose b , α b ∈ B , where α ∈ C ∞ (Ω , R ) satisfying inf x ∈ Ω α ( x ) > 0 .
Then the fields b and α b generate the same flowlines, and A b =
A α b where A b and A α b are the function defined in (9) using b and α b , respectively.
Optimal NEIS
The NEIS estimator for (10) is unbiased no matter what b is.
However, its performance relies on the choice of b .
Therefore, a natural question is to find the field b that achieves the largest variance reduction.
The next result shows that an optimal b exists that leads to a zero-variance estimator:
Proposition 3.1 (Existence of zero-variance dynamics) .
Assume that Ω = [0 , 1] d and U 0 , U 1 ∈
C ∞ (Ω , R ) .
Let D : Ω → (0 , ∞ ) be some smooth positive function with inf x ∈ Ω D ( x ) > 0 , and suppose that V ∈ C ∞ (Ω) solves the following Poisson’s equation on Ω
[Equation]
with
[Equation]
If the solution V is a Morse function, then b = ∇ V is a zero-variance velocity field: that is, if we use it to define (9) , we have
[Equation]
for almost all x
[Equation]
and as a result
[Equation]
This proposition is proven in Appendix E where we also make a connection between (11) and
Beckmann’s transportation problem.
We stress that the optimal b specified in Proposition 3.1 is not unique (see Proposition E.9): however, we show below in Proposition 4.1 that, under certain conditions, all local minima of the variance (viewed as a functional of b ) are global minima.
We also note that the assumption that the solution is a Morse function is mostly a technicality, as discussed in
Appendix E.3.
Similarly, we consider the torus in Proposition 3.1 for simplicity mainly; we expect that the proposition will hold in general when Ω has compact closure or even when Ω = R d , see
Appendix E for examples including that of Gaussian mixture distributions.
For illustration, the contour plot of V and the flowlines of b = ∇ V are shown in Figure 1 in a simple example in a two-dimension torus where ρ 0 = 1 and ρ 1 is a mixture density with 3 modes; their explicit expressions are given in (54); in this example, we solved (11) numerically with D = 1 , see
Appendix E.5 for more details.
Some other examples where the zero-variance dynamics is explicit are discussed in Appendix F.
Connection to transport maps and normalizing flows.
The zero-variance dynamics provides a transport map T from ρ 0 to ρ 1 , as shown in:
Proposition 3.2 (Existence of a perfect generator) .
Suppose D = 1 for simplicity.
Under the same assumption as in Proposition 3.1, let V be the Morse function solving (11) and b = ∇ V the associated zero-variance dynamics.
Then there exists a continuously differentiable function κ (defined almost everywhere on Ω ) such that
[Equation]
Furthermore, the map T ( x ) :=
X κ ( x ) ( x ) is a transport map from ρ 0 to ρ 1 , i.e., T # ρ
= ρ 1 .
The proof is given in Appendix G.1:
Note that we consider again b = ∇ V on the torus for technical simplicity: the statement of the proposition should hold in general for a zero-variance dynamics b .
The solution of (14) is particularly simple in one-dimension, where we can take b ( x ) = 1 , and straightforwardly verify that κ ( x )
=
T ( x ) − x with
[Equation]
where F i
[Equation]
x
[Equation]
=
[Equation]
x
[Equation]
We also illustrate the statement of Proposition 3.2 via numerical examples in Appendix G.2.
To avoid confusion, we stress that we will not use the transport map T of Proposition 3.2 in the examples below.
Indeed, using this map would require identifying κ , which introduces an unnecessary additional calculation which we can avoid using the NEIS estimator directly.
In addition, the NEIS estimator will likely have better properties than those based on transport maps, as we can we can think of NEIS as using a time-parameterized family of transport maps rather than a single one.
In particular, the variance of the NEIS estimator will be small if samples likely on ρ 0 become likely on ρ 1 sometime along the NEIS trajectories, rather than at the same fixed time for all samples.
The former seems easier to fulfill than the latter.
For example, in one-dimension, the NEIS estimator has zero variance for any b bounded away from zero, whereas building a transport map from ρ 0 to ρ 1 is already nontrivial in that simple case since it requires solving (15).
Variational formulations
The Poisson equation (11) admits a variational formulation:
[Equation]
If D is chosen to be a probability density function (for example D = ρ 0 or D = 12 ( ρ 1 + ρ 0 ) )
the two terms in the objective in (16) are expectations which can be estimated via sampling (using e.g. direct sampling for the expectation with respect to ρ 0 and NEIS for the one with respect to ρ 1 ).
This means that we can in principle use an MCMC estimator of (16) as empirical loss, and minimize it over all V in some parametric class.
Here however, we will follow a different strategy that allows us to directly parametrize b instead of V (i.e. relax the requirement that b = ∇ V ) and simply use the variance of the estimator as objective function.
Specifically, since we quantify the performance of the estimators based on (7) and (10) by their variance, we can view these quantities as functionals of b that we wish to minimize.
Since the estimators are unbiased, these objectives are
[Equation]
where we defined the second moments M t − ,t + ( b ) :
=
E 0 (cid:2)
|A t − ,t + | 2 (cid:3) and M ( b ) :
=
E 0 (cid:2) |A| 2 (cid:3) .
With the finite-time objective, we know that with b = 0 d , (7) reduces to (2).
Therefore minimizing
M t − ,t + ( b ) over b by gradient descent starting from b near 0 d will necessarily produce a better estimator: while we cannot guarantee that the variance of this optimized estimator will be zero, the experiments conducted below indicate that it can be a several order of magnitude below that of the vanilla estimator.
For the infinite-time objective, we know that for any b , (9) leads to an estimator with a lower variance than the one based on (2) [33].
Minimizing Var ( b ) over b using gradient descent leads to a local minimum; the next result shows that all such local minima are global:
Proposition 4.1 (Global minimum) .
Under some technical assumptions listed in Proposition H.1, if b ∗ ∈ B is a local minimum of Var ( b ) where the functional derivative of Var ( b ) with respect to b vanishes, i.e. δ Var ( b ∗ ) /δ
b =
d on Ω , then b ∗ is a global minimum and Var ( b ∗ ) = 0 .
The expression of the functional derivative δ Var ( b ∗ ) /δ
b is given in Proposition D.1.
The technical assumptions under which Proposition 4.1 hold are explained in Appendix A and the proof is given in
Appendix H.
Training towards the optimal b
Here we discuss how to use deep learning techniques to find the optimal b ; these techniques will be illustrated on numerical examples in Section 6.
Some technical details are deferred to Appendix I.
Objective.
We use the finite-time objective M t − ,t + ( b ) in (7) with t − ∈ [ − 1 , 0] , t + = t − + 1 .
Two natural choices are t − = 0 and t − = − 1 / 2 , which will be used below in the numerical experiments.
This leads to no loss of generality a priori since in the training scheme we put no restriction on the magnitude that b can reach, and with large b the flow line can travel large distance even during t ∈ [ − 1 , 1] (the range of integration in s, t in (8)); see the discussion in Appendix B.4 for more details.
In practice we use a time-discretized version of (8) with 2 N t discretization points, and use the standard Runge-Kutta scheme of order 4 (RK4) to integrate the ODE (4) over t ∈ [ − 1 , 1] using uniform time step ( ∆ t = 1 /N t ).
We note that this numerical discretization introduces a bias.
However, this bias can be systematically controlled by changing the time step or using higher order integrator.
In our experiments, we observed that the RK4 integrator led to negligible errors, see
Table 5.
Neural architecture.
In our experiments, we either parameterize b by a deep neural network directly, or we assume that b is a gradient field,
[Equation]
and parameterize the potential V by a deep neural network.
We always use an ℓ -layer neural network with width m for all inner layers; therefore, from now on, we simply refer the neural network structure by a pair ( ℓ, m ) ; see Appendix I.2 for more details.
When we parametrize the potential function
V instead of b , the only difference is that the output dimension of the neural network becomesinstead of d .
The activation function is chosen as the softplus function, which is a smooth version of ReLU that gave better empirical results compared to the sigmoid function.
At initialization the neural parameters were randomly generated.
Theoretical results about the gradient of M t − ,t + ( b ) with respect to parameters are given in Appendix C and corresponding numerical implementations are explained in Appendix I.
Direct training method.
We minimize M t − ,t + ( b ) with respect to the parameters in the neural network using stochastic gradient descent (SGD) in which we evaluate the loss and its gradient empirically using mini-batches of data drawn from ρ 0 at every iteration step.
Assisted training method.
When local minima of U 1 are far away from the local minimum of
U 0 at x = 0 , the direct training method by sampling data from ρ 0 and minimizing M t − ,t + ( b ) fails, because the flowlines may not reach the importance region of ρ 1 due to poor initialization of b .
More specifically, if along almost all trajectories, e − U 1 ( X s ( x ))
≈ 0 for s ∈ [ − 1 , 1] , then with large probability A t − ,t + ( x ) ≈ 0 where x ∼ ρ 0 ; as a result the empirical variance of the estimator can be extremely small if the number of samples is small, while the true variance could be extremely large.
Such a mode collapse phenomenon is common in rare event simulations.
To get around this difficulty, recall that ideally we would like to find a dynamics b such that A is approximately a constant function in the infinite-time case.
That is, if b is a zero-variance dynamics, then A is a constant function and E p (cid:2) ( A − ( E p A ) 2 ) (cid:3)
=
for any distribution p , and we are not constrained to use the base distribution ρ 0 and minimize the functional b → Var ( b ) in (17).
Motivated by this idea, we use an assisted training scheme in which, at iteration i of SGD, the loss function is
[Equation]
Here E p i denotes expectation with respect to the probability density p i defined as
[Equation]
where υ ∈ (0 , 1) controls the number of steps during which the training is assisted, c ∈ (0 , 1) ,
L is the total number of training steps, and Z :
=
Z t =1 is the time-1 map of the ODE ˙ Z t ( x ) = − ς ∇ U 1 (cid:0)
Z t ( x ) (cid:1) with Z t =0 ( x ) = x
and ς > 0 is a parameter.
In essence, using (18) means that, for the first υL training steps, there is a probability c
i that the data x ∼ ρ 0 are replaced by Z ( x ) , so that the training method can better explore important regions near local minima of U 1 .
Subsequently, the assistance is turned off so that some subtle adjustment can be made.
If some samples from ρ 1 = e − U 1 / Z 1 were available beforehand, we could equivalently replace Z # ρ 0 in (19) by the empirical distribution over these samples.
We emphasize that the assisted training method is only used to guide the training initially and the NEIS estimator for Z 1 is unbiased.
Numerical experiments
We consider three benchmark examples to illustrate the effectiveness of NEIS assisted with training.
The first two examples involve Gaussian mixtures, for which we use NEIS with t − = 0 ; the third example is Neal’s funnel distribution, for which we use NEIS with t − = − 1 / 2 .
In all examples, we compare the performance of NEIS with those of annealed importance sampling (AIS) [26]; the number of transition steps in AIS is denoted as K and we refer to this method as AIS- K below; for more details see Appendix I.1.
For the comparison, we choose to record the query costs to Uand ∇ U 1 as the measurement of computational complexity, which connects to the framework in the theory of information complexity (see e.g., [28]).
The runtime could depend on coding, machine condition, etc., whereas query complexity more or less only depends on the computational problem ( U 0 , U 1 and b ) itself; for most examples of interest, U 0 is simple whereas U 1 and its derivatives will be expensive to compute.
For simplicity, we always use as base density ρ 0 ( x ) =
(2 π ) − d/ 2 e − 12 | x | 2 .
We remark that a better choice of ρ 0 (i.e., more adapted to ρ 1 ) can significantly improve the sampling performance; our ρis precisely used to validate the performance of NEIS in situations where ρ 0 is not well chosen.
It would be interesting to study how to adapt the choice of ρ 0 for easier training in NEIS, but this is left for future investigations.
When presenting results, we rescale the estimates so that the exact value is Z 1 = 1 for all examples.
More implementation details about training are deferred to Appendix I.2.
All trainings and estimates of Z 1 are conducted on a laptop with CPU i7-12700H; we use 15 threads at maximum.
The runtime of training ranges approximately between 40 ∼ 80 seconds for Gaussian mixture (2D), 9.5 ∼ 12 minutes for Gaussian mixture (10D); for the Funnel distribution (10D), the runtime is around 25 minutes for a generic linear ansatz and around 2 minutes for a two-parameter ansatz.
Appendix J includes additional figures about training.
When computing the gradient of the variance with respect to parameters, we use an integration-based method when t − = − 1 / 2 (for the convenience of numerical implementation) and use an ODE-based method when t − =
(for higher accuracy); details about these two approximation methods are given in Appendix I.3 and Appendix I.4 respectively.
The codes are accessible on https://github.com/yucaoyc/NEIS .
An asymmetric 2 -mode Gaussian mixture in 2D. As a first illustration, we consider an asymmetric 2 -mode Gaussian mixture
[Equation]
(20) where e 1 = [ 10 ] , e 2 =
[ 01 ] , σ 1 = √ 0 .
1 , λ = 5 .
With this choice of parameters, the variance of the vanilla estimator based on (2) is approximately 1 .
× 10 6 .
We use NEIS with t − = 0 and set the time step to ∆ t = 1 / 50 for ODE discretization during both training and estimation of Z 1 .
We train over L = 50 SGD steps using the loss (18) by imposing bias in the first 60% the training period only (i.e. with υ = 0 . 6 ).
The evolution of the variance during the training is shown in Figurein Appendix; the best optimized flow has a variance of about 1 , as opposed to 10 6 for the vanilla estimator.
Since p i in (19) is quite different from ρ 0 during the assisted learning period, it may happen that the empirical variance significantly exceeds the variance of the vanilla importance sampling; this does not contradict with Proposition H.3 below.
As seen in Figure 7, at the end of the assisted period, the variance is already quite small and in most cases, the variance continues to reduce as b gets further optimized.
After training, we estimate Z 1 using NEIS with the optimized flow and compare its performance with AIS-10 and AIS-100.
We first record the query cost for training and then set a total number of queries to U 1 , ∇ U 1 as budgets.
Given the query budget, we estimate Z 1 using each method for 10 times, leading to the results given in Table 5 below.
When we determine the estimation cost of
NEIS, we deduct the query cost of training from the total query budget for fairer comparison.
Note that NEIS uses less total queries to produce more accurate estimate of Z 1 : in particular, the standard deviation of estimating Z 1 by NEIS method is around 1 magnitude smaller than AIS-100.
Moreover, the bias from ODE discretization appears to be negligible.
Figure 2 show an optimized flow and also provide a visual comparison of NEIS with AIS under fixed query budget; more comparison using various ansatzes or architectures can be found in Figures 11 and 12.
A symmetric 4 -mode Gaussian mixture in 10D. Next we consider a symmetric 4 -mode Gaussian mixture in d = 10 dimension with
[Equation]
where the vector µ i =
[ λ cos ( iπ 2 ) λ sin ( iπ 2 ) 0 0 ··· 0 ] and Σ =
Diag [ σ 21 σ 21 σ 22 σ 22 ··· σ 22 ] is a diagonal matrix.
The parameters are d = 10 , σ 1 = √ 0 .
1 , σ 2 = √ 0 .
5 and λ = 5 .
With this choice of parameters, the variance of the vanilla estimator based on (2) is approximately 2 .
15 × 10 6 .
We use
NEIS with t − =
and the time step ∆ t = 1 / 60 is used for ODE discretization during both training and estimation of Z 1 .
We show the training result in Figure 8.
The variance reduces to aboutafter 60 SGD steps for the gradient ansatz (here we only considered this ansatz as it produces more promising empirical results).
Similar to the last example, we compare NEIS using the optimized b with AIS, under fixed query budgets; see Table 5.
The best result from NEIS has an estimator with the standard deviation less than 1 / 3 of the one from AIS-100, even though NEIS uses less query cost.
This comparison suggests that AIS-100 needs more than 9 times more resources than NEIS with optimized flow in order to achieve similar precision and the cost spent on training indeed pays off if we require an accurate estimate of Z 1 (meaning less fluctuation for Monte Carlo estimates).
Moreover, this table also shows that the bias from ODE discretization is negligible.
Figure 2 shows a particular optimized flow: as can be seen, the mass near the origin flows towards four local minima of U 1 , as we would intuitively expect.
More optimized flows and comparisons can be found in Figure 13 in Appendix.
t r i a l =
[Figure]
t r i a l
[Figure]
t r i a l
[Figure]
t r i a l
[Figure]
[Figure]
A funnel distribution in 10D. We consider the following 10D funnel distribution studied in [2, 27]: for the state x = [ x 1 , x 2 , . . .
, x 10 ] ∈ R 10 ,
[Equation]
For numerical stability, we consider the above funnel distribution restricted to a unit ball centered at the origin with radius 25 .
Instead of heuristically parameterizing the dynamics via neural-networks, we consider a generic linear ansatz and a two-parametric linear ansatz:
[Equation]
The generic linear ansatz can be regarded as a neural network without inner layers.
With (22a), we drawn the entries in the matrix W 1 randomly and we set b 1 = 0 10 initially, and we use the assisted training method; with (22b), we set α = β = 2 initially, and we use the direct training method.
In both cases, we choose the finite-NEIS scheme with t − = − 1 / 2 .
We notice that the asymmetric choice t − = 0 can also leads into more optimal dynamics, but its performance is not as competitive as the symmetric case t − = − 1 / 2 .
It is very likely that such a difference is due to the structure of funnel distribution: each coordinate x i ( 1 ≤ i ≤ 10 ) has mean 0 and therefore, a symmetric version can probably better weight the contribution from both forward and backward flows.
The training results are shown in Figures 9 and 10 in Appendix: we can observe that the error and variance are overall decreasing during the training and the parameters α, β tend to increase with a similar speed.
We use the same protocol as in the two previous examples to compare NEIS with
AIS.
As can be be observed in Table 5, the two-parameter ansatz (22b) gives the best estimate; the generic linear ansatz (22a) is not as competitive (probably due to over-parameterization), but it still outperforms the AIS-100, under fixed query budget.
Figure 2 shows these optimized flows; more results can be found in Figure 14 in the Appendix.
The apparent gap between estimates and the ground truth in Figure 2 (or see Table 5) comes from insufficient sample size.
Conclusion and outlook
In this work, we revisited the NEIS strategy proposed in [33] and analyzed its capabilities, both from theoretical and computational standpoints.
Regarding the former, we showed that NEIS leads to a zero-variance estimator for a velocity field b = ∇ V with a potential V that satisfies a certain
Poisson equation with the difference between the target and the base density as source.
Moreover, a zero-variance dynamics can be used to construct a transport map from ρ 0 to ρ 1 .velocity In turn, we highlighted the connection and difference between NEIS and importance sampling strategies based on the normalizing flows (NF).
On the computational side, we showed that the variance of the NEIS estimator can be used as objective function to train the velocity field b .
This training procedure can be performed in practice by approximating the velocity field by a neural network, and optimizing the parameters in this network using SGD, similar to what is done in the context of neural ODE but with a different objective.
Our numerical experiments showed that this strategy is effective and can lower the variance of a vanilla estimator for Z 1 by several orders of magnitude.
While the numerical examples we used in the present paper are somewhat academic, the results suggest that NEIS has potential in more realistic settings.
In order to explore other applications, it would be interesting to investigate how to best parametrize b (e.g., less parameters and non-stiff energy landscape with respect to these parameters) and how to best initiate the training procedure.
It would also be interesting to ask whether we can improve the performance of NEIS by optimizing certain parameters in the base density ρ 0 in concert with b .
The answers to these questions are probably model specific and are left for future work.
Acknowledgment
We would like to thank Jonathan Weare and Fang-Hua Lin for helpful discussions, and the anonymous referees for their useful comments and suggestions.
The work of EVE is supported by the National
Science Foundation under awards DMR-1420073, DMS-2012510, and DMS-2134216, by the Simons
Collaboration on Wave Turbulence, Grant No. 617006, and by a Vannevar Bush Faculty Fellowship.
A The functional space for the infinite-time case A.1 Assumptions
For simplicity, we make:
Assumption A.1.
(i)
The domain Ω is either • an open and connected subset of R d with smooth boundary, • or a d -dimensional torus (without boundary).
(ii) U 0 , U 1 ∈ C ∞ (Ω , R ) .
(iii) Z 0 :
= (cid:82) Ω e − U
= 1 , Z 1 < ∞ and Var (max) ∈ (0 , ∞ ) , where Var (max) :=
E ρ
[ e − 2( U 1 − U 0 ) ] − ( Z 1 )is the variance for the vanilla importance sampling method.
Notations
The open ball around x with radius r is denoted as B r ( x ) :
= (cid:8)
y ∈ Ω (cid:12)(cid:12) | y − x | < r (cid:9) .
For any subset D ⊂ Ω , let τ + D ( x ) and τ − D ( x ) be the first hitting times to the boundary ∂D in the forward and backward directions, respectively.
More specifically,
[Equation]
For later convenience, let us denote
[Equation]
and thus
[Equation]
A.2 Preliminaries
Lemma A.2.
If b ∈ B in (3) , then for any t, s ∈ R , x ∈ Ω and k = 0 , 1 ,
[Equation]
This lemma can be verified easily by definition and thus the proof is omitted.
A simple consequence of (25) is the following result that we also state without proof:
Lemma A.3.
For any s ∈ R and x ∈ Ω ,
[Equation]
provided that these terms are well-defined.
A.3 The functional space
For the infinite-time case, we consider the following family of vector fields denoted as B ∞ .
Definition A.4.
B ∞ is a set that contains all b ∈ B such that Ω \ ℧ ( b ) has Lebesgue measure zero, where ℧ ( b )
⊂ Ω is the collection of points x at which the functions
[Equation]
are continuous on a local neighborhood of x for k = 0 , 1 .
We use the notation ℧
( b ) because in general, such a subset depends on the choice of b .
The main reason behind the above definition is that we need functions in (27) to behave nicely almost everywhere.
The integrability of t → F ( k ) t ( x ) depends on the long-term behavior of the flow, which is not easy to characterize in general; thus we simply include the integrability into the assumption.
However, we can indeed expect that the above conditions should hold for most interesting examples, e.g.:
Example A.5 .
If U 0 ( x ) =
| x | 2 2 + d 2 ln(2 π ) and U 1 ( x ) =
| x | 2 2 σ 2 (so that both ρ 0 and ρ 1 are Gaussian densities), one optimal flow is b ( x ) =
x (cf.
Appendix F below).
For this choice, we can direct compute that when z ̸ = 0 d , X t ( z ) =
e t z and hence
[Equation]
and similar expressions hold for F (0) by letting σ = 1 in above equations.
Then clearly, ℧ ( b ) =
Ω \{ 0 d } and such a dynamics belongs to B ∞ .
However, the constant function b = 0 d / ∈ B ∞ : we can easily verify that e.g., for this dynamics
, (cid:82) ∞ 0 F (1) t ( z ) d t = ∞ for any z and hence ℧ ( 0 d )
= ∅ ; see also Lemma A.7 below.
Here are a few immediate properties of the set ℧
( b ) :
Lemma A.6.
We have:
(i) ℧
( b ) is an open subset of Ω .
(ii)
The set ℧ ( b ) is closed under the evolution of the dynamics b ,
i
e., if x ⋆ ∈ ℧ ( b ) , then X t ( x ⋆ ) ∈ ℧
( b ) for any t ∈ R .
(iii)
If x ⋆ ∈ ℧ ( b ) , then X t ( x ⋆ ) ∈ ℧
( b ) for any t ∈ R , where ℧ ( b ) is the closure of ℧ ( b ) in R d .
(iv) x
→ (cid:82) ∞
−∞ F ( k ) t ( x ) d t is continuous on ℧ ( b ) .
(v) ( x, t ) → (cid:82) ∞ t F ( k ) s ( x ) d s is continuous on ℧ ( b ) × R .
Proof.
The part (i) follows easily from the definition of ℧ ( b ) and the part (iv) also trivially holds.
For the part (ii), notice that if y =
X t ( x ) , then
[Equation]
Since ( x, t ) → X t ( x ) , ( x, t ) → J t ( x ) are continuous by the smoothness assumption of b , it is clear that J t (cid:0) X − t ( y ) (cid:1) is continuous on Ω .
The continuity of y → (cid:82) t 0 F ( k ) s (cid:0)
X − t ( y ) (cid:1)
d s also trivially holds on Ω .
Next, the continuity of y → (cid:82) ∞
F ( k ) s (cid:0) X − t ( y ) (cid:1)
d s in a local neighborhood of X t ( x ⋆ ) comes from the assumption that x ⋆ ∈ ℧ ( b ) .
Thus, y → (cid:82) ∞ 0 F ( k ) s ( y ) d s is continuous in a local neighborhood of X t ( x ⋆ ) , if x ⋆ ∈ ℧ ( b ) .
The other case for y → (cid:82)
−∞ F ( k ) s ( y ) d s can be similarly verified.
The part (iii) is an immediate consequence of part (ii).
Let us prove it by contradiction.
Assume that the conclusion in part (iii) does not hold, then there exists x ⋆ ∈ ℧
( b ) such that y ⋆ :=
X t ( x ⋆ ) / ∈ ℧
( b ) for some t ∈ R .
By the part (ii), we know this x ⋆ ̸∈ ℧
( b ) and thus x ⋆ ∈ ∂ ℧
( b ) is in the boundary.
As ℧ ( b ) is closed and y ⋆ / ∈ ℧ ( b ) , there must exist an ϵ > 0 such that for any y ∈ R d with | y − y ⋆ | <
ϵ , we have y / ∈ ℧
( b ) .
By the smoothness assumption on b , we know there exists a δ > 0 such that for any x ∈ B δ ( x ⋆ ) , we have | X t ( x ) − y ⋆ | <
ϵ outside of ℧ ( b ) .
Since x ⋆ is in the boundary of ℧ ( b ) , we must be able to find an x ∈ ℧ ( b ) such that x ∈ B δ ( x ⋆ ) and by part (ii), X t ( x ) ∈ ℧ ( b ) .
Thus, we reach a contradiction.
For the part (v),
[Equation]
Because ( x, t ) → X t ( x ) is continuous (by the smoothness of b ∈ B ) and z → (cid:82) ∞ 0 F ( k ) s
( z ) d s is continuous in a local neighborhood of X t ( x ) ∈ ℧
( b ) by the part (ii), it is then clear that (cid:82) ∞
[Equation]
X
[Equation]
x )
[Equation]
d s is continuous with respect to ( x, t ) , and hence the conclusion follows easily.
A notable family of points that are excluded from ℧ ( b ) are points at which (cid:82) ∞
−∞ F ( k ) t ( x ) d t = ∞ .
For instance, these include stationary points of b and periodic orbits, which we state as:
Lemma A.7.
Given a vector field b ∈ B , we have x / ∈ ℧
( b ) ,
(i) if x is a stationary point of b (i.e., b ( x ) =
d )
or (ii) if x is on a periodic orbit
Proof.
If x is a stationary point of b , the trajectory is X t ( x ) =
x for all t ∈ R .
Then it is obvious that (cid:82) ∞
−∞ F ( k ) t ( x ) d t = e − U k
( x ) (cid:82) ∞
[Equation]
e ( ∇· b )( x ) t d t = ∞ , which establishes the part (i).
For the part (ii), let us assume that the period is τ .
If c := (cid:82) τ 0 ∇ · b (cid:0) X s ( x ) (cid:1)
d s ≥ 0 , then (cid:90) ∞
[Equation]
= ∞ , where the constant C =
[Equation]
d
[Equation]
Therefore, (cid:82) ∞
−∞ F ( k ) t ( x ) = ∞ .
If c := (cid:82) τ 0 ∇· b (cid:0) X s ( x ) (cid:1)
d s < 0 , we can similarly show that (cid:82)
−∞ F (0) t ( x ) d t = ∞ , and the same conclusion holds.
A.4 Perturbation of the dynamics
Next we investigate the following question: given b ∈ B ∞ and δ b ∈ C ∞ c (Ω , R d ) , can we guarantee that b + ϵδ b ∈ B ∞ for small enough ϵ ?
Such a conclusion trivially holds for the finite-time case; however, more underlying structures are needed for the infinite-time case, due to the fact that the long-term behavior of the flow b can sensitively depend on the local perturbation δ b .
This question is probably unavoidable in order to understand the mathematical structure of B ∞ .
Notation: We shall use the notation X t ( · ) to represent the flow map under b , and use X ϵt ( · ) to represent the flow map under b ϵ :=
b + ϵδ b in this section below.
Moreover, we shall use F ( k,ϵ ) · ( · ) to denote the function defined in (6) for the dynamics
b ϵ and the Jacobian of the flow J ϵ ( · ) ( · ) is similarly defined.
Definition A.8 ( b -stability) .
Given b ∈ B ∞ : (a) (For an open bounded set).
A nonempty open bounded set D ⊂ ℧ ( b ) is said to be b -stable if:
(i)
There exists a point x ⋆ ∈ D and ζ ∈ (0 , 1) such that
[Equation]
(ii) For any x ∈ D , the trajectory (cid:8) X t ( x ) (cid:9) t ∈ R intersects with the boundary ∂D at exactly two points.
(b) (For a point).
A point x ∈ ℧ ( b ) is said to be b -stable if there exists a neighborhood B ϵ ( x ) such that the region B ϵ ( x ) is b -stable.
Otherwise, the point x is said to be b -unstable.
The assumption in the part (i) ensures that the trajectory t → X t ( x ) will leave this region D within a finite amount of time; see Lemma A.9 below.
The part (ii) is used to ensure that the trajectory is not (infinitely) recurrent to D ; once the trajectory leaves D , it will not return to D again.
Lemma A.9.
Suppose b ∈ B and D ⊂ Ω is open and bounded.
If there exists a point x ⋆ ∈ D and ζ ∈ (0 , 1) such that
[Equation]
then for any x ∈ D , we have
[Equation]
Proof.
Consider the quantity h t ( x ) :
= (cid:10) b ( x ⋆ ) , X t ( x ) − x ⋆ (cid:11) for x ∈ D .
Then when t ∈ (cid:0) τ − D ( x ) , τ + D ( x ) (cid:1) , d d th t ( x )
[Equation]
(cid:10) b ( x ⋆ ) , b ( X t ( x )) − b ( x ⋆ )
+ b ( x ⋆ ) (cid:11) ≥ (1 − ζ ) | b ( x ⋆ ) | 2 > 0 .
Therefore, (1 − ξ ) | b ( x ⋆ ) | 2 (cid:0) τ
+ D ( x ) − τ − D ( x ) (cid:1) ≤ (cid:90) τ
+ D ( x ) τ − D ( x ) d d th t ( x ) d
[Equation]
Then the conclusion can be immediately obtained.
We now state the main result of this section:
Proposition A.10.
Suppose b ∈ B ∞ and x ⋆ ∈
℧
( b ) is b -stable.
Then there exists an open bounded neighborhood of x ⋆ , denoted as D ⊂ ℧
( b ) , such that for an arbitrary δ b ∈ C ∞ c ( D, R d ) , there exists an ϵ 0 > 0 and b + ϵδ b ∈ B ∞ for any ϵ ∈ (0 , ϵ 0 ) .
Proof.
The main idea is that if the path (cid:8) X t ( x ) (cid:9) t ∈ R passes through D , then a small perturbation within a bounded time period does not affect the long-term behavior; if the path does not pass through
D , then b ϵ =
b along this path and therefore, (cid:82) ∞ 0 F ( k,ϵ ) t ( x ) d t = (cid:82) ∞
F ( k ) t ( x ) d t and hence, the continuity is also preserved locally around x .
Step (I): Setup and the choice of D .
Since x ⋆ ∈ ℧
( b ) , we know | b ( x ⋆ ) | > 0 by Lemma A.7.
Moreover, we can find a small b -stable ball B θ ( x ⋆ ) by Definition A.8 with a parameter ζ ∈ (0 , 1) in (28).
Then consider the following cross-section within B θ ( x ⋆ )
[Equation]
, and define the streamtube T passing through S as
[Equation]
It is not hard to see that T is an open subset of ℧ ( b ) by Lemma A.6.
Then let us choose D as an arbitrary open ball around x ⋆ such that
[Equation]
Next let us consider an arbitrary δ b ∈ C ∞ c ( D, R d ) and from now on, we shall fix δ b .
It is easy to verify that b + ϵδ b ∈ B for any ϵ ∈ R .
The non-trivial part is to check that Ω \ ℧
( b ϵ ) has measure zero for sufficiently small ϵ and
hence b ϵ ∈ B ∞ .
Step (II): Choice of ϵ 0 .
Let us pick
[Equation]
for any ζ ⋆ ∈ ( ζ, 1) .
The main motivation is that we need (28) to hold for b ϵ as well.
Indeed, if ϵ ≤ ϵ 0 ,
[Equation]
and for any x ∈ B θ ( x ⋆ ) ,
[Equation]
As discussed above, this property ensures that any trajectory (cid:8) X ϵ t ( x ) (cid:9) t ∈ R with x ∈ B θ ( x ⋆ ) will pass through the boundary ∂B θ ( x ⋆ ) , and at the same time, since B θ ( x ⋆ ) is b -stable, the condition (ii) in Definition A.8 ensures that such a trajectory only intersects with the boundary ∂B
θ ( x ⋆ ) at exactly 2 points.
Let us denote
[Equation]
By Lemma A.9, we know
[Equation]
Step (III): Prove that Ω \ ℧ ( b ϵ ) has measure zero for any ϵ ∈ (0 , ϵ 0 ) .
We will prove that for any ϵ ∈ (0 , ϵ 0 ) ,
T ⊂ ℧
( b ϵ
[Equation] [Equation]
⊂ ℧
( b
[Equation]
It could be observed that the boundary ∂ T has measure zero: the boundary contains flowlines from a hyper-surface with dimension d − 2 , that is, ∂ T is a set of flowlines passing through (cid:8)
y :
| y − x ⋆ | = θ/ 2 , ⟨ y − x ⋆ , b ( x ⋆ ) ⟩ = 0 (cid:9) .
Hence, provided that the above equation holds, we immediately know that
[Equation]
has measure zero, where the superscript c means set complement.
As a remark, from now on, we shall fix ϵ ∈ (0 , ϵ 0 ) .
Proof of T ⊂ ℧ ( b ϵ ) .
Let us pick an arbitrary x ∈ T and we shall prove that z → (cid:82) ∞ 0 F ( k,ϵ ) t ( z ) d t is continuous locally near x .
Similarly, we can verify that z → (cid:82)
−∞ F ( k,ϵ ) t ( z ) d t is locally continuous near x .
Therefore, x ∈ ℧
( b ϵ ) and thus T ⊂ ℧
( b ϵ ) .
Next we return to verify that z → (cid:82) ∞ 0 F ( k,ϵ ) t ( z ) d t is continuous locally near x .
We claim that there exists a y ∈ S ∪ D ∈ B θ/ 2 ( x ⋆ ) and s ∈ R such that X ϵ s ( y ) =
x . To prove this, we need to discuss two cases:
• Suppose (cid:8) X ϵt ( x ) (cid:9) t ∈ R never enters D .
Because b ϵ = b on Ω \ D , we know X ϵt ( x ) =
X t ( x ) for any t ∈ R .
By the definition of the streamtube T , there exists a y ∈ S and s ∈ R such that
y
=
X − s ( x ) =
X ϵ − s ( x ) , which immediately gives X ϵs ( y ) = x .
• Suppose (cid:8) X ϵt ( x ) (cid:9) t ∈ R enters D at some time.
Then the above conclusion follows easily.
Because b ϵ is smooth, for small enough δ , we can ensure that B δ ( x ) ⊂ T and also X ϵ − s ( z ) ∈
B θ/ 2 ( x ⋆ ) for any z ∈ B δ ( x ) .
By (30),
[Equation]
We divide the proof of continuity of z → (cid:82) ∞ 0 F ( k,ϵ ) t ( z ) d t into two cases: (a) If τ ≤ s , then we already know for any point
z ∈ B δ ( x ) , we have X ϵt ( z )
/ ∈ B θ ( x ⋆ ) for t ≥ 0 .
Recall that b
=
b ϵ outside of B θ ( x ⋆ ) .
Hence X ϵt ( z ) =
X t ( z ) for any t ≥ 0 , and (cid:90) ∞
[Equation]
( k,ϵ
[Equation]
, which is continuous on a neighbor of x by x ∈ ℧ ( b ) .
(b) If τ > s , then by (31), we know X ϵt ( X ϵτ − s ( z )) /
∈ B θ ( x ⋆ ) for any z ∈ B δ ( x ) and t ≥and in particular, X ϵτ − s ( z ) / ∈ B θ ( x ⋆ ) for any z ∈ B δ ( x ) .
Let us rewrite (cid:90) ∞
[Equation]
Since b ϵ is smooth, apparently z → (cid:82) τ − s
F ( k,ϵ ) t ( z ) d t and z → J ϵτ − s ( z ) are continuous on Ω .
The continuity of z → (cid:82) ∞ 0 F ( k,ϵ ) t (cid:0) X ϵτ − s ( z ) (cid:1) d t locally near x can be exactly proved in the same way as the Part (a) above for the new point X ϵτ − s ( x ) .
One small technical result to verify is that X ϵτ − s ( x ) ∈ ℧
( b ) in order to apply the same argument from the Part (a).
Note that X ϵτ − s ( x ) =
X ϵτ ( y ) =
X ϵτ − (cid:101) τ (cid:0) X ϵ (cid:101) τ ( y ) (cid:1) where
[Equation]
Since X ϵ (cid:101) τ ( y ) ∈ ∂B θ ( x ⋆ ) , we know X ϵ (cid:101)
τ ( y ) ∈ ℧
( b ) (e.g., by choosing a small enough θ ).
Outside of B θ ( x ⋆ ) , we know b ϵ = b and thus X ϵτ − (cid:101) τ (cid:0) X ϵ (cid:101) τ ( y ) (cid:1) =
X τ − (cid:101) τ (cid:0) X ϵ (cid:101) τ ( y ) (cid:1) ∈ ℧
( b ) by Lemma A.6.
Proof of ℧ ( b ) \ T ⊂ ℧
( b ϵ ) .
Let us consider an arbitrary point x ∈ ℧ ( b ) \ T .
Note that b ϵ =
b outside of D ⊂ T .
For a local neighborhood B δ ( x ) outside of T , we also know for any y ∈ B δ ( x ) ,
X ϵt ( y ) =
X t ( y ) / ∈ T for t ∈ R , by both the definition of T and the construction b ϵ
= b outside of T .
By the same argument as in the Part (a) above, it could be readily shown that x ∈ ℧
( b ϵ ) and thus ℧ ( b ) \ T ⊂ ℧
( b ϵ ) .
B Supplementary material for SectionB.1 Proof of Proposition 2.
We first prove the finite-time case.
As b ∈
B , we know that (cid:82) t + t − F (0) − s ( x ) d s ≡
[Equation]
t +
[Equation]
x
[Equation]
− s ( x ) d s < ∞ by the continuity assumption of b and Assumption A.1.
Then
[Equation]
By the change of variables x = X t ( (cid:101) x ) , we have
[Equation]
Note that as the integrand is non-negative, switching the order of time integration and space integration is justified by Fubini–Tonelli theorem.
The proof of Proposition 2.1 for the infinite-time case is essentially the same as the finite-time case, except the followings:
• We need to replace the domain Ω in (32) by ℧
( b ) defined in Definition A.4.
• We need the continuity of x → (cid:82) ∞
−∞ F (0) t ( x ) d t in order to use Theorem 2 in [20] to get the first line in (32).
A generalization with discontinuity should be possible by e
g., considering piecewise continuous b .
However, we shall not explore this further in this work.
As a remark, the map x → X t ( x ) being bijective (due to the nature of ODE flows) on ℧ ( b ) was proved in Lemma A.6 (iii), when applying [20, Theorem 2].
B.2 Proof of Proposition 2.
Consider
[Equation]
To prove the first conclusion, we need to verify that the trajectory (cid:8) X t ( x ) (cid:9) t ∈ R =
[Equation]
Z t ( x ) (cid:9) t ∈ R .
From now on, let us fix x and introduce a scalar-valued function θ by θ t := (cid:82) t 0 α (cid:0)
Z s ( x ) (cid:1)
d s (i.e., dd t θ t = α (cid:0) Z t ( x ) (cid:1) .
By taking the time derivative, it is not hard to verify that Z t ( x ) =
X θ t (cid:0) x (cid:1) as both satisfy the same ODE.
Of course, θ also depends on x
but we shall not explicitly specify this dependence for simplicity of notations.
Thus, the trajectory t → Z t ( x ) is the same as t → X t ( x ) under time rescaling specified by θ .
Next we shall prove the following lemma, which immediately leads into the second result in Proposition 2.2.
Lemma B.1.
Suppose g : Ω → R is a non-negative continuous function.
For any x ∈ Ω ,
[Equation]
∞
[Equation]
Proof.
Because α is strictly positive, θ · : R → R is bijective, and by the inverse function theorem
[Equation]
Then by the change of variables (cid:101) t =
[Equation]
and
[Equation]
s = θ s ,
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
It is then sufficient to show that ψ 1 ( t ) =
ψ 2 ( t ) for any t ∈ R , where
[Equation]
[Table]
[Equation]
It is easy to observe that ψ 1 (0)
=
ψ 2 (0) .
Let us consider the time derivative of ψ
[Equation]
It is clear that ψ 2 ( t ) satisfies the same ODE and thus ψ 1 = ψ 2 .
B.3 Remarks on the discrete-time analogy of (7)
Let us briefly explain how (7) connects to the method in [42] by time discretization.
Suppose
N − = t − /h and N + = t + /h , where h ≪ 1 is the time step size; for simplicity of notation, let us assume that N − and N + are simply integers.
By discretizing the time integration for the finite-time
NEIS scheme in (7),
[Equation]
where we denote T ( · ) =
X − h ( · ) , and J T − j ( x ) :=
(cid:12)(cid:12)(cid:12) det (cid:16) ∇ T − j ( x ) (cid:17)(cid:12)(cid:12)(cid:12) is the Jacobian for the map
T − j .
Then by choosing N − = − K and N + = 0 , we have
[Equation]
which are Eqs.
(8) and (10) in arXiv v1 of [42].
B.4 Remark on the relation between finite-time and infinite-time NEIS
In what follows, we briefly elaborate on the relation between the finite-time and infinite-time NEIS schemes.
Suppose we fix −∞ < t − < 0 < t + < ∞ and consider a fixed valid flow b for the infinite-time NEIS, i.e.,
[Equation]
is well-defined for almost all x ∈ Ω , where the state X t ( x ) solves the ODE dd t X t ( x )
=
b ( X t ( x )) for any x ∈ Ω .
The superscript in A b is used to emphasize that it is the estimator for this particular flow b and similar notations are used below.
Next we consider a family of rescaled flow b α parameterized by α > 0 , defined as
[Equation]
Let us study its estimator for the finite-time NEIS:
[Equation]
where Z t ( x ) solves the ODE dd t Z t ( x )
=
b α ( Z t ( x )) for any x ∈ Ω .
From Appendix B.2, we already know that Z t ( x ) =
X αt ( x ) for any x ∈ Ω and t ∈ R .
By change of time variables t
= (cid:101) t/α , s = (cid:101) s/α and r = (cid:101) r
/α , we have
[Equation]
For any (cid:101) t ∈ R , as α → ∞ , the integrand in the last equation pointwisely converges to
[Equation]
If we heuristically swap the order of taking the limit α → ∞ and the integral with respect to (cid:101) t (which should generally hold for most examples)
[Equation]
we end up with an identity:
[Equation]
The above relation heuristically justifies that due to the space-time rescaling, in the limit of large magnitude of the flow (i.e., α → ∞ above), it does not matter how t − , t + are chosen as long as t − < 0 < t + .
In particular, if the flow b is a zero-variance dynamics, i.e., A b ( x ) =
Z 1 for x ∈ Ω almost surely, then in the finite-time NEIS, the flow b α = α b (with α ≫ 1 ) should be approximately a zero-variance dynamics for the finite-time scheme.
The finite-time NEIS scheme may not have explicit analytical results about zero-variance dynamics in the same way as the infinite-time NEIS scheme; however, due to the above discussed relation, the finite-time version still possesses the ability to handle and learn an approximately zero-variance dynamics, which is good enough in practice, e.g., during training the optimal flow in Section 5.
C The first-order perturbation of the variance for the finite-time scheme
Here we study how the variance (or equivalently, the second moment) of the estimator depends on b , since the performance of the finite-time NEIS scheme (7) largely depends on this choice.
More specifically, in the following proposition, we study how the second moment changes under a small perturbation of b .
The expression (34) below will be useful for training optimal dynamics in Section(see also Appendix I for details).
Proposition C.1.
Suppose b ∈ B and for any perturbation
δ b ∈ C ∞ c (Ω , R d ) , denote b
ϵ :=
b + ϵδ b .
Then, d
[Equation]
where for k ∈ { 0 , 1 } , we define
[Equation]
and Y t ( x ) is the solution of the following ODE:
[Equation]
The expression of the functional derivative δ M t
[Equation]
+
[Equation] [Equation]
b (not presented in this work) for the finite-time case can be derived in the same way as Lemma D.8 below for the infinite-time case.
However, it appears that the expression of δ M t − ,t + ( b ) δ b is too complicated to provide useful analytical results.
Proof.
Let us perturb b by ϵδ b where ϵ ≪ 1 .
Let us consider
[Equation]
with a fixed initial condition X 0 ( x )
=
X ϵ 0 ( x ) = x .
For a small ϵ , we can expect that X t ( x ) ≈ X ϵt ( x ) and also we know X 0 t ( x ) ≡ X t ( x ) .
Define F ( k,ϵ ) t ( x ) for the dynamics
b ϵ in the same way as in (6), namely,
[Equation]
By these notations
[Equation]
Then we take the derivative of M t − ,t + ( b ϵ ) with respect to ϵ :
[Equation]
Next
[Equation]
we need to compute dd ϵ F ( k,ϵ ) t ( x ) .
Let us first consider the perturbation to the trajectory.
Let
Y ϵt ( x ) := dd ϵ (cid:0) X ϵt ( x ) (cid:1) and then d d t
[Equation]
+
[Equation]
) (cid:0) X ϵt
[Equation]
x
[Equation]
(cid:1)(cid:17) =
∇ b (cid:0) X ϵt ( x ) (cid:1) Y ϵt ( x ) + δ b (cid:0) X ϵt ( x ) (cid:1)
+ ϵ (cid:16) ∇ δ b (cid:0) X ϵt ( x ) (cid:1)(cid:17)
Y ϵt ( x ) ,
Y ϵ 0 ( x ) = 0 .
When ϵ = 0 , Y 0 t ( x ) is the solution to d
[Equation]
Y
( x ) = 0 .
Now we are ready to explicitly write down dd ϵ F ( k,
[Equation]
) t ( x ) .
It is straightforward to derive that
[Equation]
  .
When we let ϵ =
[Equation]
we have
[Equation]
Finally
[Equation]
we arrive at the conclusion by combining previous results and dropping the superscript in
Y
[Equation]
( x ) for simplicity.
D The first-order perturbation of the variance for the infinite-time scheme
The goal of this section is to derive the functional derivative of M ( b ) with respect to b , denoted as δ M ( b ) δ b , defined as follows: for any δ b ∈ C ∞ c (Ω , R d ) such that b + ϵδ b ∈ B ∞ for small enough ϵ , we have
[Equation]
Since M and Var only differ by a constant (which is independent of b ), it is apparent that δ Var ( b ) δ b ≡ δ M ( b ) δ b .
Proposition D.1.
The functional derivative δ M ( b ) δ b : Ω → R d has the following form
[Equation]
Var
[Equation]
Remark D.2 .
The proof of the last formula is slightly formal: for instance, conditions on b to ensure the existence of ∇A are not discussed.
Recall the expression of B from (24).
The proof of Proposition D.1 is given in Appendix D.2: it relies on a few explicit formulas, that we state first.
D.1 Some explicit formulas
We need some explicit formulas for Y t ( x ) (36) and G ( k ) t ( x ) (35).
We notice that G ( k ) depends on
Y · ( · ) and δ b linearly, and Y t ( x ) also depends on δ b linearly.
Therefore, the first step is to rewrite the expression of Y t ( x ) more explicitly in terms of δ b .
Lemma D.3.
Suppose the dynamics b ∈ B and δ b ∈ C ∞ c (Ω , R d ) .
Then we have
[Equation] [Equation]
The kernel C t,s ( x ) ∈ R
d × d has the following form
[Equation]
where exp T ← is the chronological time-ordered operator exponential.
Proof.
By plugging the ansatz (39) into (36), we immediately know that C s,s ( x ) =
I d for all s ∈ R and
[Equation]
This linear ODE has an explicit solution as in (40), by introducing time-ordered operator exponential.
Next, we shall rewrite G ( k ) t ( x ) .
Lemma D.4.
We can rewrite G ( k ) t ( x ) as follows
[Equation]
where V ( k ) t,s ( x ) is defined as
[Equation]
Proof.
Recall the expression of G ( k ) t ( x ) from (35).
After plugging (39), we have
[Equation]
Then we present a few properties, which will be useful when computing the functional derivative δ M ( b ) δ b .
The following lemma shows how C t, − s ( · ) and V ( k ) t, − s ( · ) change under the dynamical evolution
X s ( · ) .
Lemma D.5.
When t ≤ − s ≤ 0 or t ≥ − s ≥ 0 ,
[Equation]
Proof.
We first consider the term C t, − s (cid:0) X s ( x ) (cid:1) .
When t ≥ − s ≥ 0 ,
[Equation]
The case for t ≤ − s ≤ 0 can be similarly verified.
Recall from (43) that
[Equation]
where to get the third line, we use the above formula (44) about C t, − s (cid:0) X s ( x ) (cid:1) .
The following lemma connects C t, 0 and V ( k ) t, 0 with gradients.
Lemma D.6.
For any x ∈ Ω and t ∈ R , we have
[Equation]
As a consequence, det (cid:0) C t, 0 ( x ) (cid:1) =
J t ( x ) .
Proof.
We fix an index 1 ≤ j ≤ d and consider the dynamics dd
t (cid:102) X ϵt ( x ) =
b (cid:0)(cid:102) X ϵt ( x ) (cid:1) , (cid:102)
X ϵ 0 ( x ) = x
+ ϵ e j where e j is a vector with the j th element to be one, and all other elements to be zero.
Clearly, (cid:102) X 0 t ( x )
=
X t ( x ) .
Let (cid:101) Y ϵt ( x ) := dd ϵ (cid:102) X ϵt ( x ) .
Then d
[Equation]
Moreover, when ϵ = 0 , we have
[Equation]
whose solution is simply j th column of C t, 0 ( x ) .
Besides, the j th column of ∇ x X t ( x ) is given by
[Equation]
By combining above results, we easily know that ∇ x X t ( x ) =
C t, 0 ( x ) .
Next, for k ∈ { 0 , 1 } and any x ∈ Ω ,
[Equation]
D.2 Proof of Proposition D.
We list without proof the following result for the infinite-time case, which can be derived in the same way as Proposition C.1.
Lemma D.7.
Let b
ϵ :=
b + ϵδ b .
Suppose that for small enough ϵ , we have b ϵ ∈ B ∞ .
Then
[Equation]
where G ( k ) t ( x ) is defined in (35) for k = 0 , 1 .
Lemma D.8.
The functional derivative of the second moment for the infinite-time case is
[Equation]
where
S ∞ s ( x ) :
= 
[Equation]
When s = 0 , S ∞ 0 ( · ) , G ∞ 0 ( · ) are not specified above, because they will not affect the functional derivative δ M ( b ) δ b by changing values at a single point.
Proof.
In Lemma D.7, we need to simplify the term (cid:82) ∞
−∞ G ( k ) t ( x ) d t .
By plugging the formula of
G ( k ) from (42), we have
[Equation]
By plugging the last equation into Lemma D.7 and with straightforward simplification
[Equation]
we can verify that
[Equation] [Equation]
The integration by parts in the last line is valid because δ b vanishes at the boundary ∂ Ω .
By comparing the last equation with (37), we can immediately obtain (47) after straightforward simplifications.
Then we need to simplify S ∞− s (cid:0) X s ( x ) (cid:1) and G ∞− s (cid:0) X s ( x ) (cid:1) .
Lemma D.9.
S ∞− s (cid:0) X s ( x ) (cid:1) and G ∞− s (cid:0) X s ( x ) (cid:1) has the following form
[Equation]

[Equation]
B ( x
[Equation]
(cid:90)
[Equation]
F (0) t ( x ) d t
[Equation]
if s < 0 .
Proof.
When s > 0 ,
[Equation]
which is clearly independent of s from this expression.
Similarly
[Equation]
when s < 0 ,
[Equation]
which is again independent of s .
We can similarly simplify G ∞− s (cid:0) X s ( x ) (cid:1) .
By plugging the formula in Lemma D.9 into (47), (cid:90) ∞
[Equation]
Besides,
[Equation]
By combining previous results
[Equation]
It can be directly verify that
[Equation]
By plugging this into the expression of the functional derivative and dividing both sides by AB ,
[Equation] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
We keep the terms involving (cid:82) ∇F (1) t ( x ) d t untouched
and we only try to simplify terms involving (cid:82) ∇F (
[Equation]
t ( x ) d t .
The coefficient for (cid:82)
[Equation]
∇F (0) t ( x ) d t is
[Equation]
Similarly, the coefficient for (cid:82)
−∞ ∇F (0) t ( x ) d t is
[Equation]
Hence,
[Equation]
After straightforward simplification
[Equation]
we obtain (38)
[Equation]
□
E Proof of Proposition 3.1 and discussion about its assumptions and implications
In this section
[Equation]
we prove Proposition 3.
[Equation]
and discuss its assumptions (in particular the Morse function condition) as well as some of it implications (including the settings that go beyond the ones in the proposition).
In particular, we solve the Poisson equation (11) when ρ 0 is the standard Gaussian density in R d and ρ 1 is the density of a Gaussian mixture distribution.
E.1 Proof of Proposition 3.1 when D =
We proceed in three steps:
Step 1: We shall first establish the limiting behavior of the dynamics.
More specifically, the trajectory t → X t ( x ) will converge to a local maximum of V in the forward direction and converge to a local minimum in the backward direction, except at a set of points with measure zero.
Lemma E.1.
For any x ∈ Ω , we have lim | t |→∞ | b ( X t ( x )) | = 0 .
Proof.
We only need to show one direction t → ∞ and the other case follows similarly.
If this does not hold, then there exists ϵ > 0 and a monotone increasing sequence { t k } ∞ k =1 such that (cid:12)(cid:12) b (cid:0)
X t k ( x ) (cid:1)(cid:12)(cid:12) ≥ ϵ and lim k →∞ t k = ∞ .
Consider
[Equation]
, where C := sup x ∈ Ω (cid:13)(cid:13) ∇ 2 V ( x ) (cid:13)(cid:13) < ∞ .
By Grönwall’s inequality,
[Equation]
for all t ≥ s ≥ 0 .
Without loss of generality, we can ensure that t k − t k − 1 ≥ 1 .
Hence,
[Equation]
which will diverge to infinity as t → ∞ .
This contradicts with the boundedness of V and thus the assumption does not hold.
As a remark, the notation χ A () is an indicator function for the set A .
Lemma E.2.
Suppose x is not on the stable or unstable manifold of a saddle point.
Then the trajectory { X t ( x ) } t ∈ R must converge to a local maximum of V in the forward direction and a local minimum of V in the backward direction.
Proof.
Since the torus Ω = [0 , 1] d is bounded, the trajectory { X t ( x ) } t ≥ 0 must be bounded and there exists an increasing sequence { t k } ∞ k =1 such that (cid:8) X t k ( x ) (cid:9) ∞
k =1 is convergent by Bolzano-Weierstrass theorem and let us denote the limit as x ⋆ .
By Lemma E.1, we know b ( x ⋆ ) =
d and thus x ⋆ is a critical point.
By the assumption, x ⋆ is not a saddle point nor a local minimum, that is, x ⋆ must be a local maximum of V .
By the assumption that V is a Morse function, the critical point x ⋆ has a non-degenerate Hessian.
After the trajectory enters its basin of attraction (containing an open ball around x ⋆ ), the trajectory { X t ( x ) } t ∈ R will eventually converge to x ⋆ .
The backward direction can be proved in a similar way.
Lemma E.3.
Under the same assumption as in Lemma E.2, we know (cid:82) ∞ 0 F ( k ) t ( x ) d t < ∞ and (cid:82)
−∞ F ( k ) t ( x ) d t < ∞ .
In particular, lim | t |→∞ F ( k ) t ( x ) =
and lim | t |→∞ J t ( x ) = 0 .
Proof.
Without loss of generality, we only consider the forward branch.
Since V is assumed to be a
Morse function, the Hessian ∇ 2 V ( x ⋆ ) < 0 is non-degenerate and 0 > tr (cid:0) ∇ 2 V ( x ⋆ ) (cid:1) =
∆ V ( x ⋆ ) .
Therefore,
[Equation]
Since ρ k = e − U k / Z k are bounded on the torus, we know (cid:90) ∞
[Equation]
where C := sup x ∈ Ω max { e − U 0 ( x ) , e − U 1 ( x ) } < ∞ herein.
From (48), there exists β > 0 and τ >such that ∇ · b ( X s ( x )) ≤ − β for all s ≥ τ , then if t ≥ τ ,
[Equation]
, and therefore,
[Equation]
In particular, when t ≥ τ ,
[Equation]
which converges to zero exponentially fast as t → ∞ .
The same conclusion holds for F ( k ) t ( x ) ≡ e − U k
[Equation]
when t → ∞ .
Step 2: We verify that b = ∇ V is a zero-variance dynamics.
We need to show that (cid:82) ∞
−∞ ( ρ 1 − ρ 0 ) (cid:0) X t ( x ) (cid:1)
J t ( x ) d t = 0 almost everywhere on Ω .
Under the same assumption as Lemma E.2, let us consider
[Equation]
The last line comes from Lemma E.3.
The validity of the above equation almost everywhere on Ω will be explained in Step 3.
Step 3: We prove that b = ∇ V ∈ B ∞ in the sense of Definition A.4, i.e., such a gradient ascent dynamics is a valid one for the infinite-time NEIS scheme.
If we can find two open subsets D 1 , D 2 such that x → (cid:82) ∞ 0 F ( k ) t ( x ) d t is continuous on D 1 , x → (cid:82)
−∞ F ( k ) t ( x ) d t is continuous on D 2 , and both Ω \ D 1 and Ω \ D 2 have Lebesgue measure zero, then clearly ℧ ( b )
⊃ D
1 ∩ D 2 and b ∈ B ∞ .
Due to the symmetric role of forward and backward branches of trajectories, it is then sufficient to prove the following lemma.
Lemma E.4.
There exists an open subset D ⊂ Ω such that x → (cid:82) ∞ 0 F ( k ) t ( x ) is continuous and Ω \ D has measure zero.
Proof.
Let us denote the local maxima of V as X 1 , X 2 , · · · , X r .
The index r < ∞ because V is a Morse function and Ω is compact.
Since ∇ 2 V ( X i ) < 0 for 1 ≤ i ≤ r , there exists a local neighborhood B δ i ( X i ) such that lim t →∞ X t ( z )
=
X i if z ∈ B δ i ( X i ) .
Hence, it is not hard to characterize the basin of attraction of X i
[Equation]
which is open.
Then define an open subset D :=
∪ ri =
O i .
By Lemma E.2, we know Ω \ D has
Lebesgue measure zero, since there is only a finite number of critical points and the stable/unstable manifold of saddle points has measure zero.
Next, we still need to verify z → (cid:82) ∞ 0 F ( k ) t ( z ) d t is continuous at an arbitrary point x ∈ D .
Since D = ∪ ri =1 O i and O i are open and disjoint, it is sufficient to verify this conclusion for x ∈
O i for an arbitrary index i .
By the smoothness of V , there exists a local neighborhood O δ := (cid:8)
z ∈
O i : V ( X i ) − δ < V ( z ) ≤
V ( X i ) (cid:9) such that ( ∇· b )( z ) ( ∇· b )( X i ) ∈ ( 12 , 32 ) for every z ∈ O δ .
Let M = sup (cid:8) max { e − U 1 ( x ) , e − U 0 ( x ) } : x ∈ Ω (cid:9) .
We know M < ∞ because Ω is compact and U 0 , U 1 are smooth.
Define τ :=
inf { t ≥ 1 : X t ( x ) ∈ O δ } .
Due to the smoothness of b , for any integer j ≥ 2 , we can choose a small neighborhood B
δ j ( x ) such that X t ( z ) ∈
O δ for all t ≥ jτ and for all z ∈ B δ j ( x ) (note that O δ is automatically a trapping region of b by construction).
Then when z ∈ B δ j ( x ) ,
[Equation]
∞ [Equation] For an arbitrary ϵ > 0 , by Lemma E.3, we can pick j large enough such that J jτ ( x ) < − ( ∇· b )( X i ) 2 M ϵ 6 .
Next we can accordingly pick δ j small enough such that J jτ ( z ) − J jτ ( x ) < − ( ∇· b )( X i ) 2 M ϵ 6 for all z ∈ B δ j ( x ) .
In this way, we can ensure that
[Equation] [Equation]
Furthermore, due to the smoothness of b , we can choose δ j (possibly even smaller) so that
[Equation]
The continuity of z → (cid:82) jτ 0 F ( k ) t ( z ) d t can be easily established due to the differentiability of z → F ( k ) t ( z ) .
By combining previous results, for each ϵ > 0 , we can find a δ j such that for any z ∈ B δ j ( x ) ,
[Equation]
This proves the continuity of z → (cid:82) ∞ 0 F ( k ) t ( z ) d t at the point x .
E.2 A remark about the general case
By Proposition 2.2, to prove that ∇ V is a zero-variance dynamics, it is equivalent to prove that
b = D∇ V is a zero-variance dynamics where V solves (11).
Notice that J t ( x ) =
e (cid:82) t 0 ∇· ( D V ) (cid:0)
X s ( x ) (cid:1)
d s and (cid:90) ∞
−∞ (cid:0) ρ 1 ( X t ( x )) − {+ρ 
+}
( X t ( x )) (cid:1) J t ( x ) d t = (cid:90) ∞
−∞ ∇ · ( D∇ V
[Equation]
( X
[Equation]
As long as J t ( x ) vanishes when | t | → ∞ , then such a dynamics b =
D∇ V is indeed a zero-variance dynamics.
For a point x ∈ Ω , suppose the gradient ascent trajectory under ∇ V will converge to a (nondegenerate) local maximum of V , denoted as x ⋆ ; by Proposition 2.2, the trajectory initiated from x under b
= D∇ V is the same and X t ( x ) → x ⋆ as t → ∞ under the flow b .
Since D is strictly positive, it also does not change the concavity of local extreme points: when x ⋆ is a local maximum of V (with ∇ V ( x ⋆ )
=
d and ∇ 2 V ( x ⋆ ) < 0 ), then
[Equation]
which implies that as t → ∞ ,
[Equation]
By the same argument as in the case D = 1 (i.e. Lemma E.3), we can establish the validity that
J t ( x ) → 0 as | t | → ∞ .
E.3 A remark about the existence of Morse function
In Poisson’s equation (11), a Morse function V does not always exist for an arbitrary smooth density function ρ 1 , e.g., when ρ 1 = ρ 0 , D = 1 , we know V = 0 is the solution of (11) but V = 0 is not a Morse function.
However, since Morse functions are dense in C ∞ (Ω , R ) [4], we can always find a Morse function such that the dynamics b = ∇ V behaves almost like a zero-variance dynamics, which is summarized in the next proposition.
Proposition E.5.
Suppose Ω
=
[0 , 1] d is a torus and U 0 , U 1 ∈ C ∞ (Ω , R ) .
Without loss of generality, assume Z
= Z 1 = 1 .
For any ϵ ∈ (0 , 1) , there exists a Morse function V such that the dynamics b
= ∇ V provides an estimator 1 − ϵ ≤ A ( x ) ≤ 1 + ϵ for almost all x ∈ Ω in the infinite-time NEIS method.
Consequently, the variance Var ( b ) ≤ ϵ 2 .
Proof.
Denote θ := inf { ρ 0 ( x ) : x ∈ Ω } ≡ e − sup { U 0 ( x ): x ∈ Ω } > 0 since U 0 is smooth and Ω is compact.
Since both ρ k = e − U k are smooth for k = 0 , 1 , one could approximate ρ 1 − ρ 0 by trigonometric polynomials T N ( x ) =
(cid:80)
| µ | ∞ ≤ N,µ ̸ =
d a µ e i 2 π ⟨ µ,x ⟩ such that
[Equation]
where a µ = (cid:82) Ω e − i 2 π ⟨ µ,x ⟩ ( ρ 1 − ρ 0 )( x ) d x ∈ C are Fourier coefficients, µ ∈ Z d and N ∈ N ; see e.g., [7, Theorem 16].
Let Ψ N ( x )
[Equation]
(Ω , R ) .
It is clear that ∆Ψ N = T N .
As Morse functions are dense, we can find a Morse function V such that ∥ V − Ψ N ∥ C 2 (Ω) < ϵθ 2 [4, Proposition 1.2.4], and in particular, ∥ ∆ V − ∆Ψ N ∥ C 0 (Ω) < ϵθ 2 .
Therefore,
[Equation]
By Proposition 3.1, we know that b = ∇ V is a zero-variance dynamics for (cid:101) ρ 1 := ρ 0 + ∆ V .
The
Proposition 3.1 is proved under the assumption that densities are positive smooth functions for convenience and it is straightforward to verify that it also holds if ρ 1 is an arbitrary smooth function in Proposition 3.1.
In particular, using the same argument in Appendix E.1 Step 2, we have for almost all x ∼ ρ 0 ,
[Equation]
Hence,
[Equation] [Equation]
Since we assumed Z 1 = 1 ,
[Equation]
E.4 Solution of Poisson’s equation (11) for Gaussian mixtures
Lemma E.6.
One solution of the Poisson’s equation ∆ V =
Ce − | x − µ
[Equation]
with d ≥ 2 on Ω = R d is
V ( x ) =
f ( | x − µ | ) , where the function f : R + → R has the derivative
[Equation]
where Γ (cid:0) a, x (cid:1) :
= (cid:82) x 0 t a − 1 e − t d t is the lower incomplete gamma function.
Proof.
Without loss of generality, let µ = 0 d .
Then a natural radial solution is given as V ( x ) =
f ( | x | ) for some scalar-valued function f .
The above Poisson’s equation becomes
[Equation]
By some straightforward computation,
[Equation]
Proposition E.7.
Suppose V solves the following Poisson’s equation on Ω = R d
[Equation]
where
[Equation]
and µ i ̸ = µ j if i ̸ = j .
Then one solution for the gradient flow dynamics b = ∇ V is given as
[Equation]
Proof.
We just need to apply the last lemma and the formula ∇ V ( x )
=
f ′ ( | x | )
| x | x if V ( x ) =
f ( | x | ) .
Proposition E.8.
Suppose b is given in (53) .
Then
[Equation]
otherwise .
The
[Table]
dynamics
[Table]
is continuous on the region R
[Table]
Proof.
If x = µ j , then
[Equation]
When σ i → 0 for all i ,we know Γ (cid:0) d/ 2 , | µ j − µ i | 2 2 σ
i
[Equation]
→ Γ( d/ 2) when i ̸
=
j and hence we have the above result.
Similarly, we can obtain the expression when x ̸ = µ j for any j .
E.5 Example: Poisson’s equation yields a zero-variance dynamics
The example for Figure 1 is
[Equation]
The periodic boundary condition in Proposition 3.1 helps to ease the technicalities in proving that the gradient dynamics b = ∇ V from solving the Poisson’s equation (11) is a zero-variance dynamics, by removing the effect from the boundary ∂ Ω .
The same conclusion, however, should hold if V solves the Poisson’s equation with Neumann boundary condition:
[Equation]
where n is the normal vector of the boundary ∂ Ω .
We consider the same model (54) and Ω = (0 , 1) 2 .
The potential V and flowlines of b = ∇ V are visualized in Figure 3 and we can numerically verify that A ( x )
=
Z 1 for almost all x ∈ Ω .
E.6 Non-uniqueness of zero-variance dynamics
Recall from Proposition 2.2 that there are certain degrees of freedom to choose the dynamics: for a given b 1 , if we choose b 2 = α b 1 where α ∈ C ∞ (Ω , R ) is strictly positive, then this function α can be absorbed into the time rescaling and it does not affect the variance of the sampling scheme.
However, even if we remove this parameterization redundancy, zero-variance dynamics may still not be unique, e.g., due to the geometric rotational symmetry.
Proposition E.9 (Non-uniqueness) .
For given ρ 0 and ρ 1 , there might exist more than one zerovariance dynamics (let us say b 1 , b 2 ) but there is no scalar-valued function α
such that b 2 = α b 1 .
Proof.
We construct an example to prove the non-uniqueness: let d = 2 , U 0 ( x ) =
| x | 2 / 2+ ln(2 π )
and U 1 be given by
[Equation]
We can easily verify that | x | e − x 4 < 34 e − x 2 / 2 for any x ∈ R .
Then we know 716 e − U 0 ( x ) <
e − U 1 ( x ) <
e − U 0 ( x ) .
Therefore, U 1 is clearly well-defined and Z 1 = 1 .
For the dynamics b ( x ) =
[ v 1 v 2 ] with v 21 + v 22 > 0 , we have J t ( x ) = 1 for any x ∈ Ω , t ∈ R , and
[Equation]
When either v 1 = 0 or v 2 = 0 , we can easily verify that
[Equation]
Therefore, the variance is zero for two dynamics with orthogonal directions b = [ 10 ] and b = [ 01 ] .
It is clear that there is no scalar-valued function α
such that b 2 = α b 1 , and thus the non-uniqueness is established.
E.7 Connection to the Beckmann’s problem.
The Poisson’s equation (11) with D = 1 is the Euler-Lagrange equation associated with
[Equation]
to
[Equation]
when p = 2 .
The variational problem in (56) is known as Beckman’s problem of continuous transportation [5]; when p = 1 , it is also related to optimal transport in W 1 Wasserstein distance [35, 36].
F Explicitly solvable zero-variance dynamics
In this section, we provide some examples with explicitly solvable zero-variance dynamics.
Throughout this section, we consider Ω = R d .
Dimension U 0 and Ub
Details d =arbitrary b ( x ) =
Section F. general d
U 0 ( x ) =
| x | 2 / 2+ d 2 ln(2 π )
U 1 ( x ) =
( x − ϖ ) T Σ − 1 ( x − ϖ ) /b
( x ) =
Λ x + v with Λ = ln (cid:0) Σ − 1 / 2 (cid:1) , v = − (cid:0) I d − Σ 1 / 2 (cid:1) − 1 ln (cid:0) Σ − 1 / 2 (cid:1) ϖ.
Section F. general
d ρ 0 and ρ 1 has the same marginal distribution on the orthogonal subspace of { cv : c ∈ R } b ( x ) =
v
Section F.
F.1 Some general properties
Given a b ∈ B and the distribution ρ 0 , we study the family of U 1 such that b is a zero-variance dynamics.
Given an ODE flow map X τ ( · ) based on the dynamics b , let us introduce
[Equation]
[Equation]
Then ρ ∝ e − U τ is the push-forward distribution of the flow map X τ ( · ) , i.e., ρ = (cid:0) X τ ( · ) (cid:1)
# ρ 0 .
The family of distributions that can be written as a linear combination of such pushforward distributions can be characterized by
[Equation]
We have:
Proposition F.1.
For every U 1 ∈ F , the variance Var ( b ) (if well-defined) is exactly zero, i.e., if the distribution ρ 1 ∝ e − U 1 is a linear combination of push-forward distributions by the ODE flows maps, then Z 1 can be estimated with zero-variance by the infinite-time NEIS scheme.
This proposition is proven in Section F.5 below.
In words it says that, if we can learn a perfect neural ODE such that ρ 1 = X τ ( · )# ρ 0 for some τ , then such a dynamics is also the optimal one (i.e., zero-variance dynamics) for the infinite-time NEIS scheme.
Conversely, if U / ∈ F , then is it still possible that Var ( b ) = 0 ?
The answer is positive:
Proposition F.2.
The exists a dynamics b ∈ B and a ρ 1 ∝ e − U 1 such that Z 1 can be computed with zero-variance but ρ 1 does not need to be a linear combination of (cid:8) X τ ( · )# ρ 0 (cid:9)
τ ∈ R (namely, U 1 / ∈ F ).
This proposition is proven in Section F.6 below.
F.2 Flows for the 1D case
Let us consider b = 1 .
Then we can compute Z 1 via the infinite-time NEIS scheme with zero-variance for arbitrary potentials U
and U 1 .
This could be verified via direct computation: J t ( x ) = 1 and
X t ( x ) = x + t for any t, x ∈ R , and thus for an arbitrary x ,
[Equation]
Therefore, the variance is exactly zero.
Another perspective to understand this comes from Proposition F.1.
For b = 1 , we know e − U
τ
( x ) =
e − U 0 ( x − τ ) in (57).
By Proposition F.1, if the potential U 1 can be expressed as follows
[Equation]
then Z 1 can be computed with zero-variance, where f is a tempered distribution and ∗ means the convolution.
Then it is sufficient to show the existence of such a f for a generic U 1 .
For a given potential U 1 , we can solve the above equation for f using Fourier transform; more specifically,
[Equation]
where F ( − 1) are (inverse)
Fourier transform.
F.3 Linear flows for Gaussian distributions
Proposition F.3.
Suppose U 0 ( x ) =
| x | 2 / 2+ d 2 ln(2 π ) and U 1 ( x ) =
( x − ϖ ) T Σ − 1 ( x − ϖ ) / 2 , where the covariance matrix Σ is non-degenerate.
A zero-variance linear dynamics is b ( x ) =
Λ x + v with Λ = ln (cid:16)
[Equation]
Before presenting detailed proofs, let us make a few remarks about zero-variance dynamics in (58):
• If we further let Σ = (1 − ϵ )
I d where ϵ ≪ 1 is an asymptotic parameter, then the above choice (58) can be approximated as follows:
[Equation]
The leading order dynamics dd t X t ( x ) ≈ − ϖ is consistent with the parallel velocity case below in Section F.4.
• For the above Gaussian case, the dynamics (58) can be regarded as the gradient flow dynamics of the following quadratic potential
[Equation]
Indeed, it
is not hard to guess that
the
optimal dynamics might have
a
linear form in
order to
transport Gaussians.
It is natural
to guess that b = −∇ U
or
b = −∇ ( U 1 − U 0 )
might be zero
-variance dynamics,
but it
could be verified that neither of
them are
zero-variance dynamics.
Proof of Proposition F.3.
Suppose we consider a family of linear dynamics
[Equation]
Then X t ( x ) =
e Λ t x + Λ − 1 (cid:0) e Λ t − I d (cid:1) v and ( ∇ · b )( x ) = tr(Λ) .
Therefore, U − τ defined in (57) has the following form for any τ ∈ R ,
[Equation]
By Proposition F.1, the variance is zero if
[Equation]
where C is some constant.
This condition can be simplified as
[Equation]
Thus, we just need to ensure
[Equation]
by matching the order of x and, more specifically, we can choose Λ and v as in (58)
[Equation]
F.4 Flows with parallel velocity
As we have mentioned
[Equation]
in the 1D case, the choice b = 1 gives a zero-variance estimator for the infinite-time NEIS scheme.
A straightforward generalization is to consider the following parallel velocity case
[Equation]
where v ∈ R d and α is a positive scalar-valued function.
Due to Proposition 2.2, it suffices to consider b ( x ) = v .
As we can always rotate the coordinate without affecting partition functions, without loss of generality
[Equation]
let us assume v = e 1 for simplicity
[Equation]
where e 1 is a vector with the first element to beand zeros otherwise.
For an arbitrary initial proposal x , only the first coordinate x 1 is changing under the dynamics b =
e 1 .
The estimator essentially works like the 1D case above:
[Equation]
, · · · , x d ) , where (cid:101) ρ k is the marginal distribution of ρ k for the subspace
R d − 1 by tracing out the first coordinate.
Therefore, the dynamics b = e 1 is a zero-variance dynamics iff (cid:101) ρ 0 = (cid:101) ρ 1 .
Proposition F.4.
Suppose b ( x ) =
α ( x ) v where α ∈ C ∞ ( R d , R ) with inf x ∈ Ω α ( x ) > 0 and v ∈ R d .
Such a dynamics b gives a zero-variance estimator iff ρ 0 and ρ 1 have the same marginal distribution on the orthogonal space of (cid:8) cv : c ∈ R (cid:9) .
F.5 Proof of Proposition F.
Lemma F.5.
Fix the potential U 0 and a dynamics b ∈ B .
If (cid:82)
[Equation]
a constant function for k ∈ { 2 , 3 } , then any mixture of U 2 and U 3 , given below, also ensures that
[Equation]
is a constant function, as long as U is a valid potential function:
[Equation]
Proof.
We can easily observe that
[Equation]
Lemma F.6.
For the distribution ρ 1 ∝ e − U τ + C , the partition function Z 1 can be computed with zero-variance.
Proof.
We only need to verify the case C = 0 .
Then
[Equation]
This means b is a zero-variance dynamics for the distribution ρ 1 .
Proof of Proposition F.1.
Combine the above two lemmas.
F.6 Proof of Proposition F
Consider a 2D example with U 0 ( x ) =
| x | 2 2 + ln(2 π ) and b = [ 10 ] .
Then J t ( x ) = 1 , and U τ ( x ) =
( x 1 − τ ) 2 + x 22+ ln(2 π )
where x = [ x 1 x 2 ] .
Let us consider
[Equation]
where ϵ := 12 π (cid:0) 2 sup y ∈ R | y | e − y 4 +( y − 1) 2 / 2 sup y ∈ R e − y
+ y 2 / 2 (cid:1) − 1 > 0 .
It could be straightforwardly verified that U 1 is a well-defined potential and (cid:90) ∞
[Equation]
The last equality holds by Lemma F.6.
Therefore, b is a zero-variance dynamics for ρ 0 and ρ 1 .
However, U 1 / ∈ F because (cid:82) ∞
−∞ f ( τ ) e − U τ ( x ) d τ must be a separable function, whereas U 1 is not.
G Proof of Proposition 3.2 and more discussions G.1 Proof of Proposition 3.
We proceed in three steps:
Step 1: Let us first assume the existence of κ ∈ C 1 ( D, R ) satisfying (14), where D is an open subset of Ω and Ω \ D has measure zero.
We shall verify that T # ρ
= ρ 1 almost everywhere.
From (14), let us replace x by X ϵ ( x ) ,
[Equation]
By straightforward simplification,
[Equation]
By taking the derivative with respect to ϵ at ϵ = 0 ,
[Equation]
To show that T # ρ 0 = ρ 1 , we need to verify that ρ 0 ( x ) = ρ 1 ( T ( x ))
J T ( x ) where J T ( x ) =
(cid:12)(cid:12) det (cid:0) ∇ x
X κ ( x ) ( x ) (cid:1)(cid:12)(cid:12) .
Therefore, it remains to prove that
[Equation]
By the direct computation,
[Equation]
By the matrix determinant lemma,
[Equation]
where we used (40) and Lemma D.6 to get the second line.
The last equation verifies (59) and therefore, T # ρ
=
ρ 1 almost everywhere.
Step 2: We shall explain D and establish the existence of κ ∈ C 1 ( D, R ) .
Suppose we denote the local minima of V as X 1 , X 2 , · · · , X a , and local maxima of V as Y 1 , Y 2 , · · · , Y b , where a, b ∈ N .
Then in the proof of Proposition 3.1, we have already mentioned that
[Equation]
is an open subset of ℧ ( b ) and Ω \ D has measure zero, due to the assumption that V is a Morse function.
Consider the following function L ( x, t ) :
D × R → R , defined as
[Equation]
We can observe that
[Equation] [Equation]
where the second equality comes from the fact that b = ∇ V is a zero-variance dynamics; see e.g., (12).
• With fixed x , the function t → L ( x, t ) is continuously differentiable and is strictly monotonically decreasing.
These imply that for each x ∈ D , there exists a unique κ ( x ) such that L (cid:0) x, κ ( x ) (cid:1) = 0 by the intermediate value theorem.
Therefore, κ is well-defined via (14).
Next, we need to prove that such a function κ ∈ C 1 ( D, R ) , which can be immediately obtained by the implicit function theorem [34], provided that we can prove L ∈ C 1 ( D × R , R ) .
Due to the smoothness assumption on ρ 0 and ρ 1 , it is clear that ∂ t L ( x, t ) =
− ρ 1 ( X t ( x ))
J t ( x ) < 0 exists and is continuous.
Therefore, the task becomes to prove that ∇ x L ( x, t ) exists and is continuous.
Since it is clear that (cid:82)
t 0 ρ 1 ( X s (
x
J s ( x d s is continuously differentiable with respect to x , it is then sufficient to prove that
[Equation]
is
continuously differentiable for
k ∈ {
Step 3: Prove that G k ∈ C 1 ( D, R ) .
In Appendix E.1, we have proved that G k is continuous; see Lemma E.4 in particular.
Next, we first verify that G k is differentiable and then verify that ∇ G k is also continuous.
Part 1: G k is differentiable.
We want to verify that G k is differentiable and in particular
[Equation]
Let us consider an arbitrary x ∈ D .
Without loss of generality, suppose its limit in the backward branch is X 1 =
lim t →−∞ X t ( x ) .
Let us focus on a local neighborhood
B δ ( x ) such that lim t →−∞ X t ( z ) =
X 1 for all z ∈ B
δ ( x ) .
Such a small δ exists because X 1 is a strict local minimum and b = ∇ V is smooth from the assumption that V is a Morse function.
In order to verify that
G k is differentiable (i.e., (60)), by the Leibniz rule (see e.g., [18, Theorem 6.28]), it is sufficient to prove that there exists an integrable function Q : ( −∞ , 0]
→ R such that
[Equation]
By direct computation,
[Equation]
Since the domain Ω is assumed to be a torus, we know ρ k , ∇ U k and ∇ ( ∇ · b ) are uniformly bounded on the domain Ω .
Therefore,
[Equation]
Recall from (5) and (40)
that
[Equation]
Recall that X s ( z ) →
X 1 as s → −∞ ; the value ∇ · b ( X 1 ) and the hessian matrix ∇ b ( X 1 ) are both strictly positive, which imply that J s ( x ) and ∥ C s, 0 ( z ) ∥ are both decaying as s → −∞ .
Let us denote υ > 0 as the smallest eigenvalue of ∇ b ( X 1 ) .
For a given ϵ with 0 < ϵ < min (cid:8) ∇ · b ( X 1 ) , υ (cid:9) , let us define
[Equation]
which is an open neighborhood of X 1 .
We can find a subset of E , denoted as E trap , such that E trap is a trapping region of the dynamics b for the backward branch.
Thus we can find a negative time τ (which possibly depends on ϵ ) such that X s ( x ) ∈ E trap for all s ≤ τ .
If we choose a δ small enough, then we can even ensure that
[Equation]
due to the smoothness of b and the construction that E 1 is a trapping region.
Therefore, when s ≤ τ ,
J s ( z ) decays to zero exponentially fast as s → −∞ with a rate at least ∇ · b ( X 1 ) − ϵ ; similarly, the matrix norm ∥ C s, 0 ( z ) ∥ also decays to zero exponentially fast as s → −∞ with a rate at least υ − ϵ .
Therefore, on the region ( −∞ , 0] × B δ ( x ) , we can readily obtain
[Equation]
By plugging the above estimates into (63)
[Equation]
we know that
[Equation]
The function e (cid:0) ∇· b ( X 1 ) − ϵ (cid:1) s is integrable on ( −∞ , 0] and this serves as the function Q needed in (61) with some multiplicative constant.
Part 2: ∇ G k is continuous.
Let us denote H ( z, s ) :
= ∇ z (cid:0) ρ k
( X s ( z ))
J s ( z ) (cid:1) .
From (62), we can observe that ∇ z H
( z, s ) is continuous with respect to z with
[Equation]
Lemma G.1.
For a given smooth vector field W ∈ C ∞ (Ω , R d ) , there exists a constant C such that for any z ∈ B δ ( x ) and s ∈ ( −∞ , 0] , we have
[Equation]
By this lemma and the estimates in (66),
[Equation]
which readily leads into the continuity of ∇ G k based on (60)
[Equation]
Part 3: Proof of Lemma G.
By direct computation
[Equation]
Since W is assumed to be smooth on the torus Ω
[Equation]
we know W and ∇ W are uniformly bounded.
Besides, previously
[Equation]
we know that ∥ C s, 0 ( z ) ∥ ≲ e (cid:0)
[Equation]
s .
Therefore
[Equation]
we only need to prove that for any 1 ≤ ℓ ≤ d ,
[Equation]
From (41)
[Equation]
we have
[Equation]
Since ∥ C s, 0 ( z ) ∥ ≲ e ( υ − ϵ ) s from (65), the source term ∥ S ( s, z ) ∥ also decays exponentially fast with rate 2( υ − ϵ ) as s → −∞ , namely,
[Equation]
By rewriting (68) in the integral form and by (40), we have
[Equation]
To prove Lemma G.1, we only need to consider the case s ≪ 0 .
Suppose we consider s ≤ τ only; recall the role of τ in (64).
Then we could obtain that when s ≤ r ≤ τ
[Equation]
where exp T → is the anti-chronological time-ordered operator exponential.
We can separate the above integral form using τ and obtain the following estimates: when s ≤ τ ,
[Equation]
( z
[Equation]
[Equation]
r (cid:13)(cid:13)(cid:13)(cid:13) ≤
[Equation]
[Equation]
(cid:13)(cid:13)(cid:13)
[Equation]
z
[Equation]
z
[Equation]
( r
[Equation]
z ) (cid:13)(cid:13)(cid:13) d r
[Equation]
[Equation]
[Equation]
(cid:124) (cid:123)(cid:122) (cid:125)
[Equation]
(65) (cid:90)
[Equation]
(cid:13) (cid:13)(cid:13) (cid:0) C r
[Equation]
( z ) (cid:1)
[Equation]
(cid:13) (cid:13)(cid:13) (cid:124) (cid:123)(cid:122) (cid:125)
[Equation]
O (1) · ∥
[Equation]
( r
[Equation]
z ) ∥ (cid:124) (cid:123)(cid:122) (cid:125) use (69) d r
[Equation]
[Equation]
This verifies (67) for any z ∈ B δ ( x ) and s ≤ τ .
When s ∈ [ − τ, 0] , we can simply choose the prefactor large enough so that (67) holds, as τ is a finite value.
Hence, Lemma G.1 is verified.
G.2 Examples
We elaborate on Proposition 3.2 by concrete examples.
For these examples, we estimate κ from (14) either analytically or numerically, and then we validate Proposition 3.2 by comparing ρ 1 and the empirical distribution of X κ ( x ) ( x ) where x ∼ ρ 0 .
G.
Gaussian examples in 1D
For the case U 0 ( x ) =
| x | 2 2 + 12 ln(2 π ) and U 1 ( x ) =
| x − ω | 2 2 σwith σ < 1 , from Table 1, we already know that a zero-variance dynamics is b ( x ) = x − ω 1 − σ .
Then X t ( x ) =
e t x − ( e t − 1) ω 1 − σ for any t, x ∈ R and J t ( x ) =
e t for any t ∈ R .
By direct computation
[Equation]
By solving κ in (14) using the last equation, we have
[Equation]
[Equation]
which is independent of the state x .
G.2.2 Three-mode mixture on a 2D torus
We consider the model (54) on the torus Ω =
[0 , 1] 2 and recall that the zero-variance dynamics has been shown in Figure 1.
Then the contour plot of κ is visualized in Figure 5.
Moreover, in the same figure, the empirical distributions of X κ ( x ) ( x ) and contour plots of ρ 1 are provided, which numerically verifies Proposition 3.2.
G.2.3 An example on (0 , 1) 2 with Neumann boundary condition
We consider the model
[Equation]
on the domain Ω = (0 , 1) 2 and the potential V automatically solves the Poisson’s equation with
Neumann boundary condition (see (55)) by the above construction.
Apart from verifying
that b = ∇ V is a zero-variance dynamics numerically, we can also observe that Proposition 3.2 holds in this case; see Figure 6.
H Proof of Proposition 4.
Below is the full version of Proposition 4.1.
Proposition H.1 (Local minimum) .
Assume that
[Figure]
(i) (Local minimum).
b ∈ B ∞ is a (non-trivial) local minimum of Var, namely, Var ( b ) <
Var (max) and if there is a perturbation δ b ∈ C ∞ c (Ω , R d ) such that b + ϵδ b ∈ B ∞ for sufficiently small ϵ , then Var ( b +
ϵδ b ) ≥ Var ( b ) .
(ii) (Continuity assumption).
The functional derivative δ Var ( b ) δ b is continuous and δ Var ( b ) δ b =
d on Ω .
In particular, ∇A exists and is continuous on Ω .
(iii) (Technical assumptions).
℧
( b ) =
Ω (see Definition A.4) and the set of b -unstable points (see Definition A.8) has Lebesgue measure zero.
Moreover, the set (cid:8) x ∈ Ω : ∇ ( U 1 − U 0 )( x ) =
d (cid:9) has Lebesgue measure zero.
Then b is a zero-variance dynamics for the infinite-time NEIS scheme, i.e., Var ( b ) = 0 .
Recall the formula of δ Var ( b ) δ b from (38): δ Var
[Equation]
b )
[Equation]
Here is a sketch of the main idea behind the proof.
If ∇A =
d on the domain Ω , then A is a constant function.
Hence, b provides a zero-variance estimator for the infinite-time NEIS scheme and it must be a global minimum of the functional Var as well.
If the other term (cid:82) ∞ 0 F (0) t ( x ) d t (cid:82)
−∞ F (1) t ( x ) d t −
[Figure]
(cid:82)
−∞ F (0) t ( x ) d t (cid:82) ∞ 0 F (1) t (
d t = equivalent to ⟨∇ ( U 1 − U 0 )( x ) , b ( x ) ⟩ = 0 (
H. and should not be optimal, is to the gradient of potential difference and b does not explore the local structure (cf.
Proposition H.3).
This intuition leads into the following idea: if b is a local minimum of Var, then we should only have ∇A =
d almost everywhere on Ω ; otherwise, we should be able to perturb b so that the dynamics b can better explore the landscapes of
U 0 and U 1 and the variance can be further reduced; see Proposition H.6.
Remark H.2 .
As we work on the domain Ω only, we shall consider the topological space for the domain Ω instead of R d from now on.
H.1 A characterization of the global maximum
Proposition H.3.
If the dynamics b ∈ B ∞ , then
[Equation]
Var (max) .
The equality can be achieved iff
[Equation]
Proof.
We only need to prove that M ( b ) ≤ E ρ
[ e − 2( U 1 − U 0 ) ] and the equality is achieved iff (73) holds.
By Jensen’s inequality,
[Equation]
By taking the expectation E x ∼ ρ 0 (cid:2) · (cid:3) for both sides and by (10) for new potentials (cid:101) U 1 = 2 U 1 − Uand (cid:101) U
= U 0 , we immediately have the inequality:
[Equation]
Next in order to achieve the equality, we need the equality to hold in the above Jensen’s inequality:
[Equation]
constant function .
By taking derivative with respect to t , we immediately know that
[Equation]
ρ
[Equation]
almost surely .
By the continuity assumption on U 1 , U 0 and b , we obtain (73).
Conversely, when (73) holds,
[Equation]
Hence, U 1 (cid:0) X t ( x ) (cid:1) − U 0 (cid:0) X t ( x ) (cid:1) =
U 1 ( x ) − U 0 ( x ) for any t ∈ R .
Then (cid:82)
[Equation]
Hence, the equality in (72) holds under the condition (73).
H.2 Some observations about the functional derivative
We need some simplified understanding of the condition (cid:82) ∞
[Equation]
d t
[Equation]
F
[Equation]
1) t
[Equation]
x )
[Equation]
t = (cid:82)
−∞ F (0) t ( x ) d t (cid:82) ∞ 0 F (1) t ( x ) d t arising from δ Var ( b ) δ b = 0 d , which are presented in the following two lemmas.
Lemma H.4.
[Equation]
∞
[Equation] [Equation]
[Equation]
F
[Equation]
( x ) d
[Equation]
=
[Equation]
F
[Equation]
( x
[Equation]
d t
[Equation]
∞ 0 F (1) t ( x ) d t is equivalent to
[Equation]
Proof.
[Equation]
The following result provides a simplified characterization of the equality (74).
Lemma H.5.
(i) Suppose the condition in (74) holds for any x in an open set D .
Then
[Equation]
(ii) Conversely, if (75) holds for D = Ω , then b is a global maximum of M (as well as Var).
Proof.
The part (ii) immediately follows from Proposition H.3.
Next we prove the part (i).
From previous results, the condition is that
[Equation]
After replacing x by X s ( x ) ∈ D in the above equation and by (25), we have
[Equation]
where τ + D ( x ) and τ − D ( x ) defined in (23) are hitting times for the forward and backward branches to the boundary of D .
Note that the right hand side of the last equation depends on s , whereas the left hand side does not.
Let us take the derivative with respect to s and with straightforward simplifications, we obtain
[Equation]
By (6), we know exp (cid:16) U 0 (cid:0)
X s ( x ) (cid:1) − U 1 (cid:0) X s ( x ) (cid:1)(cid:17) =
A ( x ) .
Again, the left hand side depends on s whereas the right hand side does not.
So we take the derivative with respect to s again and obtain (cid:10) ∇ ( U 1 − U 0 ) (cid:0)
X s ( x ) (cid:1) , b (cid:0) X
s ( x ) (cid:1)(cid:11) =
0 for any x ∈ D and s ∈ (cid:0) τ − D ( x ) , τ
+ D ( x ) (cid:1) .
Then (75) follows immediately by choosing s = 0 .
H.3 A weaker version
Lemma H.5 leads into the following intuition: if there is a certain open subset D in which ⟨∇ ( U 1 −
U 0 ) , b ⟩ = 0 , then such a dynamics b should not be a local minimum of Var, because such a b cannot explored the landscape structure of U 1 on D .
This intuition is more rigorously formulated in the following proposition.
Proposition H.6.
Consider a dynamics b ∈ B ∞ .
Suppose D ⊂ ℧ ( b ) is nonempty and open.
Let
K :=
Ω \ D .
Assume that
(i) For any x ∈ D , we have ⟨ b ( x ) , ∇ ( U 1 − U 0 )
( x ) ⟩ = 0 .
(ii) For any t ∈ R and x ∈ D , we have X t ( x ) / ∈ K ◦ , i.e., trajectories from D are confined inside D .
(iii)
There exists a b -stable point x ⋆ ∈ D such that ∇ ( U 1 − U 0 )
( x ⋆ ) ̸
= 0 d .
Then such a dynamics b must not be a local minimum of the second moment M (as well as the variance).
Proof.
We proceed in two steps.
Step (I): The first goal is to find a smooth function
δ b ∈ C ∞ c ( D, R d ) and ϵ 0 > 0 such that ρ 0 ( E ) > 0 where E := (cid:8) x ∈ D
[Equation]
( x
[Equation]
∇
[Equation]
x
[Equation]
⊂ supp
[Equation]
b
[Equation]
(cid:0)
[Equation]
(cid:1) > 0 .
[Equation]
76c
[Equation]
By the assumption (iii) of this proposition and Proposition A.10, we know there is an open ball
B λ ( x ⋆ ) ⊂ D such that for any δ b ∈ C ∞ c (cid:0) B λ ( x ⋆ ) , R d (cid:1) , b + ϵδ b ∈ B ∞ for small enough ϵ and thus (76b) is satisfied.
It is clear that we can easily choose λ small enough so that (76c) holds.
Next, the task is to find a smooth function δ b supported on B λ ( x ⋆ ) such that (76a) holds.
Since ∇ ( U 1 − U 0 )( x ⋆ ) ̸ = 0 d
and U 0 , U 1 are assumed to be smooth, we can choose λ small enough such that
[Equation] [Equation]
It is well-known that
[Equation]
if | x | ≥
[Equation]
is a smooth function compactly supported on B 1 (0) .
Then let us consider
[Equation]
where λ 1 ∈ (0 , λ )
[Equation]
It is clear that δ b 1 is compactly supported on B λ 1 ( x ⋆ )
⊂
B λ ( x ⋆ ) and for any x ∈ B λ 1 ( x ⋆ ) , we have ⟨ δ b 1 ( x ) , ∇ ( U 1 − U 0 )
( x ) ⟩ >
so that (76a) clearly holds.
Next, we still need to further smooth out δ b 1 (see e.g., Appendix C of [11]) by introducing
[Equation]
where φ ε ( x ) :
=
1 ε d φ ( x/ε ) .
Note that we can easily extend δ b 1 to R d by letting δ b 1 = 0 d outside of
B λ 1 ( x ⋆ ) so that δ b 1 can be well-defined on R d .
By choosing 0 < ε < λ − λ 1 , we can ensure that the smooth function δ b 2 is compactly supported on B λ ( x ⋆ ) .
It is also not hard to show that (76a) still holds for δ b 2 : for any x ∈ B λ 1 ( x ⋆ ) ,
[Equation]
In summary, δ b 2 constructed above satisfies all requirements.
Step (II): We prove that b is not a local minimum by showing that M ( b + ϵδ b ) < M ( b ) for any ϵ ∈ (0 , ϵ 0 ) , where δ b satisfies all conditions in the Step (I).
By the construction of δ b , we know b
ϵ :=
b + ϵδ b does not change the velocity field at ∂D , and therefore, X ϵt ( x ) / ∈ K ◦ for any x ∈ D still holds for the dynamics
b ϵ i.e., trajectories from D do not enter K ◦ .
As an immediately consequence, trajectories t → X ϵt ( x ) with x ∈ K ◦ will not enter D (as ODE trajectories are reversible).
The slightly technical part is to consider trajectories t
→ X ϵt ( x ) with x ∈ ∂D ≡ ∂K , where the trajectory t → X ϵt ( x ) evolves under the dynamics b ϵ .
Let us consider two disjoint sets:
[Equation]
By such a construction, we can observe that for any trajectory t → X ϵt ( x ) with x ∈ (cid:101) K (or x ∈ (cid:101) D ), it must remain inside (cid:101) K (or (cid:101) D ).
In other words, the flows within (cid:101) D and (cid:101) K are completely separated from each other.
Moreover, because δ b is only supported on E ⊂ D which is completely inside D by (76c), we know the above definitions of these two sets (cid:101) D and (cid:101) K are independent of ϵ ∈ [0 , ϵ 0 ) .
Let us use A to denote the function defined in (24) corresponding to the dynamics b and use A ϵ to denote the one corresponding to the perturbed dynamics b ϵ .
Recall the assumption (i) that ⟨ b ( x ) , ∇ ( U 1 − U 0 )( x ) ⟩ = 0 for all x ∈ D .
By the fact that ∂D = ∂K , and by the continuity of b , ∇ U 0 , and ∇ U 1 , we know
[Equation]
For any trajectory t → X t ( x ) with x ∈ (cid:101) D , we can easily show that e − ( U 1 − U 0 ) (cid:0) X t ( x ) (cid:1) =
e − ( U 1 − U 0 )( x ) for all t ∈ R , and thus we have A ( x ) =
e − ( U 1 − U 0 )( x ) for any x ∈ (cid:101) D (the same calculation, in fact, has been shown in the proof of Proposition H.3).
Hence,
[Equation]
where χ A ( · ) is an indicator function for a set A .
Next we consider the trajectory t → X ϵt ( x ) with x ∈ (cid:101) K .
Since such a trajectory never enters (cid:101) D ⊃ D and b ϵ =
b on Ω \ D , we know X
ϵt ( x ) =
X t ( x ) for any t ∈ R and x ∈ (cid:101) K , and thus A =
A ϵ on (cid:101) K for any ϵ ∈ [0 , ϵ 0 ) .
Hence, E
[Equation]
By the same argument as in Proposition H.3 (by treating (cid:101) D as the domain),
[Equation]
where the equality is achieved only if ⟨ b ϵ , ∇ ( U 1 − U 0 ) ⟩ = 0 on (cid:101) D .
Note that on (cid:101) D ,
[Equation]
However, due to the fact that ⟨ δ b , ∇ ( U 1 − U 0 ) ⟩ ̸ = 0 for some open subset of D with strictly positive ρ 0 -measure (as constructed in the Step (I)), the equality M ( b ϵ ) =
M ( b ) cannot be achieved and thus
[Equation]
Since we can find a local perturbation δ b such that M ( b ϵ ) < M ( b ) for any ϵ ∈ (0 , ϵ 0 ) , then b must not be a local minimum of M .
H.4 Proof of Proposition H.
By Proposition D.1, we know either
[Equation]
Define
[Equation]
which is a closed subset of Ω by the continuity assumption on ∇A .
Hence, D :=
Ω \ K is open and by Lemma
H.5 (i)
, we know ⟨ b , ∇ ( U 1 − U 0 ) ⟩ = 0 on D .
Here are a few cases to discuss.
Case (I) : K ◦ = ∅ .
If K ◦ = ∅ , then we claim that b must be a global maximum and this contradicts with the assumption that Var ( b ) <
Var (max) .
It is not hard to observe that K ◦ = ∅ implies that D = Ω .
By continuity, we know ⟨ b , ∇ ( U 1 − U 0 ) ⟩ = 0 on D = Ω .
Then by Lemma H.5 part (ii), b must be a global maximum.
Case (II) : D = ∅ .
If D = ∅ (i.e., K = Ω ), then it is clear that A is a constant function, and thus the variance Var ( b ) = 0 .
This means b is a zero-variance dynamics.
Case (III) : K ◦ ̸ = ∅ and D ̸ = ∅
In order to use Proposition H.6, we need to deal with the case that some trajectories t → X t ( x ) for x ∈ D might enter K ◦ .
Let us introduce
[Equation]
which essentially contains all points in D whose trajectories enter K ◦ at some time.
We can easily show that S is open: because b is assumed to be smooth, the trajectories are continuous under a small perturbation for initial states.
Then the new disjoint sub-regions to consider are (cid:101) K :
=
K ◦ ∪ S and (cid:101) D :=
Ω \ (cid:101) K .
We collect some facts for clarity:
• (cid:101) K ◦ =
K ◦ ∪ S ̸ = ∅ ; • (cid:101) D ⊂ D , which immediately implies that ⟨ b , ∇ ( U 1 − U 0 ) ⟩ = 0 on (cid:101) D .
• If x ∈ (cid:101)
D , then X t ( x ) must not enter (cid:101) K ◦ .
Indeed, if not, then we have either t → X t ( x ) entering
K ◦ (which contradicts with x / ∈ S ), or X t ( x ) entering S (which still means X t ( x ) will enter
K ◦ due to the reversibility of deterministic trajectories).
We need to discuss two cases:
(a) Firstly, let us consider (cid:101)
D = ∅ , i.e., (cid:101) K = Ω and thus (cid:101) K ◦
=
Ω by the assumption that Ω is open in the topology of the space R d .
The connectivity granted by the definition of S in (77) implies that we can divide (cid:101) K ◦ into a countable number of sub-regions on which the function A is a constant.
More specifically, for x ∈ Ω , define
[Equation]
Obviously, x ∈ R x .
By the invariance of A under the dynamical flow (see (26)) and the definition of S (77), we have ∪ x ∈ K ◦ R x ⊃ (cid:101) K ◦ =
Ω , which implies
that ∪ x ∈ K ◦ R x = Ω . • Suppose x, y ∈ K ◦ and R x ∩ R y ̸
= ∅ , then there exists a z ∈ R x ∩ R y such that z connects to both x and y via a continuous path and thus A ( x ) =
A ( z ) =
A ( y ) .
It is then clear that R x =
R y via treating z as a bridge.
Therefore, ∪ x ∈ K ◦ R x can be simplified as ∪ x ∈ E R x where { R x } x ∈ E are disjoint and E ⊂ K ◦ .
• Next, we can show that E is countable.
Since K ◦ is open and ∇A ( x ) =
d on K , we can easily verify that for each x ∈ K ◦ , there exists a local neighbor B
δ ( x ) ⊂ R x and due to the fact that Q d is dense and countable, E is at most countable.
To summarize, we have
[Equation]
where { R x } x ∈ E are disjoint and E is countable.
As A is a constant function on R x by the definition of R ( · ) , A is a step function on Ω .
By the continuity of A from the assumption, and also Ω is a connected open domain, we readily know A must be a constant function on Ω instead, and such a b must be a zero-variance dynamics.
(b) Next, let us consider the case (cid:101) D ̸ = ∅ .
By the assumption that ∇ ( U 1 − U 0 ) =
d only on a set with Lebesgue measure zero, we know there must exist y ∈ (cid:101) D such that ∇ ( U 1 − U 0 )
( y ) ̸ = 0 d .
By the assumption that b -unstable points has Lebesgue measure zero, there must exist a b -stable point x ⋆ (around y ) such that ∇ ( U 1 − U 1 )( x ⋆ ) ̸ = 0 d .
Then Proposition H.6 tells us that b must not be a local minimum, which contradicts with the assumption.
I Supplementary material for numerical experiments I.1 Details about AIS.
For AIS method, we use equally-spaced temperature distribution, i.e., π k ∝ ρ 1 − β kρ β k 1 , where β k = k/K for 0 ≤ k ≤ K ; for each transition step, we use Metropolis-adjusted Langevin algorithm with time step 0 .
1 to generate the chain.
More specifically, suppose M j ( · , · ) is a transition kernel which leaves π j invariant, then
[Equation]
(78) where x j ∼ M j ( x j − 1 , · ) and x 0 ∼ ρ 0 [26, 2].
To implement such a transition kernel, we use
Metropolis-adjusted Langevin algorithm: suppose τ (which is chosen as 0 .
1 as a prescribed parameter) is the time step, then let (cid:101) x
j := x j − 1 + τ ∇ log π j ( x j − 1 ) + √ 2 τξ j , where ξ j are i.i.d.
d -dimensional standard normal random variables; the state (cid:101) x
j is accepted with a rate
[Equation] [Equation]
q ( (cid:101) x
j | x j − 1 ) (cid:111) , where q ( x ′ | x ) = exp (cid:0) − 14 τ | x ′ − x − τ ∇ log π j ( x ) | 2 (cid:1) coming from the transition probability for the Langevin step.
For each j , inside the Metropolis-Hasting correction term, we need 2 queries to ∇ U 1 (i.e., ∇ U 1 ( x j − 1 ) and ∇ U 1 ( (cid:101)
x j ) hidden inside the computation of ∇ log π j for the acceptance rate), and we need two queries to U 1 when computing U 1 ( x j − 1 ) (inside (78) and π j ( x j − 1 ) ) and U 1 ( (cid:101) x j ) (inside π j ( (cid:101) x j ) ).
I.2 More implementation details
Neural network architecture.
We use the following ℓ -layer neural network [10, 31] to parameterize the dynamics b : Ω → R d during training:
[Equation]
where ℓ is the layer depth (one output layer and ℓ − 1 hidden layers), f j ( · )
=
η ( W j ( · ) + b j ) for j = 1 , 2 , · · · , ℓ − 1 , η is the activation function, W j ∈ R n j × R n j +1 , b j ∈ R n j +1 for j = 1 , 2 , · · · , ℓ .
When we choose n j = m for all 2 ≤ j ≤ ℓ , we refer such a neural network as ( ℓ, m ) -architecture which is mentioned in Section 5.
More specifically, let us take ℓ = 2 as an example: an ( ℓ, m ) =
(2 , m ) architecture for a generic ansatz for b : Ω → R d refers to the following parameterization
[Equation]
where weights W 1 ∈ R
d
× R m , W 2 ∈ R m × R d and bias vectors
[Equation]
, b 2 ∈ R d .
For the gradient-form ansatz, as we essentially need to parameterize a potential V : Ω → R , the ( ℓ, m ) -architecture for V refers to the following choice when ℓ = 2 ,
[Equation]
where W 2 ∈ R m × R , W 1 ∈ R
d
× R m , b 1 ∈ R m .
The bias vector in the output layer is chosen as zero (i.e., b 2 = 0 ) because b 2 is a redundant parameter after taking the gradient.
The dynamics b in the gradient form refers to b = ∇ V .
Initialization and trial repetition.
When we parameterize the flow via neural networks, weights and biases in the neural network are randomly generated.
Therefore we consider two (or three) independent trials (associated with different random initializations of b ) for the same neural network architecture characterized by a pair ( ℓ, m ) .
Optimization algorithm.
We use the SGD algorithm to optimize parameters for b .
The Armijo line search algorithm (see e.g. [3, 44]) can used to find the learning rate; in practice, we notice that solving
[Equation]
− ,t + ( b ϑ ) | with a relatively large learning rate also works well for numerical examples considered in Section 6, and it is used for training in Section 6; ϑ are trainable parameters and b ϑ is the flow parameterized by ϑ .
The way to approximate the loss function M t − ,t + ( b ) ≡ E 0 (cid:2) |A
t − ,t + | 2 (cid:3) (see Section 4) and in particular its gradient with respect to parameters in b will be explained in
Appendix I.3 and I.4.
I.3 An integration-based forward propagation method to compute the estimator and its gradient
To estimate A t − ,t + ( x ) in (8) with t + = t − +1 and t − ∈ [ − 1 , 0] , the most straightforward approach is to compute F ( k ) t ( x ) at time grid points and then employ some integration scheme like the trapezoidal quadrature method.
More specifically, we first discretize the time interval [ − 1 , 1] by 2 N t + 1 equally-spaced points t m :
= 1 N t m where − N t ≤ m ≤ N t .
Then we use classical ODE integration schemes (we use
RK4) to propagate the dynamics X t ( x ) both forward and backward in time to estimate the following quantities:
[Equation]
Then
[Equation]
where
[Equation]
is the trapezoidal quadrature scheme.
Then similarly, we can use the trapezoidal quadrature scheme to estimate (cid:82) t j − t − t j − t + F (0) s ( x ) d s given the values F (0) t m ( x ) for − N t ≤ m ≤ N t and the time t j with t j ∈ [ t − , t + ] .
After we have approximated values for
F (1) tj ( x ) (cid:82) tj − t − tj − t + F (0) s ( x )d s , the trapezoidal quadrature scheme is utilized again to approximate A t − ,t + ( x ) .
The computational cost is mostly dominated by the ODE integration, e.g., propagating X t ( x ) or evaluating ∇ · b ( X s ( x )) in general.
Therefore, this straightforward integration-based method has linear computational cost with respect to N t and is thus expected to be optimal.
Using the same principle, we can estimate the gradient of the second moment with respect to parameters in the dynamics (see (34)) during the training.
I.4 An ODE-based forward propagation method to compute the estimator and its gradient for t − = 0 , t + =
To simplify notations, let us introduce
[Equation]
, and thus, A t
[Equation] [Equation]
x
[Equation]
) which implicitly depends on b .
Let us denote α t ( x
[Equation]
:=
[Equation]
F
[Equation]
B
[Equation]
I.4.1 ODE dynamics to compute the estimator
Then the estimator A 0 , 1 is simply α 1 ( x ) .
To compute A 0 , 1 , we simply need to run the following
ODE:
[Equation]
where X lag t ( x ) :
=
X t − 1 ( x ) and J lag t ( x ) :
=
J t − 1 ( x ) .
Moreover, in order to obtain the initial condition
[Equation]
we shall run the dynamics backward in time
[Equation]
i
[Equation]
e., simulating the following ODE on [0 , 1] ,
[Equation]
where the superscript R means the reversed process.
As a remark, the auxiliary backward ODE (81) has dimension d + 2 and the ODE (80) has dimension 2 d + 4 .
I.4.2 ODE dynamics to compute the gradient
Denote ϑ as a vector containing parameters in b and let N p be the number of parameters.
In what follows, we also vectorize all quantities involving ϑ , e.g., for each parameter ϑ j , there is a corresponding Y ( j ) t ( x ) in (36) and we simply use the notation Y t ( x ) to be a matrix whose j th column is Y jt ( x ) to save notations; the same convention applies to other quantities.
Next
[Equation]
we shall similarly re-write the expression ∇ ϑ A 0 , 1 (implicitly given in ∇ ϑ M 0 , 1 ( b ) (34)) in terms of outputs from an ODE.
Using the same idea, let us introduce
[Equation]
and then we can rewrite quantities involved inside ∇ ϑ M 0 , 1 ( b ) as follows:
[Equation]
d
[Equation]

[Equation]
d
[Equation]
d d t H
[Equation]
( x )
[Equation]
d d t
[Equation] [Equation]
x
[Equation] [Equation]
d d t L
[Equation]
t ( x )
[Equation]
ϑ
[Equation]
x · b
[Equation]
[Equation]
d d t
[Equation]
t ( x
[Equation]
d d t Y
[Equation]
t ( x )
[Equation]
(cid:0)
[Equation]
where the initial conditions come from solving an auxiliary backward equation on [0 , 1] , given as follows:
[Equation]
As a remark
[Equation]
we combine the auxiliary states Y t ( x ) for all parameters together
[Equation]
so that all three terms
Y t ( x ) , Y lag t ( x ) , Y Rt
( x ) have the dimension d × N p .
Below is a table that summarizes the dimension of all components.
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
) , X lag t ( x ) , X Rt ( x ) d
D t ( x ) , g t ( x ) , H t ( x ) , H lag t ( x ) , L t ( x ) , L lag t ( x ) , g Rt ( x ) , L Rt ( x ) , H
Rt
( x )
N p
Y t ( x ) , Y lag t ( x ) , Y Rt ( x )
d × N p
In the end, the outputs we need are
A 0 ,
[Equation]
x
[Equation]
so that
[Equation]
I.5 A discussion on the backward propagation for differentiation
In the formulas (34) and (35), a crucial step is to evaluate
[Equation]
for time t ∈ [ − T, T ] where T = t + − t − .
For any fixed t , this value can be efficiently measured by the adjoint equation with backward propagation proposed in [9].
For instance, let us consider t > and
[Equation]
Moreover, it can be easily verified by the definition (40) that for s ∈ [0 , t ] ,
[Equation]
The above two equations are Eqs.
(4) & (5) in [9].
This can eliminate the need to simulate Y t ( x ) , whose memory cost scales like O ( dN p ) .
However, in the finite-time NEIS scheme, we need to estimate Φ( t, x ) not only for a fixed t but also for t ∈ [ − 1 , 1] .
Therefore, the computational cost scales like O ( N 2 t ) where N t is the number of time-discretization (or say the depth of the flow map in the normalizing flow context).
As a comparison, the forward propagation method uses more memory but could be computationally cheaper as it only needs to visit the whole trajectory for O (1) times (see the table below).
[Table]
s, x ) instead of Y s (
[Table]
p
[Table]
propagation
[Table]
I.6 A discussion on query complexity
The query complexities to estimate Z 1 by both AIS and NEIS are summarized in the Table 4 below:
See
[Table]
J More training and comparisons results
Asymmetric
[Table]
mode Gaussian mixture (2D):
AISAIS-
NEIS (Generic, m = 20 )
NEIS (Generic, m = 30 )
NEIS (Grad, m = 20 )
NEIS (Grad, m = 30 )
[Table]
±
[Table]
±
[Table]
±
[Table]
Symmetric 4-mode Gaussian mixture (10D):
AISAIS-
NEIS (Grad, m = 30 )
NEIS (Grad, m = 40 ) training cost
N/A N/A
U 1 : 11.5 MB ∇ U 1 : 12.8 MB cost per estimate
U 1 : 89.4 MB
U 1 : 76.6 ∼ 76.8 MB ∇ U 1 : 89.4 MB ∇ U 1 :10 estimates 0 .
987 ± 0 .1 .
005 ± 0 .0 .
998 ± 0 .0 . 998 ± 0 .0 .
997 ± 0 .1 .
000 ± 0 .1 .
001 ± 0 .0 .
996 ± 0 .
Funnel distribution (10D):
AISAIS-
NEIS (linear (22a))
NEIS (two-parameter (22b)) training cost
N/A N/A
U 1 : 40.4 MB
U 1 : 20.2 MB ∇ U 1 : 48.8 MB ∇ U 1 : 20.2 MB cost per estimate
U 1 : 341.3 MB
U 1 : 293 MB
U 1 : 121.2 MB ∇ U 1 : 341.3 MB ∇ U 1 :∇ U 1 :10 estimates 0 .
681 ± 0 .0 .
816 ± 0 .0 .
847 ± 0 .
767 ± 0 .0 .
890 ± 0 .0 .
984 ± 0 .
[Figure]
[Figure] [Figure]
[Figure] [Figure]
i
[Figure]
l
[Figure]
t r i a l
[Figure]
t r i a l
[Figure]
[Figure]
t r i a l =t r i a l
[Figure]
[Figure]
t r i a l
[Figure]
r i
[Figure]
l
[Figure]
t r i a l
[Figure]
t
[Figure]
i a l
[Figure] [Figure]