<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Primal Dual Methods for Wasserstein Gradient Flows</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>03/31/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10228499</idno>
					<idno type="doi">10.1007/s10208-021-09503-1</idno>
					<title level='j'>Foundations of Computational Mathematics</title>
<idno>1615-3375</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>José A. Carrillo</author><author>Katy Craig</author><author>Li Wang</author><author>Chaozhen Wei</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Abstract            Combining the classical theory of optimal transport with modern operator splitting techniques, we develop a new numerical method for nonlinear, nonlocal partial differential equations, arising in models of porous media, materials science, and biological swarming. Our method proceeds as follows: first, we discretize in time, either via the classical JKO scheme or via a novel Crank–Nicolson-type method we introduce. Next, we use the Benamou–Brenier dynamical characterization of the Wasserstein distance to reduce computing the solution of the discrete time equations to solving fully discrete minimization problems, with strictly convex objective functions and linear constraints. Third, we compute the minimizers by applying a recently introduced, provably convergent primal dual splitting scheme for three operators (Yan in J Sci Comput 1–20, 2018). By leveraging the PDEs’ underlying variational structure, our method overcomes stability issues present in previous numerical work built on explicit time discretizations, which suffer due to the equations’ strong nonlinearities and degeneracies. Our method is also naturally positivity and mass preserving and, in the case of the JKO scheme, energy decreasing. We prove that minimizers of the fully discrete problem converge to minimizers of the spatially continuous, discrete time problem as the spatial discretization is refined. We conclude with simulations of nonlinear PDEs and Wasserstein geodesics in one and two dimensions that illustrate the key properties of our approach, including higher-order convergence our novel Crank–Nicolson-type method, when compared to the classical JKO method.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Gradient flow methods are classical techniques for the analysis and numerical simulation of partial differential equations. Historically, such methods were exclusively based on gradient flows arising from a Hilbert space structure, particularly L 2 (R d ), but since the work of Jordan, Kinderlehrer, and Otto in the late 90's <ref type="bibr">[75,</ref><ref type="bibr">93,</ref><ref type="bibr">94]</ref>, interest has emerged in a range of nonlinear, nonlocal partial differential equations that are gradient flows in the Wasserstein metric,</p><p>When &#937; = R d , we consider no-flux boundary conditions. Equations of this form arise in a number of physical and biological applications, including models in granular media <ref type="bibr">[12,</ref><ref type="bibr">45,</ref><ref type="bibr">46,</ref><ref type="bibr">102]</ref>, material science <ref type="bibr">[71]</ref>, and biological swarming <ref type="bibr">[6,</ref><ref type="bibr">39,</ref><ref type="bibr">77]</ref>. Furthermore, many well-known equations may be written in this way: when V = W = 0 and &#945; = 1, Eq. ( <ref type="formula">1</ref>) reduces to the heat equation (m = 1), porous medium equation (m &gt; 1), and fast diffusion equation (m &lt; 1) <ref type="bibr">[103]</ref>. In the presence of a drift potential V , it becomes a Fokker-Planck equation (m = 1) or nonlinear Fokker-Planck equation (m &gt; 1), as used in models of tumor growth <ref type="bibr">[96,</ref><ref type="bibr">100]</ref>. When the interaction potential W is given by a repulsive-attractive Morse or power-law potential, W (x) = -C a e -|x|/l a + C r e -|x|/l r , C r /C a &lt; (l r /l a ) -d , 0 &lt; l r &lt; l a , 0 &lt; C a &lt; C r ,</p><p>we recover a range of nonlocal interaction models, which are repulsive at short length scales and attractive at long length scales <ref type="bibr">[4,</ref><ref type="bibr">5,</ref><ref type="bibr">34,</ref><ref type="bibr">101]</ref>. When W = (&#916;) -1 , the Newtonian potential, we have the Keller-Segel equation and its nonlinear diffusion variants <ref type="bibr">[17,</ref><ref type="bibr">19,</ref><ref type="bibr">25,</ref><ref type="bibr">26,</ref><ref type="bibr">32,</ref><ref type="bibr">41,</ref><ref type="bibr">76]</ref>. Finally, as the diffusion exponent m &#8594; +&#8734;, we recover congested aggregation and drift equations arising in models of pedestrian crowd dynamics and shape optimization problems <ref type="bibr">[23,</ref><ref type="bibr">58,</ref><ref type="bibr">67,</ref><ref type="bibr">84,</ref><ref type="bibr">90,</ref><ref type="bibr">91]</ref>.</p><p>In order to describe the gradient flow structure of equation ( <ref type="formula">1</ref>), we begin by rewriting it as a continuity equation in &#961;(x, t) for a velocity field v(x, t),</p><p>In this form, two key properties of the equation become evident: it is positivity preserving and conserves mass. In what follows, we will always consider nonnegative initial data, and we will typically renormalize so that the mass of the initial data equals one, i.e., &#961; 0 &#8712; P ac (&#937;), where P ac (&#937;) is the set of probability measures on &#937; that are absolutely continuous with respect to Lebesgue measure. Furthermore, as our objective is to develop a numerical method for these equations, we will exclusively consider the case when &#937; is a bounded domain. Throughout, we commit a mild abuse of notation and identify all such probability measures with their densities, d&#961;(x) = &#961;(x)dx.</p><p>As discovered by Otto <ref type="bibr">[93]</ref>, given an energy E : P ac (&#937;) &#8594; R &#8746; {+&#8734;}, we may formally define its gradient with respect to the Wasserstein metric d W using the formula</p><p>(See Sect. 2.1 for the definition of the Wasserstein metric d W .) In this way, gradient flows of E, &#8706; t &#961; = -&#8711; d W E(&#961;), correspond to solutions of the continuity equation with velocity v = -&#8711; &#948;E &#948;&#961; . In particular, Eq. ( <ref type="formula">3</ref>) is the gradient flow of the energy</p><p>Differentiating the energy (4) along solutions of (3), one formally obtains that the energy is decreasing along the gradient flow</p><p>which coincides with the theoretical interpretation of gradient flows as solutions that evolve in the direction of steepest descent of an energy, where the notion of steepest descent is induced by the Wasserstein metric structure.</p><p>A key feature of equations of the form <ref type="bibr">(3)</ref> is the competition between repulsive and attractive effects. For repulsive-attractive interaction kernels W , as in equation ( <ref type="formula">2</ref>), these effects can arise purely through nonlocal interactions, leading to rich structure of the steady states <ref type="bibr">[4,</ref><ref type="bibr">13,</ref><ref type="bibr">14,</ref><ref type="bibr">34,</ref><ref type="bibr">65]</ref>. For purely attractive interaction kernels W , as in the Keller-Segel equation, the competition instead arises from the combination of nonlocal interaction with diffusion. In this case, different choices of interaction kernel W , diffusion exponent m, and initial data &#961; 0 can lead to widely different behaviorfrom bounded solutions being globally well posed to smooth solutions blowing up in finite time <ref type="bibr">[17,</ref><ref type="bibr">19,</ref><ref type="bibr">25,</ref><ref type="bibr">26,</ref><ref type="bibr">32,</ref><ref type="bibr">41]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Summary of Numerical Approach</head><p>The goal of the present work is to develop new numerical approach for partial differential equations of the form (1) that combine gradient flow methods with modern operator splitting techniques. Our approach applies to equations of this form with any combination of diffusion &#945;U m (&#961;) (&#945; &#8805; 0), drift V , or interaction W * &#961; terms-in particular, it is not necessary for diffusion to be present in order for our scheme to converge. The main idea of our approach is to discretize the PDE/Wasserstein gradient flow at two levels. First, we consider a time discretization of the gradient flow with time step &#964; (see Fig. <ref type="figure">1b</ref>), either given by the classical JKO scheme (Eq. ( <ref type="formula">6</ref>) below) or a new Crank-Nicolson inspired variant (Eq. <ref type="bibr">(7)</ref> below). This reduces computation of the gradient flow to solving a sequence of infinite-dimensional minimization problems. Then, we consider a dynamical reformulation of these minimization problems, stemming from Benamou and Brenier's dynamic characterization of the Wasserstein metric, by which the problem becomes the minimization of a strictly convex integral functional subject to a linear PDE constraint (see Fig. <ref type="figure">1c</ref>). At this level, the problem remains continuous in space and time. We conclude by considering a further discretization of the problem, with inner time step (&#916;t) and spatial discretization (&#916;x), by taking piecewise constant approximations of the functions and using a finite difference approximation of the PDE constraint (see Fig. <ref type="figure">1d</ref>). In this final, fully discrete form, we then compute the minimizer using modern operator splitting techniques, applying Yan's recent extension of the classical primal dual algorithm for minimizing sums of three convex functions <ref type="bibr">[106]</ref>.</p><p>Our paper is organized as follows. In Sect. 1.2, we discuss the relationship between our numerical approach and previous work. In Sect. 1.3, we summarize our contribution. In Sect. 2, we describe the details of our numerical method. Along with numerically simulating Wasserstein gradient flows, our method also provides, as a special case, a new method for computing Wasserstein geodesics and the Wasserstein distance between probability densities; see Remark 1. In Sect. 3, we prove that, provided a smooth, positive solution of the continuum JKO scheme exists and the energy corresponding to the PDE is sufficiently regular, then minimizers of the fully discrete problem exist (Theorem 1), the objective functions of the discrete problems &#915;converge to the objective function of the continuum problem (Theorem 2), and thus, solutions of the fully discrete scheme converge, up to a subsequence, to a solution of the continuum scheme (Theorem 3). As a special case, we also recover convergence of a numerical method for computing Wasserstein geodesics, similar to that introduced by Papadakis, P&#233;yre, and Oudet <ref type="bibr">[95]</ref>. Finally, in Sect. <ref type="bibr">4</ref>, we provide several numerical simulations illustrating our approach in both one and two dimensions, computing Wasserstein geodesics, nonlinear Fokker-Planck equations, aggregation diffusion equations, and other related equations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Details of Approach and Comparison with Previous Work</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2.1">Classical Numerical PDE Methods</head><p>We now compare our approach to existing numerical methods. Perhaps the most common numerical approach for equations of the form (1) is to consider the equation as an advection-diffusion equation and apply classical finite difference, finite volume, or Galerkin discretizations <ref type="bibr">[3,</ref><ref type="bibr">29,</ref><ref type="bibr">54,</ref><ref type="bibr">66,</ref><ref type="bibr">85]</ref>. However, when such methods are based on explicit time discretizations, they suffer from stability constraints due either to the degeneracy of the diffusion (when m &gt; 1) or the nonlocality from the interaction potential W . (See for instance the mesa problem <ref type="bibr">[83]</ref>.) Implicit time discretizations, on the other hand, are computationally intensive, due to the difficulty of matrix inversion, even when the implicit steps are solved by smart iterative methods to avoid the high computation cost of convolution <ref type="bibr">[3]</ref>.</p><p>Another common approach is to leverage structural similarities between (3) and equations from fluid dynamics to develop particle methods <ref type="bibr">[14,</ref><ref type="bibr">27,</ref><ref type="bibr">30,</ref><ref type="bibr">36,</ref><ref type="bibr">43,</ref><ref type="bibr">48,</ref><ref type="bibr">57,</ref><ref type="bibr">60,</ref><ref type="bibr">88,</ref><ref type="bibr">92]</ref>. Until recently, the key limitation of such methods has been developing approaches to incorporate diffusion. Following the analogy with the Navier-Stokes equations, stochastic particle methods have been proposed in the case of linear diffusion (m = 1) <ref type="bibr">[72]</ref><ref type="bibr">[73]</ref><ref type="bibr">[74]</ref><ref type="bibr">86]</ref>. More recently the first two authors and Patacchini developed a deterministic blob method for linear and nonlinear diffusion (m &#8805; 1) <ref type="bibr">[31]</ref>. On the one hand, particle methods naturally conserve mass and positivity, and they can also be designed to respect the underlying gradient flow structure of the equation, including the energy dissipation property <ref type="bibr">(5)</ref>. On the other hand, a large number of particles are often required to resolve finer properties of solutions.</p><p>In contrast with such classical methods, our method introduces an auxiliary momentum variable m and an additional inner layer of time discretization, which enlarges the dimension of the problem. However, as later pointed out in <ref type="bibr">[80]</ref>, the inner layer of time can be discretized with just one step without violating the overall first-order accuracy, there completely eliminating the additional cost introduced by the inner layer. Another major advantage of our approach is that, by reforming the PDE problem into an optimization problem, we obtain unconditional stability (for the JKO discretization, see Eq. ( <ref type="formula">6</ref>) below) while avoiding the inversion of a full matrix in the general implicit setting, which is extremely expensive, especially in higher dimensions; see for instance <ref type="bibr">[3]</ref>. Finally, compared to other implicit methods, such as the backward Euler method, the suboptimization problems can be solved independently at each gridpoint, and therefore are massively parallelizable and suitable for high-dimensional problems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2.2">Variational Methods</head><p>Compared to the classical numerical PDE approaches described in the previous section, a more modern class of numerical methods leverages the gradient flow structure of (1) to approximate solutions of the PDE by solving a sequence of minimization problems. This is the approach we take in the present work. Originally introduced by Jordan, Kinderlehrer, and Otto as a technique for computing solutions of the Fokker-Planck equation (Eq. ( <ref type="formula">1</ref>), W = 0, m = 1) <ref type="bibr">[75]</ref>, this scheme approximates the solution &#961;(x, t) at time t by solving the following sequence of n minimization problems with time step &#964; = t/n,</p><p>The JKO scheme is precisely the analogue of the implicit Euler method in the infinitedimensional Wasserstein space. The constraint &#961; &#8712; P ac (&#937;) ensures that the method is positivity and mass preserving, and the fact that d 2 W (&#961;, &#961; n ) &#8805; 0 ensures the energy decreasing along the scheme, E(&#961; n+1 &#964; ) &#8804; E(&#961; n &#964; ). Under sufficient assumptions on the underlying domain &#937;, drift potential V , interaction potential W , and initial data &#961; 0 (see Sect. 2.1), the solution of the JKO scheme &#961; n &#964; converges to the solution &#961;(x, t) of the partial differential equation ( <ref type="formula">1</ref>), with a first-order rate in terms of the time step &#964; = t/n [2, Theorem 4.0.4],</p><p>In our numerical simulations, we observe that this discretization error dominates other errors in our numerical method; see Sects. 4.2.1 and 4.2.2. Consequently, we also introduce a new time discretization, in analogy with the Crank-Nicolson method</p><p>The connection between the above scheme and the classical Crank-Nicolson discretization can be seen by considering the optimality conditions for (7):</p><p>Like the JKO scheme, our Crank-Nicolson inspired method is also positivity and masspreserving, though it is not energy decreasing. In Figs. 7, 8, and 10 of our numerics section, we conduct a preliminary analysis of the rate of convergence of this method, which verifies that it is indeed higher order than the JKO scheme. As the goal of the present work is primarily the development of fully discrete numerical schemes, we leave a thorough analysis of the rate of convergence of our Crank-Nicolson inspired method as &#964; &#8594; 0 to future work. On the one hand, our Crank-Nicolson inspired method <ref type="bibr">(7)</ref> is not the first higher-order method proposed for metric space gradient flows: Matthes and Plazotta developed a provably second-order scheme for general metric space gradient flows by generalizing the backward differentiation formula <ref type="bibr">[89]</ref>. The Matthes-Plazotta method, however, requires two evaluations of the Wasserstein distance at each outer time step and thus is less practical for our purpose of numerically computing gradient flows in higher dimensions. Another method was introduced by Legendre and Turinici <ref type="bibr">[79]</ref> based on the midpoint method. This method can be reformulated as the classical JKO step with half time step followed by an extrapolation. This extrapolation step could be implemented by solving the corresponding continuity equation either explicitly or implicitly; however, solving the equation explicitly could potentially violate conservation of positivity, while solving it implicitly would require an additional matrix inversion. Another higher-order variational method was also proposed in <ref type="bibr">[78]</ref>, which resembles explicit Runge-Kutta methods and, again, require two or more evaluations of the Wasserstein distance at each outer time step.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2.3">Numerical Methods for the Wasserstein Distance</head><p>To use either the classical JKO scheme <ref type="bibr">(6)</ref> or our new Crank-Nicolson inspired scheme (7) as a basis for numerical simulations, one must first develop a fully discrete approximation of the minimization problem at each step of the scheme. Here, the main numerical difficulty arises in approximating the Wassserstein distance, and there are several different approaches for dealing with this term. First, one can reformulate the Wasserstein distance in terms of a Monge-Amp&#233;re equation with nonstandard boundary conditions <ref type="bibr">[11,</ref><ref type="bibr">68]</ref>, though difficulties arise due to the lack of a comparison principle <ref type="bibr">[70]</ref>. Second, one can reframe the problem as a classical L 2 (R d ) gradient flow at the level of diffeomorphisms <ref type="bibr">[16,</ref><ref type="bibr">37,</ref><ref type="bibr">47,</ref><ref type="bibr">49,</ref><ref type="bibr">69]</ref>, but to pursue this approach, one has to overcome complications arising from the underlying geometry and the structure of the PDE system for the diffeomorphisms. Third, one can discretize the Wasserstein distance term as a finite-dimensional linear program, overcoming the lack of strict convexity of the objective function by adding a small amount of entropic regularization <ref type="bibr">[8,</ref><ref type="bibr">55,</ref><ref type="bibr">61]</ref>. (For a detailed survey of computational optimal transport, we refer the reader to the recent book by P&#233;yre and Cuturi for <ref type="bibr">[97]</ref>.)</p><p>A fourth approach for computing the Wasserstein distance, and the one which we develop in the present work, is to consider a dynamic formulation due to Benamou and Brenier <ref type="bibr">[7]</ref>. This reframes the problem as a strictly convex optimization problem with linear PDE constraints, which can be discretized using Benamou and Brenier's original augmented Lagrangian method ALG2 or, more generally, a range of modern proximal splitting methods, as shown by Papadakis, Peyre, and Oudet <ref type="bibr">[95]</ref>. (See also <ref type="bibr">[21,</ref><ref type="bibr">22]</ref> for related work on mean field games.) Adding an additional Fisher information term in this dynamic formulation (in analogy with entropic regularization) has also been explored in <ref type="bibr">[82]</ref>.</p><p>Only recently have these above approaches for computing the Wasserstein distance been integrated with the JKO scheme <ref type="bibr">(6)</ref> in order to simulate partial differential equations of the form <ref type="bibr">(1)</ref>. The Monge-Amp&#233;re approach extends naturally, though the presence of a diffusion term &#945;U m (&#961;) for &#945; &gt; 0 is required to enforce convexity constraints at the discrete level <ref type="bibr">[10]</ref>. Similarly, entropic regularization (or the addition of a Fisher information term) vastly accelerates the computation of gradient flows, but at the level of the partial differential equation, this corresponds to introducing numerical diffusion, which may disrupt the delicate balance between aggregation and diffusion inherent in PDEs of this type <ref type="bibr">[28,</ref><ref type="bibr">55,</ref><ref type="bibr">82]</ref>. Finally, Benamou and Brenier's dynamic reformulation of the Wasserstein distance has also been adopted in recent work to approximate gradient flows <ref type="bibr">[9]</ref>. A key benefit of this latter approach when compared to entropic regularization is that it leads to an optimization problem in N d</p><p>x &#215; N t variables, where N x and N t are the number of spatial and temporal gridpoints, whereas the latter leads to an optimization problem in N 2d</p><p>x variables. In the present work, we further develop this last approach, using Benamou and Brenier's dynamic reformulation of the Wasserstein distance to simulate Wasserstein gradient flows, via both the classical JKO scheme <ref type="bibr">(6)</ref> and our new Crank-Nicolson inspired scheme <ref type="bibr">(7)</ref>. This leads to a sequence of minimization problems (Fig. <ref type="figure">1C</ref>), which we discretize (Fig. <ref type="figure">1D</ref>) and then solve using a modern primal dual three operator splitting scheme due to Yan <ref type="bibr">[106]</ref>, instead of the classical ALG2 method. See Sect. 2 for a detailed description of our approach.</p><p>Due to the fact that we use operator splitting methods to compute the minimizer in Benamou and Brenier's dynamic formulation of the Wasserstein distance, our work can be seen as an extension of previous work by Papadakis, Peyre, and Oudet <ref type="bibr">[95]</ref>, which applied similar two operator splitting schemes to simulate the Wasserstein distance. However, there are a few key differences between our approach and previous work. First, we are able to implement the primal dual splitting scheme in a manner that does not require matrix inversion of the finite difference operator, which reduces the computational cost. Second, we succeed in obtaining the exact expression for the proximal operator, which allows our method to be truly positivity preserving, while other similar methods are only positivity preserving in the limit as &#916;x, &#916;t &#8594; 0; see Remark 5. Third, instead of imposing the linear PDE constraint in Benamou and Brenier's dynamic reformulation exactly, via a finite difference approximation, we allow the linear PDE constraint to hold up to an error of order &#948; &gt; 0, which can be tuned according to the spatial discretization (&#916;x), the inner temporal discretization (&#916;t), and the outer time step &#964; to respect the order of accuracy of the finite difference approximation; see Remark 3. Numerically, this allows our method to converge in fewer iterations, without any reduction in accuracy, as demonstrated in Fig. <ref type="figure">3</ref>. From a theoretical perspective, the fact that we only require the PDE constraint to hold up to an error of order &#948; &gt; 0 makes it possible to prove convergence of minimizers of the fully discrete problem to minimizers of the JKO scheme <ref type="bibr">(6)</ref>, since minimizers of the fully discrete problem always exist for &#948; &gt; 0, which is not the case when the PDE constraint is enforced exactly (&#948; = 0); see Remark 8 and Theorem 1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.3">Contribution</head><p>The main components of our numerical method for computing solutions to (1) are: (a) an outer time discretization, of either JKO <ref type="bibr">(6)</ref> or Crank-Nicolson type (7) (Fig. <ref type="figure">1B</ref>) (b) a dynamic interpretation of the Wasserstein distance (Fig. <ref type="figure">1C</ref>), which when discretized via finite difference approximations leads to a sequence of constrained optimization problems (Fig. <ref type="figure">1D</ref>) (c) an application of modern three operator splitting schemes for solving these optimization problems.</p><p>Our main contributions are:</p><p>-Unlike classical explicit methods, our JKO-type method is unconditionally stable. Unlike classical implicit methods, it achieves this stability without an expensive matrix inversion. -In practice, we observe that our Crank-Nicolson-type method performs even better than our JKO-type method, in terms of rate of convergence with respect to the outer time step (see Figs. <ref type="figure">7,</ref><ref type="figure">8</ref>, and 10). We leave a thorough analysis of the rate of this convergence of this method to future work. -By formulating our optimization problem with a linear inequality constraint instead of a linear equality constraint, our algorithm converges in fewer iterations when compared to related algorithms for Wasserstein geodesics; see Remark 3 and Fig. <ref type="figure">3</ref>. -We prove convergence of our fully discrete method (Fig. <ref type="figure">1D</ref>) to the JKO scheme (Fig. <ref type="figure">1B,</ref><ref type="figure">C</ref>) as the spatial discretization and inner time discretization go to zero.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Numerical Method</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Dynamic Formulation of JKO Scheme</head><p>As described in the previous section, our numerical method for computing the JKO scheme is based on the following dynamic reformulation of the Wasserstein distance due to Benamou and Brenier <ref type="bibr">[7]</ref>:</p><p>where (&#961;, v) &#8712; AC(0, 1; P(&#937;)) &#215; L 1 (0, 1; L 2 (&#961;)) belongs to the constraint set C 0 provided that</p><p>where &#957; is the outer unit normal on the boundary of the domain &#937;. A curve &#961; in P(&#937;) is absolutely continuous in time, denoted &#961; &#8712; AC(0, 1; P(&#937;)), if there exists</p><p>t 0 w(s)ds for all 0 &lt; t 0 &#8804; t 1 &lt; 1. The PDE constraint (9 and 10) holds in the duality with smooth test functions on</p><p>This dynamic reformulation reduces the problem of finding the Wasserstein distance between any two measures to identifying the curve in P(&#937;) that connects them with minimal kinetic energy. However, the objective function ( <ref type="formula">8</ref>) is not strictly convex, and the PDE constraint ( <ref type="formula">9</ref>) is nonlinear. For these reasons, in Benamou and Brenier's original work, they restrict their attention to the case &#961;(&#8226;, t) &#8712; P ac (&#937;) and introduce the momentum variables m = v&#961;, in order to rewrite (8) as</p><p>where</p><p>and (&#961;, m) &#8712; AC(0, 1; P ac (&#937;)) &#215; L 1 (0, 1; L 2 (&#961; -1 )) belong to the constraint set C 1 provided that</p><p>After this reformulation, the integral functional</p><p>is strictly convex along linear interpolations and lower semicontinuous with respect to weak-* convergence [1, Example 2.36], and the PDE constraint is linear. As an immediate consequence, one can conclude that minimizers are unique. Furthermore, for any &#961; 0 , &#961; 1 &#8712; P ac (&#937;), a direct computation shows that the minimizer ( &#961;, m) is given by the Wasserstein geodesic from &#961; 0 to &#961; 1 ,</p><p>where T is the optimal transport map from &#961; 0 to &#961; 1 . (See <ref type="bibr">[2,</ref><ref type="bibr">98,</ref><ref type="bibr">105]</ref> for further background on optimal transport.) Consequently, given any minimizer ( &#961;, m) of ( <ref type="formula">12</ref>), we can recover the optimal transport plan T via the following formula:</p><p>Building upon Benamou and Brenier's dynamic reformulation of the Wasserstein distance, one can also consider a dynamic reformulation of the JKO scheme <ref type="bibr">(6)</ref>. In particular, substituting <ref type="bibr">(12)</ref> in <ref type="bibr">(6)</ref> leads to the following dynamic JKO scheme: Problem 1 (Dynamic JKO) Given &#964; &gt; 0, E, and &#961; 0 , solve the constrained optimization problem,</p><p>where (&#961;, m) &#8712; AC(0, 1;</p><p>)) belong to the constraint set C provided that</p><p>We emphasize that the requirement &#961;(x, t) &#8712; P ac (&#937;) for all t &#8712; [0, 1] ensures that &#961;(x, t) &#8805; 0.</p><p>Remark 1 (Wasserstein geodesics) Note that for any &#961; 1 &#8712; P ac (&#937;), we may take</p><p>in which case Problem 1 reduces to the Benamou-Brenier formulation of the Wasserstein distance <ref type="bibr">(12)</ref>. Consequently, the numerical method we develop for Problem 1 offers, as a particular case, a provably convergent numerical method for computing the Wasserstein geodesic and Wasserstein distance between &#961; 0 and &#961; 1 . On the one hand, there are many alternative methods for computing Wasserstein geodesics in Euclidean space. Indeed, the many algorithms described in the introduction for computing the Wasserstein distance also provide an optimal transport plan, which can be linearly interpolated to give the Wasserstein geodesic <ref type="bibr">[8,</ref><ref type="bibr">11,</ref><ref type="bibr">55,</ref><ref type="bibr">61,</ref><ref type="bibr">68,</ref><ref type="bibr">97]</ref>. On the other hand, our method is distinguished because it could be more naturally extended to variants of the Wasserstein metric built on the Benamou-Brenier formulation <ref type="bibr">[33,</ref><ref type="bibr">64,</ref><ref type="bibr">87]</ref>, as well as to Wasserstein geodesics on non-Euclidean manifolds, where the geodesic equations on the underlying manifold may no longer be explicit, so that one cannot pass directly from the optimal transport plan to the Wasserstein geodesic.</p><p>Remark 2 (existence and uniqueness of minimizers) If the underling domain &#937; is convex and the energy E is proper, lower semicontinuous, coercive, and &#955;-convex along generalized geodesics, and also satisfies {&#956; : E(&#956;) &lt; +&#8734;} &#8838; P ac (&#937;), then, for &#964; &gt; 0 sufficiently small, there exists a unique solution to Problem 1 [2, Theorem 4.0.4, Theorem 8.3.1]. In particular, these assumptions are satisfied by the energy G &#961; 1 <ref type="bibr">(18)</ref>, as well as by the drift-diffusion interaction energy from the introduction (4), for U as in Eq. ( <ref type="formula">3</ref>), V , W &#8712; C 2 (&#937;). (See, for example, [2, Section 9.3] or <ref type="bibr">[56]</ref> for more general conditions on U , V , W .)</p><p>Thus, if we denote by ( &#961;, m) the minimizer of Problem 1, then for &#964; &gt; 0 sufficiently small, the proximal map, J &#964; (&#961; 0 ) := &#961;(&#8226;, 1) , is well defined for all &#961; 0 &#8712; D(E). Furthermore, the energy decreases under the proximal map,</p><p>which can be seen by comparing the value of the objective function at the minimizer (&#961;, m) to the value of the objective function at (&#961;(x, 0), 0) &#8712; C and using that &#934;(&#961;, m) &#8805; 0. Given &#961; 0 &#8712; D(E), if we recursively define the discrete time gradient flow sequence</p><p>then, taking &#964; = t/n, &#961; n &#964; converges to &#961;(x, t), the gradient flow of the energy E with initial data &#961; 0 at time t, and under mild regularity assumptions on &#961; 0 , we have</p><p>In this way, the classical JKO scheme provides a first-order approximation of the gradient flow [2, Theorem 4.0.4]. In our numerical simulations, we observe that this discretization error dominates other errors in our numerical method; see Sects. 4.2.1 and 4.2.2. For this reason, we introduce the following new scheme, inspired by the Crank-Nicolson method.</p><p>Problem 2 (Crank-Nicolson Inspired Dynamic JKO) Given &#964; &gt; 0, E, and &#961; 0 , solve the constrained optimization problem,</p><p>In Sect. 4.2.2, we provide numerical examples comparing the above method to the classical JKO scheme from Problem 1, illustrating that it achieves a higher-order rate of convergence in practice (see Figs. 7, 8, and 10), in spite of the fact that that it lacks the energy decay property of Problem 1. Under what conditions a higher-order analogue of inequality ( <ref type="formula">21</ref>) holds for the new scheme is an interesting open question that we leave to future work, as the main goal of the present work is the development of fully discrete numerical methods for computing minimizers of Problem 1 and 2. By iterating either of these minimization problems, as in Eq. ( <ref type="formula">20</ref>), we obtain a numerical method for simulating Wasserstein gradient flows.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Fully Discrete JKO</head><p>We now turn to the discretization of the dynamic JKO scheme, Problem 1, and the Crank-Nicolson inspired scheme, Problem 2. We begin by noting that the Crank-Nicolson inspired Problem 2 can be rewritten in the same form as Problem 1 by considering the energy</p><p>Using this observation, we will now describe our discretization of both problems simultaneously.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.1">Discretization of Functions and Domain</head><p>where in the lth direction, we suppose there are N l intervals of spacing (z) l = (b la l )/N l :</p><p>Piecewise constant functions with respect to this discretization are given by</p><p>For any i &#8712; N d+1 , write i = ( j, k), for the spatial index j &#8712; N d and the temporal index k &#8712; N. We let N x &#8712; N denote the number of intervals in each spatial direction and N t &#8712; N denote the number of intervals in the temporal direction. Take z = (x, &#916;t) for (x) l = (&#916;x) &gt; 0 for all l = 1, . . . , d and &#916;t &gt; 0.</p><p>We consider piecewise constant approximations (&#961; h , m h ) of the functions (&#961;, m), with coefficients denoted by (&#961; j,k , m j,k ). For any (&#961;, m) &#8712; C(&#937; &#215; [0, 1]), one such approximation is the pointwise piecewise approximation ( &#961;h , mh ), obtained by defining the coefficients ( &#961; j,k , m j,k ) to be the value of (&#961;, m) on a regular grid of spacing (&#916;x) &#215; (&#916;t):</p><p>where</p><p>), we have that ( &#961;h , mh ) converges to (&#961;, m) uniformly.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.2">Discretization of Energy Functionals</head><p>Next, we approximate the energy functionals by discrete energies E h , beginning with energies of the form (4). Given a piecewise constant function &#961; h with coefficients &#961; j ,</p><p>where</p><p>Likewise, for energies of the form (4), we consider the following discretization of the energy H &#961; 0 from Eq. ( <ref type="formula">22</ref>) for the Crank-Nicolson inspired scheme, Problem 2,</p><p>Finally, to compute Wasserstein geodesics between two measures &#961; 0 , &#961; 1 &#8712; P ac (&#937;), we consider a discretization of the energy G &#961; 1 from Eq. <ref type="bibr">(18)</ref>. Given a piecewise constant approximation &#961; h 1 of &#961; 1 and &#948; &#8805; 0, define</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.3">Discretization of Derivative Operators</head><p>Let D h t &#961; h and D h x m h denote the discrete time derivative and spatial divergence on &#937; &#215; [0, 1] and let &#957; h denote the discrete outer unit normal of &#937;. (See Hypothesis 3 for the precise requirements we impose on each of these discretizations). For example, in one dimension we may choose a centered difference in space and a forward Euler method in time,</p><p>or a Crank-Nicolson method,</p><p>We compute these discretizations of the derivatives at the boundary by extending m j,k to be zero in the direction of the outer unit normal vector. As we can only expect these approximations of the temporal and spatial derivatives to hold up to an error term, we relax the equality constraints from <ref type="bibr">(17)</ref> in the following discrete dynamic JKO scheme.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.4">Discrete Dynamic JKO</head><p>The discretizations described in the previous sections lead to a fully discrete dynamic JKO problem:</p><p>where (&#961; j,k , m j,k ) belong to the constraint set C h provided that for all j, k, j,k</p><p>The inequalities <ref type="bibr">(30)</ref> enforce the PDE constraint and the boundary condition; the inequalities (31) enforce the mass constraint and the initial conditions. Recall that, by definition of &#934; in Eq. ( <ref type="formula">13</ref>), &#934;(&#961; j,k , m j,k ) &lt; +&#8734; only if &#961; j,k is nonnegative. Consequently, if a minimizer &#961; j,k exists, it must be nonnegative.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Remark 3 (relaxation of PDE constraints)</head><p>A key element of our numerical method is that we relax the equality constraint <ref type="bibr">(17)</ref> at the fully discrete level. This reflects the fact that even an exact solution of the continuum PDE will only satisfy the discrete constraints <ref type="bibr">(30)</ref><ref type="bibr">(31)</ref> up to an error term depending on the order of the finite difference operators.</p><p>We allow the choice of &#948; i to vary for each of the above constraints. However, when the desired exact solution is sufficiently smooth, the optimal choice of &#948; i for a second-order discretization of the spatial and temporal derivatives is</p><p>where &#964; &gt; 0 is the size of the timestep in the outer time discretization; see equations <ref type="bibr">(6)</ref><ref type="bibr">(7)</ref>. As we will demonstrate in Fig. <ref type="figure">3</ref> of our numerics section, relaxing the PDE constraint accelerates convergence to a minimizer of the fully discrete Problem 1 j,k without any loss of accuracy with respect to the exact continuum solution.</p><p>Finally, note that while the discrete PDE constraint <ref type="bibr">(30)</ref> automatically enforces the mass constraint up to order &#948; 2 1 +&#948; 2 2 , we choose to impose the mass constraint separately via the first Eq. in <ref type="bibr">(31)</ref>. This leads to better performance in examples where the exact solution is not smooth enough to satisfy the discrete PDE constraint up to a high order of accuracy but imposing a stricter mass constraint leads to a higher quality numerical solution; see Fig. <ref type="figure">4</ref>.</p><p>Under sufficient hypotheses on the discrete energy E h and the initial data &#961; h 0 , minimizers of Problem 1 j,k exist; see Theorem 1. Furthermore, this discrete dynamic JKO scheme preserves the energy decreasing property of the original JKO scheme. To see this, note that, given an energy E h , time step &#964; &gt; 0, and initial data (&#961; h 0 ) j we may define the fully discrete proximal map by</p><p>where (&#961; j,k , m j,k ) is any minimizer of Problem 1 j,k . Independently of which minimizer is chosen, we have</p><p>which can be seen by comparing the value of the objective function at the minimizer (&#961; j,k , m j,k ) to the value of the objective function at (&#961; j,k , m j,k ) = ((&#961; 0 ) j , 0) &#8712; C and using the fact that &#934; &#8805; 0. Furthermore, by iterating the fully discrete proximal map, we may construct a fully discrete gradient flow sequence</p><p>In analogy with the continuum case, we will use this fully discrete JKO scheme to simulate gradient flows. (See Algorithm 3.)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Primal Dual Algorithms for Fully Discrete JKO</head><p>In order to find minimizers of Problem 1 j,k , we apply a primal dual operator splitting method. Since the constraints in Problem 1 j,k are linear inequality constraints, we may rewrite them in the form &#195;i u -bi 2 &#8804; &#948; i for i = 1, 2, 3, 4, where u = (ae, m), and ae and m are vector representations of the matrices &#961; j,k and m j,k . (See the Appendix A for explicit formulas for &#195;i and bi , in one spatial dimension). Similarly, we may rewrite the first term of the objective function <ref type="bibr">(29)</ref> in terms of u, defining</p><p>We consider two cases for the energy term in the objective function. When the energy is of the form G h &#961; 1 , as in Eq. ( <ref type="formula">26</ref>), we reframe the problem by removing the energy from the objective function and adding</p><p>to the constraints <ref type="bibr">(30)</ref> and <ref type="bibr">(31)</ref>, denoting A i ub i 2 &#8804; &#948; i , for i = 1, 2, 3, 4, 5, as the modified constraints. On the other hand, when the energy is of the form ( <ref type="formula">24</ref>) or ( <ref type="formula">25</ref>), we rewrite it in terms of u as</p><p>In particular, if we let S be the selection matrix</p><p>, where F h and H h &#961; 0 are defined in ( <ref type="formula">24</ref>) and <ref type="bibr">(25)</ref>, respectively. This leads to the following two optimization problems:</p><p>To compute the Wasserstein distance, we solve Problem 2.3, and to compute the gradient flow of an energy, we iterate Problem 2</p><p>Primal-dual methods for solving optimization problems in which the objective function is the sum of two convex functions, as in Problem 2.3, are widely available <ref type="bibr">[52]</ref>. However, analogous methods for optimizations problems in which the objective function is the sum of three convex functions, as in Problem 2.3, have only recently emerged <ref type="bibr">[62,</ref><ref type="bibr">106]</ref>. In particular, in Algorithm 1, for Problem 2.3, we use Chambolle and Pock's well-known primal dual algorithm, and in Algorithm 2, for Problem 2.3, we use Yan's recent extension of this algorithm to objective functions with three convex terms. Both algorithms offer an extended range of primal and dual step sizes &#955; and &#963; and low per-iteration complexity, due to the sparseness of S, A, and &#195;. Note specifically that the success of Algorithm 1 depends on the ease of computing the proximal operators related to &#966; and i &#948; , and therefore if we simply group the additional energy term in Problem 2.3 to either &#966; or i &#948; , it would violate such property. Instead, we shall consider E(u) as a separate term and take advantage of its smoothness, as shown in Algorithm 2. Finally, in Algorithm 3, we describe how Algorithm 2 can be iterated to approximate the full JKO sequence and, consequently, solutions of a range of nonlinear partial differential equations of Wasserstein gradient flow type. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1: Primal-Dual for Wasserstein distance</head><p>until stopping criteria is achieved;</p><p>To initialize both algorithms, we choose &#966; 0 and m 0 to be zero vectors, and for &#961; 0 , we let its components at the initial time (i.e., k = 0) be &#961; 0 (x) evaluated on an equally spaced grid of width &#916;x, and other times to be zero. The stopping criteria consist of checking the PDE constraint ( <ref type="formula">30</ref>)- <ref type="bibr">(31)</ref> along with the convergence monitors:</p><p>The proximal operator, which appears in Algorithms 1 and 2, is defined by</p><p>For both h = &#963; i * &#948; and h = &#955;&#934;, there are explicit formulas for the proximal operators. By Moreau's identity, we may write Prox &#963; i * &#948; (x) in terms of projections onto balls of radius &#948; i centered at b i for the ith portion of vector x:</p><p>For the proximal operator of &#934;, as shown by Peyr&#233;, Papadakis, and Oudet [95, Proposition 1],</p><p>where &#961; * is the largest real root of the cubic polynomial equation P(x) := (x -&#961;)(x + &#955;) 2 -&#955; 2 |m| 2 = 0, and m * can be obtained by m * = &#961; * m/(&#961; * + &#955;). By computing the proximal operator exactly, our primal dual method is positivity preserving, respecting a key property of the original Problems 1 and 1 j,k .</p><p>As the computations of both proximal operators <ref type="bibr">(35)</ref>, <ref type="bibr">(36)</ref> are component-wise, they can easily be parallelized. Likewise, the computation of the gradient &#8711; E is also component-wise:</p><p>Remark 4 (discrete convolution) As written, the above functionals involves a computation of the convolutions l W j,l &#961; l,N t and l W j,l &#961; l,0 , which can be achieved efficiently using the fast Fourier transform. Note that since the product of the discrete Fourier transforms of two vectors is the Fourier transform of the circular convolution and the interaction potential W j-k = W (x jx k ) is not a periodic function, we need zero-padding for computing the convolution. For the 1D case, we can first use the fast Fourier transform to compute the circular convolution of</p><p>and (ae, (0) N x -2 ), and then extract the last N x -1 elements, which are the desired</p><p>Embedding Algorithm 2 to the JKO iteration, we have the following algorithm for Wasserstein gradient flows. Note that line 6 in Algorithm 3 is to construct a better Algorithm 3: Primal-Dual for JKO sequence Input: &#961;(x, t 0 ), Iter max , &#955;, &#963;, &#964;, n &gt; 0 Output: &#961;(x, t k ) for 0 &#8804; k &#8804; n and the corresponding energy E(&#961;(x, t k ))</p><p>initial guess for &#961; at each JKO iteration by applying an extrapolation.</p><p>Remark 5 (Comparison of our numerical method to previous work) Our definition of the indicator function in Problems 3(a) and 3 (b) differs from previous work, and as a result, our primal-dual algorithm does not require the inversion of the matrix AA T <ref type="bibr">[7,</ref><ref type="bibr">95]</ref>, which makes it quite efficient in high dimensions thanks to the sparsity of A. A similar approach is taken in a recent preprint <ref type="bibr">[81]</ref> to compute the earth mover's distance W 1 , though, in this context, the earth mover's distance is dissimilar from the Wasserstein distance, since it does not require an extra time dimension and is thus a lower-dimensional problem.</p><p>A second difference between our method and the approach in previous works is that, since P(x) has at most one strictly positive root, it can be obtained by the general solution formula for cubic polynomials with real coefficients. Therefore, in our numerical simulations, we may compute the proximal operator Prox &#955;&#934; (u) by using this general solution formula, rather than via Newton iteration <ref type="bibr">[95]</ref>. As a consequence, our method is truly positivity preserving, as opposed to positivity preserving in the limit as &#916;x, &#916;t &#8594; 0.</p><p>We close this section by recalling sufficient conditions on the primal and dual step sizes &#963; and &#955; that ensure Algorithms 1 and 2 converge to minimizers of Problems 2.3 and 2.3.</p><p>Proposition 1 (Convergence of Algorithm 1, c.f. <ref type="bibr">[52]</ref>) Suppose &#963; &#955; &lt; 1/&#955; max (AA t ) and a minimizer of Problem 2.3 exists. Then, as Iter max &#8594; +&#8734;, and 1 , 2 &#8594; 0 in the stopping criteria <ref type="bibr">(33)</ref>  <ref type="bibr">(34)</ref>, the output u * of Algorithm 1 converges to a minimizer of Problem 2.3.</p><p>Proposition 2 (Convergence of Algorithm 2, c.f. <ref type="bibr">[106]</ref>) Suppose that the discrete energy E(u) defined in Eq. ( <ref type="formula">32</ref>) is proper, lower semi-continuous, convex, and there exists</p><p>Suppose further that &#963; &#955; &lt; 1/&#955; max ( &#195; &#195;t ), &#955; &lt; 2&#946;, and a minimizer of Problem 2.3 exists. Then, as Iter max &#8594; +&#8734; and 1 , 2 &#8594; 0, the output u * converges to a minimizer of Problem 2.3.</p><p>Note here that the co-coercivity requirement on &#8711; E in the above proposition is equivalent to require the Lipschitz continuity of &#8711; E, i.e.,</p><p>For the energy of the form (4), this requirement reduces to the boundedness of U (&#961;) and W , which can be satisfied independent of the numerical resolution if we consider bounded solution (no finite time blow up in &#961;) and nonsingular interaction kernel. In the case when W is singular, for example when W is a Newtonian interaction potential, we approximate W by a continuous function via convolution with a mollifier; see Remark 7.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Convergence</head><p>We now prove the convergence of solutions of the fully discrete JKO scheme, Problem 1 j,k , to a solution of the continuum JKO scheme, Problem 1. We begin, in Sect. 3.1, by describing the hypotheses we place on the underlying domain &#937;, the energy E, the initial data &#961; 0 , and the discretization operators. Then, in Sect. 3.2, we show that minimizers of Problem 1 j,k exist, provided the discretization is sufficiently refined. Finally, in Sect. 3.3, we prove that any sequence of minimizers of Problem 1 j,k has a subsequence that converges to a minimizer of Problem 1. In order for our finite difference approximation to converge, we assume throughout that a smooth, positive minimizer of the continuum JKO scheme Problem 1 exists. See hypothesis (H6) and Remark 9 for further discussion of this assumption.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Hypotheses</head><p>We impose the following hypotheses on the underlying domain, energy, and discretization operators.</p><p>We assume that the spacing of the spatial discretization (&#916;x) &gt; 0 and the temporal discretization (&#916;t) &gt; 0 are both functions of h satisfying lim h&#8594;0 (&#916;x) = lim h&#8594;0 (&#916;t) = 0. (H2) For any piecewise constant function &#961; h on &#937;, the discrete energy functional E h has one of the following forms, as described in Sect. 2.2.2:</p><p>+&#8734; otherwise.</p><p>We place the following assumptions on U , V , and W and the target measure &#961; 1 :</p><p>1 is a pointwise piecewise constant approximation of &#961; 1 .</p><p>(H3) D h t and D h x are finite difference approximations of the time derivative and spatial divergence. We assume that D h t is a forward Euler method in time, whereas D h x can be given by an explicit or implicit scheme of first or higher order. We denote by D -h t and D -h x the dual operators with respect to the 2 inner product, and we assume the following integration by parts formulas hold for all piecewise constant functions &#961; h ,</p><p>where &#957; h : &#937; &#8594; R d is the discrete outer unit normal of &#937;. Finally, we assume there exists C &gt; 0 depending on the domain &#937; &#215; [0, 1], so that, for any</p><p>(See Sect. 2.2.3 for finite difference approximations satisfying these hypotheses.) (H4) The constraint relaxation parameters &#948; 1 , &#948; 2 , &#948; 3 , &#948; 4 &#8805; 0 are functions of h with lim h&#8594;0 &#948; i = 0, for all i. If the energy is of the form (H2c), we require that &#948; 5 is a function of h satisfying lim h&#8594;0 &#948; 5 = 0 and lim h&#8594;0 (&#916;x + &#916;t) /&#948; 5 = 0. (H5) The initial data of the continuum problem satisfy &#961; 0 &#8712; C 1 (&#937;) and &#961; h 0 is a pointwise piecewise constant approximation of &#961; 0 . (H6) Given the domain, energy, and initial data described in the previous hypotheses, there exists a minimizer (&#961;, m) of the continuum Problem 1 satisfying</p><p>To ease notation in the following convergence proof, we observe that Problem 1 j,k may be rewritten as follows in terms of (&#961; h , m h ), the piecewise constant functions on &#937; &#215; [0, 1] corresponding to the coefficients (&#961; j,k , m j,k ). Problem 1 h (Discrete Dynamic JKO) Fix &#964;, &#948; 1 , &#948; 2 , &#948; 3 , &#948; 4 &gt; 0, E h , and &#961; h 0 . Solve the constrained optimization problem,</p><p>where (&#961; h , m h ) belong to the constraint set C h provided that they are piecewise constant functions on &#937; &#215; [0, 1] and the following inequalities hold</p><p>Similarly, we may rewrite the definition of the discrete energies in hypothesis (H2) in terms of a piecewise constant functions &#961; h on &#937; corresponding to &#961; j ,</p><p>Recall that, by definition of &#934; in equation <ref type="bibr">(13)</ref>, &#934;(&#961; h , m h ) &lt; +&#8734; only if &#961; h is nonnegative. Consequently, if a minimizer &#961; exists, it must be nonnegative.</p><p>We conclude this section with several remarks on the sharpness of the preceding hypotheses.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Remark 6 (assumption on domain &#937;)</head><p>In hypothesis (H1), we assume that &#937; is an ndimensional hyperrectangle. We impose this assumption for simplicity, as it provides an natural interpretation of the discretized outer unit normal &#957; h , which is essential in imposing the boundary conditions for our PDE constraint at the discrete level. More generally, our convergence result can be extended to any Lipschitz domain, as long as sufficient care is taken to define the discrete outer unit normal and the corresponding no flux boundary conditions. Remark 7 (assumption on energy) As described in hypothesis (H2), our convergence result applies to internal U , drift V , and interaction W potentials that are sufficiently regular on &#937;. Our assumptions on U are classical and ensure that the internal energy is lower semicontinuous with respect to weak-* convergence [2, Remark 9.3.8]. Our assumptions on V and W , on the other hand, are somewhat stronger, and in practice, one often encounters partial differential equations for which the corresponding choices of V and W are not continuous. However, there are robust methods for approximating these potentials by continuous functions that ensure convergence of the gradient flows.</p><p>For example, the second author and Topaloglu provide sufficient conditions on discontinuous interaction potentials W for which gradient flows of the regularized interaction potential, W &#949; := W * &#981; &#949; for a smooth mollifier &#981; &#949; , converge to gradient flows of the original interaction potential W , as well as conditions that ensure minimizers of W &#949; converge to minimizers of W <ref type="bibr">[59]</ref>. (The convergence of general stationary points of W that are not global minimizers to stationary point of W remains open.) Remark 8 (assumption on &#948; 5 ) In hypothesis (H4), it is essential that &#948; 5 not vanish too quickly with respect to other parameters in the discretization. A simple illustration of this fact arises in the case that &#948; 1 &#8801; &#948; 2 &#8801; &#948; 3 &#8801; &#948; 4 &#8801; 0. In this case, we cannot choose &#948; 5 &#8801; 0, since our pointwise piecewise approximation of the initial data &#961; h 0 will not generally have the same mass as our pointwise piecewise approximation of the target measure &#961; h 1 , and if they do not have the same mass, minimizers of the discrete problem do not exist. Consequently, it would be impossible to prove that minimizers of the fully discrete problem converge to minimizers of the continuum problem. On the one hand, this does not greatly impact the performance of our numerical method, as can be seen by considering previous work by Papadakis, P&#233;yre, and Oudet, which numerically implements this approach <ref type="bibr">[95]</ref>. On the other hand, our numerical simulation in Fig. <ref type="figure">3</ref> indicates that poor choice of the relaxation parameters can cause the method to iterate longer than necessary, without any improvement in accuracy.</p><p>Our requirement that lim h&#8594;0 (&#916;x + &#916;t)/&#948; 5 = 0 is sufficient to fix this problem and ensure convergence of the method, and this requirement is nearly sharp. To see this, note that, for an arbitrary pointwise piecewise approximation &#961; h 0 of a continuous function &#961; 0 , we cannot in general achieve accuracy of | &#937; &#961; h 0 -&#937; &#961; 0 | better than O(&#916;x). If either &#948; 1 and &#948; 3 , the parameters for the PDE constraint and the mass constraint, are chosen arbitrarily small, then | &#937; &#961; h (&#8226;, 1) -&#937; &#961; h 0 | can likewise be made arbitrarily small. Thus, since &#961; 0 , &#961; 1 &#8712; P ac (&#937;),</p><p>so we much have &#948; 5 &#8805; O(&#916;x). While a CFL-type condition is not necessary for the stability of our discretization of the PDE constraint, since &#961; and m indeed become coupled in the continuum limit (see Eqs. ( <ref type="formula">8</ref>) and ( <ref type="formula">12</ref>)), one should expect (&#916;t) &#8804; O(&#916;x) to give the best balance between computational accuracy and cost, and we indeed observe this numerically. Combining these facts shows that enforcing that &#948; 5 cannot decay faster than O(&#916;x + &#916;t) by assuming lim h&#8594;0 (&#916;x + &#916;t)/&#948; 5 = 0 is nearly optimal.</p><p>Remark 9 (assumption on existence of smooth, positive minimizer) In hypothesis (H6), we suppose that there exists a sufficiently regular minimizer (&#961;, m), &#961; &gt; 0, of the continuum problem. Our proof of the existence of minimizers of the fully discrete problem and our proof that minimizers of the discrete problems converge to a minimizer of the continuum problem as h &#8594; 0 strongly rely on this assumption.</p><p>In particular, the smoothness assumption allows us to use convergence of the finite difference operators, described in hypothesis (H3), to construct an element of C h in Proposition 3. The positivity assumption allows us to conclude that &#8711; &#961;,m &#934; is uniformly bounded on the range of &#961;, which we use to prove the lim sup inequality for the recovery sequence in Theorem 2(b).</p><p>From the perspective of approximating gradient flows, which are solutions of diffusive partial differential equations (3), such regularity and positivity can be guaranteed as long as the initial data are smooth and positive and either the diffusion is sufficiently strong or the drift and interaction terms do not cause loss of regularity. On the other hand, developing conditions on the energy and initial data that ensure such regularity and positivity holds at the level of the JKO scheme, for minimizers of Problem 1, remains largely open: results on the propagation of L p (R d ) or BV bounds along the scheme have only recently emerged <ref type="bibr">[17,</ref><ref type="bibr">50,</ref><ref type="bibr">63]</ref>.</p><p>From the perspective of approximating Wasserstein geodesics, the now classical regularity theory developed by Caffarelli and Urbas ensures that if the source and target measures &#961; 0 and &#961; 1 are smooth and strictly positive, then the minimizer of Problem 1 ( &#961;, m) is also smooth and strictly positive. (See, for example, [105, Section 4.3] and [2, Section 8.3].)</p><p>Along with this analytical justification for our smoothness and positivity assumptions, our numerical results also indicate that such assumptions are in general necessary. For example in Fig. <ref type="figure">4</ref>, we observe that if the source and target measure of a Wasserstein geodesic are not sufficiently smooth, the numerical solution introduces artificial regularity. Likewise, even in Fig. <ref type="figure">6</ref>, we observe that the numerical simulation is strictly positive (though very close to zero in places), while the exact solution is identically zero outside of its support. Still, in spite of the fact that our theoretical convergence result requires smoothness and positivity assumptions, in practice our numerical method still performs well on nonsmooth or nonpositive problems, provided that the spatial and temporal discretization are taken to be sufficiently small; see Figs. <ref type="bibr">5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, and 18.</ref> Finally, these types of smoothness and positivity assumptions are typically needed in convergence proofs for numerical methods based on the JKO scheme. For example, in a method based on the Monge Amp&#233;re approximation of the Wasserstein distance, the exact solution is required to be uniformly bounded above and below <ref type="bibr">[10]</ref>. Likewise, while rigorous convergence results for fully discrete numerical methods based on entropic or Fisher information regularization remain open, since these methods correspond to introducing numerical diffusion at the level of the PDE, they automatically enforce smoothness and positivity <ref type="bibr">[28,</ref><ref type="bibr">55,</ref><ref type="bibr">82]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Existence of Minimizers</head><p>We now show that, under the hypotheses described in the previous section, minimizers of the fully discrete JKO scheme, Problem 1 h , exist for all h &gt; 0 sufficiently small. We begin with the following proposition, which constructs a specific element in the constraint set C h , which we will use both in our proof of existence of minimizers and in our &#915; -convergence results in the next section.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proposition 3 (construction of element in C h ) Suppose that hypotheses (H1)-(H6) hold, and choose</head><p>Then for h &gt; 0 sufficiently small, there exists ( &#961;h , mh</p><p>If, in addition, the energy satisfies hypothesis (H2c) and E(&#961;(&#8226;, 1)) &lt; +&#8734;, then we have</p><p>for all h &gt; 0 sufficiently small.</p><p>Let mh be a pointwise piecewise constant approximation of m; see Eq. <ref type="bibr">(23)</ref>. Recall that &#957; h is the discrete outer unit normal vector. We define mh : &#937; &#215; [0, 1] &#8594; R d component-wise to respect the no flux boundary conditions, letting ( mh ) l denote the lth component of the vector for l = 1, . . . , d. If x &#8712; &#8706;&#937;, then we define</p><p>Otherwise, we take mh (x, t) = mh (x, t). Define &#961;h :</p><p>x mh (x, t) &#8801; 0. We begin by showing that ( &#961;h , mh ) &#8712; C h . By construction, for all h &gt; 0,</p><p>Taking f h &#8801; 1 in Hypothesis (H3) and applying the PDE constraint ensures that, for all s &#8712; [0, 1] and k &#8712; N so that k(&#916;t) &#8804; s &lt; (k + 1)&#916;t,</p><p>Thus, we also obtain</p><p>This concludes the proof that ( &#961;h , mh ) &#8712; C h . We now show that ( &#961;h , mh ) &#8594; (&#961;, m) uniformly on &#937; &#215; [0, 1] as h &#8594; 0. We begin by proving convergence of mh to m. Due to hypothesis (H1) on our domain &#937;, whenever e i &#8226; &#957; h (x) = 0, there exists y &#8712; &#8706;&#937; so that |y -x| &#8804; 2 &#8730; d(&#916;x) and &#957;(y) = e i . Thus, whenever e i &#8226; &#957; h (x) = 0, the continuum boundary condition m(y, t) &#8226; &#957;(y) = 0 ensures that for all t &#8712; [0, 1],</p><p>We also have that, for all (x, t)</p><p>Therefore, for all (x, t) &#8712; &#937; &#215; [0, 1], there exists</p><p>We now prove the convergence of &#961;h to &#961;. Since (&#961;, m) is a classical solution of the PDE constraint and &#961;h : &#937; &#215; [0, 1] &#8594; R is defined by the conditions that &#961;h (x, 0) = &#961;h 0 and</p><p>Since &#961;h &#8594; &#961; uniformly and &#961; &gt; 0, we immediately obtain <ref type="bibr">(39)</ref>. Finally, suppose the energy satisfies (H2c). Since E(&#961;(&#8226;, 1)) = G &#961; 1 (&#961;(&#8226;, 1)) &lt; +&#8734;, we have &#961;(&#8226;, 1) = &#961; 1 . By inequality <ref type="bibr">(41)</ref> and the fact that &#961; h 1 is a pointwise piecewise approximation of &#961;(&#8226;, 1),</p><p>where</p><p>&#8594; 0. Thus, for h sufficiently small,</p><p>which completes the proof.</p><p>Theorem 1 (minimizers of discrete dynamic JKO exist) Suppose that hypotheses (H1)-(H6) hold. Then for all h &gt; 0 sufficiently small, a minimizer of Problem 1 h exists.</p><p>Proof First, we note that Proposition 3 ensures that, for h &gt; 0 sufficiently small, the constraint set C h is nonempty and contains some (&#961; h , m h ) satisfying &#961; h &gt; 0. If the energy satisfies (H2a) or (H2b), then we immediately obtain E h (&#961; h (&#8226;, 1)) &lt; +&#8734;.</p><p>Similarly, if the energy satisfies (H2c), then inequality <ref type="bibr">(40)</ref> in Proposition 3 again ensures that E h (&#961; h (&#8226;, 1)) &lt; +&#8734;.</p><p>Since &#934;(&#961; h , m h ) &lt; +&#8734; whenever &#961; h &#8805; 0, this ensures that value of the objective function in the discrete minimization problem 1 h is not identically +&#8734; on the constraint set. Therefore, inf</p><p>and we may choose a minimizing sequence (&#961; h n , m h n ) &#8712; C h that converges to the infimum. We may assume, without loss of generality, that sup</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma 1 (properties of C h ) Suppose that hypotheses (H1)-(H6) hold, and fix</head><p>, and there exist &#961; &#8712; P(&#937; &#215; [0, 1]) and &#956; &#8712; P(&#937;) so that, up to a subsequence, &#961; h * &#961; and &#961; h (&#8226;, 1) * &#956;. Furthermore, for any piecewise constant function</p><p>Proof By hypothesis (H6), &#961; h 0 &#8594; &#961; 0 uniformly on &#937;. Likewise, the constraint on the initial data ( <ref type="formula">38</ref>) and (H4) ensure lim h&#8594;0 &#961; h (&#8226;, 0) -</p><p>We now turn to Eq. <ref type="bibr">(47)</ref>. By the PDE constraint and boundary conditions ( <ref type="formula">37</ref>) and summation by parts, via hypotheses (H3),</p><p>where, in the last line, we use that (H4) ensures &#948; 2 , &#948; 4 &#8594; 0 and the fact that</p><p>Next, we show that there exist &#961; &#8712; P(&#937; &#215; [0, 1]) and &#956; &#8712; P(&#937;) so that, up to a subsequence, &#961; h * &#961; and &#961; h (&#8226;, 1)</p><p>* &#956;. By H&#246;lder's inequality and the mass constraint <ref type="bibr">(38)</ref>,</p><p>where, in the last line, we use that (H4) ensures &#948; 3 &#8594; 0. Since hypothesis (H6) ensures &#961; h 0 &#8594; &#961; 0 uniformly and &#937; &#961; 0 = 1, we obtain,</p><p>Furthermore, since 1 0 &#937; &#934;(&#961; h , m h ) &lt; +&#8734; for each h &gt; 0, we must have &#961; h &#8805; 0 on &#937; &#215; [0, 1], and the above equation ensures sup h&gt;0 &#961; h L 1 (&#937;&#215;[0,1]) &lt; +&#8734;. Thus, classical functional analysis results ensure there exists a subsequence that converges to some &#961; &#8712; P(&#937; &#215; [0, 1]) in the weak-* topology (see, e.g., <ref type="bibr">[20,</ref><ref type="bibr">Section 3]</ref>).</p><p>Finally, taking f h &#8801; 1 in Eq. ( <ref type="formula">47</ref>) gives,</p><p>Arguing as above, we obtain that, up to a further subsequence,</p><p>We now prove that the discrete energies E h are lower semicontinuous along weak-* convergent sequences.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proposition 4 (Lower semicontinuity of energies along weak-* convergent sequences) Suppose that hypotheses (H1)-(H6) hold. Then, for any sequence of piecewise constant functions &#961;</head><p>Proof First, suppose the energy satisfies (H2a). Since the piecewise constant approximations V h and &#372; h converge to V and W uniformly, for any sequence &#961; h * &#961;,</p><p>Furthermore, our assumptions on U guarantee that the internal energy term is lower semicontinuous with respect to weak-* convergence [2, Remark 9.3.8], so lim inf h&#8594;0 &#937; U (&#961; h (x))dx &#8805; &#937; U (&#961;(x))dx. Combining this with equations <ref type="bibr">(48)</ref><ref type="bibr">(49)</ref> gives the result. Next, suppose the energy satisfies (H2b). Since &#961; 0 &gt; 0 on the compact set &#937; and U is uniformly continuous on &#961; 0 (&#937;) &#8834; (0, +&#8734;), the fact that hypothesis (H6) ensures &#961;h 0 &#8594; &#961; 0 uniformly ensures U ( &#961;h 0 ) &#8594; U (&#961; 0 ) uniformly. Therefore,</p><p>Likewise, since V h and &#372; h converge to V and W uniformly, we also have</p><p>Combining these limits with the lim inf inequality for energies of the form (H2a) gives the result. Finally, suppose the energy satisfies (H2c). Without loss of generality, we may assume that lim inf h&#8594;0 G h &#961; 1 (&#961; h ) &lt; +&#8734;, so that up to a subsequence,</p><p>We now apply Proposition 4 to prove the &#915; -convergence of Problem 1 h to Problem 1.</p><p>, there exists a sequence ( &#961;h , mh ) &#8712; C h so that ( &#961;h , mh ) &#8594; (&#961;, m) uniformly and</p><p>Proof We first prove part (a). Suppose (&#961; h , m h ) &#8712; C h , with &#961; h * &#961; and m h * m. We begin by showing that the limit (&#961;, m) belongs to C. Fix f &#8712; C &#8734; (&#937; &#215; [0, 1]) and let f h be a pointwise piecewise constant approximation of f . (See Eq. ( <ref type="formula">23</ref>).) By Lemma 1 and hypothesis (H3),</p><p>We conclude that (&#961;, m) satisfies the PDE constraint in the sense of distributions <ref type="bibr">(17)</ref>, which gives &#961; &#8712; AC([0, 1], P(&#937;)) [2, Lemma 8.1.2]. In particular, since &#961; is continuous in time, we have that the &#956; defined in Lemma 1 satisfies &#956; = &#961;(&#8226;, 1). We now consider the inequality in part (a). Since the integral functional (&#961;, m) &#8594; 1 0 &#937; &#934;(&#961;, m) is lower semicontinuous with respect to weak-* convergence of measures [1, Example 2.36], we immediately obtain lim inf</p><p>which completes the proof of part (a). We now turn to part (b). Let ( &#961;h , mh ) &#8712; C h be the sequence constructed in Proposition 3, so ( &#961;h , mh ) &#8594; (&#961;, m) uniformly. By inequality <ref type="bibr">(39)</ref>, there exists c &gt; 0 so that &#961; h (x, t) &#8805; c for h sufficiently small. Therefore,</p><p>It remains to show that lim sup</p><p>First, suppose the energy satisfies either (H2a) or (H2b). By Eqs. ( <ref type="formula">48</ref>)-( <ref type="formula">50</ref>), which hold for any weak-* convergent sequence, and the fact that</p><p>) uniformly, which gives the result. Finally, suppose the energy satisfies (H2c). Without loss of generality, suppose <ref type="bibr">(40)</ref> ensures that, for h sufficiently small,</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>By definition of G</head><p>which gives the result.</p><p>We conclude this section by applying the &#915; -convergence proof from Theorem 2 to prove that any sequence of minimizers of the discrete Problem 1 h converges, up to a subsequence, to a minimizer of the continuum Problem 1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theorem 3 (Convergence of minimizers) Suppose that hypotheses (H1)-(H6) hold.</head><p>Then, for any sequence of minimizers (&#961; h , m h ) of Problem 1 h , we have, up to a subsequence, &#961; h * &#961; and m h * m, where (&#961;, m) is a minimizer of Problem 1.</p><p>Note that, if the minimizer of the continuum Problem 1 is unique, then this theorem ensures that any sequence of minimizers of the discrete Problem 1 j,k has a further subsequence that converges to this minimizer. Therefore, the sequence itself must converge to the unique minimizer of the continuum problem. (See Remark 2 for sufficient conditions that ensure the minimizer of the continuum problem is unique.) Proof of Theorem 3 First, note that Lemma 1 ensures that there exist &#961; &#8712; P(&#937; &#215;[0, 1]) and &#956; &#8712; P(&#937;) so that, up to a subsequence, &#961; h * &#961; and &#961; h (&#8226;, 1)</p><p>* &#956;. In order to prove an analogous weak-* compactness result for m h we first prove that, up to a subsequence,</p><p>By (H6), there exists a minimizer ( &#961;, m) of the continuum Problem</p><p>Furthermore, Proposition 4 ensures that lim inf</p><p>which is bounded below by some constant, since hypothesis (H2c) ensures E &#8805; 0 and hypotheses (H2a) or (H2b) ensures E(&#956;) &gt; -&#8734;, since U , V , and W are bounded below and U is bounded below on the range of the strictly positive density &#961; 0 . Therefore, up to a subsequence, we obtain <ref type="bibr">(51)</ref>. We now deduce weak-* convergence of m h . By H&#246;lder's inequality, the fact that &#961; h * &#961;, and the definition of &#934;, we have</p><p>Thus, up to another subsequence, m h * m on &#937; &#215; [0, 1]. It remains to show that the limit (&#961;, m) of (&#961; h , m h ) is a minimizer of Problem 1. By Theorem 2, part (a), we have (&#961;, m) &#8712; C and</p><p>Combining this with inequality (52) above, we conclude that (&#961;, m) &#8712; C is also a minimizer of Problem 1, which completes the proof.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Numerical Results</head><p>In this section, we provide several examples demonstrating the efficiency and accuracy of our algorithms. We begin by using Algorithm 1 to compute Wasserstein geodesics between given source and target measures, and we then turn to Algorithm 3 to compute solutions of nonlinear gradient flows. In the following simulations, we take our computational domain &#937; to be a square, imposing the no flux boundary conditions on m dimension by dimension. In practice, unless otherwise specified, we always impose the discrete PDE constraint via the Crank-Nicolson finite difference operators ( <ref type="formula">28</ref>), and we choose 1 = 2 = in the stopping criteria to be 10 -5 unless otherwise specified. For the relaxation of the constraints in ( <ref type="formula">30</ref>) and ( <ref type="formula">31</ref>), we choose &#948; 1 = &#948; 2 = &#948; 4 = &#948; 5 = &#948;, and &#948; 3 differently, as specified in each example.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Wasserstein Geodesics</head><p>As described in Remark 1, a particular case of our numerical scheme provides a method for computing the Wasserstein geodesic between two probability densities. We begin by computing the Wasserstein geodesic between rescaled Gaussians in one dimension: ). We choose &#963; = 0.1 and &#963; &#955; = 1.5/&#955; max (A A t ) and compute 10 5 iterations. Left: evolution of geodesic from time t = 0 to t = 1. Right: rate of convergence of numerical solution to exact solution, as a function of the number of iterations in Algorithm 1</p><p>The target measure is simply a translation and dilation of the initial measure, &#961; 0 (x) = (0.5)g &#956; 0 ,&#952; 0 (x) and &#961; 1 (x) = (0.5)g &#956; 1 ,&#952; 1 (x). The optimal transport map T (x) from &#961; 0 (x) to &#961; 1 (x) is given explicitly by<ref type="foot">foot_0</ref> </p><p>Rewriting Eq. ( <ref type="formula">15</ref>) for the geodesic &#961;(x, t) and velocity v(x, t) induced by this transport map, via the definition of the push forward, we obtain</p><p>In Fig. <ref type="figure">2</ref>, we apply Algorithm 1 to compute the Wasserstein geodesic &#961;(x, t) between the initial and target densities <ref type="bibr">(53)</ref>, with means and variances &#956; 0 = -1.5, &#952; 0 = 0.3, &#956; 1 = 1.5, and &#952; 1 = 0.6. On the left, we plot the evolution of the geodesic at various times. On the right, we plot the 1 error of the densities, momenta, and Wasserstein distance as a function of the number of iterations, l, observing a rate of convergence of order O(1/l) (dashed black line). Here, the error is defined as</p><p>Fig. <ref type="figure">3</ref> Analysis of how the scaling relationship between the relaxation parameter &#948; and the spatial discretization (&#916;x) affects the accuracy of the numerical method and the number of iterations required to converge. We contrast the choices &#948; = (&#916;x) 2 , &#948; = (&#916;x) 3 and &#948; = 10 -8 for the example of the Wasserstein distance between geodesics, illustrated in Fig. <ref type="figure">2</ref>. We take N t = 30, N x = 300, &#963; = 1, &#963; &#955; = 0.99/&#955; max (A A t ) and &#948; 3 = &#948;</p><p>In Fig. <ref type="figure">3</ref>, we illustrate how choosing the optimal scaling relationship between the relaxation parameter &#948; and the spatial and temporal discretizations (&#916;x), (&#916;t) allows the method to converge in fewer iterations. We contrast the choices &#948; = (&#916;x) 2 , &#948; = (&#916;x) 3 , and &#948; = 10 -8 , for the example of the Wasserstein distance between geodesics, illustrated in Fig. <ref type="figure">2</ref>, where the outer time step &#964; = 1, (&#916;x) &#8764; (&#916;t), and &#948; 3 = &#948;. Based on the order of accuracy of our Crank-Nicolson approximation of the PDE constraint, we expect that &#948; = (&#916;x) 2 should give the optimal balance between accuracy and computational efficiency. (See Remark 3.)</p><p>In the plot on the left, we observe that for all choices of &#948;, the error between the numerical solution &#961; (l) and the exact solution &#961; * is identical, with the error saturating after 10 5 iterations. Thus, all three choices of &#948; provide the same level of accuracy, and the best way to distinguish between them is to identify which choice of &#948; causes the stopping criteria <ref type="bibr">(33 and 34)</ref> to be satisfied in the least number of excess iterations after 10 5 . The behavior of two key stopping criteria is shown in the plot on the rightthe PDE constraint Au (l)b and the convergence monitor for the relative error of the dual variables &#966; (l) -&#966; (l-1) / &#966; (l) . Of the four stopping criteria we consider (PDE constraint and three convergence monitors), these two are the last to be satisfied in all of the numerical simulations contained in this manuscript, hence these determine when our method terminates its iterations.</p><p>For the case of &#948; = (&#916;x) 2 (red lines), we indeed observe that the PDE constraint (solid line) satisfies its stopping criteria (dashed line) by 10 4 iterations and the dual variables (starred line) satisfy their stopping criteria of 10 -5 by 10 5 iterations. On the other hand, for the cases of &#948; = (&#916;x) 3 (blue lines) and &#948; = 10 -8 (green lines), we see that while the dual variables (starred lines) have satisfied their stopping criteria of 10 -5 by 10 4 iterations, the PDE constraints (solid lines) do not satisfy their stopping criteria (dashed lines) until later-it takes more than 10 5 iterations for &#948; = (&#916;x) 3 and more than 10 7 iterations for &#948; = 10 -8 . This example shows that choosing &#948; without respecting the order of accuracy of the finite difference approximation in the PDE . Here, &#963; = 0.1, &#963; &#955; = 0.99/&#955; max (A A t ) and then &#955; = 0.9727, &#948; = 10 -5 , and &#948; 3 = 10 -8 constraint, one wastes computational effort without improving the accuracy of the numerical solution.</p><p>Next, we compute Wasserstein geodesics between initial and target measures when neither are smooth nor strictly positive. In Fig. <ref type="figure">4</ref>, we compute the geodesic between a profile of the British Parliament and its translation. We do not observe convergence to the exact geodesic, which would be a constant speed translation, and instead observe degradation of the parliamentary building at intermediate times, due to numerical smoothing. Similarly, in Fig. <ref type="figure">5</ref>, we compute the geodesic between Pac-Man and a ghost, visualized as characteristic functions on sets in two dimensions. Again, we observe numerical smoothing around the edges of discontinuity. Both of these examples offer a numerical justification for the smoothness assumption we impose in our main convergence Theorem 3. In the absence of such smoothness, it appears that the method does not converge. Similar smoothness assumptions are required in the other numerical methods for Wasserstein geodesics for which rigorous convergence has been analyzed, including Monge Amp&#233;re-type methods <ref type="bibr">[11,</ref><ref type="bibr">68]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Wasserstein Gradient Flows: One Dimension</head><p>In this and the next section, we consider several examples of Wasserstein gradient flows, including some which have appeared in previous numerical studies <ref type="bibr">[3,</ref><ref type="bibr">29,</ref><ref type="bibr">49,</ref><ref type="bibr">99]</ref>, to demonstrate the performance of our method for simulating solutions of nonlinear partial differential equations. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.1">Porous Medium Equation</head><p>The porous medium equation</p><p>is the Wasserstein gradient flow of the energy (4), with U (&#961;) = 1 m-1 &#961; m and V = W = 0 . A well-known family of exact solutions is given by Barenblatt profiles (c.f. <ref type="bibr">[104]</ref>), which are densities of the form</p><p>We now apply Algorithm 3 to simulate solutions of the m = 2 porous medium equation with Barenblatt initial data, t 0 = 10 -3 and C = (3/16) 1/3 . Here, the Euler discretization ( <ref type="formula">27</ref>) is used. In Fig. <ref type="figure">6</ref>, we plot the evolution of the numerical solution over time, and we observe good agreement with the exact solution of the form <ref type="bibr">(56)</ref>, which is displayed in dashed curve.</p><p>In Fig. <ref type="figure">7</ref>, we analyze how the rate of convergence depends on the inner time step &#916;t, the spatial discretization &#916;x, and outer time step of the JKO scheme &#964; . We compute the error between the exact solution and the numerical solution in the 1 norm, i.e.,</p><p>In the plot on the left of Fig. <ref type="figure">7</ref>, we consider two fixed values of &#964; and examine how the error depends on N t and N x = 10N t . In both cases, the error quickly saturates, indicating that the outer time step &#964; dominates the error. In the plot on the right, we fix N t = 20 and N x = 200 and consider how the error depends on &#964; . We observe slightly less than first-order convergence in &#964; for the classical JKO scheme (E h = F h ) and higher-order convergence for the Crank-Nicolson inspired scheme (E h = H h ). We believe these slower rates of convergence are due to the lower regularity of solutions to the porous medium equation with compactly supported initial data, which are merely H&#246;lder continuous. In Fig. <ref type="figure">8</ref>, we consider the case of smooth, strictly positive initial data, given by a Gaussian with mean &#956; = 0 and variance &#952; = 0.2 <ref type="bibr">(53)</ref>, in which case solutions of the PDE remain smooth over time. On the left, we show the evolution of the solutions over time, and on the right, we illustrate that the classical JKO scheme indeed attains first-order accuracy, though the Crank-Nicolson inspired scheme is still less than second-order accurate.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.2">Nonlinear Fokker-Planck Equation</head><p>We now consider a nonlinear variant of the Fokker-Planck equation, Right: The rate of convergence for various choices of &#964; , contrasting the traditional first-order JKO scheme with the new Crank-Nicolson inspired scheme. For each choice of &#964; in our computation of the higher-order method, we choose our stopping criteria = 10 -4 * 2 -0.01/&#964; inspired by the porous medium equation described in the previous section <ref type="bibr">(55)</ref>. When V is a confining drift potential, all solutions approach the unique steady state</p><p>where C &gt; 0 depends on the mass of the initial data, so that &#961; &#8734; dx = &#961; 0 dx, see <ref type="bibr">[44,</ref><ref type="bibr">51]</ref>.</p><p>In Fig. <ref type="figure">9</ref>, we simulate the evolution of solutions to the nonlinear Fokker-Planck equation with V (x) = x 2 , m = 2, and initial data given by a Gaussian with mean &#956; = 0 and variance &#952; = 0.2 <ref type="bibr">(53)</ref>. On the left, we plot the evolution of the density Fig. <ref type="figure">9</ref> Evolution of the solution &#961;(x, t) to the one-dimensional nonlinear Fokker-Planck equation, with m = 2 and V (x) = x 2 . We choose &#964; = 0.05, &#916;x = 0.04, &#916;t = 0.1, &#955; = 0.1641, &#963; = 1, &#948; = 10 -5 , and &#948; 3 = 10 -5 . Left: evolution of density &#961;(x, t) toward equilibrium &#961; &#8734; (x). Right: Rate of decay of corresponding energy with respect to time Fig. <ref type="figure">10</ref> Analysis of rate of convergence for a solution of the nonlinear Fokker-Planck equation, as in Fig. <ref type="figure">9</ref>. We choose &#916;t = 0.1, &#916;x = 0.04 and consider the error (57) for various choices of &#964; , contrasting the traditional first-order JKO scheme with the new Crank-Nicolson inspired scheme &#961;(x, t) toward the steady state &#961; &#8734; (x). On the right, we compute the rate of decay of the corresponding energy (4) as a function of time, observing exponential decay as the solution approaches equilibrium. In this way, our method recovers analytic results on convergence to equilibrium of Carrillo, DiFrancesco, and Toscani <ref type="bibr">[35,</ref><ref type="bibr">51]</ref>.</p><p>In Fig. <ref type="figure">10</ref>, we analyze how the rate of convergence depends on the outer time step &#964; of the scheme, for sufficiently small inner time step &#916;t = 0.1 and spatial discretization &#916;x = 0.04. We compute the error We observe slightly faster than first-order convergence for the traditional JKO scheme (E h = F h ) and higher-order convergence for the new Crank-Nicolson inspired scheme (E h = H h ). We believe this improvement in the rate of convergence as compared to our previous example for the porous medium equation, Fig. <ref type="figure">7</ref>, is due to the rapid convergence to the steady state &#961; &#8734; .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.3">Aggregation Equation</head><p>In this section, we consider a nonlocal partial differential equation of Wasserstein gradient flow type, known as the aggregation equation</p><p>In recent years, there has been significant interest in interaction kernels W that are repulsive at short length scales and attractive at longer distances, such as the kernel with logarithmic repulsion and quadratic attraction</p><p>For this particular choice of W , there exists a unique equilibrium profile <ref type="bibr">[38]</ref>, given by</p><p>In Fig. <ref type="figure">11</ref>, we simulate the solution to the aggregation equation with Gaussian initial data <ref type="bibr">(53)</ref> with mean &#956; = 0 and variance &#952; = 1, analyzing convergence to equilibrium. On the left, we plot the evolution of the density &#961;(x, t) at varying times, observing convergence to the equilibrium profile &#961; &#8734; (x). On the right, we compute the rate of the decay of the energy as a function of time, observing exponential decay as obtained by Carrillo, Ferreira, and Precioso <ref type="bibr">[38]</ref> with a slightly slower numerical rate.</p><p>As the interaction potential W defined in Eq. ( <ref type="formula">59</ref>) is not continuous, we make the following modifications to our discretization of the JKO scheme. To avoid evaluation of W (x) at x = 0, we set W (0) to equal the average value of W on the cell of width 2h centered at 0, i.e., W (0) = 1 2h h -h W (x)dx, where we apply Gauss-Legendre quadrature rule with four grid points to evaluate the integral. In addition to modifying the interaction kernel in this way, we also introduce an artificial diffusion term of the form &#8706; x (&#961;&#8706; x &#961;) with = 1.6 &#215; (&#916;x) 2 to the right-hand side of (58), to avoid the possible overshoot at the boundary. (See also <ref type="bibr">[29]</ref> for a similar treatment.)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Wasserstein Gradient Flows: Two Dimensions</head><p>In the following, we consider a few gradient flows in two dimensions. Here, the constraint relaxation parameters are always chosen as &#948; = &#948; 3 = 10 -6 .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.1">Aggregation Equation</head><p>We now continue our study of the aggregation equation ( <ref type="formula">58</ref>) with repulsive-attractive interaction potentials in two dimensions, with interaction kernels of the form</p><p>using the convention that |x| 0 0 = ln(|x|). It is well known that the repulsion near the origin of the potential determines the dimension of the support of the steady state measure, see <ref type="bibr">[4,</ref><ref type="bibr">34]</ref>. In the following simulations, we take the initial data to be a gaussian <ref type="bibr">(53)</ref> with mean &#956; = 0 and variance &#952; = 0.25. In Fig. <ref type="figure">12</ref>, we simulate the evolution of solutions to the aggregation equation, with a = 4 and b = 2 in the interaction potential W , defined in Eq. ( <ref type="formula">60</ref>). We observe that the solution concentrates on a Dirac ring with radius 0.5 centered at the origin, recovering analytical results on the existence of a stable Dirac ring equilibrium for these values of a and b <ref type="bibr">[5,</ref><ref type="bibr">13]</ref>.</p><p>In Fig. <ref type="figure">13</ref>, we simulate the evolution of solutions to the aggregation equation, with a = 2 and b = 0. We observe that the solution converges to a characteristic function on the disk of radius 1, centered at the origin, recovering analytic results on solutions of the aggregation equation with Newtonian repulsion <ref type="bibr">[14,</ref><ref type="bibr">34,</ref><ref type="bibr">65]</ref>. We follow the same strategy described in Sect. 4.2.3 with = 1.6 &#215; (&#916;x 2 + &#916;y 2 ) to overcome the singularity of the interaction potential at x = 0 and potential overshooting.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.2">Aggregation Drift Equation</head><p>Next, we compute solutions of aggregation-drift equations</p><p>where W (x) = |x| 2 /2-ln(|x|) and V (x) = -&#945; &#946; ln(|x|). As shown in several analytical and numerical results <ref type="bibr">[29,</ref><ref type="bibr">42,</ref><ref type="bibr">53]</ref>, the steady state is a characteristic function on a torus or "milling profile", with inner and outer radius given by</p><p>In Fig. <ref type="figure">14</ref>, we simulate the long time behavior of a solution of the aggregation-drift equation with &#945; = 1 and &#946; = 4 and Gaussian initial data <ref type="bibr">(53)</ref>, &#956; = 0, &#952; = 0.25, as well as the rate of the decay of the entropy as the solution converges to equilibrium. In Fig. <ref type="bibr">(15)</ref>, we plot the evolution of the density from a nonradially symmetric initial data, given by five Gaussians to the same equilibrium profile. We follow the same strategy described in Sect. 4.2.3 to overcome the singularity of the interaction potential at x = 0      In recent years, there has been significant activity studying equations of this form, both analytically and numerically. When the interaction kernel W is attractive, the competition between the nonlocal &#8711; &#8226; (&#961;&#8711;W * &#961;) and nonlinear diffusion &#957;&#916;&#961; m causes solutions to blow up in certain regimes and exist globally in time in others, see for example <ref type="bibr">[18,</ref><ref type="bibr">19,</ref><ref type="bibr">25,</ref><ref type="bibr">26,</ref><ref type="bibr">41]</ref> and the survey <ref type="bibr">[32]</ref>. With fixed m, and in the presence of nonlocal interaction, the equation has a unique steady state which is radially decreasing up to a translation <ref type="bibr">[15,</ref><ref type="bibr">40]</ref>. In Fig. <ref type="figure">16</ref>, we simulate a solution of the aggregation-diffusion equation with W (x) = -e -|x| 2 /&#960; , &#957; = 0.1, and m = 3, and initial data given by a rescaled characteristic function on the square,</p><p>Diffusion dominates both the short and long ranges, and the medium range aggregation leads to the formation of four bumps, which ultimately approach a single bump equilibrium. (See also <ref type="bibr">[29]</ref>.) In Fig. <ref type="figure">17</ref>, we simulate solutions of the Keller-Segel equation, which is an aggregation-diffusion equation <ref type="bibr">(61)</ref> with a Newtonian interaction kernel, i.e., W (x) = 1 2&#960; ln(|x|) in two dimensions for &#957; = 1 and both m = 1 and m = 2, illustrating the role of the diffusion exponent in blowup or global existence of solutions. We choose the initial data to be given by a rescaled gaussian, obtained by multiplying equation ( <ref type="formula">53</ref>) by a mass M = 9&#960; , with mean &#956; = 0 and variance &#952; = 0.5. On the left, we  In Fig. <ref type="figure">18</ref>, we again simulate solutions of the Keller-Segel equation with m = 2, but in this case we take the initial data to be given by three localized bumps (Gaussian rings, i.e., the radial cut of the ring is a Gaussian with a center on the circle.) We observe a two-stage evolution in which the each of the bumps converges to a localized quasistationary state, and then interact and merge into one single bump in the long time limit. This is a manifestation of the typical metastability phenomena, which is likely present in the majority of the diffusion dominated Keller-Segel models <ref type="bibr">[24,</ref><ref type="bibr">29,</ref><ref type="bibr">32]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Further Details of Numerical Implementation</head><p>In this section, we provide explicit formulas for the matrix &#195; and the vectors u and b introduced in Problem 3(b) in Sect. 2.3, which play a key role in the implementation of Algorithms 1, 2, and 3. For simplicity, we consider the case of one space dimension, and the discretization takes the form <ref type="bibr">(28)</ref>. The constructions of A and b in Problem 3(a) are very similar except a slightly different treatment of &#961; at final time. From now on, for simplicity of notation, we will drop the tildes for the matrix &#195; and vector b.</p><p>Define N = (N x +1)(N t +1). Let &#8855; denote the Kronecker tensor product, I N x +1 the identity matrix of size N x + 1, and (x) M the column vector in R M with all components equal to x. Then we define u = (ae .,k ) N t k=0 ; (m .,k ) N t k=0 &#8712; R N , ae .,k = (&#961; j,k ) N x j=0 , m .,k = (m j,k ) N x j=0 and the matrix A &#8712; R M&#215;2N takes the form</p><p>Here, A &#961; &#8712; R N &#215;N reads</p><p>t &#8855; I (1)  x + D</p><p>(2) t &#8855; I (1)  x := A (1)  &#961; + A (2)  &#961; ,</p><p>where D</p><p>(1)</p><p>t &#8712; R (N t +1)&#215;(N t +1) , and I</p><p>(1)</p><p>x &#8712; R (N x +1)&#215;(N x +1) are</p><p>t = 1 0 .</p><p>Here, D</p><p>t and D</p><p>(2)</p><p>t correspond to the temporal discretization and initial condition for &#961;. Likewise,</p><p>t &#8855; D (1)  x + I N t +1 &#8855; D (2)  x := A (1) m + A (2)  m , where D (1)  x , D (2)  x &#8712; R (N x +1) , and B</p><p>(1) t &#8712; R (N t +1)&#215;(N t +1) :</p><p>For mass conservation, let S &#961; = (x) t N x +1 , then A mass = I N t +1 &#8855; S &#961; . In sum, different A i can be written as </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>One way to see that this is the unique optimal transport map from &#961; 0 to &#961; 1 is to note that T #&#961; 0 = &#961; 1 and T (x) is the gradient of a convex function; see, for example, [2, Section 6.2.3].</p></note>
		</body>
		</text>
</TEI>
