Riemannian Score-Based Generative Modelling
Abstract
Score-based generative models (SGMs) are a powerful class of generative models that exhibit remarkable empirical performance.
Score-based generative modelling (SGM) consists of a “noising” stage, whereby a diffusion is used to gradually add
Gaussian noise to data, and a generative model, which entails a “denoising” process defined by approximating the time-reversal of the diffusion.
Existing SGMs assume that data is supported on a Euclidean space, i.e. a manifold with flat geometry.
In many domains such as robotics, geoscience or protein modelling, data is often naturally described by distributions living on Riemannian manifolds and current
SGM techniques are not appropriate.
We introduce here Riemannian Score-based
Generative Models (RSGMs), a class of generative models extending SGMs to
Riemannian manifolds.
We demonstrate our approach on a variety of manifolds, and in particular with earth and climate science spherical data.
Introduction
Score-based Generative Models (SGMs) also called diffusion models (Song and Ermon, 2019; Song et al., 2021; Ho et al., 2020; Dhariwal and Nichol, 2021) formulate generative modelling as a denoising process.
Noise is incrementally added to data using a diffusion process until it becomes approximately Gaussian.
The generative model is then obtained by simulating an approximation of the corresponding time-reversal process which progressively denoises a Gaussian sample to obtain a data sample.
This process is also a diffusion whose drift depends on the logarithmic gradients of the noised data densities, i e. the Stein scores, estimated using a neural network via score matching (Hyvärinen, 2005; Vincent, 2011).
SGMs have been primarily applied to data living on Euclidean spaces, i e. manifolds with flat geometry.
However, in a large number of scientific domains the distributions of interest are supported on Riemannian manifolds.
These include, to name a few, protein modelling (Shapovalov and
Dunbrack Jr, 2011), cell development (Klimovskaia et al., 2020), image recognition (Lui, 2012), geological sciences (Karpatne et al., 2018; Peel et al., 2001), graph-structured and hierarchical data (Roy et al., 2007; Steyvers and Tenenbaum, 2005), robotics (Feiten et al., 2013; Senanayake and
Ramos, 2018) and high-energy physics (Brehmer and Cranmer, 2020).
We introduce in this work Riemannian Score-based Generative Models (RSGMs), an extension of
SGMs to Riemannian manifolds which incorporate the geometry of the data by defining the forward diffusion process directly on the Riemannian manifold, inducing a manifold-valued reverse process.
This requires constructing a noising process on the manifold that converges to an easy-to-sample reference distribution.
We establish that, as in the Euclidean case, the corresponding time-reversal process is also a diffusion whose drift includes the Stein score which is intractable but can similarly be estimated via score matching.
Methodological extensions are required as in most cases the transition kernel of the noising process cannot be sampled exactly.
For example on compact manifolds it is typically only available as an infinite sum through the Sturm–Liouville decomposition (Chavel, 1984).
To this end, we develop non-standard techniques for score estimation and rely on the use of Geodesic
Random Walks for sampling (Jørgensen, 1975).
We provide theoretical convergence bounds for
RSGMs on compact manifolds and demonstrate our approach on a range of manifolds and tasks, including modelling a number of natural disaster occurrence datasets collected by Mathieu and Nickel (2020).
We show that RGSMs achieve better performance than recent baselines (Mathieu and Nickel, 2020; Rozen et al., 2021) and scale better to high-dimensional manifolds.
Euclidean Score-based Generative Modelling
We recall here briefly the key concepts behind SGMs on the Euclidean space R d and refer the readers to Song et al.
for a more detailed introduction.
We consider a forward noising process ( X t ) t ≥defined by the following Stochastic Differential Equation (SDE)
[Equation]
where ( B t ) t ≥ 0 is a d -dimensional Brownian motion and p 0 is the data distribution.
The available data gives us an empirical approximation of p 0 .
The process ( X t ) t ≥ 0 is simply an Ornstein–Ulhenbeck (OU) process which converges with geometric rate to N(0 , Id) .
Under mild conditions on p 0 , the timereversed process ( Y t ) t ≥
= ( X T − t ) t ∈ [0 ,T ] also satisfies an SDE (Cattiaux et al., 2021; Haussmann and Pardoux, 1986) given by
[Equation]
where p t denotes the density of X t .
By construction, the law of Y T − t is equal to the law of X t for t ∈ [0 , T ] and in particular Y T ∼ p 0 .
Hence, if one could sample from ( Y t ) t ∈ [0 ,T ] then its final distribution would be the data distribution p 0 .
Unfortunately we cannot sample exactly from (2) as p T and the scores ( ∇ log p t ( x ))
t ∈ [0 ,T ] are intractable.
Hence SGMs rely on a few approximations.
First, p T is replaced by the reference distribution N(0 , Id) as we know that p T converges geometrically towards it.
Second, the following denoising score matching identity is exploited to estimate the scores
[Equation]
where p t | 0 ( x t | x 0 ) is the transition density of the OU process (1) which is available in closed-form.
It follows directly that ∇ log p t is the minimizer of ℓ t ( s ) =
E [ ∥ s ( X t ) − ∇ x t log p t |
( X t | X 0 ) ∥ 2 ] over functions s where the expectation is over the joint distribution of X 0 , X t .
This result can be leveraged by considering a neural network s θ : [0 , T ] × R d → R d trained by minimizing the loss function ℓ ( θ ) = (cid:82) T 0 λ t ℓ t ( s θ ( t, · ))
d t for some weighting function λ t > 0 .
Finally, an Euler–Maruyama discretization of (2) is performed using a discretization step γ such that T =
γN for N ∈ N
[Equation]
The above showcases the basics of SGMs but we highlight that many improvements have been proposed; see (e.g. Song and Ermon, 2020;
Jolicoeur-Martineau et al., 2021; Dhariwal and Nichol, 2021).
In particular, selecting an adaptive stepsize ( γ n ) n ∈ N (Bao et al., 2022; Watson et al., 2021) and using a predictor-corrector scheme (Song et al., 2021) instead of a simple Euler–Maruyama discretization drastically improves performance.
Riemannian Score-based Generative Modelling
We now move to the Riemannian manifold setting, and more specifically assume that M is a complete, orientable connected and boundaryless Riemannian manifold, endowed with a Riemannian metric g 4 .
Four components are required to extend SGMs to this setting: i) a forward noising process on
M which converges to an easy-to-sample reference distribution, ii) a time-reversal formula on M which defines a backward generative process, iii) a method for approximating samples of SDEs on manifolds, iv) a method to efficiently approximate the drift of the time-reversal process.
Notation are gathered in App. B.
3.1 Noising processes on manifolds
The first necessary component is a suitable generic noising process on manifolds that will converge to a convenient stationary distribution.
A simple choice is to use Langevin dynamics described by
[Equation]
which admits the invariant density (w.r.t.
the volume form) given by d p ref / d Vol M ( x ) ∝ e − U ( x ) (Durmus, 2016, Section 2.4), where ∇ is the Riemannian gradient 5 .
Two simple choices for U ( x ) present themselves.
Firstly, setting U ( x ) =
d M ( x, µ ) 2 / (2 γ 2 ) , where d M is the geodesic distance and µ ∈ M is an arbitrary mean location, induces the drift ∇ X t U ( X t ) = − exp − 1 X t ( µ ) /γ 2 6 .
This is the potential of the ‘Riemannian normal’ (Pennec, 2006) distribution, from which it is in general neither trivial to sample nor to compute the normalisation constant (Hauberg, 2018; Mathieu et al., 2019).
An alternative is to target the ’exponential wrapped’ Gaussian.
This is the pushforward of a Gaussian distribution in the tangent space at the mean location along the exponential map.
The potential is given by U ( x ) =
d M ( x, µ ) 2 / (2 γ 2 ) + log | ∂ exp − 1 µ ( x ) | 7 .
In contrast to the
Riemannian normal, sampling and evaluating the density of this distribution is easy.
One recovers the standard Ornstein–Uhlenbeck noising process (Song et al., 2021) for both of these target distributions when M = R d and µ = 0 since then the drift b ( t, X t ) = 1 2 exp − 1 X t (0) =
− 1 2 X t .
On compact manifolds, the invariant measure Vol M has finite volume, thus a natural choice is to target the uniform distribution which is given by Vol M / |M| .
In this case, ∇ X t U ( X t ) =
and the noising process is simply a Brownian motion on
M .
3.2 Time-reversal on Riemannian manifolds
In order to use these noising processes we prove the time-reversal formula for manifolds, a generalisation of the results in the Euclidean case, e.g. see Cattiaux et al.
(2021, Theorem 4.9).
Consider an SDE of the form d X t = b ( X t )d t + d B M t where B M t is a Brownian motion on M .
We refer to
App.
C.3 for an introduction to Brownian motions on manifolds.
This result shows that if ( X t ) t ∈ [0 ,T ] is a diffusion process then ( X T − t ) t ∈ [0 ,T ] is also a diffusion process w.r.t.
the backward filtration whose coefficients can be computed, and are shown in Eq.
The proof relies on an extension of
Cattiaux et al.
(2021, Theorem 4.9) to the Riemannian manifold case and is postponed to App. H.
Theorem 1 (Time-reversed diffusion) .
Let T ≥ 0 and ( B M t ) t ≥ 0 be a Brownian motion on M such that B M 0 has distribution the volume form p ref8 .
Let ( X t ) t ∈
[0 ,T ] be associated with the SDE d X t
=
b
( X t )d t + d B M t .
Let ( Y t ) t ∈ [0 ,T ] =
( X T − t ) t ∈ [0 ,T ] and assume that KL( P | Q ) < + ∞ , where Q is the distribution of ( B M t ) t ∈ [0 ,T ] and P the distribution of ( X t ) t ∈ [0 ,T ] .
In addition, assume that P t =
L ( X t ) , the distribution of X t , admits a smooth positive density p t w.r.t.
p ref for any t ∈ [0 , T ] .
Then, ( Y t ) t ∈ [0 ,T ] is associated with the SDE
[Equation]
3.3 Approximate sampling of diffusions
Obtaining samples from SDEs on a manifold is non-trivial in general.
If M is isometrically embedded into R p (with p ≥ d ) one can define ( B M t ) t ≥ 0 as a R p -valued process, see App.
C.3.
However, this approach is extrinsic , as it requires the knowledge of the projection operator to place points back on the manifold at each step which can accumulate errors.
Here we consider an intrisic approach based on Geodesic Random Walks (GRWs), see Jørgensen (1975) for a review of their properties.
GRWs can approximate any well-behaved diffusion on M .
Hence, we introduce GRWs in a general framework and consider a discrete-time process ( X γn ) n ∈ N which approximates the diffusion ( X t ) t ≥ 0 defined by
[Equation]
This generalisation is key to sampling the backward diffusion process defined in Theorem 1.
[Figure] [Figure]
Require: T, N, X γ 0 , b, σ, P 1: γ = T/N
Step
2: for k ∈ { 0 , . . .
, N − 1 } do 3:
Z k +
Definition 2 (Geodesic Random Walk) .
Let X γ 0 be a M -valued random variable.
For any γ > 0 , we define ( X γn ) n ∈ N such that for any n ∈ N , X γn +1 =
exp X γn [ γ { b ( X γn ) + √ γV n +1 } ] , where ( V n ) n ∈ N is a sequence of T M -valued random variables such that for any n ∈ N , E [ V n +1 |F n ] = 0 and E [ V n +1 V ⊤ n +1 |F n ] = σσ ⊤ ( X γn ) , where F n is the filtration generated by { X γk } nk =0 .
We say that
the
M -valued process ( X γn ) n ∈ N is a Geodesic Random Walk.
Algorithm 1 approximately simulates the diffusion ( X t ) t ∈ [0 ,T ] defined in Eq.
(5) using GRWs; see Kuwada (2012); Cheng et al.
(2022) for quantitative error bounds in the time-homogeneous case and App.
I.2 for a novel extentsion for the time-inhomogeneous case.
Fig.
1 provides a graphical illustration of this procedure.
3.4 Score approximation on Riemannian manifolds
Score matching and loss functions.
The reverse process from Eq.
(4) involves the Stein score ∇ log p t which is unfortunately intractable.
To derive an approximation, we first remark that for any s, t ∈ (0 , T ] with t > s and x t ∈ M , p t ( x t )
= (cid:82) M p t | s ( x t | x s )
d P s ( x s ) , where P s = L ( X s ) , the distribution of X s .
Thus, we have that for any s, t ∈ [0 , T ] with t > s and x t ∈ M
[Equation]
Hence, for any s, t ∈ [0 , T ] with t > s we have that ∇ log p t = arg min { ℓ t | s ( s t ) :
s t ∈ L 2 ( P t ) } , where ℓ t | s ( s t )
= (cid:82) M 2 ∥∇ x log p t | s ( x t | x s ) − s t ( x t )
∥ 2 d P s,t ( x s , x t ) , which is referred as the Denois- ing Score Matching (DSM) loss.
It can also be written in an implicit fashion.
Proposition 3.
Let t, s ∈
(0 , T ] with t > s .
Then, for any s t ∈ C ∞ ( M ) , ℓ t | s ( s t ) = 2 ℓ im t ( s t ) + (cid:82)
M 2 ∥∇
x t log p t | s ( x t | x s )
∥ 2 d P s,t ( x s , x t ) , where ℓ im t ( s t ) =
(cid:82) M { 12 ∥
s t ( x t ) ∥ 2 +div( s t )
( x t ) } d P t ( x t ) .
The proof is postponed to App.
J. For any t ∈ (0 , T ] the minimizers of the loss ℓ im t on X ( M ) (where
X ( M ) is the set of vector fields on M ) are the same as the ones for ℓ t | s .
The loss ℓ im t is referred to as the implicit score matching (ISM) loss (Hyvärinen, 2005).
These losses are direct analogous to the versions typically used in Euclidean space.
In the case where we have access to {∇ log p t | s : T ≤ t > s ≥ 0 } , the forward noising process transition kernels, or an approximation of this family, then we can use the DSM loss to learn
Algorithm
Require: ε, T, N, { X m 0 } Mm =1 , loss , s , θ 0 , N iter , p ref , P 1: ///
TRAINING /// 2: for n ∈ { 0 , . .
, N iter − 1 } do 3:
X 0 ∼ (1 /M )
(cid:80) Mm =1 δ X m▷ Random mini-batch from dataset 4: t ∼ U ([ ε, T ])
▷ Uniform sampling between ε and T 5:
X t = GRW ( t, N, X 0 , b, Id , P)
▷ Approximate forward diffusion with Algorithm 1 6: ℓ ( θ n ) =
ℓ t ( T, N, X 0 , X t , loss , s θ n ) ▷ Compute score matching loss from Table 2 7: θ n +
=
optimizer_update ( θ n , ℓ ( θ n ))
▷ ADAM optimizer step 8: end for 9: θ ⋆ = θ N epoch 10: ///
SAMPLING ///
: Y 0 ∼ p ref ▷ Sample from uniform distribution 12: b ⋆θ ( t, x ) =
s θ ⋆ ( T − t, x ) for any t ∈ [0 , T ] , x ∈ M ▷ Reverse process drift 13: { Y k } Nk =
=
GRW ( T, N, Y 0 , b θ ⋆ , Id , P)
▷ Approximate reverse diffusion with Algorithm14: return θ ⋆ , { Y k } Nk =
[Table]
Forward process d X t = − 12 X t d t + d B M t − 12 ∇ X t U ( X t )
d t + d B M t d B M t
Easy-to-sample distribution
Gaussian
Wrapped Gaussian
Uniform
Time reversal
Cattiaux et al.
Theorem
Sampling forward process
Direct
Geodesic Random Walk (Algorithm 1)
Sampling backward process
Euler–Maruyama
Geodesic Random Walk (Algorithm 1) { s t ∈ X
( M ) : t ∈ [0 , t ] } .
If this is not the case then we turn to ℓ im t .
Note that ℓ im t requires the computation of a divergence term which requires d Jacobian-vector calls.
In high dimension, a stochastic estimator is necessary (Hutchinson, 1989).
Following Song and Ermon (2020);
Nichol and
Dhariwal (2021) the loss can be weighted with a term λ t > 0 .
Parametric family of vector fields.
We approximate ( ∇ log p t ) t ∈ [0 ,T ] by a family of functions { s θ } θ ∈ Θ where Θ is a set of parameters and s θ : [0 , T ] → X ( M ) .
In a Euclidean space, vector fields are simply functions s θ : R d → R d .
In manifolds, although for any x ∈ M , T x M ∼ = R d , there does not necessarily exist a set of d smooth vector fields { E i } di =1 such that span (cid:0) { E i ( x ) } di =1 (cid:1) =
T x M (Chapter 8, page 179, Lee, 2006) 9 .
Fortunately, one can rely on a larger set of smooth vector fields { E i ( x ) } ni =1 with n > d that does span the tangent bundle.
Then it suffices to construct a neural network s θ : [0 , T ] × M → R n to parametrize the score network as s θ ( t, x ) = (cid:80) ni
=1 s iθ ( t, x ) E i ( x ) .
See App.
E for a discussion on the different choices of generating sets { E i ( x ) } ni =1 .
Combining this parameterization with the score matching losses, the time-reversal formula of Theorem 1 and the sampling of forward and backward processes described in Sec.
3.3, we define our
RGSM algorithm in Algorithm 2.
This algorithm can also benefit from a predictor-corrector scheme as in (Song et al., 2021), see App.
G.
RSGMs on compact manifolds
Assuming compactness of the manifold M , we can leverage a number of special properties to implement a specific case of our algorithm.
In particular we benefit from the fact that on compact manifolds we have a proper uniform distribution over the manifold, and have access to a variety of approximations of the heat kernel.
As highlighted in Sec. 3.1, in the compact setting we use Brownian motion as the noising SDE, which targets the uniform distribution as the stationary distribution.
Table 1 highlights the main differences between RSGMs on compact manifolds, generic manifolds and Euclidean score-based models.
Heat kernel on compact Riemannian manifolds.
For any x 0 ∈ M and t ≥ s ≥ 0 , the heat kernel p t | s ( ·| x s ) is defined as the density of B M t w.r.t.
the uniform measure on the manifold.
Contrary to the Gaussian transition density of the OU process (or the Brownian motion) in the
Euclidean setting, it is typically only available as an infinite series.
In order to circumvent this issue we consider two techniques: i) a truncation approach, ii) a Taylor expansion around t = 0 called a
Varadhan asymptotics.
First, we recall that in the case of compact manifolds the heat kernel is given by the Sturm–Liouville decomposition (Chavel, 1984) given for any t > 0 and x 0 , x t ∈ M by
[Equation]
(6) where the convergence occurs in L 2 ( p ref ⊗ p ref ) , ( λ j ) j ∈ N and ( ϕ j ) j ∈
N are the eigenvalues, respectively the eigenvectors, of − ∆ M , the Laplace-Beltrami operator in the manifold, in L 2 ( p ref ) (see
Saloff-Coste, 1994, Section 2).
When the eigenvalues and eigenvectors are known, we rely on an approximation of the logarithmic gradient of p t | 0 by truncating the sum in Eq.
(S8) with J ∈ N terms to obtain for any t > 0 and x 0 , x t ∈ M
[Equation]
Under regularity conditions on M it can be shown that for any x, y ∈ M and t ≥ 0 , lim
[Equation]
Jones et al., 2008, Lemma 1).
In the case of the d -dimensional torus or sphere the eigenvalues and eigenvectors are computable (see Saloff-Coste, 1994, Section 2) and we can apply this method to approximate p t | 0 for any t > 0 , see App.
F
When the eigenvalues and eigenvectors are unknown or not tractable, we can still derive an approximation of the heat kernel for small times t .
Using Varadhan’s asymptotics—see Bismut (1984,
Theorem 3.8) or Chen et al.
(2021, Theorem 2.1)—for any x, y ∈ M with y / ∈ Cut( x ) (where
Cut( x ) is the cut-locus of x in M (see Lee, 2018, Chapter 10))
we have that
[Equation]
Using the previously defined score-matching losses and the approximations to the heat kernel above
[Table]
we highlight three methods to compute ∇ log p t in Table
[Table] [Table]
(8) 12 E (cid:2)
∥ s ( X t ) − exp − 1 X t ( X s ) /
( t − s ) ∥ 2 (cid:3) ✗ ✓
O (1)
[Table]
E (cid:2) 12 ∥ s ( X t ) ∥ 2 + div( s )( X t ) (cid:3) ✗ ✗
O ( d )
Stochastic
E (cid:2) 12 ∥ s ( X t ) ∥ 2 + ε ⊤ ∂ s ( X t )
ε (cid:3) ✗ ✗
O (1)
Convergence results in the compact setting We now provide a theoretical analysis of RSGM under the assumption that M is compact.
The following result ensures that RSGM generates samples whose distribution is close to the data distribution p 0 .
Let us denote { Y k } n ∈{ 0 ,...,N } the sequence generated by Algorithm 2.
This result relies on the following assumption, which is satisfied for a large class of manifolds M such as the d -dimensional sphere and torus, compact matrix groups and products of these manifolds.
A1.
There exist C, α > 0 such that for any t ∈ (0 , 1] and x ∈ M , p t | 0 ( x | x ) ≤ Ct − α/ 2 , where p t | 0 ( ·| x 0 ) is the density of the heat kernel, i.e. the density of B M t with initial condition x 0 10 .
Theorem 4.
Assume A 1 , that p 0 is smooth and positive and that there exists M ≥ 0 such that for any t ∈ [0 , T ] and x ∈ M , ∥ s θ ⋆ ( t, x ) − ∇ log p t ( x ) ∥ ≤ M , with s θ ⋆ ∈ C([0 , T ] , X ( M )) .
Then if T > 1 / 2 , there exists C ≥ 0 independent on T such that
[Equation]
where W 1 is the Wasserstein distance of order one on the probability measures on M .
The proof is postponed to App. I. In particular, for any ε > 0 , choosing T > 0 large enough, M small enough (which can be achieved using the universal property of neural networks) and γ small enough, we get that W 1 ( L ( Y N ) , p 0 ) ≤ ε .
This result might seem weaker than the result obtained for Moser flows in (Rozen et al., 2021, Theorem 3), but we emphasize that our bound takes into account the time-discretization contrary to Rozen et al.
(2021) which considers the continuous-time flow.
If we consider the time-reversed continuous-time SDE then we recover a bound in total variation distance, see App.
I. Note that the upper bound M encompasses both the bias introduced by the use of a neural network and the bias introduced by the use of an approximation of the score.
Related work
In this section we discuss previous work on parametrizing family of distributions for manifold-valued data.
Here, the manifold structure is considered to be prescribed, in contrast with methods that jointly learn the manifold structure and density (e.g. Brehmer and Cranmer, 2020; Caterini et al., 2021).
Parametric family of distributions.
The various parametric families of manifold-valued distributions that have been proposed can be categorized into three main approaches (Navarro et al., 2017): wrapping, projecting and conditioning.
Wrapped distributions consider a parametric distribution on R n that is pushed-forward along a surjective map ψ : R n → M .
Projected distributions are defined by marginalizing out some distribution along the normal bundle of
M .
Conditioning distributions encompass the von Mises-Fisher and Kent distributions (Fisher, 1953; Kent, 1982).
Considering
Push-forward of Euclidean normalizing flows.
More recently, approaches leveraging the flexibility of normalizing flows (Papamakarios et al., 2019) have been proposed.
Following the wrapping method described above, these methods parametrize a normalizing flow in R n before being pushed along an invertible map ψ : R n → M .
However, to globally represent the manifold, the map ψ needs to be a homeomorphism, which can only happen if M is topologically equivalent to R n , hence limiting the scope of that approach.
One natural choice for this map is the exponential map exp x : T x M ∼ = R d .
This approach has been taken, for instance, by Falorsi et al.
and Bose et al.
(2020), respectively parametrizing distributions on Lie groups and hyperbolic space.
Neural ODE on manifolds.
To avoid artifacts or numerical instabilities due to the manifold embedding, another line of work uses tools from Riemannian geometry to define flows directly on the manifold of interest (Falorsi and Forré, 2020; Mathieu and Nickel, 2020; Falorsi, 2021).
Since these methods do not require a specific embedding mapping, they are referred as Riemannian .
They extend continuous normalizing flows (CNFs)
(Grathwohl et al., 2019) to the manifold setting, by implicity parametrizing flows as solutions of Ordinary Differential Equations (ODEs).
As such, the parametric flow is a continuous function of time.
This approach has recently been extended by Rozen et al.
(2021) introducing Moser flows, whose main appeal being that it circumvents the need to solve an ODE in the training process.
We refer to App.
K for an in-depth discussion on the links between our work and Moser flows.
Optimal transport on manifolds.
Another line of work has developed flows on manifolds using tools from optimal transport.
Sei (2013) introduced a flow that is given by f θ : x (cid:55)→ exp x ( ∇ ψ c θ ) with ψ cθ a c -convex function and c = d 2 M the squared geodesic distance.
This approach is motivated by the fact that the optimal transport map takes such an expression (Ambrosio, 2003).
These methods operate directly on the manifold, similarly to CNFs, yet in contrast they are discrete in time.
The benefits of this approach depend on the specific choice of parametric family of c -convex functions (Rezende and Racanière, 2021;
Cohen et al., 2021), trading-off expressivity with scalability.
[Table]
Experiments
In this section we benchmark the empirical performance of RSGMs along with other manifold-valued methods introduced in Sec.
We also compare to a ‘Stereographic‘ score-based model, introduced in App.
N. First, we assess their modelling capacity on earth and climate science spherical data.
Then, we test the methods scalability with respect to manifold dimensions with a synthetic experiment on the torus T d .
Eventually, we evaluate the models’ regularity and time complexity with a synthetic
SO 3 ( R ) target.
Experimental details are provided in App.
O.
6.1 Earth and climate science datasets on the sphere
We start by evaluating RSGMs on a collection of simple datasets, each containing an empirical distribution of occurrences of earth and climate science events on the surface of the earth.
These events are: volcanic eruptions (NGDC/WDS), earthquakes (NGDC/WDS), floods (Brakenridge, 2017) and wild fires (EOSDIS, 2020).
We compare to previous baseline methods: Riemannian
Continuous Normalizing Flows (Mathieu and Nickel, 2020), Moser Flows (Rozen et al., 2021) and a mixture of Kent distributions (Peel et al., 2001).
Additionally, we consider a standard SGM on the 2D plane followed by the inverse stereographic projection which induces a density on the sphere (Gemici et al., 2016).
We evaluate the log-likelihood of each model, extending to the manifold setting the likelihood computation techniques of SGMs, see App.
D. We observe from Table 4, that all benchmarked methods have comparable performance when evaluated on these simple tasks with RSGM performing marginally better on most datasets.
However, we empirically notice that
Moser flows are slow to train and additionally that both Moser flows and stereographic SGMs are computationally expensive to evaluate.
6.2 Synthetic data on tori
We now move to another manifold, that is the torus T d = S 1 × · · · × S 1 , so as to assess the scalability of the different methods with respect to the dimension d .
We consider a wrapped Gaussian target distribution on T d with a random mean and unit variance.
Moser flows’ (Rozen et al., 2021) loss involves a regularization term which involves an integral over the manifold, approximated by a
Monte Carlo (MC) estimator with uniform proposal.
This term regularizes Moser flows towards probability measures,
i
[Table]
e. with unit volume.
We thus expect Moser flows to fail in high-dimension as the number of samples K required for the MC estimator to be accurate will grows as O (e d ) , and the
[Table]
[Figure]
memory required to compute this estimator grows either in O ( Kd ) for exact divergences or O ( K ) for approximated divergences (see Table 3).
In Fig.
3, we observe that RSGMs are able to fit well the target distribution even in high dimension, with a linear or constant computational cost—depending on the divergence estimator.
In contrast,
Moser flows scale poorly with the dimension, to the extent that we are unable to train them for d ≥ 10 .
This is due to the combination of the complexity which grows linearly with both the dimension d and the number of MC samples K , which itself ought to grow exponentially with d —as discussed in the previous paragraph.
This is illustrated by the gap between the ‘Moser’ and ‘ODE’ likelihoods which increases with the manifold dimension (see left Fig. 3).
6.3 Synthetic data on the Special Orthogonal group
In order to demonstrate the broad range of applicability of our model we now turn to the task of density estimation on the special orthogonal group SO d ( R ) =
{ Q ∈ M d ( R ) : QQ ⊤ = Id , det(Q) = 1 } .
We consider the synthetic dataset consisting of samples in SO 3 ( R ) from a mixture of wrapped normal distributions with M components.
We compare RSGMs against Moser flows and a wrapped-exponential baseline inspired by Falorsi et al.
(2019)—where we parametrize a standard Euclidean SGM on so (3) that is then pushed-forward on SO 3 ( R ) .
RSGMs are trained using the ℓ t | 0 (DSM) loss with the Varadhan approximation (see
Table 2).
From Table 5 we observe that, RSGMs perform consistently, whether the target distribution has few or many mixture components M , as opposed to Exp-wrapped SGMs and Moser flows which only perform well in some range of M .
Similarly to Sec.
6.2, we find Moser flows to be much slower to train due to the large number of Monte Carlo samples needed in the reguralizer ( K = 10 4 ).
We also note from Table 5 that the number of score network evaluations (NFE) is significantly lower for
RSGMs, and is particularly detrimental for Moser flows ( ≫ 10 3 )
[Figure]
(a) Histograms of SO 3 ( R ) samples from a target mixture distribution with M = 4 components, represented via their Euler angles.
[Figure]
b) RSGMs are much more robust to hyperparameters than Exp-wrapped SGMs.
The diffusion coefficient is given by
[Figure]
Method
M = M =
M =
[Table]
[Figure]
[Table]
[Figure]
[Table]
6.4 Synthetic data on hyperbolic space
Finally we demonstrate RSGM on a non-compact manifold: the two dimensional hyperbolic space H 2 , which is defined as the simply connected space of constant negative curvature.
We use Langevin dynamics as the noising process (Eq. (3)) and target a wrapped Gaussian as the invariant distribution.
We again consider a synthetic dataset of samples from a mixture of exp-wrapped normal distribution.
From Fig.
5, we can qualitatively see that both score-based models are able to fit the target distribution.
[Figure]
Discussion and limitations
In this paper we introduced Riemannian Score-Based Generative Models (RSGMs), a class of deep generative models that represent target densities supported on manifolds, as the time-reversal of
Langevin dynamics.
The main benefits of our method stems from its scalability to high dimensions, its applicability to a broad class of manifolds due to the diversity of available loss functions, its robustness and crucially its capacity to model complex datasets.
We also provided theoretical guarantees on the convergence of RSGMs.
In future work, we would like explore more generic classes of manifolds, such a ones with a boundary, along with alternative noising processes.
Another promising extension concerns stochastic control on manifolds and more precisely, deriving efficient algorithms to solve
Schrödinger bridges in the same spirit as De Bortoli et al.
(2021) on Euclidean state spaces.
Acknowledgments
We are grateful to the anonymous reviewers for their insightful comments and the for fruitful discussion more generally.
We thank the geomstats team Miolane et al.
(2020a).
This is part of the collaboration between US DOD, UK MOD and UK EPSRC under the Multidisciplinary University
Research Initiative.
AD is also partially supported by the EPSRC grant EP/R034710/
CoSines
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] Our main contribution is the extension of diffusion models on Riemannian manifolds.
(b) Did you describe the limitations of your work?
[Yes] See Sec.
(c) Did you discuss any potential negative societal impacts of your work?
[No] The work presented in this paper focuses on the learning of score-based models on manifold.
We do not foresee any immediate societal impact of such a study.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] We have read the ethics review guidelines and our paper conforms to them.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] Yes, see A 1.
(b) Did you include complete proofs of all theoretical results?
[Yes] Yes, proofs are postponed to the supplementary material.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] Experimental details are given in App.
O. (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] Experimental details are given in App.
O. (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] Error bars are reported for each experiment.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] Experimental details are given in App.
O. 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] See Sec.
(b) Did you mention the license of the assets?
[Yes] See App.
O. (c) Did you include any new assets either in the supplemental material or as a URL?
[No] Not applicable.
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[No] Not applicable.
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[No] Not applicable.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[No] Not applicable.
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[No] Not applicable.
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[No] Not applicable.
Supplementary to:
Riemannian Score-Based Generative Modelling
A Organization of the supplementary
In this supplementary we first introduce notation in App.
B. We gather the proof of Theorem 1 as well as additional derivations on score-based generative models and Riemannian manifolds.
In App.
C, we recall basics on stochastic Riemannian geometry following Hsu (2002).
In App.
D, we introduce an extension to the Riemannian setting of the likelihood computation techniques in diffusion models.
Details about parametric vector fields are given in App.
E. In App.
F, we recall some basic facts about eigenvalues and eigenfunctions of the Laplace–Beltrami operator on the d -dimensional sphere and torus.
We present an extension of Algorithm 2 using predictor-corrector schemes in App. G.
In
App.
H, we prove the extension of the time-reversal formula to manifold in Theorem 1.
We prove the convergence of RSGM, i.e. Theorem 4, in App. I.
The proof of Proposition 3 drawing links between the denoising score matching loss and the implicit score matching loss is presented App.
J. We provide a thorough comparison between our approach and the one of Rozen et al.
(2021) in App.
K.
We show how our method can be adapted to perform density estimation in App.
L. Extensions to conditional SGM and Schrödinger Bridges are discussed in App. M.
In Sec. 3.1, we briefly discuss the non compact setting.
Details on the stereographic SGM are given in App.
N. Experimental details are given in App. O. B Notation We refer to App.
C for more details about the basic concepts of Riemannian geometry and stochastic processes.
In this section, we merely introduce the notation used in our work.
We postpone an introduction to stochastic processes on manifolds to App. C.2. In this work we always consider a smooth, connected and complete manifold M . We focus on the case of Riemannian manifolds, namely manifolds equipped with a metric g .
Metrics g are smooth scalar product on the manifold allowing us to define the notion of distance on a manifold.
We refer to
App. C for a precise definition and a discussion on metrics.
Given a smooth map f ∈ C ∞ ( M , R ) , the gradient ∇ f is defined for any f : M → R , x ∈ M , v ∈ T x M , ⟨∇ f, v ⟩ g =
d f ( v ) .
The distane d
M ( x, y ) is defined as the infimum of the length of all the curves on M joining x and y .
Geodesics are path defined on M by a second order equation (and a starting point and speed).
This second order equation corresponds to the first order minimization of an energy functional whose minimizers also minimize the length.
In App.
C, we introduce the notion of geodesics using parallel transport.
The exponential mapping exp x : U M → M with U ⊂ T x M is such that exp x ( v ) =
γ (1) with γ (1) the geodesics with initial condition ( x, v ) at time t = 1 .
Finally the volume form is a differentiable form of same degree as the dimension of M .
Since M is an orientable Riemannian manifold there is a natural volume form defined using the metric g , namely ω ( x ) =
| g ( x ) | 1 / 2 d x 1 ∧ . . .
d x d .
In this paper, we abuse notation and denote by the volume form this natural volume form.
C Preliminaries on stochastic Riemannian geometry
In this section, we recall some basic facts on Riemannian geometry and stochastic Riemannian geometry.
We follow Hsu (2002); Lee (2018, 2006) and refer to Lee (2010, 2013) for a general introduction to topological and smooth manifolds.
Throughout this section M is a d -dimensional smooth manifold, T M its tangent bundle and T ⋆ M it cotangent bundle.
We denote C ∞ ( M ) the set of real-valued smooth functions on
M and X ( M ) the set of vector fields on M .
C.1 Tensor field, metric, connection and transport
Tensor field and Riemannian metric For a vector space
V let T k,ℓ ( V ) =
V ⊗ k ⊗ ( V ⋆ )
⊗ ℓ with k, ℓ ∈ N .
For any k, ℓ ∈ N we define the space of ( k, ℓ ) -tensors as T k,ℓ M = ⊔
p ∈M T k,ℓ (T p M ) .
Note that Γ( M , T 0 , 0 M ) =
C ∞ ( M ) , X ( M ) =
Γ( M , T 1 , 0 M ) and that the space of 1 -form on
M is given by Γ( M , T 0 , 1 M ) , where Γ( M , V ( M )) is a section of a vector bundle V ( M ) (see
Lee, 2013, Chapter 10).
For any k ∈ N , we denote T | k | M = ⊔ kj =0 T j,k − j M .
M is said to be a Riemannian manifold if there exists g ∈ Γ( M , T 0 , 2 M ) such that for any x ∈ M , g ( x ) is positive definite.
g is called the Riemannian metric of
M .
Every smooth manifold can be equipped with a Riemannian metric (see Lee, 2018, Proposition 2.4).
In local coordinates we define
G = { g i,j } 1 ≤ i,j ≤ d = { g ( X i , X j ) } 1 ≤ i,j ≤ d , where { X i } di =1 is a basis of the tangent space.
In what follows we consider that
M is equipped with a metric g and for any X, Y ∈ X
( M ) we denote ⟨ X, Y ⟩ M = g
( X, Y ) .
Connection A connection ∇ is a mapping which allows one to differentiate vector fields w.r.t other vector fields.
∇ is a linear map ∇ : X ( M ) × X ( M ) →
X ( M ) .
In addition, we assume that i) for any f ∈ C ∞ ( M ) , X, Y ∈ X
( M ) , ∇ fX ( Y ) =
f ∇ X Y , ii) for any f ∈ C ∞ ( M ) ,
X, Y ∈ X ( M ) , ∇ X ( fY ) =
f ∇ X Y + X ( f ) Y .
Given a system of local coordinates, the Christoffel symbols { Γ ki,j } 1 ≤ i,j,k ≤ d are given for any i, j ∈ { 1 , . . .
, d } by ∇ X i X j = (cid:80) dk =1 Γ ki,j X k .
We also define the Levi–Civita connection ∇ by considering the additional two conditions: i) ∇ is torsion-free, i.e. for any X,
Y ∈ X ( M ) we have ∇ X Y − ∇ Y X =
[ X, Y ] , where [ X, Y ] is the Lie bracket between X and Y , ii) ∇ is compatible with the metric g , i.e. for any X
, Y, Z ∈ X ( M ) , X ( ⟨ Y, Z ⟩ M ) =
⟨∇ X Y, Z ⟩ M + ⟨ Y, ∇ X Z ⟩ M .
We recall that the Levi–Civita connection is uniquely defined since for any X
, Y, Z ∈ X ( M ) we have
[Equation]
In this case, the Christoffel symbols are given for any i, j, k ∈ { 1 , . . .
, d } by
[Equation]
where { g i,j } 1 ≤ i,j ≤ d = G − 1 .
Note that if M is Euclidean then for any i, j, k ∈ { 1 , . . .
, d } , Γ ki,j = 0 .
We also extend the connection so that for any X ∈ X ( M ) and f ∈ C ∞ ( M ) we have ∇ X f = X ( f ) .
In particular, we have that ∇ X f ∈ C ∞ ( M ) .
In addition, we extend the connection such that for any α ∈ Γ( M , T 0 , 1 M ) ,
X, Y ∈ X ( M ) we have ∇ X α ( Y ) =
α ( ∇ X Y ) − X
( α ( Y )) .
In particular, we have that ∇ X α ∈ Γ( M , T 1 , 0 M ) .
Note that for any X ∈ X ( M ) and α, β ∈ T | 1 | M we have ∇ X ( α ⊗ β ) =
∇ X α ⊗ β + α ⊗ ∇ X β .
Similarly, we can define recursively ∇ X α for any α ∈ Γ( M , T k,ℓ M ) with k, ℓ ∈ N .
Such an extension is called a covariant derivative.
Parallel transport, geodesics and exponential mapping Given a connection, we can define the notion of parallel transport, which transports vector fields along a curve.
Let γ : [0 , 1] → M be a smooth curve.
We define the covariant derivative along the curve γ by D ˙ γ : X ( γ ) → X ( γ ) similarly to the connection, where
[Equation]
[0 , 1]) , T M ) .
In particular if ˙ γ and X ∈ X ( γ ) can be extended to
X ( M ) then we define D ˙ γ ( X ) = ∇ ˙ γ X ∈ X ( M ) .
In what follows, we denote D = ∇ for simplicity.
We say that X ∈ X ( γ ) is parallel to γ if for any t ∈ [0 , 1] , ∇ ˙ γ X ( t ) = 0 .
In local coordinates, let X ∈ X ( γ ) be given for any t ∈ [0 , 1] by X = (cid:80) di =
a i ( t ) E i ( t ) (assuming that γ ([0 , 1]) is entirely contained in a local chart), then we have that for any t ∈ [0 , 1] and k ∈ { 1 , . . .
, d }
[Equation]
A curve γ on M is said to be a geodesics if ˙ γ is parallel to γ .
Using Eq.
(S1) we get that
[Equation]
For more details on geodesics and parallel transport, we refer to Lee (2018, Chapter 4).
In addition, we have that parallel transport provides a linear isomorphism between tangent spaces.
Indeed, let v ∈ T x M and γ : [0 , 1] → M with γ (0) =
x a smooth curve.
Then, there exists a unique vector field X v ∈ X ( γ ) such that X v ( x ) = v
and X v is parallel to γ .
For any t ∈ [0 , 1] , we denote Γ t 0 : T x M → T γ ( t ) M the linear isomorphism such that Γ t 0 ( v ) =
X v ( γ ( t )) .
For any x ∈ M and v ∈ T x M we denote γ x,v : [0 , ε x,v ] the geodesics (defined on the maximal interval [0 , ε x,v ] ) on M such that γ (0) =
x and ˙ γ (0) = v .
We denote U x
= { v ∈ T x M : ε x,v ≥ 1 } .
Note that 0 ∈
U x .
For any x ∈ M , we define the exponential mapping exp x : U x
→ M such that for any v ∈ U x , exp x
( v ) =
γ x,v (1) .
If for any x ∈ M , U x = T x M , the manifold is called geodesically complete .
As any connected compact manifold is geodesically complete, there exists a geodesic between any two points x,
y ∈ M
(see Lee, 2018, Lemma 6.18).
For any x, y ∈ M , we denote Geo x,y the sets of geodesics γ such that γ (0) =
x and γ ( y ) = 1 .
For any x, y ∈ M we denote Γ yx ( γ ) :
T x M → T y M
the linear isomorphism such that for any v ∈ T x M , Γ yx ( v ) =
X v ( γ (1)) , where γ ∈ Geo x,y .
Note that for any x ∈ M there exists V x ⊂ M such that x ∈ V x
and for any y ∈ V
x we have that | Geo x,y | = 1 .
In this case, we denote Γ yx = Γ yx ( γ ) with γ ∈ Geo x,y .
Orthogonal projection We will make repeated use of orthonormal projections on manifolds.
Recall that since M is a closed Riemannian manifold we can use the Nash embedding theorem (Gunther, 1991).
In the rest of this paragraph, we assume that M is a Riemannian submanifold of R p for some p ∈ N such that its metric is induced by the Euclidean metric.
In order to define the projection we introduce unpp( M ) = { x ∈ R d : there exists a unique ξ x such that ∥ x − ξ x ∥
= d ( x, M ) } .
Let E ( M ) =
int(unpp( M )) .
By Leobacher and Steinicke (2021, Theorem 1), we have M ⊂ E ( M ) .
We define ˜ p :
E ( M ) → M such that for any x ∈ E ( M ) , ˜ p ( x ) =
ξ x .
Using Leobacher and Steinicke (2021, Theorem 2), we have ˜ p ∈ C ∞ ( R p , M ) and for any x ∈ M , ˜ P ( x )
= d˜
p ( x ) is the orthogonal projection on T x M .
Since R p is normal and M and E ( M ) c are closed, there exists F open such that
M ⊂ F ⊂ E ( M ) .
Let p ∈ C ∞ ( R p , R p ) such that for any x ∈ F , p ( x ) =
˜ p
( x ) (given by Whitney extension theorem for instance).
Finally, we define P : R p
→ R p such that for any x ∈ R p , P ( x )
=
d p ( x ) .
Note that for any x ∈ M , P ( x ) is the orthogonal projection T x M and that
P ∈ C ∞ ( R p , R p ) .
C.2 Stochastic Differential Equations on manifolds
Stratanovitch integral For reasons that will become clear in the next paragraph, it is easier to define Stochastic Differential Equations (SDEs) on manifolds w.r.t the Stratanovitch integral (Kloeden and Platen, 2011, Part II, Chapter 3).
We consider a filtered probability space (Ω , ( F t ) t ≥ 0 , P ) .
Let ( X t ) t ≥ 0 and ( Y t ) t ≥ 0 be two real continuous semimartingales.
We define the quadratic covariation ([ X , Y ] t ) t ≥ 0 such that for any t ≥
[Equation]
We refer to Revuz and Yor (1999, Chapter IV) for more details on semimartingales and quadratic variations.
We denote [ X ] =
[ X , X ] .
In particular, we have that ([ X , Y ] t ) t ≥ 0 is an adapted continuous process with finite-variation and therefore [[ X , Y ]]
= 0 .
Let ( X t ) t ≥ 0 and ( Y t ) t ≥ 0 be two real continuous semimartingales, then we define the Stratanovitch integral as follows for any t ≥
[Equation]
In particular, denoting ( Z 1 t ) t ≥ 0 and ( Z 2 t ) t ≥
the processes such that for any t ≥ 0 , Z 1 t = (cid:82) t
X s ◦
d Y s and Z 2 t = (cid:82) t
X s d Y s , we have that [ Z 1 ] =
[ Z 2 ] .
We refer to Kurtz et al.
for more details on Stratanovitch integrals.
Note that if for any t ≥ 0 , X t = (cid:82) t 0 f ( X s ) ◦
d Y s with C 1 ( R , R ) , then [ X , Y ] t = (cid:82) t 0 f
( X s ) f ′ ( X s )
d Y s .
Assuming that f ∈ C 3 ( R , R ) we have that (Revuz and Yor, 1999,
Chapter IV, Exercise 3.15)
[Equation]
The proof relies on the fact that for any t ≥ 0 , d[ X , f ′ ( X )] t = f ′′ ( X t )
d
[ X ] t .
This result should be compared with Itô’s lemma.
In particular, Stratanovitch calculus satisfies the ordinary chain rule making it a useful tool in differential geometry which makes a heavy use of diffeomorphism.
Finally, we have the following correspondence between Stratanovitch and Itô SDEs.
Assume that ( X t ) t ∈ [0 ,T ] is a strong solution to d X t
= b ( t, X t )d t + σ ( t, X t ) ◦
d B t , with b ∈ C ∞ ( R d , R d ) and σ ∈ C ∞ ( R d , R d × d ) .
Then, we have that
[Equation]
where for any A ∈ C ∞ ( R d , R d × d ) we have that div(A) ∈ C ∞ ( R d , R d ) and for any i ∈ { 1 , . . .
, d } and x ∈ R d , div(A) i ( x ) =
(cid:80) dj
=1 ∂ j A
i,j ( x ) .
In particular, note that if for x 0 ∈ R d , σ ( x 0 ) is an orthogonal projection, then σ ( x 0 )
¯ b ( x 0 ) = 0 .
SDEs on manifolds We define semimartingales and SDEs on manifold through the lens of their actions on functions.
A continuous M -valued stochastic process ( X t ) t ≥ 0 is called a M -valued semimartingale if for any f ∈ C ∞ ( M ) we have that ( f ( X t ))
t ≥ 0 is a real valued semimartingale.
Let ℓ ∈ N , V 1: ℓ = { V i } ℓi
=1 ∈ X ( M ) ℓ and Z 1: ℓ = { Z i } ℓi =1 a collection of ℓ real-valued semimartingales.
A M -valued semimartingale ( X t ) t ≥ 0 is said to be the solution of SDE( V 1: ℓ , Z 1: ℓ , X 0 ) up to a stopping τ with X
a M -valued random variable if for all f ∈ C ∞ ( M ) and t ∈ [0 , τ ] we have
[Equation]
Since the previous SDE is defined w.r.t the Stratanovitch integral we have that if ( X t ) t ≥ 0 is a solution of SDE( V 1: ℓ , Z 1: ℓ , X 0 ) and Φ : M → N is a diffeomorphism then ( Φ ( X t ))
t ≥ 0 is a solution of SDE( Φ ⋆ V 1: ℓ , Z 1: ℓ , Φ ( X 0 )) , where Φ ⋆ is the pushforward operation (see Hsu, 2002,
Proposition 1.2.4).
Because the vector fields { V i } ℓi =1 are smooth we have that for any ℓ ∈ N ,
V 1: ℓ = { V i } ℓi
=1 ∈ X ( M ) ℓ and Z 1: ℓ = { Z i } ℓi =1 a collection of ℓ real-valued semimartingales, there exists a unique solution to SDE( V 1: ℓ , Z 1: ℓ , X 0 )
(see Hsu, 2002, Theorem 1.2.9).
C.3 Brownian motion on manifolds
In this section, we introduce the notion of Brownian motion on manifolds.
We derive some of its basic convergence properties and provide alternative definitions (stochastic development, isometric embedding, random walk limit).
These alternative definitions are the basis for our alternative methodologies to sample from the time-reversal.
To simplify our discussion, we assume that M is a connected compact orientable Riemannian manifold equipped with the Levi–Civita connection ∇ .
We denote p m ref the Haussdorff measure of the manifold (which coincides with the measure associated with the Riemannian volume form (see Federer, 2014, Theorem 2.10.10) and p ref = p m ref /p ref ( M ) the associated probability measure.
Gradient, divergence and Laplace operators Let f ∈ C ∞ ( M ) .
We define ∇ f ∈ X
( M ) such that for any X ∈ X ( M ) we have ⟨ X, ∇ f ⟩ M = X ( f ) .
Let { X i } di =1 ∈ X
( M ) d such that for any x ∈ M , { X i ( x ) } di =1 is an orthonormal basis of T x M .
Then, we define div : X ( M ) → C ∞ ( M ) (linear) such that for any X ∈ X ( M ) , div( X ) =
(cid:80) di
=1 ⟨∇ X i X, X i ⟩ M .
The following Stokes formula (also called divergence theorem, see Lee (2018, p.51)) holds for any f ∈ C ∞ ( M ) and
X ∈ X [Equation] M ) ,
[Equation] d p ref ( x ) .
Let X = (cid:80) di
[Equation]
1 a i X i in local coordinates.
Using the Stokes formula and the definition of the gradient we get that in local coordinates
[Equation]
The Laplace–Beltrami operator is given by ∆ M :
[Equation] ( M ) and for any f ∈ C ∞ ( M ) by ∆ M ( f ) = div(grad( f )) .
In local coordinates we obtain ∆ M ( f ) = det( G ) − 1 / 2 (cid:80) di =1 ∂ i (det( G ) 1 / 2 (cid:80)
dj
=1 g i,j ∂ j f ) .
Using the Nash isometric embedding theorem (Gunther, 1991) we will see that ∆ M can always be written as a sum of squared operators.
However, this result requires an extrinsic point of view as it relies on the existence of projection operators.
In contrast, if we consider the orthonormal bundle O M , see (Hsu, 2002, Chapter 2), we can define the Laplace–Bochner operator ∆ O M : C ∞ (O M ) → C ∞ (O M ) as ∆ O M = (cid:80) di =1 H 2 i , where we recall that for any i ∈ { 1 , . . .
, d } , H i is the horizontal lift of e i .
In this case, ∆ O M is a sum of squared operators and we have that for any f ∈ C ∞ ( M ) , ∆ O M ( f ◦ π ) =
∆ M ( f ) (see Hsu, 2002, Proposition 3.1.2).
Being able to express the various Laplace operators as a sum of squared operators is key to express the associated diffusion process as the solution of an SDE.
Alternatives definitions of Brownian motion We are now ready to define a Brownian motion on the manifold M .
Using the Laplace–Beltrami operator, we can introduce the Brownian motion through the lens of diffusion processes.
Definition S5 (Brownian motion) .
Let ( B M t ) t ≥ 0 be a M -valued semimartingale.
( B M t ) t ≥ 0 is a
Brownian motion on M if for any f ∈ C ∞ ( M ) , ( M ft ) t ≥ 0 is a local martingale where for any t ≥
[Equation]
Note that this definition is in accordance with the definition of the Brownian motion as a diffusion process in the Euclidean space R d , since in this case ∆ M = ∆ .
A key property of frame bundles and orthonormal bundles is that any semimartingale on M can be associated to a process on F M (or
O M ) and a process on R d .
The proof of the following result can be found in Hsu (2002, Propositions 3.2.1 and 3.2.2).
Proposition S6 (Intrinsic view of Brownian motion) .
Let ( B M t ) t ≥ 0 be a M -valued semimartingales.
Then ( B M t ) t ≥ 0 is a Brownian motion on M if and only on the following conditions hold:
a) The horizontal lift ( U t ) t ≥ 0 is a ∆ O M / 2 diffusion process,
i
e. for any f ∈ C ∞ (O M ) , we have that ( M ft ) t ≥ 0 is a local martingale where for any t ≥
[Equation]
b) The stochastic antidevelopment of ( B M t ) t ≥ 0 is a R d -valued Brownian motion ( B t ) t ≥ 0 .
In particular the previous proposition provides us with an intrisic way to sample the Brownian motion on M with initial condition B M 0 .
First sample ( U t ) t ≥ 0 solution of SDE( H 1: d , B 1: d , U 0 ) with
H 1: d = { H i } di =1 and π ( U 0 ) =
B M 0 and B 1: d the Euclidean d -dimensional Brownian motion.
Then, we recover the M -valued Brownian motion ( B M t ) t ≥ 0 upon letting ( B M t ) t ≥
= ( π ( U t ))
t ≥ 0 .
We now consider an extrinsic approach to the sampling of Brownian motions on M .
Using the
Nash embedding theorem (Gunther, 1991), there exists p ∈ N such that without loss of generality we can assume that M ⊂ R p .
For any x ∈ M , we denote P( x ) :
R p
→ T x M the projection operator.
In addition for any x ∈ M , we denote { P i ( x ) } pi =
= { P( x ) e i } pi =1 , where { e i } pi =1 is the canonical basis of R p .
For any i ∈ { 1 , . . .
, p } , we smoothly extend P i to R p .
In this case, we have the following proposition (Hsu, 2002, Theorem 3.1.4):
Proposition S7 (Extrinsic view of Brownian motion) .
For any f ∈ C ∞ ( M ) we have that ∆ M ( f ) =
(cid:80) pi =1 P i (P i ( f )) .
Hence, we have that ( B M t ) t ≥ 0 solution of SDE( { P i } pi =1 , B 1: p , B M 0 ) with B M 0 a
M -valued random variable and B 1: p a R p -valued Brownian motion.
The second part of this proposition, stems from the fact that any solution of SDE( { V i } ℓi =1 , B 1: ℓ , X 0 ) , where X 0 is a M -valued random variable and B 1: ℓ a R ℓ -valued Brownian motion is a diffusion process with generator A such that for any f ∈ C ∞ ( M ) , A ( f ) =
(cid:80) ℓi
=1 V i
( V i ( f )) .
The extrinsic approach is particularly convenient since the SDE appearing in Proposition S7 can be seen as an SDE on the Euclidean space R p .
We finish this paragraph, by investigating the behaviour of the Brownian motion in local coordinates.
For simplicity, we assume here that we have access to a system of global coordinates.
In the case where the coordinates are strictly local then we refer to Ikeda and Watanabe (1989, Chapter 5, Theorem 1) for a construction of a global solution by patching local solutions.
We denote { X k , X i,j } 1 ≤ i,j,k ≤ d such that for any u ∈ F M , { X k ( u ) , X i,j ( u ) } 1 ≤ i,j,k ≤ d is a basis of T u F M , Using properties of the horizontal lift, see (Hsu, 2002, Chapter 2), we get that ( U t ) t ≥
= ( { X kt , E i,jt } 1 ≤ i,j,k ≤ d ) obtained in Proposition S6 is given in the global coordinates for any i, j, k ∈ { 1 , . . .
, d } by
[Equation]
By definition of the Stratanovitch integral we have that for any k ∈ { 1 , . . .
, d }
[Equation]
Let ( M t ) t ≥
= ( { M kt } dk =1 ) t ≥ 0 such that for any t ≥ 0 and k ∈ { 1 , . . .
, d } M kt = (cid:80) dj
=1 (cid:82) t 0 E k,jt d B kt .
We obtain that d M t =
G ( X t ) − 1 / 2 d B t for some d -dimensional Brownian motion ( B t ) t ≥ 0 , using Lévy’s characterization of Brownian motion.
In addition, we have that for any k, j ∈ { 1 , . . .
, d }
[Equation]
Hence, using this result and the fact that (cid:80) d j =1 E ℓ,jt E m,jt = g ℓ,m ( X t ) , we get that for any k ∈ { 1 , . . .
, d }
[Equation]
Note that this result could also have been obtained using the expression of the Laplace–Beltrami in local coordinates.
Brownian motion and random walks In the previous paragraph we consider three SDEs to obtain a Brownian motion on M (stochastic development, isometric embedding and local coordinates).
In this section, we summarize results from Jørgensen (1975) establishing the limiting behaviour of
Geodesic Random Walks (GRWs) when the stepsize of the random walk goes to 0 .
This will be of particular interest when considering the time-reversal process.
We start by defining the geodesic random walk on M , following Jørgensen (1975, Section 2).
Let { ν x } x ∈M such that for any x ∈ M , ν x : B (T x M ) → [0 , 1] with ν x (T x M ) = 1 , i.e. for any x ∈ M , ν x is a probability measure on T x M .
Assume that for any x ∈ M , (cid:82) M ∥ v ∥ 3 d ν x ( v ) < + ∞ .
In addition assume that there exists µ (1) ∈ X ( M ) and µ (2) ∈
X 2 ( M ) , where X 2 ( M ) is the section Γ( M , ⊔ x ∈M L (T x M )) , such that for any x ∈ M , (cid:82) M v d ν x ( v ) = µ (1) ( x ) and (cid:82) M v ⊗ v d ν x ( v ) = µ (2) ( x ) .
In addition, we assume that for any x ∈ M , Σ( x ) = µ (2) ( x ) − µ (1) ( x ) ⊗ µ (1) ( x ) is strictly positive definite and that there exists L ≥ such that for any x, y ∈ M ,
∥ ν x − ν y ∥
TV ≤ L d M ( x, y ) .
Where we have that for any ν
[Equation]
Note that if d M ( x, y ) ≤ ε then for some ε > 0 we have that | Geo x,y | = 1 .
Definition S8 (Geodesic random walk) .
Let X 0 be a M -valued random variable.
For any γ > 0 , we define ( X γt ) t ≥
such that X γ
= X 0 and for any n ∈ N and t ∈ [0 , γ ] , X nγ + t = exp X
nγ [ tγ { µ n + (1 / √ γ )( V n − µ n ) } ] , where ( V n ) n ∈ N is a sequence of random variables in such that for any n ∈ N ,
V n has distribution ν X nγ conditionally to X nγ .
For any γ > 0 , the process ( X γn ) n ∈ N = ( X γnγ ) n ∈ N is called a geodesic random walk.
In particular, for any γ > 0 we denote (R γn ) n ∈ N the sequence of Markov kernels such that for any n ∈ N , x ∈ M and A ∈ B ( M ) we have that δ x R( A ) =
P ( X γn ∈ A ) , with X γ
= x .
The following theorem establishes that the limiting dynamics of a geodesic random walk is associated with a diffusion process on M whose coefficients only depends on the properties of ν (see Jørgensen, 1975, Theorem 2.1).
Theorem S9 (Convergence of geodesic random walks) .
For any t ≥ 0 , f ∈ C( M ) and x ∈ M we have that lim γ → 0 ∥ R ⌈ t/γ ⌉ γ [ f ] − P t [ f ] ∥ ∞ = 0 , where (P t ) t ≥ 0 is the semi-group associated with the infinitesimal generator
A : C ∞ ( M ) → C ∞ ( M ) given for any f ∈ C ∞ ( M ) by A ( f ) = ⟨ µ (1) , ∇ f ⟩ M + 12 ⟨ Σ , ∇ 2 f ⟩ M .
In particular if µ (1) = 0 and µ (2) =
Id then the random walk converges towards a Brownian motion on M in the sense of the convergence of semi-groups.
For any x ∈ M in local coordinates we have that Φ # ν x has zero mean and covariance matrix G ( x ) , where Φ is a local chart around x and
G ( x ) =
( g i,j ( x )) 1 ≤ i,j ≤ d the coordinates of the metric in that chart.
Convergence of Brownian motion We finish this section with a few considerations regarding the convergence of the Brownian motion on M .
Since we have assumed that M is compact we have that there exist (Φ k ) k ∈ N an orthonormal basis of − ∆ M in L 2 ( p ref ) , ( λ k ) k ∈ N such that for any i, j ∈ N , i ≤ j , λ i ≤ λ j and λ 0 = 0 , Φ
= 1 and for any k ∈ N , ∆ M Φ k = − λ k
Φ k .
For any t ≥ 0 and x, y ∈ M , p t | 0 ( y | x ) =
(cid:80) k ∈ N e − λ k t
Φ k ( x )Φ k ( y ) where for any f ∈ C ∞ we have
[Equation]
where ( B M ,x t ) t ≥ 0 is the Brownian motion on M with B M ,x= x and p ref is the probability measure associated with the Haussdorff measure on M .
We also have the following result (see Urakawa, 2006,
Proposition 2.6).
Proposition S10 (Convergence of Brownian motion) .
For any t > 0 , P t admits a density p t | 0 w.r.t p ref and p ref P t = p ref , i.e. p ref is an invariant measure for (P t ) t ≥ 0 .
In addition, if there exists C, α ≥such that for any t ∈ (0 , 1] , p t | 0 ( x | x ) ≤ Ct − α/ 2 then for any p 0 ∈ P ( M ) and for any t ≥ 1 / 2 we have
[Equation]
where λ 1 is the first non-negative eigenvalue of − ∆ M in L 2 ( p ref ) and we recall that (P t ) t ≥ 0 is the semi-group of the Brownian motion.
A review on lower bounds on the first positive eigenvalue of the Laplace–Beltrami operator can be found in (He, 2013).
These lower bounds usually depend on the Ricci curvature of the manifold or its diameter.
We conclude this section by noting that in the non-compact case (Li, 1986) establishes similar estimates in the case of a manifold with non-negative Ricci curvature and maximal volume growth.
D Likelihood computation D.1 ODE likelihood computation
Similarly to Song et al.
(2021), once the score is learned we can use it in conjunction with an Ordinary
Differential Equation (ODE) solver to compute the likelihood of the model.
Let (Φ t ) t ∈ [0 ,T ] be a family of vector fields.
We define ( X t ) t ∈ [0 ,T ] such that X 0 has distribution p 0 (the data distribution) and satisfying d X t =
Φ t ( X t )d t .
Assuming that p 0 admits a density w.r.t.
p ref then for any t ∈ [0 , T ] , the distribution of X t admits a density w.r.t.
p ref and we denote p t this density.
We recall that d log p t ( X t ) =
− div(Φ t )( X t )d t , see Mathieu and Nickel (2020, Proposition 2) for instance.
Recall that we consider a Brownian motion on the manifold as a forward process ( B M t ) t ∈ [0 ,T ] with { p t } t ∈ [0 ,T ] the associated family of densities.
Thus we have that for any t ∈ [0 , T ] and x ∈ M
[Equation]
Hence, we can define ( X t ) t ∈ [0 ,T ] satisfying d X t = − 12 ∇ log p t ( X t )
d t such that X 0 has distribution p 0 .
Defining ( ˆ X t ) t ∈
[0 ,T ] =
( X T − t ) t ∈ [0 ,T ] , it follows that ˆ X 0 has distribution L ( X T ) and satisfies
[Equation]
Finally, we introduce ( Y t ) t ∈ [0 ,T ] satisfying (S3) but such that Y 0 ∼ p ref .
Note that if T ≥ 0 is large then the two processes ( Y t ) t ∈ [0 ,T ] and ( ˆ X t ) t ∈ [0 ,T ] are close since L ( X T ) is close to p ref .
Therefore, using the score network and a manifold ODE solver (as in Mathieu and Nickel, 2020), we are able to approximately solve the following ODE
[Equation]
with q t the density of Y θt w.r.t.
p ref and log q
( Y 0 )
=
with d Y θt = 12 div( s θ ( T − t, Y θt ))
d t and Y θ 0 ∼ p ref .
The likelihood approximation of the model is then given by E [log q T ( ˆ X θT )]
= (cid:82)
M log q T ( x )d p data ( x ) , where ( ˆ X θt ) t ∈ [0 ,T ] =
( X θT − t ) t ∈ [0 ,T ] with d X θt = − 12 div
( s θ ( t, X θt ))
d t and X 0 ∼ p data .
In App.
D.2, we highlight that this is not the likelihood of the SDE model.
D.2 Difference between ODE and SDE likelihood computations
In this section, we show that the likelihood computation from Song et al.
(2021) does not coincide with the likelihood computation obtained with the SDE model.
We present our findings in the Riemannian setting but our results can be adapted to the Euclidean setting with arbitrary forward dynamics.
Recall that we consider a Brownian motion on the manifold as a forward process ( B M t ) t ∈ [0 ,T ] with ( p t ) t ∈ [0 ,T ] the associated family of densities.
We have that for any t ∈ [0 , T ] and x ∈ M [Equation] S
[Equation]
ODE model.
In the case of the ODE model, we define ( X t ) t ∈ [0 ,T ] such that X 0 ∼ p 0 and satisfies d X t = − 12 ∇ log p t ( X t )d t .
The family of densities ( q t ) t ∈ [0 ,T ] associated with ( X t ) t ∈ [0 ,T ] also satisfies (S4).
Now consider ( ˆ X t ) t ∈ [0 ,T ] =
( X T − t ) t ∈ [0 ,T ] , this satisfies ˆ X 0 ∼ p T with [Equation] S
[Equation]
Finally, we consider ( Y ODE t ) t ∈ [0 ,T ] which also satisfies Eq.
(S5) and such that Y ODE0 ∼ p ref .
Denoting ( q ODE t ) t ∈ [0 ,T ] the densities of ( Y ODE t ) t ∈ [0 ,T ] w.r.t.
p ref we have for any t ∈ [0 , T ] and x ∈ M [Equation] S
[Equation]
SDE model.
When sampling we consider a process ( Y SDE t ) t ∈ [0 ,T ] such that Y SDE0 has distribution p ref and whose family of densities ( q SDE t ) t ∈ [0 ,T ] satisfies for any t ∈ [0 , T ] and x ∈ M ∂ t q SDE t [Equation] S
[Equation]
Hence, Eq. (S6) and Eq.
(S7) do not agree, except if q SDE t = q
[Equation]
= p T − t which is the case if and only if Y SDE0 and Y ODE0 have the same distribution as X T .
Note that it is possible to evaluate the likelihood of the SDE model using that
[Equation]
We can use the score approximation s θ ( t, x ) to approximate ∇ log p t ( x ) for any t ∈ [0 , T ] and x ∈ M .
In order to approximate ∇ log q SDE t , one can consider another neural network t θ ( t, x ) approximating ∇ log q SDE t ( x ) for any t ∈ [0 , T ] and x ∈ M .
This approximation can be obtained using the implicit score loss presented in Sec. 3.4.
E Parametric family of vector fields
We approximate ( ∇ log p t ) t ∈ [0 ,T ] by a family of functions { s θ } θ ∈ Θ where Θ is a set of parameters and for any θ ∈ Θ , s θ : [0 , T ] → X ( M ) .
In this work, we consider several parameterisations of vector fields:
• Projected vector field .
We define s θ ( t, x ) =
proj T x M (˜ s θ ( t, x ))
=
P ( x )˜ s θ ( t, x ) for any t ∈ [0 , T ] and x ∈ M , with ˜ s θ : R p × [0 , T ] → R p an ambient vector field and P ( x ) the orthogonal projection over T x M at x ∈ M .
According to Rozen et al.
(2021, Lemma 2), then div( s θ )( x, t ) =
div E ( s θ )( x, t ) for any x ∈ M , where div E denotes the standard Euclidean divergence.
• Divergence-free vector fields :
For any Lie group G , any basis of the Lie algebra g
=
T e G yields a global frame.
Indeed, let v ∈ g and define the flow Φ :
R × M
→ M given for any t ∈ R and x ∈ M by Φ vt ( x ) = x exp e ( tv ) .
Then defining { E i } di =1 = { ∂ t Φ v i 0 } di =1 , where { v i } di = is a basis of g , we get that { E i } di =1 is a left-invariant global frame.
As a result, we have that for any i ∈ { 1 , . . .
, d } , div( E i ) =
(for the classical left invariant metric).
This result simplifies the computation of div( s θ ) where s θ ( t, x ) =
(cid:80) di
=1 s iθ ( t, x ) E i ( x ) for any t ∈ [0 , T ] and x ∈ M since we have that div( s θ )( t, x )
= (cid:80) di =1 E i ( s iθ )( t, x ) + (cid:80) di
=1 s iθ ( t, x )
div( E i )( x ) = (cid:80) di
=1 ds iθ ( E i )( t, x ) (see Falorsi and Forré, 2020).
Note that this approach can be extended to any homogeneous space ( G, H ) .
• Coordinates vector fields .
We define s θ ( t, x ) = (cid:80) di
=1 s iθ ( t, x ) E i ( x ) for any t ∈ [0 , T ] and x ∈ M , with { E i } di =1 = { ∂ i φ ( φ − 1 ( x )) } di =1 the vector fields induced by a choice of local coordinates, where φ is a local parameterization φ : U → M and z ∈ U ⊂ R d .
Then the divergence can be computed in these local coordinates div( s θ )
( t, φ ( z ))
= | det G | − 1 / 2 (cid:80) di =1 ∂
i {| det G | 1 / 2 s iθ ( t, φ ( · )) } ( z ) .
In the case of the sphere, one recovers the standard divergence in spherical coordinates using this formula.
Note that { E i } di =1 does not span the tangent bundle except if the manifold is parallelizable.
The sphere is a well-known example of non-parallelizable manifold, as per the hairy ball theorem .
F Eigensystems of the Laplace–Beltrami operator and heat kernels
In this section, we recall the eigenfunctions and eigenvalues of the Laplace–Beltrami operator in two specific cases: the d -dimensional torus and the d -dimensional sphere.
We also highlight that the heat kernel on compact manifold can be written as an infinite series using the Sturm–Liouville decomposition.
The case of the torus Let { b i } di =1 be a basis of R d .
We consider the associated lattice on R d , i.e.
Γ = { (cid:80) d i =
α i b i : { α i } d i =1 ∈ Z d } .
Finally, the associated d -dimensional torus is defined as T Γ = R d / Γ .
Denote B = ( b 1 , . . .
, b d ) ∈ R d × d .
Let { ¯ b i } di =1 ∈
( R d ) d such that (B − 1 ) ⊤ =
( ¯ b 1 , . . .
, ¯ b d ) .
We define Γ ⋆ = { (cid:80) di
=1 α i
¯
b
i : { α i } di =1 ∈ Z d } , the dual lattice.
Note that for any x ∈ Γ and y ∈ Γ ⋆ we have that ⟨ x, y ⟩ ∈ Z and that if { b i } di =1 is an orthonormal basis then Γ = Γ ⋆ .
The torus R d / Γ is a (flat) compact Riemannian manifold.
The set of eigenvalues of the Laplace–Beltrami operator is − π/ π/ D e n s i t y t=0. − π/ π/
Signed d M ( x 0 ,x t ) 0 .0 .1 .1 .t=0. − π/ π/0 .0 .t= Sturm-Liouville (5) Sturm-Liouville (10)
Sturm-Liouville (50)
Varadhan expansion given by {− 4 π 2 ∥ y ∥ 2 : y ∈ Γ ⋆ } .
The eigenfunctions of the Laplace–Beltrami operator are given by { x (cid:55)→ sin(2 π ⟨ x, y ⟩ ) :
y ∈ Γ ⋆ } and { x (cid:55)→ cos(2 π ⟨ x, y ⟩ ) : y ∈ Γ ⋆ } .
The case of the sphere Next, we investigate the case of the d -dimensional sphere (see Saloff-Coste, 1994).
The set of eigenvalues of the Laplace–Beltrami operator is given by {− k ( k + d − 1) : k ∈ N } .
Note that λ k =
k
( k + d − 1) has multiplicity
d k = ( k + d − 2)!
/ { ( d − 1)!
k } (2 k + d − 1) .
The eigenfunctions of the Laplace–Beltrami operator are known as the spherical harmonics and can be defined in terms of Legendre polynomials.
When investigating the heat kernel on the ddimensional sphere, we are interested in the product ( x, y )
(cid:55)→ (cid:80) ϕ ∈
Φ n ϕ ( x ) ϕ ( y ) , where Φ n is the set of eigenfunctions associated with the eigenvalue λ n for n ∈ N .
This function can be described using the Gegenbauer polynomials (see Atkinson and Han, 2012, Theorem 2.9).
More precisely, we have that for any n ∈ N and x, y ∈ S d
[Equation]
where here Γ : R + → R is given for any v > 0 by Γ( v )
= (cid:82) + ∞
[Equation]
e
[Equation] d t .
In the special case where d = 1 , then the heat kernel coincide with the wrapped Gaussian density and can be easily evaluated.
Heat kernel on compact Riemannian manifolds.
We recall that in the case of compact manifolds the heat kernel is given by the Sturm–Liouville decomposition Chavel (1984) given for any t > 0 and x, y ∈ M by
[Equation]
where the convergence occurs in L 2 ( p ref ⊗ p ref ) , ( λ j ) j ∈ N and ( ϕ j ) j ∈ N are the eigenvalues, respectively the eigenvectors, of − ∆ M in L 2 ( p ref ) (see Saloff-Coste, 1994, Section 2).
When the eigenvalues and eigenvectors are known, we approximate the logarithmic gradient of p t | 0 by truncating the sum in (S8) with J ∈ N terms.
Another possibility to approximate ∇ log p t | 0 is to rely on the so-called Varadhan approximation, see Sec.
3.4, which is valid for small t > 0 .
Fig.
S1 illustrates these different approximations of the heat kernel and Table 1 compares the different loss functions.
[Table]
t ) − S J,t ( X 0 , X t ) ∥ 2 (cid:3) ✗ ✓ ( J → ∞ )
Varhadan
[Table]
12 E (cid:2)
∥ s ( X t ) − log X t ( X 0 ) /t ∥ 2 (cid:3) ✗ ✓ ( t → 0 ) [Table] s
[Table]
Varhadan (8) 12 E (cid:2)
∥ s ( X t ) − log X t ( X s ) / ( t − s ) ∥ 2 (cid:3) ✗ ✓ ( t → s ) [Table] E (cid:2) 12 ∥ s ( X t ) ∥ 2 + div( s )( X t ) (cid:3) ✓ ✓
[Table]
E (cid:2) 12 ∥ s ( X t ) ∥ 2 + ε ⊤ ∂s ( X t ) ε (cid:3) ✓ ✓ 2 ∥ ∂s ∥ F
G Predictor-corrector schemes
In this section, we present a predictor-corrector scheme, adapting the techniques of Allgower and
Georg (2012); Song et al. (2021) to the manifold setting.
Changes between Algorithm 1, Algorithmand Algorithm 3, Algorithm 4 are highlighted in red.
Let t ∈
[0 , T ] , γ > 0 and k =
⌊ t/γ ⌋ .
We remark that Algorithm 3 (Line 11) corresponds to the recursion associated with ( X t,γj ) j ∈ N such that for any j ∈ N
[Equation]
where { ¯ Z j } j ∈ N is a family of i.i.d Gaussian random variables with zero mean and identity covariances matrix in R p and for any j ∈ N , Z j = P( X t,γj ) ¯ Z j .
Note that here k ∈ { 0 , N − 1 } is fixed.
Letting γ → 0 , we obtain that under mild assumptions, see (Kuwada, 2012, Theorem 3.1), ( X t,γj ) j ∈ N converges to ( X ts ) s ≥ 0 such that
[Equation]
We have that p T − t is the invariant measure of ( X t s ) s ≥ 0 .
Hence, the role of the corrector step is to project the distribution back onto p T − t for all times t ∈ [0 , T ] , see Fig. S2. [Figure] [Equation]
[Figure]
[Equation]
H Time-reversal formula: extension to compact Riemannian manifolds
In this section, we provide the proof of Theorem 1.
The proof follows the arguments of Cattiaux et al.
(2021, Theorem 4.9).
We could have also applied the abstract results of Cattiaux et al.
Theorem 5.7) to obtain our results.
Note that the time-reversal on manifold could also be obtained by readily extending arguments from Haussmann and Pardoux (1986), however the entropic conditions found by Cattiaux et al.
(2021) are more natural when it comes to the study of the Schrödinger
Bridge problem. For the interested reader we provide an informal derivation of the time-reversal formula obtained by Haussmann and Pardoux (1986) in App. H.1. The proof of Theorem 1 is given in App.
H.2.
Finally, we emphasize that García-Zelada and Huguet (2021) have developed a Girsanov theory for stochastic processes defined on compact manifolds with boundary in order to study the
Brenier-Schrödinger problem.
Require: T, N, X γ 0 , b, σ, P 1: γ = T/N ▷ Step-size 2: for k ∈ { 0 , . . .
, N − 1 } do 3: ///
PREDICTOR STEP 4: ¯ Z k +1 / 2 ∼ N(0 , I p )
▷ Standard Gaussian in ambient space R p 5:
Z k +1 / 2 = P( X γk )
¯ Z k +1 /▷
Projection in the tangent space T x M 6:
W k +1 / 2 = γb ( kγ, X γk ) + √ γσ ( kγ, X γk ) k
+
▷ Euler–Maruyama step on tangent space 7:
X γk +1 / 2 = exp X γk
[ W k +1 / 2 ] ▷ Geodesic projection onto M 8: ///
CORRECTOR STEP 9: ¯ Z k +1 ∼ N(0 , I p )
▷ Standard Gaussian in ambient space R p 10:
Z k +1 =
P( X γk +1 / 2 )
¯ Z k + ▷ Projection in the tangent space T x M 11:
W k +1 =
γ 2 b ( kγ, X γk +1 / 2 ) + √ γσ ( kγ, X γk +1 / 2 )
Z k + ▷ Euler–Maruyama step on tangent space 12:
X [-γ k +
-]γk +1 =
exp
X γk +1 /
[ W k +1 ]
▷ Geodesic projection onto M 13: end for 14: return { X γk } Nk =
Require: ε, T, N, { X m 0 } M m =1 , loss , s , θ iter ref
1: /// TRAINING /// 2: for n ∈ { 0 , . .
, N iter − 1 } do 3:
X 0 ∼ (1 /M )
(cid:80) Mm =1 δ X m▷ Random mini-batch from dataset 4: t ∼ U ([ ε, T ])
▷ Uniform sampling between ε and T 5:
X t = GRW ( t, N, X 0 , 0 , Id , P) ▷ Approximate forward diffusion with Algorithm 1 6: ℓ ( θ n ) =
ℓ t ( T, N, X 0 , X t , loss , s θ n ) ▷ Compute score matching loss from Table 2 7: θ n +
=
optimizer_update ( θ n , ℓ ( θ n ))
▷ ADAM optimizer step 8: end for 9: θ ⋆ = θ N epoch 10: ///
SAMPLING ///
: Y 0 ∼ p ref ▷ Sample from uniform distribution 12: b ⋆θ ( t, x ) =
s θ ⋆ ( T − t, x ) for any t ∈ [0 , T ] , x ∈ M ▷ Reverse process drift 13: { Y k } Nk =
= GRW-c ( T, N, Y 0 , b θ ⋆ , Id , P)
▷ Approximate reverse diffusion with Algorithm14: return θ ⋆ , { Y k } Nk =
H.1 Informal derivation
In this section, we provide a non-rigorous derivation of Theorem 1 following the approach of
Haussmann and Pardoux (1986).
Let ( X t ) t ∈
[0 ,T ] be a continuous process such that for any f ∈
C 2 ( M ) we have that ( M X ,f t ) t ∈ [0 ,T ] is a X -martingale where for any t ∈ [0 , T ]
[Equation]
Let ( Y t ) t ∈ [0 ,T ] =
( X T − t ) t ∈ [0 ,T ] .
Our goal is to show that for any f ∈ C 2 ( M ) , ( M Y ,f t ) t ∈ [0 ,T ] is a Y -martingale where for any t ∈ [0 , T ]
[Equation]
Note that here we implicitly assume that for any t ∈ [0 , T ] , X t admits a smooth positive density w.r.t.
p ref denoted p t .
In other words, we want to show that for any g ∈ C 2 ( M ) and s, t ∈ [0 , T ] with t ≥ s we have
[Equation]
We introduce the infinitesimal generator A : C 2 ( M ) → C( M ) given for any f ∈ C 2 ( M ) and x ∈ M by
[Equation]
Similarly, we introduce the infinitesimal generator ˜ A : [0 , T ] × C 2 ( M ) → C( M ) given for any f ∈ C 2 ( M ) , t ∈ [0 , T ] and x ∈ M by
[Equation]
With these notations, (S11) can be written as follows: we want to show that for any g ∈ C 2 ( M ) and s, t ∈ [0 , T ] with t ≥ s we have
[Equation]
The rest of this section follows the first part of the proof of Haussmann and Pardoux (1986, Theorem 2.1).
Let t, s ∈
[0 , T ] with t ≥ s .
We have
[Equation]
with v : [0 , T − s ] × M → R given for any u ∈ [0 , T − s ] and x ∈ M by v ( u, x ) =
E [ g ( X
T − s ) | X u = x ] .
We have that v satisfies the backward Kolmogorov equation, i.e. we have for any u ∈ [0 , T − s ] and x ∈ M
[Equation]
Note that it is not trivial to show that v is regular enough to satisfy the backward Kolmogorov equation.
In this informal derivation, we assume that v is regular enough and will provide a different rigorous proof of the time-reversal formula in App.
H.2.
However, note that it is possible to show that v indeed satisfies the backward Kolmogorov equation by adapting arguments from Haussmann and Pardoux (1986) to the manifold framework.
Let h : [0 , T − s ] × M
→ R given for any u ∈ [0 , T − s ] and x ∈ M by h ( u, x ) = v ( u, x ) f ( x ) .
Using (S13), we have for any u
[Equation]
In addition, using the divergence theorem (see Lee, 2018, p.51), we have for any u ∈ [0 , T − s ]
[Equation]
Therefore, using this result and (S14) we get that for any u ∈ [0 , T − s ] E
[Equation]
Combining this result and (S9) and that for any u ∈ [0 , T − s ] and x ∈ M , v ( u, x ) =
E [ g ( X
T − s ) | X u = x ] we get
[Equation]
Using this result, (S12) and the change of variable u
(cid:55)→ T − u
we obtain
E [
[Equation]
Hence, (S11) holds and we have proved Theorem 1.
Again, we emphasize that in order to make the proof completely rigourous one needs to derive regularity properties of v .
H.2 Proof of Theorem
In this section, we follow another approach to prove the time-reversal formula.
We are going to use the integration by part formula of Cattiaux et al.
(2021, Theorem 3.17) in a similar spirit as Cattiaux et al.
(2021, Theorem 4.9) in the Euclidean setting.
In order to adapt arguments from Cattiaux et al.
(2021) to our Riemannian setting, we use the Nash embedding theorem in order to embed our processes in a Euclidean space and leverage tools from Girsanov theory.
The rest of the section is organized as follows.
First in App.
H.2.1, we recall basic properties of infinitesimal generators and recall the integration by part formula of Cattiaux et al.
(2021, Theorem 3.17).
Then in App.
H.2.2, we extend some Girsanov theory to compact Riemannian manifolds using the Nash embedding theorem.
We conclude the proof in App. H.2.3.
H.2.1 Diffusion processes and integration by part formula
In this section, we state a simplified version of Cattiaux et al.
(2021, Theorem 3.17) for Markov continuous path (probability) measure on Polish spaces.
Let ( X , X ) be a Polish space.
We say that P is a path measure if P ∈ P (C([0 , T ] , X )) .
Let ( X t ) t ∈
[0 ,T ] with distribution P .
We denote ( F t ) t ∈ [0 ,T ] the filtration such that for any t ∈ [0 , T ] , F t = σ ( X s , s ∈
[0 , t ]) .
Let ( M t ) t ∈ [0 ,T ] be a Polish-valued stochastic process.
We say that ( M t ) t ∈ [0 ,T ] is a P -local martingale if it is a local martingale w.r.t.
the filtration ( F t ) t ∈ [0 ,T ] .
A function u : [0 , T ] × X → R is said to be in the domain of the extended generator of P if there exists a process ( ¯ A P u ( t, X [0 ,t ] ))
t ∈ [0 ,T ] such that:
(a) ( ¯ A P u ( t, X [0 ,t ] ))
t ∈ [0 ,T ] is adapted w.r.t.
( F t ) t ∈ [0 ,T ] . (b) (cid:82) T 0 | ¯ A P u ( t, X [0 ,t ] )
| d t < + ∞ , P -a
s. (c)
The
process ( M t ) t ∈ [0 ,T ] is a P - local martingale, where for any t ∈ [0 , T ]
[Equation]
The domain of the extended generator is denoted dom( ¯ A P ) .
We say that ( u, v ) with u, v : [0 , T ] ×
X → R is in the domain of the carré du champ if u, v, uv ∈ dom( ¯ A P ) .
In this case, we define the carré du champ ¯Υ P as
[Equation]
Note that if X = M is a Riemannian manifold, C 2 ( M ) ⊂ dom( ¯ A P ) and for any u ∈ C 2 ( M ) ¯
A P ( u ) =
⟨∇ u, X ⟩ + 12 ∆ M u with X ∈ Γ(T M ) then we have that C 2 ( M ) ×
C 2 ( M ) ⊂ dom(¯Υ P ) and for any u, v ∈ C 2 ( M ) , ¯Υ P ( u, v ) =
⟨∇ u, ∇ v ⟩ .
Assume that there exists U P ⊂ dom( ¯ A P ) ∩ C b ( X ) such that
U P is an algebra.
We denote U P , 2 such that
[Equation]
Finally we denote R ( P ) the time-reverse path measure, i.e. for any A ∈ B (C([0 , T ] , X ))
we have
R ( P )( A ) =
P ( R ( A )) , where R ( A ) =
{ t (cid:55)→ ω T − t : ω ∈ A } .
In what follows, we assume P is Markov.
It is well-known, see (Léonard et al., 2014, Theorem 1.2) for instance, that in this case
R ( P ) is also Markov.
In addition, since P is Markov, for any u ∈ dom( ¯ A P ) and t ∈ [0 , T ] there exists A P such that ¯ A P u ( t, X [0 ,t ] ) =
A P u ( t, X t ) with A P u : [0 , T ] × X → R .
Similarly, we define Υ P ( u, v ) :
[0 , T ] × X → R from ¯Υ P ( u, v ) .
We are now ready to state the integration by part formula, (Cattiaux et al., 2021, Theorem 3.17).
Theorem S11.
Let u, v ∈ U P , 2 .
The following hold:
(a) If u ∈ dom( A R ( P ) ) and A R ( P ) u ∈ L 1 ( P ) then for almost any t ∈ [0 , T ]
[Equation]
(b)
If the following hold: i) Υ P ( u, v ) ∈ C([0 , T ] × X , R ) .
ii) U 2 , P determines the weak convergence of Borel measures.
iii) µ defines a finite measure on [0 , T ] × X where for any ω ∈ ¯ U 2 , P we have
[Equation]
where ¯ U 2 , P = { ω ∈ C([0 , T ] × X , R ) : ω ( t, · ) ∈
U
P for any t ∈ [0 , T ] }
Then u ∈ dom( A R ( P ) ) and
A R ( P ) u ∈ L 1 ( P ) .
Note that this theorem is a simplified version of Cattiaux et al.
(2021, Theorem 3.17) where we restrict ourselves to the case of Markov path measures.
In what follows, we wish to apply Theorem S11 to diffusion processes on manifolds.
To do so, we will verify that under a finite entropy assumption, the conditions u ∈ dom( A R ( P ) ) and
A R ( P ) u ∈ L 1 ( P ) are fullfilled for a class of regular functions u .
These integrability results are obtained using Girsanov theory.
H.2.2 Girsanov theory on compact Riemannian manifolds
In this section, we will consider two types of martingale problems: one on Euclidean spaces and one on the compact Riemannian manifold M .
Let P ∈ P
(C([0 , T ] , R p )) .
We say that P satisfies the (Euclidean) martingale problem with infinitesimal generator A : [0 , T ] × C 2 ( R p ) × R p
→ R if for any u ∈ C 2 c ( R p ) , ( M t ) t ∈ [0 ,T ] is a P -martingale where for any t ∈ [0 , T ] we have
[Equation]
where ( X t ) t ∈ [0 ,T ] has distribution P and (cid:82) T 0 |A
( t, u )( X s )
d t | < + ∞ , P -a.s.
Let P ∈
P (C([0 , T ] , M )) .
We say that P satisfies the (Riemannian) martingale problem with infinitesimal generator ˜ A : [0 , T ] × C 2 ( M ) × M
→ R if for any u ∈ C 2 ( M ) , ( M t ) t ∈ [0 ,T ] is a P -martingale where for any t ∈ [0 , T ] we have
[Equation]
where ( X t ) t ∈ [0 ,T ] has distribution P and (cid:82) T 0 |
˜
A ( t, u )( X s )d t | < + ∞ , P -a.s.
We now prove the following theorem.
Proposition S12.
Let Q be the path measure of a Brownian motion on M .
Let P be a Markov path measure on C([0 , T ] , M ) such that KL ( P | Q ) <
+ ∞ .
Then there exists β such that for any t ∈ [0 , T ] and x ∈ M , β ( t, x ) ∈ T x M and we have that P satisfies the martingale problem with infinitesimal generator
A where for any t ∈ [0 , T ] , u ∈ C 2 ( M ) and x ∈ M we have
[Equation]
In addition, we have that
[Equation]
where ( X t ) t ∈ [0 ,T ] has distribution P .
Proof.
First, we extend ( B M t ) t ∈ [0 ,T ] to R p using the Nash embedding theorem (see Gunther, 1991).
( B M t ) t ∈ [0 ,T ] can be seen as a process on R p (for some p ∈ N ) which satisfies in a weak sense
[Equation]
where ( B t ) t ∈ [0 ,T ] is a p -dimensional Brownian motion and P ∈ C ∞ ( R p , R p × p ) is such that for any x ∈ M , P( x ) is the projection onto T x M and for any i ∈ { 1 , . .
, p } , P i ∈ C ∞ ( R p , R p ) with P i
= P e i where { e j } pj =1 is the canonical basis of R p .
We refer to App.
C.1 for more details on the projection operator and its extension to R p .
Using the link between Stratanovitch and Itô integral, there exists ¯ b ∈ C ∞ ( R p , R p ) such that ( B M t ) t ∈ [0 ,T ] can be seen as a process on R p which satisfies in a weak sense
[Equation]
where ¯ b is given in (S2) and satisfies P ¯ b ( x ) = 0 for any x ∈ M , see the remark following (S2).
For any u, v ∈ C 2 c ( M ) , we consider ¯ u, ¯ v extensions to C 2 c ( R p ) and we have for any s, t ∈ [0 , T ]
[Equation]
In particular, we get that for any x ∈ M , ∆ M u ( x ) = 2 ⟨∇ ¯ u ( x ) , ¯ b ( x ) ⟩ + ⟨ P( x ) , ∇ 2 ¯ u ( x ) ⟩ .
Note that ( B
M t ) t ∈ [0 ,T ] (seen as a process on R p ) satisfies the condition (U) in Léonard (2012b), i.e. uniqueness of the trajectories given an initial condition.
Therefore applying (Léonard, 2012b, Theorem 2.1), (Cattiaux et al., 2021, Claim 4.5), there exists ¯ β : [0 , T ] × R p
→ R p such that
[Equation]
In addition, P (seen as a process on R p ) satisfies a martingale problem with infinitesimal generator ¯
A : [0 , T ] × C 2 c
( R p ) ×
R p
→ R such that for any t ∈ [0 , T ] , ¯ u ∈ C 2 c ( R p ) and x ∈ R p
[Equation]
Let β : [0 , T ] × M such that for any t ∈ [0 , T ] and x ∈ M we have β ( t, x )
=
P( x )¯ β ( t, x ) .
In particular, we have that for any x ∈ M , β ( t, x ) ∈ T x M .
Let u ∈ C 2 c
( M ) and consider an extension ¯ u to Cc
( R p ) .
For any t ∈ [0 , T ] and x ∈ M we have
[Equation]
In particular, we have that P (seen as a process on M ) satisfies a martingale problem with infinitesimal generator A : [0 , T ] × C 2 c
( M ) × M → R such that for any t ∈ [0 , T ] , u ∈ C
( R p ) and x ∈ M
[Equation]
In addition, rewriting (S16) we have
[Equation]
which concludes the proof.
We also derive the following useful lemma, which will be used in the proof of convergence of RSGM.
Corollary S13.
Assume A 1 .
Let P 1 , P 2 be a Markov path measure on C([0 , T ] , M ) with P 10 = P 20 .
In addition, assume that there exist b 1 , b 2 ∈ C ∞ ([0 , T ] , X ( M ))
such that ( X 1 t ) t ∈ [0 ,T ] and ( X 2 t ) t ∈ [0 ,T ] are associated to P 1 and P 2 respectively and satisfy weakly d X it =
b 1 ( t, X it )
d t + d B t for i ∈ { 1 , 2 } .
Then, we have that
[Equation]
Proof.
Upon, using the Nash embedding theorem (see Gunther, 1991), we can assume that M is a submanifold of R p with p ∈ N such that the Riemannian metric on M is induced by the Euclidean metric on R p .
Since M is compact, there exists R > 0 such that M ⊂ ¯B(0 , R ) .
Let φ ∈ C ∞ ( R p , [0 , 1]) such that for any x ∈ ¯B(0 , R ) , φ ( x ) = 1 and for any x ∈ R p with ∥ x ∥ ≥ R + 1 , φ ( x ) = 0 .
Consider ¯ b 1 , ¯ b 2 ∈ C 2 c ([0 , T ] × R p , R p ) such that for any t ∈ [0 , T ] and x ∈ M , ¯ b i ( x )
=
b i ( x ) with i ∈ { 1 , 2 } .
Consider ( ¯ X i t ) t ∈ [0 ,T ] such that for any i ∈ { 1 , 2 }
[Equation]
where ¯ b ∈ C ∞ ( R p , R p ) is defined in the proof of Proposition S12.
Let ¯
X
i 0 ∼ P 10 for any i ∈ { 1 , 2 } then for any i ∈ { 1 , 2 } , ( ¯ X it ) t ∈ [0 ,T ] (seen as a process on M ) is such that L (( ¯ X it ) t ∈
[0 ,T ] )
= P i .
Indeed, denote { ¯ A it } t ∈ [0 ,T ] the generator of ( ¯ X it ) t ∈ [0 ,T ] for any i ∈ { 1 , 2 } .
Let f ∈ C ∞ ( M , R ) and ¯ f ∈ C ∞ ( R p , R ) an extension to R p .
We have that for any i ∈ { 1 , 2 } , x ∈ M and t ∈ [0 , T ]
[Equation]
Hence, for any i ∈ { 1 , 2 } , ( ¯ X it ) t ∈ [0 ,T ] (seen as a process on M ) and ( X it ) t ∈ [0 ,T ] have the same infinitesimal generators.
Hence, L (( ¯ X it ) t ∈ [0 ,T ] ) = P i for any i ∈ { 1 , 2 } .
For any i ∈ { 1 , 2 } , denote ¯ P i =
L (( ¯ X it ) t ∈ [0 ,T ] ) (seen as a process on R p ).
Note that since for any x ∈ R p with ∥ x ∥ ≥ R + 1 , φ ( x ) =
we have that (Liptser and Shiryaev, 2001, Equation (7.137)) is satisfied.
In addition, since for any x ∈ R p with ∥ x ∥ ≥ R + 1 , φ ( x ) + ∥∇ φ ( x ) ∥ = 0 , we have that (Liptser and Shiryaev, 2001, Equation (4.110), Equation (4.111)) are satisfied.
In addition, letting for any t ∈ [0 , T ] and x ∈ R p , α ( t, x ) =
¯ b 1 ( t, x ) − ¯ b 2 ( t, x ) = P( x )(¯ b 1 ( t, x ) − ¯ b 2 ( t, x ))
, we have that for any t ∈ [0 , T ] ,
P( x ) α ( t, x ) = P( x )(¯ b 1 ( t, x ) − ¯ b 2 ( t, x )) .
Therefore, we can apply (Liptser and Shiryaev, 2001,
Section 7.6.4) and using that P( x )¯ b ( x ) = 0 for any x ∈ M (see the proof of Proposition S12), we have that
[Equation]
Therefore, we have that
[Equation]
Hence, we get
[Equation]
which concludes the proof.
Once Proposition S12 is established, we can obtain the following straightforward extension of
Cattiaux et al.
(2021, Proposition 4.6).
Proposition S14.
Assume A 1 .
Let Q be a Brownian motion with Q 0 = p ref and P a path measure on C([0 , T ] , M ) such that KL ( P | Q ) < + ∞ .
Then, there exist β P , β R ( P ) : [0 , T ] × M → such that for any t ∈ [0 , T ] and x ∈ M , β P ( t, x ) , β R ( P ) ( t, x ) ∈ T x M .
In addition, we have that P and
R ( P ) satisfy martingale problems with infinitesimal generator A P , respectively A R ( P ) where for any t ∈ [0 , T ] , u ∈ C 2 ( M ) and x ∈ M we have
[Equation]
Finally, we have that
[Equation]
< [Equation] where ( X t ) t ∈ [0 ,T ] has distribution P .
Proof.
The proof is straightforward upon combining Proposition S12 and the fact that KL ( P | Q ) =
KL ( R ( P ) | R ( Q )) =
KL ( R ( P ) | Q ) < + ∞ , using that Q is stationary.
We conclude this section, with the following application of Theorem S11.
Proposition S15.
For any u, v ∈ C ∞ c ( M ) , we have that for almost any t ∈ [0 , T ]
[Equation]
Proof.
Remark that C 2 c ( M ) ⊂ dom(Υ P ) and C 2 c ( M ) ⊂ dom(Υ R ( P ) ) .
In addition, we have that for any u, v ∈ C 2 c ( M ) , Υ P ( u, v ) =
Υ R ( P ) ( u, v ) = ⟨ u, v ⟩ .
Note that by Proposition S14 and
Theorem S11 we have that for any u, v ∈ C ∞ c ( M ) , (S17) holds.
H.2.3 Concluding the proof
Using Proposition S15 we can now conclude the proof of Theorem 1.
First, remark that we can identify β P = b .
Let u, v ∈ C ∞ ( M ) , we have that
[Equation]
Using that for any t ∈ [0 , T ] , P t admits a smooth positive density w.r.t.
p ref denoted p t and the divergence theorem, see (Lee, 2018, p.51), we have that for any t ∈ [0 , T ] , (cid:82)
[Equation]
Therefore, we get that for any t ∈ [0 , T ] and x ∈ M , ⟨ β R ( P ) ( T − t, x ) , ∇ u ( x ) ⟩ = ⟨− b ( x ) + ∇ log p t ( x ) , ∇ u ( x ) ⟩ , which concludes the proof.
I Convergence of RSGM
In this section, we study the convergence of RSGM and prove Theorem 4.
We state our main results in App.
I.1 and give discretization bounds following the recent work of Cheng et al.
(2022) in sec:discr-bounds-grw.
I.1 Main results
In this section, we prove Theorem 4.
We start by recalling the sequence considered in RSGM.
Let ( Y k ) k ∈ { 0 ,...,N } be given by Y 0 ∼ p ref and for any k ∈ { 0 , . . .
, N − 1 }
[Equation]
where { Z k } ) n ∈ N is a sequence of independent square integrable random variables with zero mean and identity covariance matrix.
For ease of reading, we restate Theorem 4.
Theorem S16.
Assume A 1 , that p 0 is smooth and positive and that there exists M ≥ 0 such that for any t ∈ [0 , T ] and x ∈ M , ∥ s θ ⋆ ( t, x ) − ∇ log p t ( x ) ∥ ≤ M , with s θ ⋆ ∈ C([0 , T ] , X ( M )) .
Then if T > 1 / 2 , there exists C ≥ 0 independent on T such that
[Equation]
where W 1 is the Wasserstein distance of order one on the probability measures on M .
Proof.
For any k ∈ { 1 , . . . , N } , denote R k such that for any x ∈ R d , A ∈ B ( R d ) and k ∈ { 0 , . . .
, N − 1 } we have
[Equation]
Define for any k 0 , k 1 ∈ { 1 , . . .
, N } with k 1 ≥ k 0 Q k 0 ,k 1 = (cid:81) k 1 ℓ = k 0 R k 1 + k 0 − ℓ .
Finally, for ease of notation, we also define for any k ∈ { 1 , . . .
, N } , Q k = Q k +1 ,N .
Note that for any k ∈ { 1 , . . .
, N } , Y k has distribution π ∞ Q k , where π ∞ ∈ P ( M ) with density w.r.t.
the Hausdorff measure p ref .
Let P ∈ P ( C ) be the probability measure associated with ( B t ) t ∈ [0 ,T ] with B 0 ∼ π 0 , where π 0 ∈ P ( M ) admits a density w.r.t.
the Hausdorff measure given by p 0 .
We denote ( ˆ Y t ) t ∈ [0 ,T ] the process defined by the diffusion d ˆ Y t =
s θ ⋆ ( T − t, ˆ Y t )
d t + d B t and ˆ Y 0 ∼ π ∞ .
We also denote ˆ P R ∈ P ( C ) the probability measure associated with ( ˆ Y t ) t ∈ [0 ,T ] .
First note that using that P
=
π
we have for any
A ∈ B ( M )
[Equation]
Hence we have that
[Equation]
S
[Equation]
Let φ ∈ C( M ) with is 1 -Lipschitz,
i
[Equation]
e. for any x, y ∈ M , | φ ( x ) − φ ( y ) | ≤ d ( x, y ) .
Since M is compact, we have that φ is bounded.
Using this result, (S18), the data processing theorem (Kullback, 1997, Theorem 4.1) and Pinsker’s inequality (Bakry et al., 2014, Equation 5.2.2) we have
[Equation]
We now control each one of these terms.
The first term can be easily controlled using the geometric ergodicity of the Brownian motion on compact manifolds.
The second term can be controlled using the Girsanov theory on isometrically embedded manifolds.
For the last term, we rely on the convergence of the GRW to its associated diffusion as presented in App.
I.2.
We now control each one of these terms.
(a) Using Proposition S10, we have that ∥ π 0 P T | 0 − π ∞
∥ TV ≤ C 1 / 2 e λ 1 / 2 e − λ 1 T where λ 1 is the first positive eigenvalue of − ∆ M in L 2 ( π ∞ ) .
Therefore, we get that
[Equation]
(b) Recall that we have that P R | 0 is associated with the process d Y t = ∇ log [Equation] Y [Equation]
+ [Equation] B M t and that ˆ P R | 0 is associated with the process d ˆ Y t =
s θ ⋆ ( T − t, ˆ Y t )
d t + d B M t .
Using Corollary S we have that
[Equation]
(c) Let us define { ¯ Y k } Nk =0 such that for any k ∈ { 0 , . .
. , N } , ¯ Y k
= ˆ Y
= Y 0 and for any t ∈ [0 , kγ ] we have that ¯ Y 0 t =
ˆ Y t .
For any t ∈ [ kγ, T ] , we have that ¯ Y kt =
Y t,k , where Y kγ,k
= ˆ Y kγ and for any j ∈ { k, . .
, N − 1 } and t ∈ [0 , γ ]
[Equation]
where { Z j } N − 1 j =0 are independent Gaussian random variables with identity covariance matrix and zero mean and E kj is a frame of T Y jγ,k M such that for any j ∈ { k +1 , . . .
, N − 1 } , E k +1 j [Equation]
and { E 0 j } N − 1 j =0 is such that for any j ∈ { 0 , . .
, N − 1 } , E
j is a frame of T Y jγ M .
One [0 , kγ ] , we define ( ˆ Y kt ) t ∈ [0 ,kγ ] as follows.
For any k ∈ { 0 , . . .
, N − 1 } , we set ( Y k +1 t ) t ∈ [0 ,kγ ] =
( Y kt ) t ∈ [0 ,kγ ] .
For any k ∈ { 0 , . . .
, N − 1 } , we set ( Y t ) kγ, ( k +1) γ as in Proposition S21 (taking the notations of
Proposition S21, X
=
ˆ Y k
( k +1) γ and X γ
= ˆ Y kkγ ).
Note that we have { ¯ Y Njγ, 0 } Nj =
= { Y Nj } Nj =0 and { ¯ Y t,N } t ∈ [0 ,T ] =
{ ˆ Y t } t ∈ [0 ,T ] .
Therefore, we have that
[Equation]
In addition, using Proposition S21 and Proposition S22, we have that there exists C ≥ 0 such that for any k ∈ { 0 , . . .
, N − 1 }
[Equation]
Therefore, we get that there exists C ≥ 0 such that
[Equation]
≤ C exp[ T ] γ 1 / 2 ,
Therefore, we get that there exists C ≥ 0 such that for any φ ∈ C( M ) which is 1 -Lipschitz, we have
[Equation]
Let x 0 ∈ M .
Let Lip( M ) the set of Lipschitz functions on M with Lipschitz constant equal to 1 .
Let Lip(
M )
the set of Lipschitz functions on M with Lipschitz constant equal to 1 and such that for any φ ∈ Lip( M ) 0 , φ ( x 0 )
= 0 .
Note that in this case, we have that ∥ φ ∥ ∞ ≤ diam( M ) .
Using (S19), we have
[Equation]
which concludes the proof.
We now state a result regarding the continuous-time process (i.e. we now longer consider discretization errors).
We recall that we denote ( ˆ Y t ) t ∈ [0 ,T ] the process defined by the diffusion d ˆ Y t =
s θ ⋆ ( T − t, ˆ Y t )
d t + d B t and ˆ Y 0 ∼ π ∞ .
Theorem S17.
Assume A 1 , that p 0 is smooth and positive and that there exists M ≥ 0 such that for any t ∈ [0 , T ] and x ∈ M , ∥ s θ ⋆ ( t, x ) − ∇ log p t ( x ) ∥ ≤ M , with s θ ⋆ ∈ C([0 , T ] , X ( M )) .
Then if T > 1 / 2 , there exists C ≥ 0 independent on T such that
[Equation]
Proof.
The proof is identical to the one of Theorem S16, except that we do not have to deal with the discretization error.
We use that for any µ, ν ∈ P ( M )
[Equation]
The result of Theorem S17 should be compared with the one of (Rozen et al., 2021, Theorem 3).
With our result we control a L 1 bound between the density of ˆ Y T and the one of p 0 .
In (Rozen et al., 2021, Theorem 3) a L ∞ bound between the densities is recovered.
It can be shown that ˆ p T
=
L ( ˆ Y T ) .
Let κ be the modulus of continuity of ˆ p T − p 0 , i.e. for any ε ≥
[Equation]
Let x 0 ∈ M such that
[Equation]
For any x ∈ ¯B( x 0 , κ ( M/ 2)) , we have | ˆ p T ( x ) − p
( x ) | ≥ M/ 2 .
Hence, denoting Vol κ = (cid:82) ¯B( x 0 ,κ ( M/ 2))
d p ref ( x ) > 0 , we have
[Equation]
Hence, there exists C ≥ 0 such that for any T > 1 /
[Equation]
Therefore, we recover the same guarantees as Theorem S17 (note that M is not explicitly controlled using network properties in our work, but we could use universal approximation properties as in
Rozen et al.
(2021) in order to obtain a similar result).
I.2 Discretization bounds for GRW
In this section, we establish discretization bounds for GRW.
Our results are a straightforward extension of Cheng et al.
(2022) to the case where the drift term in the GRW is time-inhomogeneous.
Since M is compact, we have that for any x 1 , x 2 ∈ M , there exists a minimizing geodesic such that γ ∈ C ∞ ([0 , 1] , M ) and γ (0) =
x 1 and γ (1) =
x 2 .
When this choice is not unique we fix a minimizing geodesic.
We denote Γ x 2 x 1 : T x 1 M → T x 2 M the associated parallel transport.
Let b ∈ C ∞ ([0 , T ] , X ( M )) .
We start by introducing a family of GRWs defined on progressively finer grids.
Let γ > 0 , X 0 ∈ M , E 0 ∈ F X 0 M (the vector space of frames at X 0 ) and consider the families { E ℓk : k ∈ { 0 , . .
. , 2 ℓ } , ℓ ∈ N } , { X ℓk : k ∈ { 0 , . .
. , 2 ℓ } , ℓ ∈ N } such that X
= X 0 ,
X 01 = exp X
[ γb (0 , X 00 ) + √ γ ( B 1 − B 0 ) E 00 ] and E 01 =
Γ X 01 X 00 E
(note that E ℓ 2 ℓ is not used in the proof but defined for completeness).
In addition, we have that for any ℓ ∈ N with ℓ ≥ 1 , X ℓ
= X 0 ,
E ℓ 0 = E 0 and for any k ∈ { 0 , . .
, 2 ℓ − 1 − 1 }
[Equation]
where γ ℓ = γ/ 2 ℓ .
For any ℓ ∈ N , we also define ( X ℓ t ) t ∈ [0 ,γ ] such that for any ℓ ∈ N , k ∈ { 0 , . . .
, 2 ℓ − 1 } , we have for any t ∈ [ kγ ℓ , (
[Equation]
Note that for any ℓ ∈ N and k ∈ { 0 , . .
, 2 ℓ − 1 } , X ℓkγ ℓ = X [Equation]
We are going to use the following useful lemma, see (Cheng et al., 2022, Lemma 62).
Lemma S18.
Assume A 1 .
Then, there exists C ≥ 0 such that for any x, y ∈ M , γ : [0 , 1] → M minimizing geodesic with γ (0)
= x , γ (1)
=
y and u ∈ T x M , v ∈ T y M
we have
[Equation]
with κ = ∥
u ∥ + ∥ v ∥ .
We are now ready to state the main result of this section.
Proposition S19.
Assume A 1 .
Then, there exists C ≥ 0 such that for any ℓ ∈ N
[Equation]
Proof.
Let ℓ ∈ N , k ∈ { 0 , . .
, 2 ℓ − 1 } and t ∈ [ kγ ℓ , ( k + 1) γ ℓ ] .
We define U tk = d ( X ℓt , X ℓ +1 t ) 2 ,
U k
= sup { U tk : t ∈ [ kγ ℓ , ( k + 1) γ ℓ ] } and U − 1 = 0 .
We also introduce for any j ∈ { 0 , . . .
[-, 2 ℓ − 1 } and for t ∈ [ kγ ℓ , (2 k + 1) γ ℓ +1 ) , ¯ X ℓ +1 t = X ℓ +1 t and for t ∈ [(2 k + 1) γ ℓ +1 , ( k + 1) γ ℓ ) ¯ X ℓ +1 t = exp X ℓ +
-]
, 2 ℓ − 1 } and for t ∈ [ kγ ℓ , (2 k + 1) γ ℓ +1 ) , ¯ X ℓ +1 t = X ℓ +1 t and for t ∈ [(2 k + 1) γ ℓ +1 , ( k + 1) γ
[Equation]
¯
[Equation]
Using this result and that for any a, b ≥ 0 , ( a + b ) 2 ≤ (1 + 2 − ℓ ) a 2 + (1 + 2 ℓ ) b 2 , we have that for any t ∈ [ kγ ℓ , ( k + 1) γ ℓ ]
[Equation]
Note that for t ∈ [ kγ ℓ , (2 k + 1) γ ℓ +1 ] , the second term in (S21) is zero.
We now bound each one of these terms: (a) First, we assume that t ∈ [( k + 1) γ ℓ , (2 k + 1) γ ℓ +1 ] .
Recall that
[Equation]
Hence, using Lemma S18, we have that
[Equation]
with w : [0 , 1] → M a minimizing geodesic between X ℓk and X ℓ +12 k
[Equation]
In particular, since E ℓk = Γ X ℓk X ℓ +12 k E ℓ +12 k using (S20), we have that u 2 k
=
Γ
X
ℓk X ℓ +
k v 2 k .
Therefore, combining this result and that t − (2 k + 1) γ ℓ +1 + γ ℓ +
=
t − kγ ℓ , we get that
[Equation]
Therefore, we get that ∥
u k − v k ∥ ≤ L 1 γ ℓ d ( X ℓk , X ℓ +12 k )
+ L 2 γ 2 ℓ .
In addition, we have that ∥ w ′ (0) ∥ ≤ d ( X ℓk , X ℓ +12 k ) since w is a minimizing geodesic.
Combining these results and (S22) we get that [Equation] 1 t
[Equation]
Hence
[Equation]
there exists C 1 ≥
(not dependent on k or ℓ ) such that
[Equation]
Next
[Equation]
we assume that t ∈ [ kγ ℓ , (2 k + 1) γ ℓ +1 ] .
Recall that
[Equation]
Hence, using Lemma S18, we have that
[Equation]
with w : [0 , 1] → M a minimizing geodesic between X ℓk and X ℓ +12 k
[Equation]
In particular, since E ℓk = Γ X ℓk X ℓ +12 k E ℓ +12 k using (S20) and t − (2 k + 1) γ ℓ +1 + γ ℓ +
=
t − kγ ℓ , we have that u 2 k
= Γ X
ℓk X ℓ +
k v 2 k .
Therefore, we get that
[Equation]
Therefore, we get that ∥
u k − v k ∥ ≤ L 1 γ ℓ d ( X ℓk , X ℓ +12 k ) .
In addition, we have that ∥ w ′ (0) ∥ ≤ d ( X ℓk , X ℓ +12 k ) since w is a minimizing geodesic.
Combining these results and (S23) we get that d (
[Equation]
X ℓ +
[Equation]
Hence, there exists C 1 ≥ 0 (not dependent on k or ℓ ) such that for any t ∈ [ kγ ℓ , ( k + 1) γ ℓ ]
[Equation]
(b) We recall that if t ∈ [ kγ ℓ , (2 k + 1) γ ℓ +1 ] the second term in (S21) is zero.
Therefore in what follows, we assume t ∈
[(2 k + 1) γ ℓ +1 , ( k + 1) γ ℓ ] .
We introduce [Equation] (S
[Equation]
In what follows, we provide an upper-bound for d ( ¯ X ℓ +1 t , X ℓ +1 t ) .
First, we have that
[Equation]
We recall that ¯
[Equation]
Denote a k , b k such that
[Equation]
Using (S20), (S25) and (S26) we have that
[Equation]
Using this result and (Sun et al., 2019, Lemma 3)
[Equation]
there exists C 2 ≥
(not dependent on k or ℓ ) such that
[Equation]
Using this result and that for any t ∈ [
[Equation]
γ ] and x ∈ M
[Equation] ∥ b ( t [Equation] x ) ∥ ≤ K we get that there exists C 3 ≥ 0 (not dependent on k or ℓ ) such that
[Equation]
Finally
[Equation]
we recall that
[Equation]
X ℓ +1 t =
[Equation]
[Equation]
[Equation]
[Equation]
+1 ] .
Let us define
[Equation]
Using Lemma S
[Equation]
we get that
[Equation]
In addition [Equation] using Lemma S
[Equation]
we get that
[Equation]
with e k = γ ℓ +1 b ( kγ ℓ , X ℓ + [Equation]
) + ( B [Equation] 2 k
[Equation]
k .
Combining this result and (S29)
[Equation]
we get that
[Equation]
Combining (S27) and (S30) [Equation] there exists C 5 such that
[Equation]
In what follows, we denote
[Equation]
with τ + k = sup {∥ c k ∥ + ∥ d k ∥ : t ∈ [ kγ ℓ , ( k + 1) γ ℓ ] } , see (S28).
Therefore, using (S21), (S24) and (S31), we get that for any k ∈ { 0 , . . .
, 2 ℓ − 1 }
[Equation]
Let { R k } 2 ℓ k = − 1 such that R − 1 = 0 and for any k ∈ { 0 , . .
, 2 ℓ − 1 }
R
[Equation]
k
[Equation]
k . Then, for any k ∈ { 0 , . .
, 2 ℓ − 1 } , we have that R 2 ℓ − 1 ≥ R k ≥ U k .
Therefore
E [ R 2 ℓ ] ≥ E [sup { U k : k ∈ { 0 , . . . , 2 ℓ }} ] ≥ E [sup { d ( X ℓt , X ℓ +1 t ) 2 : t ∈ [0 , γ ] } ] . (S32)
In addition, using that for any k ∈ { 0 , . . . , 2 ℓ − 1 } , E [ α k |F k ] = ¯ α k and E [ β k |F k ]
= ¯ β k are constant, where F k = σ ( { B t : t ∈ [0 , kγ ℓ ] } ) .
Therefore, we get that for any k ∈ { 0 , . . .
, 2 ℓ − 1 }
[Equation]
Therefore, using the discrete Grönwall lemma we get that for any k ∈ { 0 , . . .
, 2 ℓ − 1 }
[Equation]
In addition, there exists C 8 ≥ 0 such that for any k ∈ { 0 , . . . , 2 ℓ } , ¯ α k ≤ [Equation] − ℓ
[Equation]
¯ β k ≤ C
[Equation]
γ
[Equation]
[Equation]
Hence, there exists C 9 ≥ 0 such that
[Equation]
which concludes the proof upon using (S32).
Proposition S20.
Assume A 1 .
Then, there exists ( X t ) t ∈ [0 ,γ ] such that lim ℓ → + ∞ sup { d ( X ℓt , X t ) : t ∈ [0 , γ ] } = 0 and ( X t ) t ∈ [0 ,γ ] is a weak solution to d X t
= b ( t, X t )d t + d B M t .
Proof.
The proof is a straightforward application of Proposition S19 and (Cheng et al., 2022, A.
(Step 2 and Step 3), A.2).
Proposition S21.
Assume A 1 .
Then, there exists C ≥ 0 such that E (cid:2)
d ( X 01 , X γ ) 2 ≤ Cγ 3 / 2 (cid:3) .
Proof.
Using Proposition S19, there exists C ≥ 0 such that for any ℓ ∈ N
[Equation]
Therefore, combining this result and Proposition S20 we get that for any ℓ ∈ N
[Equation]
which concludes the proof.
Finally, we consider the two following processes ( X 1 k , X 2 k ) k ∈ N such that for any k ∈ N and i ∈ { 1 , 2 }
[Equation]
where { Z k } k ∈ N is a family of independent Gaussian random variables with zero mean and identity covariance matrix, and for any k ∈ N , E 1 k is a frame for T X 1 k M and E 2 k
= Γ X 2 k
X 1 k E 1 k .
Proposition S22.
Assume A 1 .
Then, there exists C ≥ 0 such that for any k ∈ N
[Equation]
Proof.
Let k ∈ N .
Using Lemma S18, there exists D ≥ 0 such that
[Equation]
X
[Equation]
[Equation] [Equation] with w : [0 , 1] → M a minimizing geodesic between X 1 k and X 2 k
[Equation]
We have that Γ X 1 k X 2 k v 2 k = v k and
[Equation]
In addition, ∥ w ′ (0) ∥ ≤ d ( X 1 k , X 2 k ) .
Therefore, we get that
[Equation]
Hence, using that for any t ≥ 0 , √ 1 + t ≤ 1 + t/ 2 , we have
[Equation]
Therefore, we get that there exists C ≥ 0 such that
[Equation]
which concludes the proof.
J Proof of Proposition
Proof.
Let t ∈ (0 , T ] and s t ∈ C ∞ ( M ) .
Using the divergence theorem (see Lee, 2018, p.51) [Equation] we have [Equation]
ref
[Equation]
x
[Equation]
, which concludes the proof.
K Comparison with Moser flows
In this section, we compare ourselves with Rozen et al.
(2021) in greater details.
Rozen et al.
(2021) also aims at interpolating between a reference distribution p ref and a target distribution p 0 .
We assume that we have access to the density p ref and that we know how to sample form p ref (which is often the case if p ref is the uniform distribution on M ).
Contrary to RSGM, p ref is not necessary the uniform distribution.
We then consider the following interpolation ˆ p t
= (1 − t )ˆ p 0 + t ˆ p 1 , with ˆ p
= p ref and ˆ p 1 = p 0 .
Let ( X t ) t ∈ [0 , 1] be given by X 0 ∼ ˆ p 0 and d X t = v t ( X t )
d t where for any t ∈ [0 , 1] , v t = u / ((1 − t )ˆ p 0 + ˆ p 1 ) , with div( u ) =
ˆ p 0 − ˆ p 1 .
Using the Fokker-Planck equation, we have that for any t ∈ [0 , 1] , X t ∼ ˆ p t .
In Rozen et al.
(2021), u is replaced by a parametric version u θ and the authors optimize the loss
[Equation]
with λ, ε > 0 and for any f : M → R , f + ,ε = max( f, ε ) and f − ,ε = ε − min( f, ε ) .
Given u θ , we then consider ( X θt ) t ∈ [0 , 1] such that d X θt = v θt ( X θt )d t , where for any t ∈ [0 , 1] , v θt =
u θ / (ˆ p 0 + t div( u θ )) .
Note that u θ also enables density estimation using that ˆ p
= ˆ p 0 − div( u θ ) .
Density estimation is not directly accessible using RSGM, however in App.
L we propose a way to perform such an estimation using Fisher score in a manner akin to Choi et al.
Let ˆ p
= p ref to be the uniform distribution on M .
As RSGM, Moser flow defines a continuous time interpolation between p 0 and p ref .
One major difference between the two approaches is that
Moser flows perform the interpolation in density space , i.e. ˆ p t
=
(1 − t )ˆ p 0 + t ˆ p 1 for any t ∈ [0 , 1] , whereas RSGM performs the interpolation in sample space , i.e. p t = (cid:82) M p
( y ) p t |
( y, x )d p ref ( y ) .
Interpolation in the density space results in spontaneous creation of density, whereas interpolation in sample space corresponds to a displacement of the density, see Figs.
S3a and S3b.
In that respect, Moser flows can be seen as vertical displacement whereas RSGM corresponds to horizontal displacement , see Santambrogio (2017).
The drawback with the ‘spontaneous creation of density’ of
Moser flows, is that when solving trajectories in sample space —for sampling or likelihood evaluation purposes—the Stein score’s amplitude can get extremely high in settings where the reference and target distributions have little overlap as shown on Fig.
S3c.
L Density estimation with Fisher score
In this section, we show how we can adapt ideas from Choi et al.
(2021) for density estimation on M using the Fisher score.
The main idea of using Fisher score is to leverage the following decomposition for any x ∈ M
[Equation]
[Figure] ili [Figure] Moser
[Figure]
Score model [Figure] Assume that an approximation ˆ s θ of ∂ t log p t (the Fisher score) is available then we have that for any x ∈ M [Equation]
Before turning to our main result
[Figure]
we state the following lemma.
Lemma S23.
Assume A 1 .
Then, there exists C, T 0 ≥ 0 such that for any x ∈ M and T ≥ T 0 , | p T ( x ) − 1 | ≤ C exp[ − λ 1 T/ 2] , where λ 1 is the first non-negative eigenvalue of − ∆ M in L 2 ( p ref ) .
Proof.
First, using Proposition S10, there exists C 0 ≥ 0 such that for any T ≥ 1 / 2 we have
[Equation]
Using (Grigor’yan, 1999, Corollary 5.5), (Hsu, 1999, Theorem 1.2)and the fact that M is compact, there exists C 1 , β ≥ 0 such that for any T ≥ 1 / 2 and x 0 , x T ∈ M
[Equation]
In addition, using (Croke, 1980, Proposition 14) we have that there exists C 2 , r 0 > 0 such that for any x 0 ∈ M and r ∈ (0 , r 0 )
[Equation]
Assume that that (cid:82)
M | p T ( x ) − 1 |
d p ref ( x ) ≤ ε and that there exists x 0 ∈ M such that | p T ( x ) − 1 | > κε with κ > 0 and let T ≥ T 0 with T
= ( κε/ (2 C 1 )) 1 /β .
Then, using (S33) and (S34), we have for any r ∈ (0 , r 0 )
[Equation]
Since κε/ (2 C 1 (1 + T β )) ∈ (0 , r 0 ) we have
[Equation]
Therefore, we get that
[Equation]
Therefore, we get that κ ≤ (4 C 1 (1 + T β ) /C 2 ) 1 / ( d +1)
ε − 1 / ( d +1) .
Therefore, we have that for any x ∈ M
[Equation]
Let T 0 ≥ 0 such that for any T ≥ T
we have
[Equation]
Combining this result and (S36), we get that for any x ∈ M and T ≥ [Equation] [Equation] ) /C
[Equation]
1 / ( d +1) C 1 − 1 / ( d +1)e − (1 − 1 / ( d +1))
λ 1 T , (S36) which concludes the proof.
The following proposition quantifies this approximation.
Proposition S24.
Assume A
and that p 0 ∈ C ∞ ( M , (0 , + ∞ )) .
Let x 0 ∈ M and assume that for any t ∈ [0 , T ] , | ˆ s θ ( t, x 0 ) − ∂ t log p t ( x 0 )
| ≤ M with M ≥ 0 .
Then, there exists C, T 0 ≥ 0 such that for any T
[Equation]
where λ 1 is the first non-negative eigenvalue of − ∆ M in L 2 ( p ref ) .
Proof.
First using, Lemma S23, there exists C 0 , T ( a )≥ 0 such that for any T ≥ T ( a )
[Equation]
Let T ( b )=
| log( C 0 ) | /λ 1 .
Using that for any s ∈ [1 / 2 , + ∞ ) we have that | log(1+ s ) | ≤ 2 log(2) | s | we get that for any T ≥ max( T ( a ) 0 , T ( b ) 0 )
[Equation]
which concludes the proof.
In practice, we do not have access to ∂ t log p t .
However, following (Choi et al., 2021, Proposition 2), we have the following property.
Proposition S25.
Let ˆ s such that for any t ∈ [0 , T ] and x ∈ M , ˆ s ( t, x ) =
∂ t log p t ( x ) .
Then, we have that ˆ
s = arg min { L ( s ) : s ∈ C ∞ ([0 , T ] × M , R ) } ,
where for any s ∈ C ∞ ([0 , T ] × M , R ) we have L [Equation] [Equation]
t
[Equation]
t ]
[Equation]
[Equation]
t
[Equation]
t
[Equation]
t
[Equation]
t [Equation] [Equation] where λ ∈ C ∞ ([0 , T ] , R ) is a weighting function.
Proof.
For any t ∈ [0 , T ] and x t ∈ M we have
[Equation]
Hence, since M is compact and ˆ s ∈ C ∞ ([0 , T ] × M , R ) , we have that ˆ s = arg min { L 0 ( s ) : s ∈ C ∞ ([0 , T ] × M , R ) } where for any s ∈ C ∞ ([0 , T ] × M , R ) we have
[Equation]
In addition, we have that
[Equation]
By integration by parts we get
[Equation]
Combining this result and (S37) we get that
[Equation]
which concludes the proof
[Equation] Hence [Equation] using Proposition S25, we could estimate jointly the spatial (or Stein) score used in RSGM and the Fisher score considered in this section, see Choi et al.
M Extensions M.1 Schrödinger bridge.
For Euclidean SGM, the generative model is given by an approximation of the time-reversal of the noising dynamics ( X t ) t ∈ [0 ,T ] while the backward dynamics ( Y t ) t ∈ [0 ,T ] is initialized with the invariant distribution of the noising dynamics (the uniform distribution p ref in case of RSGM).
However, in order for the method to yield good results we need L ( Y 0 )
≈ L ( X T ) (see De Bortoli et al., 2021, Theorem 1).
Usually, this requires the number of steps in the backward process to be large in order to keep T large and γ small (where γ > 0 is the stepsize in the GRW).
Another limitation of SGM is that existing methods target an easy-to-sample reference distribution.
Hence, classical SGM cannot interpolate between two distributions defined by datasets.
To circumvent this problem, one can consider a process whose initial and terminal distribution are pinned down using
Schrödinger bridges (Schrödinger, 1932; Léonard, 2012a; Chen et al., 2016; De Bortoli et al., 2021;
Vargas et al., 2021).
M. Conditional RSGM.
Another extension of interest is conditional sampling.
By amortizing SGM with respect to an observation y it is possible to approximately sample from a given posterior distribution.
In the
Euclidean setting this idea has been successfully applied for several image processing problems such as deblurring, denoising or inpainting (see for instance Kawar et al., 2021a,b; Lee et al., 2021; Sinha et al., 2021;
Batzolis et al., 2021; Chung et al., 2021).
Similarly, RSGM can be amortized to handle such situations in the case where the underlying posterior distribution is supported on a manifold.
Practically, this requires for the score network takes an additional input, i.e s θ ( t, x ; y ) .
M.3 Invariant distributions
In what follows, we propose an extension for modelling probability distributions which known invariance.
That is, we assume that p 0 ( ρ ( g ) x ) = p 0 ( x ) for all g ∈ G , with G a group and ρ : G → GL n ( R ) a representation.
Following Köhler et al.
, we have that if p ref is invariant w.r.t.
G and ϕ : M → M is equivariant w.r.t.
to G , then the pushforward probability density p =
p ref ◦ ϕ − 1 is invariant w.r.t.
G .
Let’s consider the probability flow ϕ associated with the reverse diffusion (4)—given by d Y t = {− b ( Y t )
+ ∇ log p T − t ( Y t ) }
d t + d B M t — i.e. the solution of the following ODE (see App.
D)
[Equation]
In practice, the Stein score ∇ log p t is approximated with the score network s θ ( t, · ) .
It is sufficient to parametrize the score network so that it is equivariant w.r.t.
its second argument —assuming that ρ ( g ) and the drift b commute (e.g. which is true for a linear drift)—since we then have
[Equation]
− b + 12 s θ ( T − t
[Equation]
· ) (cid:3) ( ρ ( g ) Y t )
=
ρ ( g ) (cid:2) −
[Equation]
12 s θ ( T − t
[Equation]
· ) (cid:3) ( Y t ) .
N Stereographic baseline details
In the experiments on the sphere we compare to a Stereographic Score-Based baseline model.
This model is an alternative to the RSGM the we propose in order to construct score-based models on manifolds without having to construct the intrinsic approach presented in the paper as Riemannian
Score-Based models.
They can be applied to more cases than just the sphere.
In general these models work as follows:
Project the datapoints from the manifold to Euclidean space through a invertible 11 function f : M → R d . 2.
Train a Euclidean score-based generative model on the datapoints projected to Euclidean space, giving a density p θ on R d (where θ are the parameters of the density).
Define the density on the manifold as the pushforward of the density in Euclidean space under the inverse of the bijection, P θ, M = f − 1 ∗ p θ .
One could also apply these models to the torus.
By using the bijection f : θ (cid:55)→ tan( θ ) we can project each coordinate onto the real line.
In general we found that these models perform less well than their intrinsic counterparts.
In order to map density near the seams of the bijection, it requires the model to send data points off to infinity in the Euclidean space.
This is numerically challenging and leaves artefacts in the pushforward density on the manifold.
In addition, these methods depend on the bijection used to project the data into a
Euclidean space and therefore are not intrinsic.
O Experimental details
In what follows we describe the experimental settings used to generate results introduced in Sec. 6.
The models and experiments have been implemented in Jax (Bradbury et al., 2018), using a modified version of the Riemannian geometry library Geomstats (Miolane et al., 2020b).
Anonymized code can be found at here 12 .
Due to difficulties referencing anonymized repositories, the modified version of geomstats is included as a zip file in the supplementary material.
Additionally modified versions of the submitit and hydra-submitit-launcher packages are not supplied for the same reasons, but the default versions of these will suffice for most users.
Full code and all repos will be publicly available after publication.
Models Following Song et al.
(2021), the score-based generative models (SGMs) diffusion coefficient is parametrized as g ( t ) =
(cid:112) β ( t ) with β : t (cid:55)→ β min + ( β max − β min ) · t .
Architecture The architecture of the score network s θ is given by a multilayer perceptron with 5 hidden layers for the Earth and SO (3) experiments, and 3 for the high-dimension experiments with 512 units each.
We use sinusoidal activation functions.
We decompose the output of the score network on the set of divergence free vector fields as per Sec. 3.4.
Loss Where not specified, SGMs are trained with the sliced score matching (SSM) loss ℓ im t , relying on the Hutchinson estimator for computing the divergence with Rademacher noise described in
Sec. 3.4.
We found that training with the denoising score matching (DSM) loss ℓ t | 0 gave similar results.
Regarding the weighting function, for DSM loss ℓ t |
we use λ t =
Var [ X t | X 0 ] (where we rely on the closed-form standard deviation available in the Euclidean setting as a proxy for the compact manifold setting), while for the ISM/SSM losses ℓ im t we use λ t = g ( t ) 2 = β ( t ) .
Optimization All models are trained by the stochastic optimizer Adam (Kingma and Ba, 2015) with parameters β 1 = 0 .
9 , β 2 = 0 .
999 , batch-size of 512 data-points.
The learning rate is annealed with a linear ramp from 0 to 1000 and from then with a cosine schedule.
Likelihood evaluation and sample drawing We rely on the Dormand-Prince solver (Dormand and
Prince, 1980), an adaptive Runge-Kutta 4(5) solver, with absolute and relative tolerance of 1 e − 5 to compute approximate numerical solutions of any ODEs.
For the rollouts of the SGM SDEs we use a
Euler Maruyama predictor and no corrector.
Unless stated we use 100 step rollouts.
Hardware Models are trained on a cluster with a mixture of GeForce RTX 1080, 1080 Ti and
Ti GPU cards.
O.1 Sphere
Data We randomly split the datasets intro training, validation and test datasets with (0 . 8 , 0 . 1 , 0 . 1) proportions.
In each case the earth is approximated as a perfect sphere.
Models The mixture of Kent distributions (Peel et al., 2001) were optimised using the EM algorithm and the number of components were selected from a grid search over the range 5 , 10 , 15 , 20 , 25 , 30 , 40 , 50 , 75 , 100 , based on validation set likelihood and 250 EM iterations.
The number of components selected were: Volcano 25 , Earthquake 50 , Flood 100 and Fire 100 .
For the stereographic SGM–which is a standard SGM with an Ornstein–Uhlenbeck process followed with the inverse stereographic projection–we found β min = 0 .
001 and β max = 2 to work best.
Optimization The score-based models are trained for 600 k iterations for all datasets but ‘Flood’ where 300 k performed best.
Additional experimental results
Approximate forward sampling Standard Euclidean SGMs rely on a Ornstein–Ulhenbeck (OU) forward process (1) which can easily be simulated since X t | X 0 is Gaussian.
In contrast, for most manifolds one has to rely on an approximate sampling scheme—see Sec. 3.3.
First, we directly assess the quality of the approximate samples ˆ X t | X 0 obtained via geodesic random walk (GRW), against ‘exact’ samples X t | X 0 which are obtained by using a high number of discretization steps ( N = 1000 ).
We report on Fig.
S4a the discrepancy between these distributions for different values of discretization steps N , as measured by maximum mean discrepancy (MMD) (Gretton et al., 2012).
We see that from N = 5 the approximate samples are very closely distributed to the true samples.
Then, in order to assess the impact of this approximation on the RSGMs’ performance, we report on
Fig.
S4b the log-likelihood when varying the number of discretization steps N .
We similarly observe that apart from very small values of N , the models’ performance is very robust to the approximation quality of the forward sampling samples.
[Figure]
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure] [Figure]
[Figure]
On Fig.
S5, we show how the test log-likelihood varies with respect to the two hyparameters of the DSM loss, by training RSGMs over a grid of values for τ and J on the Flood dataset.
We can see that the Varadhan approximation by itself ( τ = 1 ) yields descent performance, although a wise combination of Varadhan approximation with a truncation of the heat kernel can give even better results.
The performance is relatively robust to the choice of such hyperparameters as long as τ and J are high enough.
[Figure]
O.2 Torus
Data The synthetic data trained on consists of a wrapped Gaussian distribution on T n with uniformly chosen random mean and standard deviation of 0 . 2 .
Such a distribution is defined by taking the density of a Normal distribution in the tangent space of the manifold at the mean and passing it through the exponential map at the mean.
Architecture To parametrize the vector field on T n we use a single filed per dimension pointing in a consistent direction around the i th component in the product, with unit norm.
Models All models were trained with the same 3 layer, 512 units per layer MLP across different dimension sizes.
Optimization The models are optimized for 50 k iterations.
The RSGM models are trained with both the implicit score-matching loss and the sliced score-matching loss.
O.3 Special Orthogonal group
Applications of orthogonal constraints span various fields, such as protein docking with ligands binding pose prediction (Ganea et al., 2022), robotics and Computer vision with rigid body transformation estimation (Barfoot et al., 2011; Prokudin et al., 2018), and medical imaging for data alignment (Hou et al., 2018).
Data We consider the synthetic dataset consisting of samples in SO 3 ( R d ) 13 from the mixture distribution with density p (Q) = 1 K (cid:80)
Kk =1 N W (Q | Q k , σ 2 k ) with K ∈ N , where for any k ∈ { 1 , . . .
, K } , we have that
Q
=
Q
k exp Id [ σ k ˆ z ] with z ∼ N(0 , Id R 3 ) satisfies Q ∼ N W (Q k , σ k ) and ( · ) ∧ : R 3 → so (3) .
For any k ∈ { 1 , . . .
, K } , we set Q k ∼ µ where µ is the uniform distribution on SO 3 ( R ) and σ 2 k ∼ IG( α = 100 , β = 1) , where IG is the inverse Gaussian distribution.
We choose
K = 32 mixture components.
We showcase a conditional sampling extension of our model—see
App.
M for more details— by targeting individual mixture components p ( Q | k ) .
Our model is trained using the ℓ t | 0 (DSM) loss along with the Varadhan asymptotic approximation, see (8).
Architecture To parametrize the vector field, we rely on the basis of the Lie group, so ( n ) =
{ A ∈ M d ( R ) :
A ⊤ = − A } given by E ij =
U ij − U ji for i, j ∈ { 1 , . . .
, d } with i < j and U ij = ( δ ij ( k, ℓ )) 1 ≤ k,ℓ ≤ d , which induces a basis on the tangent spaces T Q SO d for any Q ∈
SO d ( R ) given by { QE ij } 1 ≤ i<j ≤ d .
This is the divergence-free vector field approach described in Sec. 3.4.
Models We compare our proposed approach against Moser flows (Rozen et al., 2021) and a wrappedexponential baseline (Falorsi et al., 2019) defined as the pushforward along the transformation
R 3 F − 1 θ −−−→ R 3 g −→ R 3 ∧ −→ so (3) exp −−→
SO 3 ( R ) with F − 1 θ denoting the approximate time-reversed diffusion, g denoting the radial operator defined by g : x (cid:55)→ 2 π tanh( ∥ x ∥ ) x/ ∥ x ∥ , ( · ) ∧ : R 3 → so ( n ) the isomorphism given by the basis on so (3) and exp the matrix exponential.
The radial g operator’s constant 2 π is chosen as the injectivity radius of the group so that the transformation tanh ◦ ∧ ◦ exp is injective (the set of elements with no preimage is then only the cut locus which is known to have measure zero).
Henceforth, this wrapped-exponential transformation cannot be bijective, it is either injective or surjective depending on the choice of radius in the radial operator g .
Optimization Models are trained for 100 k iterations.
The Riemannian SGM is trained with the
Varhadan approximation of the denoising score-matching loss (DSM) Sec. 3.4, and the wrappedexponential model relies on the exact DSM loss.
After a first hyperparameter exploration, a grid search is performed over learning_rate ∈ [2 e − 5 , 4 e − 5] , for SGMs over β f ∈ [0 . 5 , 1 , 2 , 4 , 6 , 8 , 10] and for Moser flows over K ∈ [1000 , 10000] and λ min ∈ [1 , 10 , 100] .