This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Conditional Lagrangian Wasserstein Flow for Time Series Imputation

Weizhu QIAN
School of Computer Science and Technology
Soochow University, China
&Dalin Zhang
Department of Computer Science
Aalborg University, Denmark
Yan Zhao
Department of Computer Science
Aalborg University, Denmark
correspondence to [email protected]
Abstract

Time series imputation is important for numerous real-world applications. To overcome the limitations of diffusion model-based imputation methods, e.g., slow convergence in inference, we propose a novel method for time series imputation in this work, called Conditional Lagrangian Wasserstein Flow. The proposed method leverages the (conditional) optimal transport theory to learn the probability flow in a simulation-free manner, in which the initial noise, missing data, and observations are treated as the source distribution, target distribution, and conditional information, respectively. According to the principle of least action in Lagrangian mechanics, we learn the velocity by minimizing the corresponding kinetic energy. Moreover, to incorporate more prior information into the model, we parameterize the derivative of a task-specific potential function via a variational autoencoder, and combine it with the base estimator to formulate a Rao-Blackwellized sampler. The propose model allows us to take less intermediate steps to produce high-quality samples for inference compared to existing diffusion methods. Finally, the experimental results on the real-word datasets show that the proposed method achieves competitive performance on time series imputation compared to the state-of-the-art methods.

1 Introduction

Time series imputation is essential for various practical scenarios in many fields, such as transportation, environment, and medical care, etc. Deep learning-based approaches, such as RNNs, VAEs, and GANs, have been proved to be advantageous compared to traditional machine learning methods on various complex real-words multivariate time series analysis tasks Fortuin et al. (2020). More recently, diffusion models, such as denoising diffusion probabilistic models (DDPMs) Ho et al. (2020) and score-based generative models (SBGMs) Song et al. (2020), have gained more and more attention in the field of time series analysis due to their powerful modelling capability Lin et al. (2023); Meijer and Chen (2024).

Although many diffusion model-based time series imputation approaches have been proposed and show their advantages compared to conventional deep learning models Tashiro et al. (2021); Chen et al. (2021, 2023), they are limited to slow convergence or large computational costs. Such limitations may prevent them being applied to real-world applications. To address the aforementioned issues, in this work, we leverage the optimal transport theory Villani et al. (2009) and Lagrangian mechanics Arnol’d (2013) to propose a novel method, called Conditional Lagrangian Wasserstein Flow (CLWF), for fast and accurate time series imputation.

In our method, we treat the multivariate time series imputation task as a conditional optimal transport problem, whereby the random noise is the source distribution, the missing data is the target distribution, and the observed data is the conditional information. To generate new data samples efficiently and accurately, we need to find the shortest path in the probability space according to the optimal transport theory. To this end, we first project the original source and target distributions into the Wasserstein space via sampling mini-batch OT maps. Afterwards, we construct the time-dependent intermediate samples through interpolating the source distribution and target distribution. Then according to the principle of least action in Lagrangian mechanics Arnol’d (2013), the optimal velocity function moving the source distribution to the target distribution is learned in a self-supervised manner by minimizing the corresponding kinetic energy. Moreover, to further improve the model’s performance, we learn the task-specific potential function by training a Variational Autoencoder (VAE) model Kingma and Welling (2014) on the observed time series data to build a Rao-Blackwellized trajectory sampler.

Finally, CLWF is assessed on two real-word multivariate time series datasets. The obtained results show that the proposed method achieves competitive performance and admits fast convergence compared with other state-of-the-art time series imputation methods.

The contributions of the paper ares summarized as follows:

  • We present Conditional Lagrangian Wasserstein Flow, a novel conditional generative framework based on the optimal transport theory and Lagrangian mechanics;

  • We propose a Rao-Blackwellized trajectory sampler to enhance the data generation performance by incorporating the prior information;

  • We develop the practical algorithms to solve the time series imputation problem via a conditional generative approach;

  • We demonstrate that the proposed method has competitive performance on time series imputation tasks compared other state-of-the-art methods.

2 Preliminaries

In this section, we concisely introduce the fundamentals of stochastic differential equations, optimal transport, Shrödinger Bridge, and Lagrangian mechanics.

2.1 Stochastic Differential Equations

We treat the data generation task as an initial value problem (IVP), in which X0dX_{0}\in\mathbb{R}^{d} is the initial data (e.g., some random noise) at the initial time t=0t=0, and XTdX_{T}\in\mathbb{R}^{d} is target data at the terminal time t=Tt=T. To solve the IVP, we consider a stochastic differential equation (SDE) defined by a Borel measurable time-dependent drift function μt:[0,T]×dd\mu_{t}:[0,T]\times\mathbb{R}^{d}\rightarrow\mathbb{R}^{d}, and a positive Borel measurable time-dependent diffusion function σt:[0,T]>0d\sigma_{t}:[0,T]\rightarrow\mathbb{R}^{d}_{>0}. Accordingly, the Itô form of the SDE can be described as follows Oksendal (2013):

dXt=μt(Xt,t)dt+σtdWt,\displaystyle\mathrm{d}X_{t}=\mu_{t}(X_{t},t)\mathrm{d}t+\sigma_{t}\mathrm{d}W_{t}, (1)

where WtW_{t} is a Brownian motion/Wiener process. When the diffusion term is not considered, the SDE degenerates to an ordinary differential equation (ODE). However, we will use the SDE for the theoretical analysis as it is more general.

The Fokker–Planck equation (FPE) Risken and Frank (2012) describing the evolution of the marginal density pt(Xt)p_{t}(X_{t}) reads:

tpt(Xt)=(ptμt)+σt22Δpt,\displaystyle\frac{\partial}{\partial t}p_{t}(X_{t})=-\divergence(p_{t}\mu_{t})+\frac{\sigma_{t}^{2}}{2}\Delta p_{t}, (2)

where Δpt=(pt)\Delta p_{t}=\divergence(\nabla p_{t}) is the Laplacian. In fact, both Eq. eq:sde and Eq. eq:fpe reveal the dynamics of the system and serve as the boundary conditions for the optimization problems we will introduce in later sections with different focuses. The differences are when the constraint is Eq. 1, the formalism is Lagrangian, which depicts the movement of each individual particle; while when the constraint is Eq.2, the formalism is Eulerian, which depicts the evolution of population.

2.2 Optimal Transport

The optimal transport (OT) problem aims to seek the optimal transport plans/ maps that moves the source distribution to the target distribution Villani et al. (2009); Santambrogio (2015); Peyré et al. (2019). In the Kantorovich’s formulation of the OT problem, the transport costs are minimized with respect to some probabilistic couplings/joint distributions Villani et al. (2009); Santambrogio (2015); Peyré et al. (2019). Let p0p_{0} and pTp_{T} be two Borel probability measures with finite second moments on the space Ωd\Omega\in\mathbb{R}^{d}. Π(p0,pT)\Pi(p_{0},p_{T}) denotes a set of transport plans between these two marginals. Then, the Kantorovich’s OT problem is defined as follows:

infπΠ(p0,pT)𝒳×𝒴12xy2π(x,y)dxdy,\displaystyle\underset{\pi\in\Pi(p_{0},p_{T})}{\mathrm{inf}}\int_{\mathcal{X}\times\mathcal{Y}}\frac{1}{2}\norm{x-y}^{2}\pi(x,y)\mathrm{d}x\mathrm{d}y, (3)

where Π(p0,pT)={π𝒫(𝒳×𝒴):(πx)#π=p0,(πy)#π=pT}\Pi(p_{0},p_{T})=\big{\{}\pi\in\mathcal{P}(\mathcal{X}\times\mathcal{Y}):(\pi^{x})_{\#}\pi=p_{0},(\pi^{y})_{\#}\pi=p_{T}\big{\}}, with πx\pi^{x} and πx\pi^{x} being two projections of 𝒳×𝒴\mathcal{X}\times\mathcal{Y} on Ω\Omega. The minimizer of Eq .3, π\pi*, always exist and referred to as the optimal transport plan.

Note that the R.H.S of Eq. 3 can also include an entropy regularization term DKL(πp0pT)D_{\mathrm{KL}}(\pi\|p_{0}\otimes p_{T}), then the original OT problem transforms into the entropy-regularized optimal transport (EROT) problem with Eq. 2 as the constraint, which frames the transport problem better in terms of convexity and stability Cuturi (2013) In particular, from a data generation perspective, p0p_{0} is some random initial noise and pTp_{T} is the target data distribution, and we can sample the optimal transport maps in a mini-batch manner Tong et al. (2023, 2024); Pooladian et al. (2023).

2.3 Shrödinger Bridge

The transport problem in Sec. 2.2 can be further viewed from a distribution evolution perspective, which is particularly suitable for developing the flow models that model the data generation process. For this reason, the Shrödinger Bridge (SB) problem is introduced Léonard (2012). Assume that ΩC1([0,T],d)\Omega\in C^{1}([0,T],\mathbb{R}^{d}), 𝒫(Ω)\mathcal{P}(\Omega) is a probability path measure on the path space Ω\Omega, then the goal of the SB problem aims to find the following optimal path measure:

=argmin𝒫(Ω)DKL()subject to0=q0andT=qT,\displaystyle\mathbb{P}*=\underset{\mathbb{P}\in\mathcal{P}(\Omega)}{\arg\min}D_{\mathrm{KL}}(\mathbb{P}\|\mathbb{Q})\quad\mbox{subject to}~{}\mathbb{P}_{0}=q_{0}~{}\mbox{and}~{}\mathbb{P}_{T}=q_{T}, (4)

where the Kullback–Leibler (KL) divergence DKL()={logddd,if,+,otherwise,D_{\mathrm{KL}}(\mathbb{P}\|\mathbb{Q})=\begin{cases}\log\frac{\mathrm{d}\mathbb{P}}{\mathrm{d}\mathbb{Q}}\mathrm{d}\mathbb{P},&\mbox{if}~{}\mathbb{P}\ll\mathbb{Q},\\ +\infty,&\mbox{otherwise},\end{cases} and \mathbb{Q} is a reference path measure, e.g., Brownian motion or Ornstein-Uhlenbeck process. Moreover, the distribution matching problem in Eq. 3 can be cast as a dynamical SB problem as well Gushchin et al. (2024); Koshizuka and Sato (2022); Liu et al. (2024):

arg\displaystyle\arg minθ𝔼p(Xt)[12μtθ(Xt,t)2],\displaystyle\min_{\theta}\mathbb{E}_{p(X_{t})}\Big{[}\frac{1}{2}\norm{\mu_{t}^{\theta}(X_{t},t)}^{2}\Big{]}, (5)
subject toEq. 1orEq. 2,\displaystyle\mbox{subject to}~{}\mbox{Eq.~{}}\ref{eq:sde}~{}\mbox{or}~{}\mbox{Eq.~{}}\ref{eq:fpe},

where θ\theta is the parameters of the variational drift function μt\mu_{t}.

2.4 Lagrangian Mechanics

In this section, we formulate the data generation problem under the framework of Lagrangian mechanics Arnol’d (2013). Let ptp_{t} and pt˙=dptdt\dot{p_{t}}=\frac{\mbox{d}p_{t}}{\mbox{d}t} be the density and law of the generalized coordinates XtX_{t}, respectively. 𝒦(pt,pt˙,t)\mathcal{K}(p_{t},\dot{p_{t}},t) is the kinetic energy, and 𝒰(pt,t)\mathcal{U}(p_{t},t) is the potential energy, then the corresponding Lagrangian is

(pt,p˙t,t)=𝒦(pt,p˙t,t)𝒰(pt).\displaystyle\mathcal{L}(p_{t},\dot{p}_{t},t)=\mathcal{K}(p_{t},\dot{p}_{t},t)-\mathcal{U}(p_{t}). (6)

We assume that Eq. 6 is lower semi-continuous (lsc) and strictly convex in pt˙\dot{p_{t}} in the Wasserstein space. The kinetic energy 𝒦(xt,μt,t)\mathcal{K}(x_{t},\mu_{t},t) and potential energy 𝒰(pt,t)\mathcal{U}(p_{t},t) are defined as follows, respectively:

𝒦(xt,μt,t)\displaystyle\mathcal{K}(x_{t},\mu_{t},t) =0Td12μt(xt,t)2pt(xt)dxtdt,\displaystyle=\int^{T}_{0}\int_{\mathbb{R}_{d}}\frac{1}{2}\norm{\mu_{t}(x_{t},t)}^{2}p_{t}(x_{t})\mathrm{d}x_{t}\mathrm{d}t, (7)
𝒰(pt,t)\displaystyle\mathcal{U}(p_{t},t) =dUt(xt)pt(xt)𝑑xt,\displaystyle=\int_{\mathbb{R}_{d}}U_{t}(x_{t})p_{t}(x_{t})dx_{t}, (8)

where Ut(Xt)U_{t}(X_{t}) is the potential function. Then the action in the context of Lagrangian mechanics is defined as follow:

𝒜[μt(x)]=0Td(xt,μt,t)𝑑xt𝑑t.\displaystyle\mathcal{A}[\mu_{t}(x)]=\int^{T}_{0}\int_{\mathbb{R}_{d}}\mathcal{L}(x_{t},\mu_{t},t)dx_{t}dt. (9)

According to the principle of least action, the shortest path is the one minimizing the action, which is aligned with Eq. 4 in the SB theory as well. Therefore, we can leverage the Lagrangian dynamics to tackle the OT problem for data generation. To solve Eq. 6, we need to satisfy the stationary condition, i.e., the Euler-Lagrangian equation:

ddtp˙t(xt,μt,t)=pt(pt,pt˙,t),\displaystyle\frac{d}{dt}\frac{\partial}{\partial\dot{p}_{t}}\mathcal{L}(x_{t},\mu_{t},t)=\frac{\partial}{\partial p_{t}}\mathcal{L}(p_{t},\dot{p_{t}},t), (10)

with the boundary condition dXtdt=μ(Xt,t),q0=p0,qT=pT\frac{\mathrm{d}X_{t}}{\mathrm{d}t}=\mu(X_{t},t),~{}q_{0}=p_{0},~{}q_{T}=p_{T}.

3 Conditional Lagrangian Wasserstein Flow for Time Series Imputation

In the section, building upon the optimal transport theory, the Shrödinger Bridge problem, and Lagrangian mechanics introduced in Sec. 2, we propose Conditional Lagrangian Wasserstein Flow, which is a novel conditional generative method for time series imputation.

3.1 Time Series Imputation

Our goal is to impute the missing time series data points based on the observations. For training, we adopt adopt a conditionally generative approach for time series imputation in the sample space K×L\mathbb{R}^{K\times L}, where KK represents the dimension of the multivariate time series and LL represents sequence length. In our self-supervised learning approach, the total observed data xobsK×Lx^{\mathrm{obs}}\in\mathbb{R}^{K\times L} are partitioned into the imputation target xtarK×Lx^{\mathrm{tar}}\in\mathbb{R}^{K\times L} and the conditional data xcondK×Lx^{\mathrm{cond}}\in\mathbb{R}^{K\times L}.

As a result, the missing data points xtarx^{\mathrm{tar}} can be generated based on the conditions xcondx^{\mathrm{cond}} joint with some uninformative initial distribution x0K×Lx_{0}\in\mathbb{R}^{K\times L} (e.g., Gaussian noise) at time t=0t=0, then the imputation task can be described as: xtarp(xtar|x0cond)x^{\mathrm{tar}}\sim p(x^{\mathrm{tar}}|x^{\mathrm{cond}}_{0}), where the total input of the model is x0input:=(xcond,x0)K×L×2x^{\mathrm{input}}_{0}:=(x^{\mathrm{cond}},x_{0})\in\mathbb{R}^{K\times L\times 2}.

3.2 Interpolation in Wasserstein Space

To solve Eq. 7, we need to sample the intermediate variable XtX_{t} in the Wasserstein space first. To do so, the interpolation method is adopted to construct the intermediate samples. According to the OT and SB problems introduced in Sec. 2, we define the following time-differentiable interpolant:

It:Ω×ΩΩsuch thatI0=X0andIT=XT,\displaystyle I_{t}:\Omega\times\Omega\rightarrow\Omega\quad\text{such that}~{}I_{0}=X_{0}~{}\text{and}~{}I_{T}=X_{T}, (11)

where Ωd\Omega\in\mathbb{R}^{d} is the support of the marginals p0(X0)p_{0}(X_{0}) and pT(XT)p_{T}(X_{T}), as well as the conditional p(Xt|X0,XT,t)p(X_{t}|X_{0},X_{T},t).

For implement ItI_{t}, first, we independently sample some random noise X0𝒩(0,σ02)X_{0}\sim\mathcal{N}(0,\sigma^{2}_{0}) at the initial time t=0t=0 and the data samples XTp(xtar)X_{T}\sim p(x^{\mathrm{tar}}) at the terminal time t=Tt=T, respectively. Afterwards, the interpolation method is used to construct the intermediate samples Xtp(Xt|X0,XT,t)X_{t}\sim p(X_{t}|X_{0},X_{T},t), where tuniform(0,T)t\sim\mathrm{uniform}(0,T) Liu et al. (2022); Albergo and Vanden-Eijnden (2023); Tong et al. (2024). More specifically, we design the following sampling approach:

Xt=tT(XT+γt)+(1tT)X0+α(t)t(Tt)Tϵ,t[0,T],\displaystyle X_{t}=\frac{t}{T}(X_{T}+\gamma_{t})+(1-\frac{t}{T})X_{0}+\alpha(t)\sqrt{\frac{t(T-t)}{T}}\epsilon,\quad t\in[0,T], (12)

where γt𝒩(0,σγ2)\gamma_{t}\sim\mathcal{N}(0,\sigma^{2}_{\gamma}) is some random noise with variance σγ\sigma_{\gamma} injected to the target data samples for improving the coupling’s generalization property, and α(t)0\alpha(t)\geq 0 is a time-dependent scalar.

Note that Eq. 12 can only allow us to generate time-dependent intermediate samples in the Euclidean space but not the Wasserstein space, which can lead to slow convergence as the sampling paths are not straightened. Hence, to address this issue, we need to project the interpolations in the Wasserstein space before interpolating to strengthen the probability flow. To this end, we leverage the method adopted in Tong et al. (2023, 2024); Pooladian et al. (2023) to sample the optimal mini-batch OT maps between X0X_{0} and XTX_{T} first, and perform the interpolations according to Eq. 12 afterwards. Finally, we have the joint variable xtinput:=(xcond,xt)x^{\mathrm{input}}_{t}:=(x^{\mathrm{cond}},x_{t}) as the input for computing the velocity of the Wasserstein flow.

3.3 Flow Matching

To estimate the velocity of the Wasserstein flow μt(Xt,t)\mu_{t}(X_{t},t) in Eq. 1, the previous methods that require trajectory simulation for training can result in long convergence time and large computational costs Chen et al. (2018); Onken et al. (2021). To circumvent the above issues, in this work we adopt a simulation-free training strategy based on the OT theory introduce in Sec. 2.2 Liu et al. (2022); Tong et al. (2023); Albergo and Vanden-Eijnden (2023), which turns out to be faster and more scalable to large time series datasets.

Since we can now draw mini-batch interpolated samples of the source distribution and target distribution in the Wasserstein space using Eq. 12, we can model the variational velocity function using a neural network with parameters θ\theta. Then, according to Eq. 1, the target velocity can be computed by the difference between the source distribution and target distribution. Therefore, the variational velocity function μθ(xtinput,t)\mu_{\theta}(x^{\mathrm{input}}_{t},t) can be learned by

argminθ0Td×d×ddXtdtμtθ(xtinput,t)2dx0dxtardxinputdt\displaystyle\arg\min_{\theta}\int_{0}^{T}\int_{\mathbb{R}^{d}\times\mathbb{R}^{d}\times\mathbb{R}^{d}}\norm{\frac{\mbox{d}X_{t}}{\mbox{d}t}-\mu_{t}^{\theta}(x^{\mathrm{input}}_{t},t)}^{2}\mbox{d}x_{0}\mathrm{d}x^{\mathrm{tar}}\mbox{d}x^{\mathrm{input}}\mbox{d}t (13)
\displaystyle\approx argminθ𝔼p(x0),p(xtar),p(xinput),t[xtarx0Tμtθ(xtinput,t)2].\displaystyle\arg\min_{\theta}\mathbb{E}_{p(x_{0}),p(x^{\mathrm{tar}}),p(x^{\mathrm{input}}),t}\Bigg{[}\norm{\frac{x^{\mathrm{tar}}-x_{0}}{T}-\mu_{t}^{\theta}(x^{\mathrm{input}}_{t},t)}^{2}\Bigg{]}. (14)

Eq. 14 can be solved by drawing mini-batch samples in the Wasserstein space and performing stochastic gradient descent accordingly. In this fashion, the learning process is simulation-free as the trajectory simulation is not needed.

Moreover, note that that Eq. 13 also obeys the principle of least action introduced in Sec. 2.4 as it minimizes the kinetic energy described in Eq. 7. Therefore, it indicates that the geodesic that drives the particles from the source distribution to the target distribution in the OT problem described in Sec. 2 is found as well, which enables us to generate new samples with less simulation steps compared to standard diffusion models.

3.4 Potential Function

So far, we have demonstrated how to leverage the kinetic energy to estimate the velocity in the Lagrangian described by Eq. 6. Apart from this, we can also incorporate the prior knowledge within the task-specific potential energy into the dynamics, which enables us to further improve the data generation performance. To this end, let U(Xt):d×[0,T]U(X_{t}):\mathbb{R}^{d}\times[0,T]\rightarrow\mathbb{R} be the task-specific potential function depending on the generalized coordinates XtX_{t} Yang and Karniadakis (2020); Onken et al. (2021); Neklyudov et al. (2023b). Therefore, we can compute the dynamics of the system by

dXtdt=vt(Xt,t)\displaystyle\frac{\mbox{d}X_{t}}{\mbox{d}t}=v_{t}(X_{t},t) =xUt(Xt).\displaystyle=-\nabla_{x}U_{t}(X_{t}). (15)

Since the data generation problem in our case can also be interpreted as a stochastic optimal control (SOC) problem Bellman (1966); Fleming and Rishel (2012); Nüsken and Richter (2021); Zhang and Chen (2022); Holdijk et al. (2023); Berner et al. (2024), then the existence of such Ut(Xt)U_{t}(X_{t}) is assured by Pontryagin’s Maximum Principle (PMP) Evans (2024).

To estimate vt(Xt,t)v_{t}(X_{t},t), according to the Lagrangian Eq. 6, we assume that the potential function takes the form Ut(Xt)log𝒩(Xt|Xt^,σp2)U_{t}(X_{t})\approx-\log\mathcal{N}(X_{t}|\hat{X_{t}},\sigma^{2}_{p}), where Xt^\hat{X_{t}} the learned mean and σp2\sigma^{2}_{p} is the pre-defined variance. As a result, the derivative is xU(Xt)=XtXt^σp2\nabla_{x}U(X_{t})=\frac{X_{t}-\hat{X_{t}}}{\sigma^{2}_{p}}. In terms of practical implementation, we parameterize xU(Xt)\nabla_{x}U(X_{t}) via a Variational Autoencoder (VAE) Kingma and Welling (2014). More specifically, we pre-train a VAE on the total observed time series data XobsX^{\mathrm{obs}}. Afterwards, the reconstruction discrepancies of the VAE are used to approximate the task-specific vϕ(Xt,t)v^{\phi}(X_{t},t) depending on XtX_{t}:

vtϕ(Xt,t)=1σp2(XtVAE(Xt)),\displaystyle v_{t}^{\phi}(X_{t},t)=-\frac{1}{\sigma^{2}_{p}}(X_{t}-\mathrm{VAE}(X_{t})), (16)

where VAE(Xt)\mathrm{VAE}(X_{t}) represents the reconstruction output of the pre-trained VAE model with input XtX_{t}, and σp2\sigma^{2}_{p} is treated as a positive constant for simplicity. In this manner, we can incorporate the prior knowledge learned from the accessible training data into the sampling process formulated by Eq. 14 to enhance the data generation performance.

3.5 Rao-Blackwellized Sampler

To generate the missing time series datapoints, we first formulate an unbiased ODE sampler S(Xt,μtθ(Xt,t),t)S(X_{t},\mu_{t}^{\theta}(X_{t},t),t) for Xt+1X_{t+1} with the Euler method and μtθ(Xt,t)\mu_{t}^{\theta}(X_{t},t) learned by Eq. 14 (which means the diffusion term in Eq. 1 is omitted). Alternatively, one can also adopt the SDE sampler by using the Euler–Maruyama method. Nevertheless, to ensure achieve the best imputation performance, we choose the ODE sampler for implementation. Note that the ODE sampler alone is good enough to generate high-quality samples for time series imputation.

Now we can construct a Rao-Blackwellized trajectory sampler Casella and Robert (1996) for time series data imputation using Eq. 14 and Eq. 16. To this end, we first treat 𝒮(Xt+1|Xt,μtθ(Xt,t),t)\mathcal{S}(X_{t+1}|X_{t},\mu_{t}^{\theta}(X_{t},t),t) be the base estimator for Xt+1X_{t+1} with 𝔼[𝒮2]<\mathbb{E}[\mathcal{S}^{2}]<\infty for all Xt+1X_{t+1}. And we assume 𝒯(Xt,vtϕ(xt,t),t)\mathcal{T}(X_{t},v_{t}^{\phi}(x_{t},t),t) is a sufficient statistic for Xt+1X_{t+1} based on Eq. 16, even it is not a very accurate estimator for Xt+1X_{t+1}. As a result, we can formulate a new trajectory sampler 𝒮=𝔼[𝒮|𝒯]\mathcal{S}^{*}=\mathbb{E}[\mathcal{S}|\mathcal{T}] to generate the missing time series data. Then according to the Rao-Blackwell theorem Casella and Robert (1996), we have

𝔼[𝒮Xt+1]2𝔼[𝒮Xt+1]2,\displaystyle\mathbb{E}[\mathcal{S}^{*}-X_{t+1}]^{2}\leq\mathbb{E}[\mathcal{S}-X_{t+1}]^{2}, (17)

where the inequality is strict unless 𝒮\mathcal{S} is a function of 𝒯\mathcal{T}. Eq. 17 suggests we can construct a more powerful sampler with smaller errors than the base ODE sampler 𝒮\mathcal{S} using Rao-Blackwellization.

3.6 The Algorithms

Refer to caption
Figure 1: The overall training process of Conditional Lagrangian Wasserstein Flow.

The overall training process of CLWF is illustrated in Fig. 1, which consists of the following stages. First, the total observed data xobsx^{\mathrm{obs}} are partitioned into the target data and conditional data for training. Next, the data pairs of xtarx^{\mathrm{tar}} and x0x_{0} are sampled from the target dataset and random Gaussian noise, respectively. Then, the data pairs are projected into the Wasserstein space by sampling the corresponding OT maps. After that, the intermediate variable xtx_{t} is sampled through interpolation using Eq. 12. We can approximate the target velocity dXtdt\frac{\mbox{d}X_{t}}{\mbox{d}t} by computing xtarx0T\frac{x^{\mathrm{tar}}-x_{0}}{T}. Subsequently, we use the joint distribution of the conditional information xcondx^{\mathrm{cond}} and the intermediate variable xtx_{t}, xinputx^{\mathrm{input}} as the total input to feed the variational flow model μtθ\mu_{t}^{\theta} to compute the velocity. And the flow matching loss defined by Eq. 14 is minimized by stochastic gradient descent.

Furthermore, to incorporate the prior information of into the model, we can choose to train a VAE model on the total observed data xobsx^{\mathrm{obs}}. This is used to estimate the derivative of the task-specific potential function according to Eq. 16, which can be further utilized to construct a more powerful Rao-Blackwellized sampler for inference.

For inference, at time t=0t=0, we sample the initial random noise x0x_{0} and conditional information xcondx^{\mathrm{cond}} to formulate the joint variable xinputx^{\mathrm{input}}. Note that during the trajectory sampling x0x_{0} will evolve over time, while xcondx^{\mathrm{cond}} remain invariant. We use xinputx^{\mathrm{input}} as the input of the flow model μtθ\mu_{t}^{\theta} to compute the velocity. Afterwards, we sample the new xtx_{t} using the Euler method. If we perform Rao-Blackwellization, then xtx_{t} is fed to the VAE model for computing the derivative of the potential function, and xtx_{t} is updated again using the Euler method. The above process will be repeated until reach its convergence. Moreover, we can sample multiple trajectories using different initial random noise, and the averages as the final imputation results. Finally, the proposed training and sampling procedures are presented in Algorithm 1 and Algorithm 2, respectively.

Algorithm 1 Training procedure
Terminal time: TT, max epochs, observed data XobsX^{\mathrm{obs}}, parameters: θ\theta and ϕ\phi.
while epoch < max epochs do
     sample tt, (x0,xT)(x_{0},x_{T}), and OT maps;
     sample xtx_{t} according to Eq. 12;
     minimize Eq. 14;
end while
if Rao-Blackwellization then
     train a VAE\mathrm{VAE} model on XobsX^{\mathrm{obs}}.
end if
Algorithm 2 Sampling procedure
initial time t=0t=0, terminal time: T=1T=1, Euler method step number: NN.
sample initial noise X0𝒩(0,σ02)X_{0}\sim\mathcal{N}(0,\sigma^{2}_{0})
while tt < T do
     Xt=Xt+μtθ(xinput,t)TNX_{t}=X_{t}+\mu_{t}^{\theta}(x^{\mathrm{input}},t)\frac{T}{N}
     if Rao-Blackwellization then
         Xt=Xt+vtϕ(xt,t)TNX_{t}=X_{t}+v_{t}^{\phi}(x_{t},t)\frac{T}{N}
     end if
     t=t+TNt=t+\frac{T}{N}
end while

4 Experiments

4.1 Datasets

We use two public multivariate time series datasets for validation. The first dataset is the PM 2.5 dataset Zheng et al. (2013) from the air quality monitoring sites for 1212 months. The missing rate of the raw data is 13%13\%. The feature number KK is 3636 and the sequence length LL is 3636. In our experiments, only the observed datapoints are masked randomly as the imputation targets.

The other dataset we use is the PhysioNet dataset Silva et al. (2012) collected from the intensive care unit for 4848 hours. The feature number KK is 3535 and the sequence length LL is 4848. The missing rate of the raw data is 80%80\%. In our experiments, 10%10\% and 50%50\% of the datapoints are masked randomly as the imputation targets, which are denoted as PhysioNet 0.1 and PhysioNet 0.5, respectively.

4.2 Baselines

For comparison, we select the following state-of-the-art timer series imputation methods as the baselines: 1) GP-VAE Fortuin et al. (2020), which is combines a VAE model and a Gaussian Process prior; 2) CSDI Tashiro et al. (2021), which is based on the conditional diffusion model; 3) CSBI Chen et al. (2023), which is based on the Schrödinger bridge diffusion model; 4) DSPD-GP Biloš et al. (2023), which combines the diffusion model with the Gaussian Process prior.

4.3 Experimental Settings

In terms of the choices of architectures, tboth the flow model and the VAE model are built upon Transformers Tashiro et al. (2021). We use the ODE sampler for inference and sample the exact optimal transport maps for interpolations to achieve the optimal performance. The optimizer is Adam and the learning rate: 0.0010.001 with linear scheduler. The maximum training epochs is 200200. The mini batch size for training is 6464. The total step number of the Euler method used in CLWF is 1515, while the total step numbers for other diffusion models. i.e., is CSDI, CSBI, and DSPD-GP are 1515 (as suggested in their papers). The number of the Monte Carlo samples for inference is 5050. The standard deviation σ0\sigma_{0} for the initial noise X0X_{0} is 0.10.1, and the standard deviation σγ\sigma_{\gamma} for the injected noise γt\gamma_{t} 0.0010.001. The coefficient σp2\sigma_{p}^{2} in the derivative of the potential function is 0.010.01.

4.4 Experimental Results

4.4.1 Imputation Results

Table 1: Test imputation results on PM 2.5, PhysioNet 0.1, and PhysioNet 0.5 (55-trial averages). The best are in bold and the second best are underlined.
Method PM 2.5 PhysioNet 0.1 PhysioNet 0.5
RMSE MAE RMSE MAE RMSE MAE
GP-VAE 43.143.1 26.426.4 0.730.73 0.420.42 0.760.76 0.470.47
CSDI 19.319.3 9.869.86 0.570.57 0.240.24 0.650.65 0.320.32
CSBI 19.019.0 9.809.80 0.550.55 0.230.23 0.630.63 0.310.31
DSPD-GP 18.318.3 9.709.70 0.540.54 0.220.22 0.680.68 0.300.30
CLWF 18.118.1 9.709.70 0.470.47 0.220.22 0.640.64 0.290.29

We assess the proposed method on PM 2.5, PhysioNet 0.1 and PhysioNet 0.5, respectively. The root means squared error (RMSE) and mean absolute error (MAE) are used as the evaluation metrics. From the test results shown in Table 1 and Fig. 2, we can see that our method CLWF outperforms the existing deep learning-based method (GP-VAE) and the recent state-of-the-art diffusion methods (CSDI, CSBI, and DSPD-GP). Moreover, CLWF uses only 1515 sampling steps for inference, while the baseline diffusion method uses only 5050 sampling steps. This suggests that CLWF is faster and more accurate than the existing methods on time series imputation tasks.

Refer to caption
Refer to caption
Refer to caption
Figure 2: Visualization of the test imputation results on PM 2.5, green dots are the conditions, blue dots are the imputation results, and red dots are the ground truth.

4.4.2 Ablation Study

Single-sample Imputation Result. We compare the time series imputation performance of CLWF with CSDI using only one Monte Carlo sample. The test results shown in Table 2 shows that CWFL outperforms CSDI, which suggests that CWFL exhibits lower imputation variances compared to diffusion-based models. This indicates that CWFL is more efficient and computationally economical for inference.

Table 2: Single-sample test imputation results on PM 2.5, PhysioNet 0.1, and PhysioNet 0.5 (55-trial averages).
Method PM 2.5 PhysioNet 0.1 PhysioNet 0.5
RMSE MAE RMSE MAE RMSE MAE
CSDI 22.222.2 11.711.7 0.740.74 0.300.30 0.830.83 0.400.40
CLWF 18.418.4 10.010.0 0.480.48 0.220.22 0.640.64 0.300.30

Effect of Rao-Blackwellzation. We compare the test imputation CLWF wth and without using Rao-Blackwellzation. Note that the PhysioNet dataset does not have enough non-zero data points to train a valid VAE model, therefore we only construct the Rao-Blackwellized sampler for the PM 2.5 dataset. The results showed in Table 3 indicates

Table 3: Test imputation results on PM 2.5 (55-trial averages).
Method PM 2.5
RMSE MAE
CLWF (without RB) 18.218.2 9.759.75
CLWF (RB) 18.118.1 9.709.70

that the Rao-Blackwellized sampler can further improve the time series imputation performance of the base sampler.

5 Related Work

5.1 Diffusion Models

Diffusion models, such as DDPMs Ho et al. (2020) and SBGM  Song et al. (2020), are considered as the new contenders to GANs on data generation tasks. But they generally take relatively long time to produce high quality samples. To mitigate this problem, the flowing matching methods have been proposed from an optimal transport. For example, ENOT uses the saddle point reformulation of the OT problem to develop a new diffusion model Gushchin et al. (2024) The flowing matching methods have also been proposed based on the OT theory Lipman et al. (2022); Liu (2022); Liu et al. (2023); Albergo and Vanden-Eijnden (2023); Albergo et al. (2023). In particular, mini-batch couplings are proposed to straighten the probability flows for fast inference Pooladian et al. (2023); Tong et al. (2024, 2023).

The Schrödinger Bridge have also been applied to diffusion models for improving the data generation performance of diffusion models. Diffusion Schrödinger Bridge utilizes the Iterative Proportional Fitting (IPF) method to solve the SB problem De Bortoli et al. (2021). SB-FBSDE proposes to use forward-backward (FB) SDE theory to solve the SB problem through likelihood training Chen et al. (2022). GSBM formulates a generalized Schrödinger Bridge matching framework by including the task-specific state costs for various data generation tasks Liu et al. (2024) NLSB chooses to model the potential function rather than the velocity function to solve the Lagrangian SB problem Koshizuka and Sato (2022). Action Matching Neklyudov et al. (2023a, b) leverages the principle of least action in Lagrangian mechanics to implicitly model the velocity function for trajectory inference. Another classes of diffusion models have also been proposed from an stochastic optimal control perspective by solving the HJB-PDEs Nüsken and Richter (2021); Zhang and Chen (2022); Berner et al. (2024); Liu et al. (2024).

5.2 Time Series Imputation

Many diffusion-based models have been recently proposed for time series imputation Lin et al. (2023); Meijer and Chen (2024). For instance, CSDI Tashiro et al. (2021) combines a conditional DDPM with a Transformer model to impute time series data. CSBI Chen et al. (2023) adopts the FB-SDE theory to train the conditional Schrödinger bridge model to for probabilistic time series imputation. To model the dynamics of time series from irregular sampled data, DSPD-GP Biloš et al. (2023) uses a Gaussian process as the noise generator. TDdiff Kollovieh et al. (2024) utilizes self guidance and learned implicit probability density to improve the time series imputation performance of the diffusion models. However, the time series imputation methods mentioned above exhibit common issues, such as slow convergence, similar to many diffusion models. Therefore, in this work, we proposed CLWF to tackle thess challenges.

6 Conclusion, Limitation, and Broader Impact

In this work, we proposed CLWF, a novel time series imputation method based on the optimal transport theory and Lagrangian mechanics. To generate the missing time series data, following the principle of least action, CLWF learns a velocity field by minimizing the kinetic energy to move the initial random noise to the target distribution. Moreover, we can also estimate the derivative of a potential function via a VAE model trained on the observed training data to further improve the performance of the base sampler by Rao-Blackwellization. In contrast with previous diffusion-based models, the proposed requires less simulation steps and Monet Carlo samples to produce high-quality data, which leads to fast inference. For validation, CWLF is assessed on two public datasets and achieves competitive results compared with existing methods.

One limitation of CLWF is that the samples obtained are not diverse enough as we use ODE for inference, which results in slightly higher test (continuous ranked probability score) CRPS compared to previous works, e.g., CSDI. Therefore, for future work, we will seek suitable approaches to accurately model the diffusion term in the SDE. Moreover, we will also try to design better task-specific potential functions for sparse multivariate time series data. We plan to explore the potential of the Lagrangian Wasserstein Flow model for other time series analysis tasks, such as anomaly detection and uncertainty quantification.

In terms of broader impact, our study on time series imputation has the potential to address important real-world challenges and consequently make a positive impact on daily lives.

References

  • Albergo et al. [2023] Michael S Albergo, Nicholas M Boffi, and Eric Vanden-Eijnden. Stochastic interpolants: A unifying framework for flows and diffusions. arXiv preprint arXiv:2303.08797, 2023.
  • Albergo and Vanden-Eijnden [2023] Michael Samuel Albergo and Eric Vanden-Eijnden. Building normalizing flows with stochastic interpolants. In The Eleventh International Conference on Learning Representations, 2023.
  • Arnol’d [2013] Vladimir Igorevich Arnol’d. Mathematical methods of classical mechanics, volume 60. Springer Science & Business Media, 2013.
  • Bellman [1966] Richard Bellman. Dynamic programming. science, 153(3731):34–37, 1966.
  • Berner et al. [2024] Julius Berner, Lorenz Richter, and Karen Ullrich. An optimal control perspective on diffusion-based generative modeling. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=oYIjw37pTP.
  • Bertsekas [2012] Dimitri Bertsekas. Dynamic programming and optimal control: Volume I, volume 4. Athena scientific, 2012.
  • Biloš et al. [2023] Marin Biloš, Kashif Rasul, Anderson Schneider, Yuriy Nevmyvaka, and Stephan Günnemann. Modeling temporal data as continuous functions with stochastic process diffusion. In International Conference on Machine Learning, pages 2452–2470. PMLR, 2023.
  • Casella and Robert [1996] George Casella and Christian P Robert. Rao-blackwellisation of sampling schemes. Biometrika, 83(1):81–94, 1996.
  • Chen et al. [2018] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018.
  • Chen et al. [2022] Tianrong Chen, Guan-Horng Liu, and Evangelos Theodorou. Likelihood training of schrödinger bridge using forward-backward sdes theory. In International Conference on Learning Representations, 2022, 2022.
  • Chen et al. [2021] Yongxin Chen, Tryphon T Georgiou, and Michele Pavon. Stochastic control liaisons: Richard sinkhorn meets gaspard monge on a schrodinger bridge. Siam Review, 63(2):249–313, 2021.
  • Chen et al. [2023] Yu Chen, Wei Deng, Shikai Fang, Fengpei Li, Nicole Tianjiao Yang, Yikai Zhang, Kashif Rasul, Shandian Zhe, Anderson Schneider, and Yuriy Nevmyvaka. Provably convergent schrödinger bridge with applications to probabilistic time series imputation. In International Conference on Machine Learning, pages 4485–4513. PMLR, 2023.
  • Cuturi [2013] Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. Advances in neural information processing systems, 26, 2013.
  • De Bortoli et al. [2021] Valentin De Bortoli, James Thornton, Jeremy Heng, and Arnaud Doucet. Diffusion schrödinger bridge with applications to score-based generative modeling. Advances in Neural Information Processing Systems, 34:17695–17709, 2021.
  • Evans [2022] Lawrence C Evans. Partial differential equations, volume 19. American Mathematical Society, 2022.
  • Evans [2024] Lawrence C Evans. An introduction to mathematical optimal control theory spring, 2024 version. Lecture notes available at https://math.berkeley.edu/ evans/control.course.pdf, 2024.
  • Fleming and Rishel [2012] Wendell H Fleming and Raymond W Rishel. Deterministic and stochastic optimal control, volume 1. Springer Science & Business Media, 2012.
  • Fortuin et al. [2020] Vincent Fortuin, Dmitry Baranchuk, Gunnar Rätsch, and Stephan Mandt. Gp-vae: Deep probabilistic time series imputation. In International conference on artificial intelligence and statistics, pages 1651–1661. PMLR, 2020.
  • Gushchin et al. [2024] Nikita Gushchin, Alexander Kolesov, Alexander Korotin, Dmitry P Vetrov, and Evgeny Burnaev. Entropic neural optimal transport via diffusion processes. Advances in Neural Information Processing Systems, 36, 2024.
  • Ho et al. [2020] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
  • Holdijk et al. [2023] Lars Holdijk, Yuanqi Du, Ferry Hooft, Priyank Jaini, Berend Ensing, and Max Welling. Stochastic optimal control for collective variable free sampling of molecular transition paths. Advances in Neural Information Processing Systems, 36, 2023.
  • Kingma and Welling [2014] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In The Second International Conference on Learning Representations, 2014.
  • Kollovieh et al. [2024] Marcel Kollovieh, Abdul Fatir Ansari, Michael Bohlke-Schneider, Jasper Zschiegner, Hao Wang, and Yuyang Bernie Wang. Predict, refine, synthesize: Self-guiding diffusion models for probabilistic time series forecasting. Advances in Neural Information Processing Systems, 36, 2024.
  • Koshizuka and Sato [2022] Takeshi Koshizuka and Issei Sato. Neural lagrangian schrödinger bridge: Diffusion modeling for population dynamics. In The Eleventh International Conference on Learning Representations, 2022.
  • Léonard [2012] Christian Léonard. From the schrödinger problem to the monge–kantorovich problem. Journal of Functional Analysis, 262(4):1879–1920, 2012.
  • Lin et al. [2023] Lequan Lin, Zhengkun Li, Ruikun Li, Xuliang Li, and Junbin Gao. Diffusion models for time-series applications: a survey. Frontiers of Information Technology & Electronic Engineering, pages 1–23, 2023.
  • Lipman et al. [2022] Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In The Eleventh International Conference on Learning Representations, 2022.
  • Liu et al. [2024] Guan-Horng Liu, Yaron Lipman, Maximilian Nickel, Brian Karrer, Evangelos Theodorou, and Ricky TQ Chen. Generalized schrödinger bridge matching. In The Twelfth International Conference on Learning Representations, 2024.
  • Liu [2022] Qiang Liu. Rectified flow: A marginal preserving approach to optimal transport. arXiv preprint arXiv:2209.14577, 2022.
  • Liu et al. [2022] Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. In The Eleventh International Conference on Learning Representations, 2022.
  • Liu et al. [2023] Xingchao Liu, Lemeng Wu, Mao Ye, and Qiang Liu. Learning diffusion bridges on constrained domains. In international conference on learning representations (ICLR), 2023.
  • Meijer and Chen [2024] Caspar Meijer and Lydia Y Chen. The rise of diffusion models in time-series forecasting. arXiv preprint arXiv:2401.03006, 2024.
  • Neklyudov et al. [2023a] Kirill Neklyudov, Rob Brekelmans, Daniel Severo, and Alireza Makhzani. Action matching: Learning stochastic dynamics from samples. In International Conference on Machine Learning, pages 25858–25889. PMLR, 2023a.
  • Neklyudov et al. [2023b] Kirill Neklyudov, Rob Brekelmans, Alexander Tong, Lazar Atanackovic, Qiang Liu, and Alireza Makhzani. A computational framework for solving wasserstein lagrangian flows. arXiv preprint arXiv:2310.10649, 2023b.
  • Nüsken and Richter [2021] Nikolas Nüsken and Lorenz Richter. Solving high-dimensional hamilton–jacobi–bellman pdes using neural networks: perspectives from the theory of controlled diffusions and measures on path space. Partial differential equations and applications, 2(4):48, 2021.
  • Oksendal [2013] Bernt Oksendal. Stochastic differential equations: an introduction with applications. Springer Science & Business Media, 2013.
  • Onken et al. [2021] Derek Onken, Samy Wu Fung, Xingjian Li, and Lars Ruthotto. Ot-flow: Fast and accurate continuous normalizing flows via optimal transport. Proceedings of the AAAI Conference on Artificial Intelligence, 35(10):9223–9232, 2021.
  • Peyré et al. [2019] Gabriel Peyré, Marco Cuturi, et al. Computational optimal transport: With applications to data science. Foundations and Trends® in Machine Learning, 11(5-6):355–607, 2019.
  • Pooladian et al. [2023] Aram-Alexandre Pooladian, Heli Ben-Hamu, Carles Domingo-Enrich, Brandon Amos, Yaron Lipman, and Ricky TQ Chen. Multisample flow matching: Straightening flows with minibatch couplings. In International Conference on Machine Learning, pages 28100–28127. PMLR, 2023.
  • Risken and Frank [2012] Hannes Risken and Till Frank. The Fokker-Planck Equation: Methods of Solution and Applications, volume 18. Springer Science & Business Media, 2012.
  • Santambrogio [2015] Filippo Santambrogio. Optimal transport for applied mathematicians. Birkäuser, NY, 55(58-63):94, 2015.
  • Silva et al. [2012] Ikaro Silva, George Moody, Daniel J Scott, Leo A Celi, and Roger G Mark. Predicting in-hospital mortality of icu patients: The physionet/computing in cardiology challenge 2012. In 2012 Computing in Cardiology, pages 245–248. IEEE, 2012.
  • Song et al. [2020] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2020.
  • Tashiro et al. [2021] Yusuke Tashiro, Jiaming Song, Yang Song, and Stefano Ermon. Csdi: Conditional score-based diffusion models for probabilistic time series imputation. Advances in Neural Information Processing Systems, 34:24804–24816, 2021.
  • Tong et al. [2023] Alexander Tong, Nikolay Malkin, Kilian Fatras, Lazar Atanackovic, Yanlei Zhang, Guillaume Huguet, Guy Wolf, and Yoshua Bengio. Simulation-free schrödinger bridges via score and flow matching. arXiv preprint arXiv:2307.03672, 2023.
  • Tong et al. [2024] Alexander Tong, Kilian FATRAS, Nikolay Malkin, Guillaume Huguet, Yanlei Zhang, Jarrid Rector-Brooks, Guy Wolf, and Yoshua Bengio. Improving and generalizing flow-based generative models with minibatch optimal transport. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=CD9Snc73AW. Expert Certification.
  • Villani et al. [2009] Cédric Villani et al. Optimal transport: old and new, volume 338. Springer, 2009.
  • Yang and Karniadakis [2020] Liu Yang and George Em Karniadakis. Potential flow generator with l 2 optimal transport regularity for generative models. IEEE Transactions on Neural Networks and Learning Systems, 33(2):528–538, 2020.
  • Yong and Zhou [2012] Jiongmin Yong and Xun Yu Zhou. Stochastic controls: Hamiltonian systems and HJB equations, volume 43. Springer Science & Business Media, 2012.
  • Zhang and Chen [2022] Qinsheng Zhang and Yongxin Chen. Path integral sampler: A stochastic control approach for sampling. In The Tenth International Conference on Learning Representations. OpenReview.net, 2022. URL https://openreview.net/forum?id=_uCb2ynRu7Y.
  • Zheng et al. [2013] Yu Zheng, Furui Liu, and Hsun-Ping Hsieh. U-air: When urban air quality inference meets big data. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1436–1444, 2013.

Appendix A Stochastic Optimal Control

The data generation task can also be interpreted as a stochastic optimal control (SOC) problem Bellman [1966], Fleming and Rishel [2012], Nüsken and Richter [2021], Zhang and Chen [2022], Holdijk et al. [2023], Berner et al. [2024] whose cost function 𝒥\mathcal{J} is defined as:

𝒥(Xt,t)\displaystyle\mathcal{J}(X_{t},t) =𝔼p(Xt)[0Td12xΨ(Xt,t)2dXtdt]+𝔼p(XT)[Ψ(XT)],\displaystyle=\mathbb{E}_{p(X_{t})}\Bigg{[}\int^{T}_{0}\int_{\mathbb{R}_{d}}\frac{1}{2}\norm{\nabla_{x}\Psi(X_{t},t)}^{2}\mathrm{d}X_{t}\mathrm{d}t\Bigg{]}+\mathbb{E}_{p(X_{T})}\big{[}\Psi(X_{T})\big{]}, (18)

where 12xΨ(Xt,t)2\frac{1}{2}\norm{\nabla_{x}\Psi(X_{t},t)}^{2} denotes the running cost, and Ψ(XT)\Psi(X_{T}) denotes the terminal cost. The above SOC problem can be solved by dynamic programming Bellman [1966], Bertsekas [2012].

Further, let V(Xt,t)=inf𝒥(Xt,t)V(X_{t},t)=\inf\mathcal{J}(X_{t},t) be the value function/optimal-cost-to-go of the SOC problem, then the corresponding Hamilton-Jacobi-Bellman (HJB) partial differential equation (PDE) Evans [2022], Yong and Zhou [2012] is given by

Vtt12VtVt+12ΔVt=0,\displaystyle\frac{\partial V_{t}}{\partial t}-\frac{1}{2}\nabla V^{\prime}_{t}\nabla V_{t}+\frac{1}{2}\Delta V_{t}=0, (19)
with the terminal condition:V(Xt,T)=Ψ(Xt).\displaystyle\mbox{with the terminal condition:}~{}V(X_{t},T)=\Psi(X_{t}). (20)

Appendix B Rao-Blackwell Theorem

Theorem 1

(Rao-Blackwell) Let 𝒮\mathcal{S} be an unbiased estimator of some parameter θΘ\theta\in\Theta, and 𝒯(X)\mathcal{T}(X) the sufficient statistic for θ\theta, then: 1) 𝒮=𝔼[𝒮|𝒯(X)],\mathcal{S}^{*}=\mathbb{E}[\mathcal{S}|\mathcal{T}(X)],is an unbiased estimator for θ\theta, and 2) 𝕍θ[𝒮]𝕍θ[𝒮]\mathbb{V}_{\theta}[\mathcal{S}^{*}]\leq\mathbb{V}_{\theta}[\mathcal{S}] for all θ\theta. The inequality is strict unless 𝒮\mathcal{S} is a function of 𝒯\mathcal{T}.

Appendix C Experimental Environment

For the hardware environment of the experiments, we use a single NVIDIA A100-PCIE-40GB GPU and an Intel(R) Xeon(R) Gold-6248R-3.00GHz CPU. For the software environment, the Python version is 3.9.7, the CUDA version 11.7, and the Pytorch version is 2.0.1.