Nonlinear Dynamical Unbalanced Optimal Transport: Relaxation and Duality Dongjun Wu, Anders Rantzer Abstract In this paper, we introduce a generalized dynamical unbalanced optimal transport framework by incorporating limited control input and mass dissipation, addressing limitations in conventional optimal transport for control applications. We derive a convex dual of the problem using dual optimal control techniques developed before and during the 1990s, transforming the non-convex optimization into a more tractable form. At the core of this formulation is the smooth sub-solutions to an HJB equation. A first-order algorithm based on the dual formulation is proposed to solve the problem numerically. I Introduction Optimal transport (OT) has emerged as a powerful mathematical framework with growing interest in the control community [ 1 , 2 ] , particularly for its ability to model and optimize the transportation of resources, distributions, or probabilities in a variety of applications such as robotic swarms [ 3 ] , motion planning [ 4 ] and single-cell analysis [ 5 ] . Despite its successes, conventional OT, rooted in Monge’s formulation and Kantorovich’s relaxation, assumes mass conservation, meaning the total mass of the initial and target measures must be equal. This assumption limits its applicability in scenarios where mass changes occur during the transport process. For example, in the transmission of electricity through a grid, energy losses due to resistance lead to mass dissipation; in irrigation systems, evaporation or leakage causes mass reduction; and in biological systems, cell growth or decay introduces mass creation or destruction. These cases highlight a critical limitation of classical OT: its inability to handle mass variations, which are prevalent in control applications. To overcome this limitation, extensions to incorporate mass creation and dissipation have been proposed in the literature [ 6 , 7 , 8 , 9 , 10 ] . We adopt the term “unbalanced optimal transport” (UOT) for such extended OT problems. UOT often uses partial differential equations (PDEs) to govern the evolution of measures with varying total mass, as seen in the dynamical formulation of Hellinger-Kantorovich distance (HK) [ 10 ] or Wasserstein-Fisher-Rao (WF) metric [ 6 ] . While UOT has expanded the scope of OT to dynamical systems with mass variation, existing formulations typically assume unconstrained control inputs and mass dissipation, which may not reflect practical constraints (both dynamical and static) in control problems. For instance, in robotic swarms, nonlinear dynamics are present and control inputs (e.g., torques and velocities) are often bounded by physical limits, and in biological systems, mass changes (e.g., growth rates) are constrained by environmental or biochemical factors. In this paper, we propose a generalized formulation of dynamical UOT that explicitly accounts for systems dynamics, constrained control inputs and constrained mass changes. The primary goal of this work is to derive a convex duality for this generalized UOT problem, transforming the nonlinear optimization into a dual form that is more tractable for analysis and computation. To achieve this, we leverage techniques from classical dual optimal control theory, that have been developed before and during the 1990s [ 11 , 12 , 13 ] . Specifically, we employ the concept of relaxed control to lift the problem into a convex setting. This approach not only establishes a duality result but also enables the development of a first-order numerical algorithm to solve the problem. Our contributions provide a flexible framework for control problems involving mass variation, with potential applications in energy systems, fluid dynamics, and biological modeling. Notations: We collect some notations that will be used in the paper. Throughout the paper, X is a compact set in \mathbb{R}^{n} . \partial X denotes the boundary of X . The set of non-negative Borel measures on X is denoted \mathcal{M}_{+}(X) ; the set of probability measures on X is denoted \mathscr{P}(X) . Given a function f:[0,1]\times X\to\mathbb{R} , \nabla f typically means the gradient with respect to the second variable. Let X_{1} and X_{2} be two measurable spaces, \mu a measure on X_{1} , and T a measurable map from X_{1} to X_{2} . Then T_{\#}\mu is the push-forward measure on X_{2} . Given a set A\subseteq\mathbb{R}^{n} , the distance from a point to the set A is defined as d_{A}(x)=\inf_{y\in A}|x-y| . Given a normed linear space \mathcal{X} , the set of bounded linear functionals on \mathcal{X} is denoted \mathcal{X}^{*} . Given a set S\subseteq\mathcal{X} , {\rm co}S is the smallest convex set in \mathcal{X} containing S , and \overline{\rm co}(S) is the closure of {\rm co}(X) . II Problem setting Let X be a compact set in \mathbb{R}^{n} . Consider the following system described by a partial differential equation (PDE) in variable \mu(t,x) : \partial_{t}\mu+\nabla\cdot(\mu f(t,x,u)=g(t,x,u)\mu (1) with boundary condition \mu(0,x)=\mu_{0}(x),\quad\mu(1,x)=\mu_{1}(x) (2) The unknown variable \mu(t,\cdot) is a one-parameter non-negative Borel measure, i.e., \mu(t,\cdot)\in\mathcal{M}_{+}(X) and is compactly supported in X for every t\in[0,1] . The vector field f(t,x,\cdot) and function g(t,x,\cdot) are given and u(t,x) is to be designed to achieve certain optimal criteria. We call u the control input. For convenience, denote D=[0,1]\times X . The equation ( 1 ) should be understood in distributional sense. Namely, the following identity holds for all \varphi\in C^{1}([0,1]\times X) \int_{0}^{1}\int_{X}(\partial_{t}\varphi+\nabla\varphi\cdot f+g\varphi){\rm d}\mu(t,x){\rm d}t=\int_{X}\varphi(1,\cdot){\rm d}\mu_{1}-\varphi(0,\cdot){\rm d}\mu_{0}. We shall call ( 1 ) the system , which describes how an initial measure \mu_{0} is transported to \mu_{1} under the flow of the system \dot{x}=f(t,x,u(t,x)) (3) with mass dissipation determined by g(\cdot,\cdot,\cdot) . Indeed, in case \mu(t,x) is a compactly supported density on X , then the mass evolution is governed by \displaystyle\frac{d}{dt}\int_{X}\mu(t,x){\rm d}x \displaystyle=\int_{X}-\nabla\cdot(\mu f)+g\mu{\rm d}x=\int_{X}g\mu{\rm d}x. If g\equiv 0 , then the total mass \int\mu(t,\cdot) is preserved, and \mu(t,x) is the pushforward measure of \mu_{0} by the flow of the system ( 3 ). If g\geq 0 (resp. \leq 0 ), then the total mass is monotone increasing (resp. decreasing). With ( 1 ) being our model and ( 2 ) the boundary condition, we study an optimization problem of the following type: \min_{u,\mu}\int_{0}^{1}\int_{X}L(t,x,u){\rm d}\mu(t,x){\rm d}t (4) where L(\cdot,\cdot,\cdot) is a non-negative function called the Lagrangian. Under certain regularity assumption, the system ( 1 ) is known to have a unique weak solution in the distributional sense given initial datum \mu_{0}\in\mathscr{P}(X) . And the solution is fully characterized by the flow of the ordinary differential equation ( 3 ) and the mass dissipation term g : for given u with required regularity, let X_{u}(t;x) be the system flow of ( 3 ) starting from x at t=0 , then \mu(t,\cdot)=X_{u}(t,\cdot)_{\#}\left(\mu_{0}\exp\left(\int_{0}^{t}g(s,X_{u}(s,\cdot),u(t,X_{u}(s,\cdot)))\right)\right) (5) for t\in[0,1] , see for example [ 14 ] . In particular, if \mu_{0}=\delta_{x_{0}} , i.e., a Dirac mass at x_{0} . Then the solution to ( 1 ) is \mu(t,x)=e^{\int_{0}^{t}g(s,x(s))ds}\delta_{x(t)}(x) where x(t) is the solution to ( 3 ) with initial condition x(0)=x_{0} . We ignore the technical regularity issues concerning the well-posedness of the system solution, and instead assume that the solution to the system always exists and is unique once the input and initial data \mu_{0} have fixed to certain set (to be defined in the sequel). To facilitate the study of the problem ( 4 ) under the dynamic constraints ( 1 ), we reformulate it into the following form. Problem 1 (Primal problem) Consider the system \displaystyle\partial_{t}\mu(t,x)+\nabla\cdot[\mu(t,x)v(t,x)] \displaystyle=w(t,x)\mu(t,x) (6) \displaystyle\mu(0,x) \displaystyle=\mu_{0}(x) \displaystyle\mu(1,x) \displaystyle=\mu_{1}(x) Study the Lagrangian type problem \min_{v,w,\mu}\int_{0}^{1}\int_{X}L(t,x,v(t,x),w(t,x)){\rm d}\mu(t,x){\rm d}t (7) subject to constraints \begin{bmatrix}v(t,x)\\ w(t,x)\end{bmatrix}\in F(t,x) (8) where the function L and the set F satisfy Assumption H1 below. Assumption H1 : • For every (t,x)\in D , F(t,x) is a convex set, and (v,w)\mapsto L(t,x,v,w) is a lower semi-continuous proper convex function. • There exists a convex compact set \Omega , such that F(t,x)\subseteq\Omega for all (t,x)\in D . Remark 1 Problem 1 extends the unbalanced optimal transport distance proposed in [ 6 ] , by taking L(t,x,v,w)=\frac{1}{2}|v|^{2}+\frac{1}{2}\delta^{2}w^{2} and F(t,x)=\mathbb{R}^{n+1} . 1 1 1 Although F(t,x) is non-compact, we can choose bounded regions which include the supports of \mu_{0},\mu_{1} , and the evolution of the dynamics. In this case, the optimal cost is denoted as WF_{\delta}(\mu_{0},\mu_{1})^{2} . The formulation ( 6 ) is much general, which handles the dynamical constraints ( 8 ) with more general cost ( 7 ). In particular, system ( 1 ) with optimization cost ( 4 ) can be turned into Problem 1 by defining L and F as L(t,x,v,w):=\inf_{u}\left\{L(t,x,u)\left|\begin{array}[]{c}v=f(t,x,u)\\ w=g(t,x,u)\end{array}\right.\right\} (9) (we have used the same letter L for two different functions but it does not cause any confusion) and F(t,x)=\left\{\begin{bmatrix}v\\ w\end{bmatrix}:v=f(t,x,u),\;w=g(t,x,u),\;\exists u\right\}. (10) Given the boundary condition \mu_{0},\mu_{1} , it is an essential question whether Problem 1 is feasible. We have the following sufficient condition. Lemma 1 Problem 1 is feasible for a given pair (\mu_{0},\mu_{1}) if for every (x_{0},z_{0})\in{\rm supp}\mu_{0}\times\mathbb{R} and (x_{1},z_{1})\in{\rm supp}\mu_{1}\times\mathbb{R} , there exists a feasible pair (v(\cdot,\cdot),w(\cdot,\cdot)) such that (x_{0},z_{0}) and (x_{1},z_{1}) are the initial and terminal states of the system \dot{x}=v(t,x) , \dot{z}=w(t,x) respectively. In particular, if the system \left\{\begin{array}[]{l}\dot{x}=f(t,x,u)\\ \dot{z}=g(t,x,u)\end{array}\right. (11) is controllable, then by assuming that F(t,x) is defined by ( 10 ) and L as ( 9 ), the problem is feasible. III Relaxation Problem 1 is an optimal control problem in measure space. In classical optimal control theory in finite dimensional space, convex duality theories have been systematically developed to turn the nonlinear and non-convex problem into infinite dimensional linear programs (hence convex), see for example, L. C. Young [ 11 ] , W. Fleming and D. Vermes [ 12 ] and R. Vinter [ 13 ] , see also A. Rantzer and P. A. Parrilo [ 15 ] . For balanced dynamical optimal transport, some duality theories have also been established in the literature, see for example [ 16 , 17 ] . Duality results for unbalanced dynamical optimal transport (UDOT) have been established by L. Chizat et. al. [ 6 , 18 , 19 ] and M. Liero et. al. [ 10 ] . It was shown that the interpolating Wasserstein-Fisher-Rao metric (see Remark 1 ) WF_{\delta} can be formulated as WF_{\delta}(\mu_{0},\mu_{1})^{2}=\sup_{\varphi\in C^{1}([0,1]\times X)}\int\varphi(1,\cdot){\rm d}\mu_{1}-\varphi(0,\cdot){\rm d}\mu_{0} where \varphi is such that \partial_{t}\varphi+\frac{1}{2}\left(|\partial_{x}\varphi|^{2}+\frac{\varphi^{2}}{\delta^{2}}\right)\leq 0. (12) This duality was obtained based on the fact that the control v and dissipation w can be chosen freely. It is an open question whether similar results hold when the control and dissipation are constrained as in Problem 1 . The goal of this paper is to derive the dual of Problem 1 . We demonstrate that, by leveraging techniques from classical dual optimal control theory, a similar duality result does hold. The key procedure in the construction of classical dual optimal control is to lift the problem into a space composed by the so-called Young measures [ 11 ] , or “relaxed arcs” [ 13 ] . For example, in [ 13 ] , a relaxed arc (when the terminal time is fixed) for the system \dot{x}\in\Omega on [0,1] with x(0)=x_{0} is a tuple (\gamma,m) where \gamma:[0,1]\to X is Lipschitz on [0,1] with \gamma(0)=x_{0} and m_{t}\in\mathscr{P}(X) is a one-parameter probability measure such that \dot{\gamma}(t)=\int_{\Omega}v{\rm d}m_{t}(v). To mimic the notion of relaxed arcs, we propose to define a notion called relaxed measures . First, we consider a relaxation of Problem 1 : Problem 2 In Problem 1 , replace the constraint ( 8 ) by \begin{bmatrix}v(t,x)\\ w(t,x)\end{bmatrix}\in\Omega (13) where \Omega\subseteq\mathbb{R}^{n+1} is defined in Assumption H1. We then define relaxation measures based on the formulation of Problem 2 . Definition 1 (Relaxed measure) A pair (\mu,m) is called a relaxed measure if \mu solves ( 6 ) with (v,w) being \begin{bmatrix}v(t,x)\\ w(t,x)\end{bmatrix}=\int_{\Omega}\begin{bmatrix}\alpha\\ \beta\end{bmatrix}{\rm d}m_{t,x}(\alpha,\beta) where m_{t,x} is a Young measure. A relaxed measure defines a bounded linear functional \Phi on C(D\times\Omega) , for any \xi\in C(D\times\Omega) , define \left\langle\Phi,\xi\right\rangle:=\int_{0}^{1}\int_{X}\int_{\Omega}\xi(t,x,\alpha,\beta){\rm d}m_{t,x}(\alpha,\beta){\rm d}\mu(t,x){\rm d}t. (14) The linear functional \Phi has the following property: for every \phi\in C^{1}([0,1]\times X) , there holds \displaystyle\left\langle\Phi,\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta\right\rangle \displaystyle=\int_{X}\phi(1,\cdot){\rm d}\mu_{1}-\phi(0,\cdot){\rm d}\mu_{0}. (15) Indeed, \displaystyle\left\langle\Phi,\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta\right\rangle \displaystyle= \displaystyle\int_{0}^{1}\int_{X}\int_{\Omega}\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta{\rm d}m_{t,x}(\alpha,\beta){\rm d}\mu(t,x){\rm d}t \displaystyle= \displaystyle\int_{0}^{1}\int_{X}\left[\phi_{t}+\int_{\Omega}[\partial_{x}\phi,\;\phi]\cdot\begin{bmatrix}\alpha\\ \beta\end{bmatrix}{\rm d}m_{t,x}(\alpha,\beta)\right]{\rm d}\mu(t,x){\rm d}t \displaystyle= \displaystyle\int_{0}^{1}\int_{X}\partial_{t}\phi+\partial_{x}\phi\cdot v+\phi w{\rm d}\mu(t,x){\rm d}t \displaystyle= \displaystyle\int_{X}\phi(1,\cdot){\rm d}\mu_{1}-\phi(0,\cdot){\rm d}\mu_{0} Conversely, we can also use ( 15 ) as a defining property of a set of linear functionals on C(D\times\Omega) , i.e., we set W:=\{\Phi\in C^{*}(D\times\Omega)\;|\;\Phi\text{ satisfies (\ref{eq:Phi_phi})}\} (16) It is easy to observe that functionals in W are non-negative in the sense that \left\langle\Phi,l\right\rangle\geq 0 when 0\leq l\in C(D\times\Omega) . Now let S=\{\Phi\in C^{*}(D\times\Omega)\,|\,\exists\text{a relaxed measure s.t. (\ref{eq:lin_func_Phi}) holds}\} (17) then S is a subset of W . The question is how big is the difference between S and W . The following lemma says that W=\overline{{\rm co}}S . The proof is given in Appendix. Lemma 2 Let W and S be defined as ( 16 ) and ( 17 ) respectively. Then W=\overline{{\rm co}}S . With Lemma 2 at hand, we propose to study: Problem 3 (Relaxed primal problem) \min_{\Phi\in W}\left\langle\Phi,L\right\rangle with constraint 2 2 2 Remember that d_{F(t,x)}(\alpha,\beta) is the distance from (\alpha,\beta) to the set F(t,x) , see the Notation paragraph of Section I . \displaystyle\left\langle\Phi,d_{F(t,x)}(\alpha,\beta)\right\rangle \displaystyle=0. (18) The following lemma justifies that Problem 3 is a tight relaxation of Problem 1 . Lemma 3 The optimal values of Problem 1 and Problem 3 are equal. The complete proof of the lemma is tedious; a proof sketch is provided in the Appendix, which is based on Lemma 2 IV Duality In this section, we work toward a convex duality of Problem 3 . We shall prove that Problem 3 admits the following dual formulation. Problem 4 (Dual problem) \sup_{\phi}\int_{X}\phi(1,\cdot){\rm d}\mu_{1}-\phi(0,\cdot){\rm d}\mu_{0} where \phi is taken over the C^{1} solutions to the Hamilton-Jacobi-Bellman inequality \partial_{t}\phi+H(t,x,\partial_{x}\phi,\phi)\leq 0 (19) with H being defined as H(t,x,p,p_{0}):=\sup_{(v,w)\in F(t,x)}\{p^{\top}v+p_{0}w-L(t,x,v,w)\}. Below the main result of this paper, whose proof is deferred to the Appendix: Theorem 1 The optimal values of Problems 1 , 3 and 4 are equal. Now the dual formulation of WF_{\delta} (see ( 12 )) is now justified by Theorem 1 . The Hamiltonian reads \displaystyle H(t,x,p,p_{0}) \displaystyle=\sup_{(v,w)}\left\{p^{\top}v+p_{0}w-\left(\frac{1}{2}|v|^{2}+\frac{1}{2}\delta^{2}w^{2}\right)\right\} \displaystyle=\frac{1}{2}\left(|p|^{2}+\frac{p_{0}^{2}}{\delta^{2}}\right) based on which we immediately recover ( 12 ) from ( 19 ). Theorem 1 also recovers the well-known duality result on balanced optimal transport, i.e., when w\equiv 0 , first proved by Bernard and Buffoni [ 16 ] . We have a more generalized version: Corollary 1 Consider the differential inclusion \dot{x}\in G(t,x) on X , with G(t,x)\subseteq\Omega being convex and \Omega some convex compact set. Let c(x,y)=\inf\int_{0}^{1}L(t,x,\dot{x}){\rm d}t for some Lagrangian L such that v\mapsto L(t,x,v) is convex. Let \mu_{0},\mu_{1} be two probability measures, then \min_{\pi\in\Gamma(\mu_{0},\mu_{1})}\int c(x,y){\rm d}\pi(x,y)=\sup_{\phi}\int\phi_{1}(1\cdot){\rm d}\mu_{1}-\phi_{0}(0,\cdot){\rm d}\mu_{0} where the supremum is taken over the set of C^{1} solutions to the HJB inequality \partial_{t}\phi+H(t,x,\partial_{x}\phi)\leq 0. V A Numerical Algorithm We propose a numerical algorithm similar to the one proposed in [ 20 ] based on the dual formulation Problem 4 . To streamline the exposition, we introduce some notations below \displaystyle G(\phi) \displaystyle=\int_{X}\phi(0,\cdot){\rm d}\mu_{0}-\phi(1,\cdot){\rm d}\mu_{1} \displaystyle K_{H} \displaystyle\;=\{(a,b,c)\in C(D;\mathbb{R}^{n+2}):a+H(t,x,b,c)\leq 0\} Then, Problem 4 can be written as \sup_{q,\phi}-G(\phi)-I_{K_{H}}(q) subject to the constraint q=(\partial_{t}\phi,\partial_{x}\phi,\phi) . We introduce a Lagrangian multiplier \lambda:D\to\mathbb{R}^{n+2} to accommodate this equality constraint: \sup_{q,\phi}\inf_{\lambda}-G(\phi)-I_{K_{H}}(q)-\left\langle\lambda,q-\delta(\phi)\right\rangle where \delta is the operator \delta(\phi)=\begin{bmatrix}\partial_{t}\phi\\ \partial_{x}\phi\\ \phi\end{bmatrix}. Let \mathcal{L}(\phi,q,\lambda):=G(\phi)+I_{K_{H}}(q)+\left\langle\lambda,\delta(\phi)-q\right\rangle then we shall study \inf_{q,\phi}\sup_{\lambda}\mathcal{L}(\phi,q,\lambda) or its augmented Lagrangian form \inf_{q,\phi}\sup_{\lambda}\mathcal{L}_{r}(\phi,q,\lambda) where \mathcal{L}_{r}(\phi,q,\lambda)=\mathcal{L}(\phi,q,\lambda)+\frac{r}{2}\left\|\delta(\phi)-q\right\|^{2} . The norm \|\cdot\| is defined as \|v\|^{2}=\int_{D}|v(t,x)|^{2}{\rm d}t{\rm d}x . Given (\phi^{0},q^{0},\lambda^{1}) , iterate for k\geq 1 1. Compute \phi^{k}\in\arg\min_{\phi}\mathcal{L}_{r}(\phi,q^{k-1},\lambda^{k}) ; 2. Compute q^{k}\in\arg\min_{q}\mathcal{L}_{r}(\phi^{k},q,\lambda^{k}) ; 3. \lambda^{k+1}=\lambda^{k}+r(\delta(\phi^{k})-q^{k}) . Algorithm 1 Augmented Lagrangian Method In Step 1), \phi^{k} can be obtained by solving the second order PDE -r(\Delta_{t,x}\phi-\phi)=\xi^{k} where \displaystyle\xi^{k} \displaystyle=-r(\partial_{t}a^{k-1}+\nabla_{x}\cdot b^{k-1}-c^{k-1}) \displaystyle\quad\quad+\nabla_{x}\cdot\lambda_{b}^{k}+\partial_{t}\lambda_{a}^{k}-\partial_{t}\lambda_{c}^{k} with pure Neumann boundary conditions \displaystyle r\partial_{t}\phi(1,\cdot) \displaystyle=ra^{k-1}(1,\cdot)+\mu_{1}-\lambda_{a}^{k}(1,\cdot) \displaystyle r\partial_{t}\phi(0,\cdot) \displaystyle=ra^{k-1}(0,\cdot)+\mu_{0}-\lambda_{a}^{k}(0,\cdot) and \partial_{x}\phi=0 on \partial X . Note we have denoted \lambda^{k}=(\lambda_{a}^{k},\lambda_{b}^{k},\lambda_{c}^{k}) and q^{k}=(a^{k},b^{k},c^{k}) . To obtain this, differentiating \mathcal{L}_{r} w.r.t. \phi : G(\varphi)+\left\langle\lambda^{k},\delta(\varphi)\right\rangle+r\left\langle\delta(\phi)-q^{k-1},\delta(\varphi)\right\rangle=0 (20) which should hold for all \varphi . Easy calculations show that \displaystyle\left\langle\lambda^{k},\delta(\varphi)\right\rangle= \displaystyle\int\lambda_{a}^{k}\varphi_{t}+\lambda_{b}^{k}\cdot\varphi_{x}+\lambda_{c}^{k}\varphi{\rm d}x{\rm d}t \displaystyle= \displaystyle-\int(\lambda_{a}^{k})_{t}\varphi{\rm d}x{\rm d}t \displaystyle+\int\lambda_{a}^{k}(1,\cdot)\varphi(1,\cdot)-\lambda_{a}^{k}(0,\cdot)\varphi(0,\cdot){\rm d}x \displaystyle-\int(\nabla_{x}\lambda_{b}^{k})\varphi{\rm d}x{\rm d}t+\int_{\partial X}\varphi\lambda_{b}^{k}\cdot dS \displaystyle+\int\lambda_{c}^{k}\varphi{\rm d}x{\rm d}t and \displaystyle\left\langle\delta(\phi)-q^{k-1},\delta(\varphi)\right\rangle \displaystyle= \displaystyle-\int r(\phi_{tt}+\phi_{xx}-\phi-a_{t}^{k-1}-\nabla_{x}\cdot b^{k-1}+c^{k-1})\varphi{\rm d}t{\rm d}x \displaystyle+\int\varphi(1,\cdot)(\phi_{t}(1,\cdot)-a^{k-1}(1,\cdot)){\rm d}x \displaystyle-\int\varphi(0,\cdot)(\phi_{t}(0,\cdot)-a^{k-1}(0,\cdot)){\rm d}x \displaystyle-\int_{\partial X}(\phi_{x}-b^{k-1})\varphi\cdot dS Substituting these into ( 20 ) gives the desired result. Step 2) amounts to the pointwise minimization \displaystyle q^{k} \displaystyle=\arg\inf_{q\in K_{H}}\frac{r}{2}|q-\delta(\phi^{k})|^{2}+\left\langle\lambda^{k},\delta(\phi^{k})-q\right\rangle \displaystyle=\arg\inf_{q\in K_{H}}\frac{r}{2}|q|^{2}-\left\langle q,\lambda^{k}+r\delta(\phi^{k})\right\rangle \displaystyle=\arg\inf_{q\in K_{H}}\left|q-(\lambda^{k}/r+\delta(\phi^{k}))\right|^{2}. VI Conclusion We have proposed a generalized dynamical unbalanced optimal transport (UOT) framework with constrained control and mass changes. By deriving its convex duality using classical dual optimal control techniques, a first-order numerical algorithm has been proposed. Our approach enhances UOT’s applicability to control problems like energy systems and biological modeling. Future work includes proposing more efficient numerical algorithms to handle the dimensionality issue associated with the solution of the HJB. Appendix Proof: Without loss of generality, assume \int{\rm d}\mu_{0}=1 . Suppose that there exists \Lambda_{0}\in\mathscr{W}\backslash\overline{{\rm co}}S , then there exists l\in C(D\times\Omega) and a\in\mathbb{R} , such that \left\langle\Phi,l\right\rangle\geq a,\quad\forall\Phi\in S (21) and \left\langle\Lambda_{0},l\right\rangle\left\langle\Lambda_{0},l\right\rangle \displaystyle\geq-\left\langle\Lambda_{0},\partial_{t}\phi+\partial_{x}\phi\cdot\alpha-\phi\beta\right\rangle \displaystyle=\int\phi(0,\cdot){\rm d}\mu_{0}-\phi(1,\cdot){\rm d}\mu_{1} which yields a contradiction by ( 22 ). To complete the proof, we approximate \phi by C^{1} functions in a similar fashion as in [ 13 ] . ∎ Proof: Given \Phi\in W , express \Phi as \Phi=\int_{S}\Lambda{\rm d}P(\Lambda) for some Borel probability measure P on S . For any l , \left\langle\Phi,l\right\rangle=\int_{S}\left\langle\Lambda,l\right\rangle{\rm d}P(\Lambda) implies the existence of some \Lambda_{0}\in S such that \left\langle\Phi,l\right\rangle=\left\langle\Lambda_{0},l\right\rangle=\int l{\rm d}m_{t,x}{\rm d}\mu{\rm d}t . By ( 18 ), we have \int_{S}\left\langle\Lambda,d_{F(t,x)}(\alpha,\beta)\right\rangle{\rm d}P(\Lambda)=\left\langle\Phi,d_{F(t,x)}(\alpha,\beta)\right\rangle=0 from which we deduce \left\langle\Lambda,d_{F(t,x)}(\alpha,\beta)\right\rangle=0 a.e. \Lambda . Therefore, we may assume \left\langle\Lambda_{0},d_{F(t,x)}(\alpha,\beta)\right\rangle=0 , implying that m_{t,x} is supported in F(t,x) for {\rm d}\mu{\rm d}t a.e. (t,x) . Then \begin{bmatrix}v(t,x)\\ w(t,x)\end{bmatrix}:=\int_{\Omega}\begin{bmatrix}\alpha\\ \beta\end{bmatrix}{\rm d}m_{t,x}(\alpha,\beta)\in F(t,x),\;\text{a.e. }(t,x) and \int_{\Omega}L(t,x,\alpha,\beta){\rm d}m_{t,x}(\alpha,\beta)\geq L(t,x,v(t,x),w(t,x)) by Jensen’s inequality. To summarize, we have constructed from an arbitrary \Phi\in W under constraint ( 18 ) a tuple (\mu,v,w) satisfying the equation ( 6 ) in a way that \left\langle\Phi,L\right\rangle\geq\int_{0}^{1}\int_{X}L(t,x,v,w){\rm d}\mu(t,x){\rm d}t, implying that the optimal value of Problem 1 is upper bounded by that of Problem 3 . On the other hand, the reverse inequality holds in an obvious way. This gives the desired result. ∎ Proof: First, assume that w(t,x)\geq 0 for all (v(t,x),w(t,x))\in F(t,x) . The assumption will be removed later. Consider the space \mathcal{X}=C(D\times\Omega)\times C(X)\times C(X) and its topological dual \mathcal{X}^{*}=C^{*}(D\times\Omega)\times C^{*}(X)\times C^{*}(X) . We construct two convex functionals on \mathcal{X}^{*} as follows. First, define two subsets in \mathcal{X}^{*} : \displaystyle P \displaystyle=\left\{(m,n_{0},n_{1})\in\mathcal{X}^{*}\left|\begin{array}[]{c}n_{0}=\mu_{0},\;n_{1}=\mu_{1},\;m\geq 0\\ \left\langle m,d_{F(t,x)}(\cdot,\cdot)\right\rangle=0\end{array}\right.\right\} \displaystyle Q \displaystyle=\left\{(m,n_{0},n_{1})\in\mathcal{X}^{*}\left|\begin{array}[]{c}\text{(\ref{eq:m_n1_n0}) holds for all}\\ \phi\in C^{1},\,n_{0},\,n_{1}\in C^{*}(X)\end{array}\right.\right\} \left\langle m,\partial_{t}\phi+\phi_{x}\cdot v+\phi w\right\rangle=\left\langle n_{1},\phi_{1}\right\rangle-\left\langle n_{0},\phi_{0}\right\rangle (23) Then define two functionals p^{*} , q^{*} (the asterisk superscripts is to remind that they are defined on \mathcal{X}^{*} ) as \displaystyle p^{*}(m,n_{0},n_{1}) \displaystyle=\left\langle m,L\right\rangle+I_{P}(m,n_{0},n_{1}), \displaystyle q^{*}(m,n_{0},n_{1}) \displaystyle=I_{Q}(m,n_{0},n_{1}) Note that q^{*}(m,n_{0},n_{1})=q^{*}(-m,-n_{0},-n_{1}) , it is then easy to see that Problem 3 is equivalent to \min_{(m,n_{0},n_{1})\in\mathcal{X}^{*}}p^{*}(m,n_{0},n_{1})+q^{*}(-m,-n_{0},-n_{1}) We shall use the Fenchel-Rockafellar theorem (Theorem 2 in Appendix) to derive the dual of the above problem. First, we compute p and q such that p^{*} and q^{*} are their convex conjugates. The computation of p is rather straightforward, \displaystyle p(\xi,\eta_{0},\eta_{1}) \displaystyle= \displaystyle\sup_{(m,n_{0},n_{1})}\left\langle m,\xi\right\rangle+\left\langle n_{0},\eta_{0}\right\rangle+\left\langle n_{1},\eta_{1}\right\rangle-p^{*}(m,n_{0},n_{1}) \displaystyle= \displaystyle\sup_{m\geq 0,\,\left\langle m,d_{F(t,x)}\right\rangle=0}\left\langle m,\xi-L\right\rangle+\int\eta_{0}{\rm d}\mu_{0}+n_{1}{\rm d}\mu_{1} \displaystyle= \displaystyle\max_{(t,x)\in D,\;(v,w)\in F(t,x)}(\xi-L)^{+}+\int\eta_{0}{\rm d}\mu_{0}+n_{1}{\rm d}\mu_{1} where (\xi-L)^{+}:=\max\{0,\xi-L\} . To compute q , consider the set \mathcal{Q}=\left\{(\xi,\eta_{0},\eta_{1})\in\mathcal{X}\left|\begin{array}[]{c}\exists\phi\in C^{1},\text{ s.t. }\eta_{0}=\phi_{0},\eta_{1}=-\phi_{1}\\ \xi=\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta,\;\forall(t,x,\alpha,\beta)\end{array}\right.\right\} We assert that q(\xi,\eta_{0},\eta_{1})=I_{\bar{\mathcal{Q}}} with \bar{\mathcal{Q}} being the closure of Q . In fact, by definition q(\xi,\eta_{0},\eta_{1})=\sup_{(m,n_{0},n_{1})\in Q}\left\langle m,\xi\right\rangle+\left\langle\eta_{0},n_{0}\right\rangle+\left\langle\eta_{1},n_{1}\right\rangle if (\xi,\eta_{0},\eta_{1})\in\mathcal{Q} , we have \displaystyle\left\langle m,\xi\right\rangle \displaystyle=\left\langle m,\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta\right\rangle \displaystyle=\left\langle n_{1},\phi_{1}\right\rangle-\left\langle n_{0},\phi_{0}\right\rangle\text{ (by (\ref{eq:m_n1_n0}))} \displaystyle=-\left\langle n_{1},\eta_{1}\right\rangle-\left\langle n_{0},\eta_{0}\right\rangle\text{ (by definition of $\mathcal{Q}$)} from which it follows that q(\xi,\eta_{0},\eta_{1})=0 . If (\xi,\eta_{0},\eta_{1})\notin\bar{\mathcal{Q}} , then since \mathcal{Q} is a closed linear space, there exists (m^{\prime},n_{0}^{\prime},n_{1}^{\prime})\in\mathcal{X}^{*} such that \left\langle\xi,m^{\prime}\right\rangle+\left\langle\eta_{0},n_{0}^{\prime}\right\rangle+\left\langle\eta_{1},n_{1}^{\prime}\right\rangle>0 (24) and \left\langle\partial_{t}\phi+\phi_{x}\cdot v+\phi w,m^{\prime}\right\rangle+\left\langle\phi_{0},n_{0}^{\prime}\right\rangle+\left\langle-\phi_{1},n_{1}^{\prime}\right\rangle=0 for all \phi\in C^{1} . But this implies (m^{\prime},n_{0}^{\prime},n_{1}^{\prime})\in Q . By ( 24 ), we arrive at the conclusion that q(\xi,\eta_{0},\eta_{1})=+\infty since \alpha(m^{\prime},n_{0}^{\prime},n_{1}^{\prime})\in Q for any \alpha\in\mathbb{R} . Now invoking Theorem 2 , we have \displaystyle\min_{(m,n_{0},n_{1})\in\mathcal{X}^{*}}p^{*}(m,n_{0},n_{1})+q^{*}(-m,-n_{0},-n_{1}) \displaystyle= \displaystyle\sup_{(\xi,\eta_{0},\eta_{1})\in\mathcal{X}}-p(\xi,\eta_{0},\eta_{1})-q(\xi,\eta_{0},\eta_{1}) \displaystyle= \displaystyle\sup_{(\xi,\eta_{0},\eta_{1})\in\bar{\mathcal{Q}}}-p(\xi,\eta_{0},\eta_{1}) \displaystyle= \displaystyle\sup_{(\xi,\eta_{0},\eta_{1})\in\bar{\mathcal{Q}}}\left\{-\max(\xi-L)^{+}-\int\eta_{0}{\rm d}\mu_{0}-n_{1}{\rm d}\mu_{1}\right\} \displaystyle= \displaystyle\sup_{\phi\in C^{1}}-\max(\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta-L)^{+}+\int\phi_{1}{\rm d}\mu_{1}-\phi_{0}{\rm d}\mu_{0} (25) where the maximization is taken over the set (t,x,\alpha,\beta)\in D\times\Omega such that (\alpha,\beta)\in F(t,x) . For fixed \phi\in C^{1} , let c=\max(\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta-L)^{+} and define \tilde{\phi}=\phi-ct . Then \displaystyle\tilde{\phi}_{t}+\tilde{\phi}_{x}\cdot\alpha+\tilde{\phi}\beta-L \displaystyle= \displaystyle(\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta-L-c)-ct\beta \displaystyle\leq \displaystyle 0 since \beta\geq 0 by assumption. Note that this is equivalent to saying that \partial_{t}\tilde{\phi}+H(t,x,\partial_{x}\tilde{\phi},\tilde{\phi})\leq 0. (26) By assuming without loss of generality that \mu_{1}(X)=1 , we get \displaystyle-\max(\tilde{\phi}_{t}+\tilde{\phi}_{x}\cdot\alpha+\tilde{\phi}\beta-L)^{+}+\int\tilde{\phi}_{1}{\rm d}\mu_{1}-\tilde{\phi}_{0}{\rm d}\mu_{0} \displaystyle= \displaystyle\int\tilde{\phi}_{1}{\rm d}\mu_{1}-\tilde{\phi}_{0}{\rm d}\mu_{0} (27) \displaystyle= \displaystyle\int(\phi_{1}-c){\rm d}\mu_{1}-\phi_{0}{\rm d}\mu_{0} \displaystyle= \displaystyle-c+\int\phi_{1}{\rm d}\mu_{1}-\phi_{0}{\rm d}\mu_{0} \displaystyle= \displaystyle-\max(\phi_{t}+\phi_{x}\cdot\alpha+\phi\beta-L)^{+}+\int\phi_{1}{\rm d}\mu_{1}-\phi_{0}{\rm d}\mu_{0} Now, replacing \phi in ( 25 ) by \tilde{\phi} and in view of ( 26 ), ( 27 ), the theorem is proven under the assumption that w(\cdot,\cdot)\geq 0 . To remove the positivity assumption on w , consider the scaling \nu(t,x)=e^{\lambda t}\mu(t,x) . Then \nu satisfies \displaystyle\partial_{t}\nu+\nabla\cdot\nu v \displaystyle=\tilde{w}\nu \displaystyle\nu(0,\cdot) \displaystyle=\mu_{0} \displaystyle\nu(1,\cdot) \displaystyle=e^{\lambda}\mu_{1} in which \tilde{w}=w+\lambda . The minimization of ( 7 ) becomes \int_{0}^{1}\int_{X}L(t,x,v,\tilde{w}-\lambda)e^{-\lambda t}{\rm d}\nu(t,x){\rm d}t. Choose \lambda large enough such that \tilde{w}\geq 0 , which is possible due to the compactness of \Omega . Applying the previous result, we get a dual formulation of this problem: \sup_{\phi}\int_{X}\phi(1,\cdot)e^{\lambda}{\rm d}\mu_{1}-\phi(0,\cdot){\rm d}\mu_{0} (28) subject to \partial_{t}\phi+\tilde{H}(t,x,\partial_{x}\phi,\phi)\leq 0 (29) The Hamiltonian \tilde{H} is computed as follows \displaystyle\tilde{H}(t,x,p,p_{0}) \displaystyle= \displaystyle\sup_{(v,\tilde{w})}p^{\top}v+p_{0}\tilde{w}-e^{-\lambda t}L(t,x,v,\tilde{w}-\lambda) \displaystyle= \displaystyle p_{0}\lambda+\sup_{(v,w)\in F(t,x)}p^{\top}v+p_{0}w-e^{-\lambda t}L(t,x,v,w) \displaystyle= \displaystyle p_{0}\lambda+e^{-\lambda t}\sup_{(v,w)\in F(t,x)}(e^{\lambda t}p)^{\top}v+(e^{\lambda t}p_{0})w-L \displaystyle= \displaystyle p_{0}\lambda+e^{-\lambda t}H(t,x,e^{\lambda t}p,e^{\lambda t}p_{0}) where H is the Hamiltonian defined as in Problem 4 . Thus the HJB inequality can be transformed into \partial_{t}\phi+\lambda\phi+e^{-\lambda t}H(t,x,e^{\lambda t}\partial_{x}\phi,e^{\lambda t}\phi)\leq 0 or \partial_{t}\varphi+H(t,x,\partial_{x}\varphi,\varphi)\leq 0 (30) with \varphi=e^{\lambda t}\phi . Now, replacing \phi in ( 28 ) by e^{-\lambda t}\varphi , ( 28 ) can be written as \sup_{\varphi\in C^{1}}\int\varphi(1,\cdot){\rm d}\mu_{1}-\varphi(0,\cdot){\rm d}\mu_{0} in which \varphi is subject to the HJB inequality ( 30 ). The proof is now complete. ∎ Theorem 2 (Fenchel-Rockafellar) Let \mathcal{X} be a normed vector space, \mathcal{X}^{*} its topological dual. Let p,q:\mathcal{X}\to\mathbb{R}\cup\{+\infty\} be two proper convex functionals. Denote p^{*},q^{*} the convex conjugates of p,q respectively. If there exists a point x_{0}\in\mathcal{X} , such that p is continuous in at x_{0} and q(x_{0})<+\infty , then \min_{x^{*}\in\mathcal{X}^{*}}\{p^{*}(x^{*})+q^{*}(-x^{*})\}=\sup_{x\in\mathcal{\mathcal{X}}}\{-p(x)-q(x)\}.