generalized sliced wasserstein distances · generalized sliced wasserstein distances soheil...

12
Generalized Sliced Wasserstein Distances Soheil Kolouri 1 Kimia Nadjahi 2 Umut S ¸ ims ¸ekli 2 Roland Badeau 2 Gustavo K. Rohde 3 Abstract The Wasserstein distance and its variations, e.g., the sliced-Wasserstein (SW) distance, have re- cently drawn attention from the machine learning community. The SW distance, specifically, was shown to have similar properties to the Wasser- stein distance, while being much simpler to com- pute, and is therefore used in various applications including generative modeling and general super- vised/unsupervised learning. In this paper, we first clarify the mathematical connection between the SW distance and the Radon transform. We then utilize the generalized Radon transform to define a new family of distances for probabil- ity measures, which we call generalized sliced- Wasserstein (GSW) distances. We also show that, similar to the SW distance, the GSW distance can be extended to a maximum GSW (max-GSW) distance. We then provide the conditions under which GSW and max-GSW distances are indeed distances. Finally, we compare the numerical per- formance of the proposed distances on several generative modeling tasks, including SW flows and SW auto-encoders. 1. Introduction The Wasserstein distance has its roots in optimal transport (OT) theory (Villani, 2008) and forms a metric between two probability measures. It has attracted abundant attention in data sciences and machine learning due to its convenient theoretical properties and applications on many domains (Solomon et al., 2014; Frogner et al., 2015; Montavon et al., 2016; Kolouri et al., 2017; Courty et al., 2017; Peyr ´ e & Cu- turi, 2018; Schmitz et al., 2018), especially in implicit gen- erative modeling such as OT-based generative adversarial networks (GANs) and variational auto-encoders (Arjovsky et al., 2017; Bousquet et al., 2017; Gulrajani et al., 2017; Tolstikhin et al., 2018). 1 HRL Laboratories, LLC., Malibu, CA, USA 2 T´ el ´ ecom Paris- Tech, Paris, France 3 University of Virginia Charlottesville, VA, USA. Correspondence to: Soheil Kolouri <[email protected]>. Copyright 2019 by the author(s). While OT brings new perspectives and principled ways to formalize problems, the OT-based methods usually suffer from high computational complexity. The Wasserstein dis- tance is often the computational bottleneck and it turns out that evaluating it between multi-dimensional measures is numerically intractable in general. This important computa- tional burden is a major limiting factor in the application of OT distances to large-scale data analysis. Recently, several numerical methods have been proposed to speed-up the eval- uation of the Wasserstein distance. For instance, entropic regularization techniques (Cuturi, 2013; Cuturi & Peyr ´ e, 2015; Solomon et al., 2015) provide a fast approximation to the Wasserstein distance by regularizing the original OT problem with an entropy term. The linear OT approach, (Wang et al., 2013; Kolouri et al., 2016a) further simplifies this computation for a given dataset by a linear approxima- tion of pairwise distances with a functional defined on dis- tances to a reference measure. Other notable contributions towards computational methods for OT include multi-scale and sparse approximation approaches (Oberman & Ruan, 2015; Schmitzer, 2016), and Newton-based schemes for semi-discrete OT (evy, 2015; Kitagawa et al., 2016). There are some special favorable cases where solving the OT problem is easy and reasonably cheap. In particular, the Wasserstein distance for one-dimensional probability densi- ties has a closed-form formula that can be efficiently approx- imated. This nice property motivates the use of the sliced- Wasserstein distance (Bonneel et al., 2015), an alternative OT distance obtained by computing infinitely many lin- ear projections of the high-dimensional distribution to one- dimensional distributions and then computing the average of the Wasserstein distance between these one-dimensional representations. While having similar theoretical properties (Bonnotte, 2013), the sliced-Wasserstein distance has signif- icantly lower computational requirements than the classical Wasserstein distance. Therefore, it has recently attracted ample attention and successfully been applied to a variety of practical tasks (Bonneel et al., 2015; Kolouri et al., 2016b; Carriere et al., 2017; Karras et al., 2017; S ¸ ims ¸ekli et al., 2018; Deshpande et al., 2018; Kolouri et al., 2018; 2019). As we will detail in the next sections, the linear projection process used in the sliced-Wasserstein distance is closely related to the Radon transform, which is widely used in to- mography (Radon, 1917; Helgason, 2011). In other words, arXiv:1902.00434v1 [cs.LG] 1 Feb 2019

Upload: others

Post on 02-Jan-2020

33 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

Soheil Kolouri 1 Kimia Nadjahi 2 Umut Simsekli 2 Roland Badeau 2 Gustavo K. Rohde 3

Abstract

The Wasserstein distance and its variations, e.g.,the sliced-Wasserstein (SW) distance, have re-cently drawn attention from the machine learningcommunity. The SW distance, specifically, wasshown to have similar properties to the Wasser-stein distance, while being much simpler to com-pute, and is therefore used in various applicationsincluding generative modeling and general super-vised/unsupervised learning. In this paper, wefirst clarify the mathematical connection betweenthe SW distance and the Radon transform. Wethen utilize the generalized Radon transform todefine a new family of distances for probabil-ity measures, which we call generalized sliced-Wasserstein (GSW) distances. We also show that,similar to the SW distance, the GSW distance canbe extended to a maximum GSW (max-GSW)distance. We then provide the conditions underwhich GSW and max-GSW distances are indeeddistances. Finally, we compare the numerical per-formance of the proposed distances on severalgenerative modeling tasks, including SW flowsand SW auto-encoders.

1. IntroductionThe Wasserstein distance has its roots in optimal transport(OT) theory (Villani, 2008) and forms a metric between twoprobability measures. It has attracted abundant attention indata sciences and machine learning due to its convenienttheoretical properties and applications on many domains(Solomon et al., 2014; Frogner et al., 2015; Montavon et al.,2016; Kolouri et al., 2017; Courty et al., 2017; Peyre & Cu-turi, 2018; Schmitz et al., 2018), especially in implicit gen-erative modeling such as OT-based generative adversarialnetworks (GANs) and variational auto-encoders (Arjovskyet al., 2017; Bousquet et al., 2017; Gulrajani et al., 2017;Tolstikhin et al., 2018).

1HRL Laboratories, LLC., Malibu, CA, USA 2Telecom Paris-Tech, Paris, France 3University of Virginia Charlottesville, VA,USA. Correspondence to: Soheil Kolouri <[email protected]>.

Copyright 2019 by the author(s).

While OT brings new perspectives and principled ways toformalize problems, the OT-based methods usually sufferfrom high computational complexity. The Wasserstein dis-tance is often the computational bottleneck and it turns outthat evaluating it between multi-dimensional measures isnumerically intractable in general. This important computa-tional burden is a major limiting factor in the application ofOT distances to large-scale data analysis. Recently, severalnumerical methods have been proposed to speed-up the eval-uation of the Wasserstein distance. For instance, entropicregularization techniques (Cuturi, 2013; Cuturi & Peyre,2015; Solomon et al., 2015) provide a fast approximationto the Wasserstein distance by regularizing the original OTproblem with an entropy term. The linear OT approach,(Wang et al., 2013; Kolouri et al., 2016a) further simplifiesthis computation for a given dataset by a linear approxima-tion of pairwise distances with a functional defined on dis-tances to a reference measure. Other notable contributionstowards computational methods for OT include multi-scaleand sparse approximation approaches (Oberman & Ruan,2015; Schmitzer, 2016), and Newton-based schemes forsemi-discrete OT (Levy, 2015; Kitagawa et al., 2016).

There are some special favorable cases where solving theOT problem is easy and reasonably cheap. In particular, theWasserstein distance for one-dimensional probability densi-ties has a closed-form formula that can be efficiently approx-imated. This nice property motivates the use of the sliced-Wasserstein distance (Bonneel et al., 2015), an alternativeOT distance obtained by computing infinitely many lin-ear projections of the high-dimensional distribution to one-dimensional distributions and then computing the averageof the Wasserstein distance between these one-dimensionalrepresentations. While having similar theoretical properties(Bonnotte, 2013), the sliced-Wasserstein distance has signif-icantly lower computational requirements than the classicalWasserstein distance. Therefore, it has recently attractedample attention and successfully been applied to a variety ofpractical tasks (Bonneel et al., 2015; Kolouri et al., 2016b;Carriere et al., 2017; Karras et al., 2017; Simsekli et al.,2018; Deshpande et al., 2018; Kolouri et al., 2018; 2019).

As we will detail in the next sections, the linear projectionprocess used in the sliced-Wasserstein distance is closelyrelated to the Radon transform, which is widely used in to-mography (Radon, 1917; Helgason, 2011). In other words,

arX

iv:1

902.

0043

4v1

[cs

.LG

] 1

Feb

201

9

Page 2: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

the sliced-Wasserstein distance is calculated via linear slic-ing of the probability distributions. However, the linearnature of these projections does not guarantee an efficientevaluation of the sliced-Wasserstein distance: in very high-dimensional settings, the data often lives in a thin manifoldand the number of randomly chosen linear projections re-quired to capture the structure of the data distribution growsvery quickly (Simsekli et al., 2018). Reducing the numberof required projections would thus result in a significant per-formance improvement in sliced-Wasserstein computations.

Contributions. In this paper, we address the aforemen-tioned computational issues of the sliced-Wasserstein dis-tance and for the first time, we extend the linear slicingto non-linear slicing of probability measures. Our maincontributions are summarized as follows:

• Using the mathematics of the generalized Radon trans-form (Beylkin, 1984) we extend the definition of thesliced-Wasserstein distance to an entire class of distances,which we call the generalized sliced-Wasserstein (GSW)distance. We prove that replacing the linear projectionswith polynomial projections will still yield a valid dis-tance metric and we then identify general conditions un-der which the GSW distance is a distance function.

• We then show that, instead of using infinitely many pro-jections as required by the GSW distance, we can stilldefine a valid distance metric by using a single projection,as long as the projection gives the maximal distance inthe projected space. We aptly call this distance the max-GSW distance. The max-GSW distance vastly reducesthe computational cost induced by the projection opera-tions; however, it comes with an additional cost since itrequires optimization over the space of projectors.

• Due to their inherent non-linearity, the GSW and max-GSW distances are expected to capture the complex struc-ture of high-dimensional distributions by using much lessprojections, which will reduce the overall computationalburden in a significant amount. We verify this fact inour experiments, where we illustrate the superior perfor-mance of the proposed distances in both synthetic andreal-data settings.

2. BackgroundWe review in this section the preliminary concepts and for-mulations needed to develop our framework, namely thep-Wasserstein distance, the Radon transform, the sliced p-Wasserstein distance and the maximum sliced p-Wassersteindistance. In what follows, we denote by Pp(Ω) the set ofBorel probability measures with finite p’th moment definedon a given metric space (Ω, d) and by µ ∈ Pp(X) andν ∈ Pp(Y ) probability measures defined on X,Y ⊆ Ωwith corresponding probability density functions Iµ and Iν ,i.e. dµ(x) = Iµ(x)dx and dν(y) = Iν(y)dy.

2.1. Wasserstein Distance

The p-Wasserstein distance, p ∈ [1,∞), between µ and ν isdefined as the solution of the optimal mass transportationproblem (Villani, 2008):

Wp(µ, ν) =

(inf

γ∈Γ(µ,ν)

∫X×Y

dp(x, y)dγ(x, y)

) 1p

(1)

where dp(·, ·) is the cost function, and Γ(µ, ν) is the set ofall transportation plans γ ∈ Γ(µ, ν) such that:

γ(A× Y ) = µ(A) for any Borel subset A ⊆ Xγ(X ×B) = ν(B) for any Borel subset B ⊆ Y .

Due to Brenier’s theorem (Brenier, 1991), for absolutelycontinuous probability measures µ and ν (with respect tothe Lebesgue measure), the p-Wasserstein distance can beequivalently obtained from

Wp(µ, ν) =

(inf

f∈MP (µ,ν)

∫X

dp(x, f(x)

)dµ(x)

) 1p

(2)

where MP (µ, ν) = f : X → Y | f#µ = ν and f#µrepresents the pushforward of measure µ, characterized as∫A

df#µ(y) =

∫f−1(A)

dµ(x) for any Borel subset A ⊆ Y.

Note that in most engineering and computer science appli-cations, Ω is a compact subset of Rd and d(x, y) = |x− y|is the Euclidean distance. By abuse of notation, we will useWp(µ, ν) and Wp(Iµ, Iν) interchangeably.

One-dimensional distributions: The case of one-dimensional continuous probability measures is specificallyinteresting as the p-Wasserstein distance has a closed-formsolution. More precisely, for one-dimensional probabilitymeasures, there exists a unique monotonically increasingtransport map that pushes one measure to another. LetFµ(x) = µ((−∞, x]) =

∫ x−∞ Iµ(τ)dτ be the cumulative

distribution function (CDF) for Iµ and define Fν to be theCDF of Iν . The optimal transport map is then uniquelydefined as f(x) = F−1

ν (Fµ(x)) and, consequently, the p-Wasserstein distance has an analytical form given as follows:

Wp(µ, ν) =

(∫X

dp(x, F−1

ν (Fµ(x)))dµ(x)

) 1p

=

(∫ 1

0

dp(F−1µ (z), F−1

ν (z))dz

) 1p

(3)

where Eq. (3) results from the change of variable Fµ(x) = z.Note that for empirical distributions, Eq. (3) is calcu-lated by simply sorting the samples from the two distri-butions and calculating the average dp(·, ·) between the

Page 3: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

sorted samples. This requires only O(M) operations atbest and O(M logM) at worst, where M is the number ofsamples drawn from each distribution (see Kolouri et al.(2019) for more details). The closed-form solution of the p-Wasserstein distance for one-dimensional distributions is anattractive property that gives rise to the sliced-Wasserstein(SW) distance. Next, we review the Radon transform, whichenables the definition of the SW distance. We also formu-late an alternative OT distance called the maximum sliced-Wasserstein distance.

2.2. Radon Transform

The standard Radon transform, denoted byR, maps a func-tion I ∈ L1(Rd), where

L1(Rd) = I : Rd → R /

∫Rd|I(x)|dx <∞,

to the infinite set of its integrals over the hyperplanes of Rdand is defined as

RI(t, θ) =

∫RdI(x)δ(t− 〈x, θ〉)dx, (4)

for (t, θ) ∈ R × Sd−1, where Sd−1 ⊂ Rd stands for thed-dimensional unit sphere, δ(·) the one-dimensional Diracdelta function, and 〈·, ·〉 the Euclidean inner-product. Notethat R : L1(Rd) → L1(R × Sd−1). Each hyperplane canbe written as:

H(t, θ) = x ∈ Rd | 〈x, θ〉 = t, (5)

which alternatively can be interpreted as a level set of thefunction g ∈ Rd × Sd−1 → R defined as g(x, θ) = 〈x, θ〉.For a fixed θ, the integrals over all hyperplanes orthogonalto θ define a continuous functionRI(·, θ) : R→ R whichis a projection (or a slice) of I .

The Radon transform is a linear bijection (Natterer, 1986;Helgason, 2011) and its inverseR−1 is defined as:

I(x) = R−1(RI(t, θ)

)=

∫Sd−1

(RI(〈x, θ〉, θ) ∗ η(〈x, θ〉)dθ (6)

where η(·) is a one-dimensional high-pass filter with cor-responding Fourier transform Fη(ω) = c|ω|d−1, whichappears due to the Fourier slice theorem (Helgason, 2011),and ‘∗’ is the convolution operator. The above definition ofthe inverse Radon transform is also known as the filteredback-projection method, which is extensively used in imagereconstruction in the biomedical imaging community. Intu-itively each one-dimensional projection (or slice)RI(·, θ)is first filtered via a high-pass filter and then smeared backinto Rd along H(·, θ) to approximate I . The summation ofall smeared approximations then reconstructs I . Note that

in practice, acquiring an infinite number of projections isnot feasible, therefore the integration in the filtered back-projection formulation is replaced with a finite summationover projections (i.e., a Monte-Carlo approximation).

2.3. Sliced-Wasserstein and MaximumSliced-Wasserstein Distances

The idea behind the sliced p-Wasserstein distance is to first,obtain a family of one-dimensional representations for ahigher-dimensional probability distribution through linearprojections (via the Radon transform), and then, calculatethe distance between two input distributions as a functionalon the p-Wasserstein distance of their one-dimensional rep-resentations (i.e., the one-dimensional marginal distribu-tions). The sliced p-Wasserstein distance between Iµ andIν is then formally defined as:

SWp(Iµ, Iν) =

(∫Sd−1

W pp

(RIµ(., θ),RIν(., θ)

)dθ

) 1p

(7)

This is indeed a distance function as it satisfies positive-definiteness, symmetry and the triangle inequality (Bon-notte, 2013; Kolouri et al., 2016b).

The computation of the SW distance requires an integrationover the unit sphere in Rd. In practice, this integration isapproximated by using a simple Monte Carlo scheme thatdraws samples θl from the uniform distribution on Sd−1

and replaces the integral with a finite-sample average:

SWp(Iµ, Iν) ≈

(1

L

L∑l=1

W pp

(RIµ(·, θl),RIν(·, θl)

)) 1p

(8)

The sliced p-Wasserstein distance has important practicalimplications: provided that RIµ(·, θl) and RIν(·, θl) canbe computed for any sample θl, then the SW distance isobtained by solving several one-dimensional optimal trans-port problems, which have closed-form solutions. It is es-pecially useful when one only has access to samples of ahigh-dimensional PDF I and kernel density estimation isrequired to estimate I: one-dimensional kernel density esti-mation of PDF slices is a much simpler task compared to thedirect estimation of I from its samples. The downside is thatas the dimensionality grows, one requires a larger numberof projections to accurately estimate I from RI(·, θ). Inshort, if a reasonably smooth two-dimensional distributioncan be approximated using L projections, then O(Ld−1)projections are required to approximate a similarly smoothd-dimensional distribution for d ≥ 2.

To further clarify this, let Iµ = N (0, Id) and Iν =N (x0, Id), x0 ∈ Rd, be two multivariate Gaussian den-sities with the identity matrix as the covariance ma-

Page 4: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

trix. Their projected representations are one-dimensionalGaussian distributions of the form RIµ(·, θ) = N (0, 1)and RIµ(·, θ) = N (〈θ, x0〉, 1). It is therefore clearthat W2(RIµ(·, θ),RIν(·, θ)) achieves its maximum valuewhen θ = x0

‖x0‖2 and is zero for θ’s that are orthogonal to x0.On the other hand, we know that vectors that are randomlypicked from the unit sphere are more likely to be nearlyorthogonal in high-dimension. More rigorously, the follow-ing inequality holds: Pr(|〈θ, x0

‖x0‖2 〉| < ε) > 1 − e(−dε2),which implies that for a high dimension d, the majority ofsampled θ’s would be nearly orthogonal to x0 and therefore,W2(RIµ(·, θ),RIν(·, θ)) ≈ 0 with high probability.

To remedy this issue, one can avoid uniform sampling of theunit sphere, and pick samples θ’s that contain discriminantinformation between Iµ and Iν instead. This idea was forinstance used in Deshpande et al. (2018), where the authorsfirst calculate a linear discriminant subspace and then mea-sure the empirical SW distance by setting the θ’s to be thediscriminant components of the subspace.

A similarly flavored but less heuristic approach is to use themaximum sliced p-Wasserstein (max-SW) distance, whichis an alternative OT metric defined as:

max-SWp(Iµ, Iν) = maxθ∈Sd−1

Wp

(RIµ(·, θ),RIν(·, θ)

)(9)

Given that Wp is a distance, it is easy to show that max-SWp is also a distance: we will prove in Section 3.2 thatthe metric axioms hold for the maximum generalized sliced-Wasserstein distance, which contains the max-SW distanceas a special case.

3. Generalized Sliced-Wasserstein DistancesWe propose in this paper to extend the definition of thesliced-Wasserstein distance to formulate a new optimaltransport metric, which we call the generalized sliced-Wasserstein (GSW) distance. The GSW distance is obtainedusing the same procedure as for the SW distance, exceptthat here, the one-dimensional representations are acquiredthrough nonlinear projections. In this section, we first re-view the generalized Radon transform, which is used toproject the high-dimensional distributions, and we then for-mally define the class of GSW distances. We also extendthe concept of max-SW distance to the class of maximumgeneralized sliced-Wasserstein (max-GSW) distances.

3.1. Generalized Radon Transform

The generalized Radon transform (GRT) extends the orig-inal idea of the classical Radon transform introduced byRadon (1917) from integration over hyperplanes of Rd tointegration over hypersurfaces, i.e. (d − 1)-dimensionalmanifolds (Beylkin, 1984; Denisyuk, 1994; Ehrenpreis,

! !

"#(!, &')

!

Inputdistribution

#())

*(),&')

+(!, &')

"# !, & :Sliceswithrespecttodifferent* !, &+ !, & = ) * ), & = !

Figure 1. Visualizing the slicing process for classical and general-ized Radon transforms for the Half Moons distribution. The slicesGI(t, θ) follow Equation (10).

2003; Gel’fand et al., 1969; Kuchment, 2006; Homan &Zhou, 2017). The GRT has various applications, includ-ing Thermoacoustic Tomography, where the hypersurfacesare spheres, and Electrical Impedance Tomography, whichrequires integration over hyperbolic surfaces.

To formally define the GRT, we introduce a function g de-fined on X × (Rn\0) with X ⊂ Rd. We say that g is adefining function when it satisfies the four conditions below:H1. g is a real-valued C∞ function on X × (Rn\0)H2. g(x, θ) is homogeneous of degree one in θ, i.e.,

∀λ ∈ R, g(x, λθ) = λg(x, θ)

H3. g is non-degenerate in the sense that

∀(x, θ) ∈ X × Rn\0, ∂g∂x

(x, θ) 6= 0

H4. The mixed Hessian of g is strictly positive, i.e.

det

((∂2g

∂xi∂θj

)i,j

)> 0

Then, the GRT of I ∈ L1(Rd) is the integration of I overhypersurfaces characterized by the level sets of g, which arecharacterized by Ht,θ = x ∈ X | g(x, θ) = t.

Let g be a defining function. The generalized Radon trans-form of I , denoted by GI , is then formally defined as:

GI(t, θ) =

∫RdI(x)δ(t− g(x, θ))dx (10)

Page 5: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

Note that the standard Radon transform is a special case ofthe GRT with g(x, θ) = 〈x, θ〉. Figure 1 illustrates the slic-ing process for standard and generalized Radon transformsfor the Half Moons dataset as input.

3.2. Generalized Sliced-Wasserstein and MaximumGeneralized Sliced-Wasserstein Distances

Following the definition of the SW distance in Equation (7),we define the generalized sliced p-Wasserstein distance us-ing the generalized Radon transform as:

GSWp(Iµ, Iν) =

(∫Ωθ

W pp

(GIµ(·, θ),GIν(·, θ)

)dθ

) 1p

(11)where Ωθ is a compact set of feasible parameters for g(·, θ)(e.g., Ωθ = Sd−1 for g(·, θ) = 〈·, θ〉).

The GSW distance can also suffer from the projection com-plexity issue described in Section 2.3; that is why we formu-late the maximum generalized sliced p-Wasserstein distance,which generalizes the max-SW distance as defined in (9):

max-GSWp(Iµ, Iν) = maxθ∈Ωθ

Wp

(GIµ(·, θ),GIν(·, θ)

)(12)

Proposition 1. The generalized sliced p-Wasserstein dis-tance and the maximum generalized sliced p-Wassersteindistance are, indeed, distances over Pp(Ω) if and only if thegeneralized Radon transform is injective.

Proof. The non-negativity and symmetry are direct conse-quences of the fact that the Wasserstein distance is a metric(Villani, 2008): see supplementary material.

We prove the triangle inequality forGSWp and max-GSWp.Let µ1, µ2 and µ3 in Pp(Ω). Since the Wasserstein distancesatisfies the triangle inequality, we have, for all θ ∈ Ωθ,

Wp(GIµ1(·, θ),GIµ3

(·, θ)) ≤Wp(GIµ1(·, θ),GIµ2

(·, θ))+Wp(GIµ2

(·, θ),GIµ3(·, θ))

Therefore, we can write:

GSWp(Iµ1, Iµ3

) =

(∫Ωθ

W pp (GIµ1

(·, θ),GIµ3(·, θ))dθ

) 1p

≤(∫

Ωθ

(Wp(GIµ1

(·, θ),GIµ2(·, θ))

+ Wp(GIµ2(·, θ),GIµ3

(·, θ)))pdθ

) 1p

≤(∫

Ωθ

W pp (GIµ1

(·, θ),GIµ2(·, θ))dθ

) 1p

+

(∫Ωθ

W pp (GIµ2

(·, θ),GIµ3(·, θ))dθ

) 1p

(13)

where inequality (13) follows from the application of theMinkowski inequality in Lp(Ωθ). We conclude that GSWp

satisfies the triangle inequality.

Let θ∗ = arg maxθ∈ΩθWp(GIµ1

(·, θ),GIµ3(·, θ)); then,

max-GSWp(Iµ1 , Iµ3)

= maxθ∈Ωθ

Wp(GIµ1(·, θ),GIµ3(·, θ))

= Wp(GIµ1(·, θ∗),GIµ3

(·, θ∗))≤Wp(GIµ1

(·, θ∗),GIµ2(·, θ∗))

+Wp(GIµ2(·, θ∗),GIµ3

(·, θ∗))≤ maxθ∈Ωθ

Wp(GIµ1(·, θ),GIµ2

(·, θ))

+ maxθ∈Ωθ

Wp(GIµ2(·, θ),GIµ3(·, θ))

≤ max-GSWp(Iµ1, Iµ2

) + max-GSWp(Iµ2, Iµ3

)

So max-GSWp also satisfies the triangle inequality.

SinceWp(µ, µ) = 0 for any µ, we haveGSWp(Iµ, Iν) = 0and max-GSWp(Iµ, Iν) = 0. Now, GSWp(Iµ, Iν) = 0or max-GSWp(Iµ, Iν) = 0 is equivalent to GIµ(·, θ) =GIν(·, θ) for almost all θ ∈ Ωθ. Therefore, GSW and max-GSW are distances if and only if GIµ(·, θ) = GIν(·, θ)implies µ = ν, i.e. the GRT is injective.

Remark 1. If the chosen generalized Radon transformis not injective, then we can only say that the GSW andmax-GSW distances are pseudo-metrics: they still sat-isfy non-negativity, symmetry, the triangle inequality, andGSWp(Iµ, Iµ) = 0 and max-GSWp(Iµ, Iµ) = 0.

3.3. Injectivity of the Generalized Radon Transform

We have shown that the injectivity of the GRT is crucial forthe GSW and max-GSW distances to be, indeed, distancesbetween probability measures. Here, we enumerate some ofthe known defining functions that lead to injective GRTs.

The investigation of the sufficient and necessary conditionsfor showing the injectivity of GRTs is a long-standingtopic (Beylkin, 1984; Homan & Zhou, 2017; Uhlmann,2003; Ehrenpreis, 2003). The circular defining function,g(x, θ) = ‖x − r ∗ θ‖2 with r ∈ R+ and Ωθ = Sd−1 wasshown to provide an injective GRT (Kuchment, 2006). Moreinterestingly, homogeneous polynomials with an odd degreealso yield an injective GRT (Rouviere, 2015), i.e.

g(x, θ) =∑|α|=m

θαxα,

where we use the multi-index notation α =(α1, . . . , αdα) ∈ Ndα , |α| =

∑dαi=1 αi, and

xα =∏dαi=1 x

αii . Here, the summation iterates over

all possible multi-indices α, such that |α| = m, where mdenotes the degree of the polynomial and θα ∈ R. The

Page 6: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

Algorithm 1 GSW Distanceinput xi ∼ IµNi=1, yi ∼ IνNi=1, order p,

number of slices L, defining function gInitialize d = 0for l = 1 to L do

Sample θl from Ωθ uniformlyCompute xi = g(xi, θl) and yi = g(yi, θl) for each iSort xi and yj in ascending order s.t. xi[n] ≤ xi[n+1]

and yj[n] ≤ yj[n+1]

d = d+ 1L

∑Nn=1 |xi[n] − yi[n]|p

end foroutput d

1p ≈ GSWp(Iµ, Iν)

Algorithm 2 Max-GSW Distanceinput xi ∼ IµNi=1, yj ∼ IνNj=1,

order p, defining function g(x, θ)Randomly initialize θ ∈ Ωθwhile θ has not converged do

Compute xi = g(xi, θl) and yi = g(yi, θl) for each iSort xi and yj in ascending order s.t. xi[n] ≤ xi[n+1]

and yj[n] ≤ yj[n+1]

θ = ProjΩθ

(ADAM(∇θ( 1N

∑Nn=1 |xi[n]− yj[n]|p), θ))

end whileSort xi and yi in ascending orderd = 1

N

∑Nn=1 |xi[n] − yi[n]|p

output d1p ≈ max-GSWp(Iµ, Iν)

parameter set for homogeneous polynomials is then setto Ωθ = Sdα−1. We can observe that choosing m = 1reduces to the linear case 〈x, θ〉, since the set of themulti-indices with |α| = 1 becomes (α1, . . . , αd);αi =1 for a single i ∈ J1, dK, and αj = 0, ∀j 6= i andcontains d elements.

4. Numerical ImplementationIn this section, we briefly review the numerical methodsused to compute the GSW and max-GSW distances.

4.1. Generalized Radon Transforms of Empirical PDFs

In most machine learning applications, we do not have ac-cess to the distribution Iµ but to a set of samples xiNi=1

drawn from Iµ, for which the empirical density is:

Iµ(x) ≈ 1

N

N∑i=1

δ(x− xi)

The GRT of the empirical density is then given by:

GIµ(t, θ) ≈ 1

N

N∑i=1

δ(t− g(xi, θ)

)

Moreover, for high-dimensional problems, estimating Iµin Rd requires a large number of samples. However, theprojections of Iµ, GI(·, θ), are one-dimensional and it maynot be critical to have a large number of samples to estimatethese one-dimensional densities.

4.2. Numerical Implementation of GSW Distances

Let xiNi=1 and yjNj=1 be samples respectively drawnfrom Iµ and Iν , and let g(·, θ) be a defining function. Fol-lowing the work of Kolouri et al. (2019), the Wassersteindistance between one-dimensional distributions GIµ(·, θ)and GIν(·, θ) can be calculated from sorting their samplesand calculating the Lp distance between the sorted samples.In other words, the GSW distance between Iµ and Iν canbe approximated from their samples as follows:

GSWp(Iµ, Iν) ≈( 1

L

L∑l=1

N∑n=1

|g(xi[n], θl)−g(yj[n], θl)|p) 1p

where i[m] and j[n] are the indices of sorted g(xi, θ)Ni=1

and g(yj , θ)Nj=1. The procedure to approximate the GSWdistance is summarized in Algorithm 1.

4.3. Numerical Implementation of max-GSW Distances

To compute the max-GSW distance, we perform an EM-likeoptimization scheme: (a) for a fixed θ, g(xi, θ) and g(yi, θ)are sorted to compute Wp, (b) θ is updated with:

θ = ProjΩθ

(ADAM

(∇θ(

1

N

N∑n=1

|g(xi[n], θ)−g(yj[n], θ)|p), θ))

where ADAM refers to the ADAM optimizer (Kingma &Ba, 2014) and Proj

Ωθ

(·) is the operator projecting θ onto Ωθ.

For instance, when θ ∈ Sn−1, ProjΩθ

(θ) = θ‖θ‖ .

Remark 2. Here, we find the optimal θ by optimizing the ac-tualWp, as opposed to the heuristic approaches proposed inDeshpande et al. (2018) and Kolouri et al. (2019), where thepseudo-optimal slice is found via perceptrons or penalizedlinear discriminant analysis (Wang et al., 2011).

Finally, once convergence is reached, the max-GSW dis-tance is approximated with:

max-GSWp(Iµ, Iν) ≈( 1

N

N∑n=1

|g(xi[n], θ∗)−g(yj[n], θ

∗)|p) 1p

The whole procedure is summarized in Algorithm 2.

5. Experiments5.1. Generalized Sliced-Wasserstein Flows

Our first experiment demonstrates the effects of the choiceof the GSW distance in its purest form by considering the

Page 7: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

following problem: minµGSWp(µ, ν), where ν is a tar-get distribution and µ is the source distribution, which isinitialized to be the normal distribution. The optimization isthen solved iteratively via

∂tµt = −∇GSWp(µt, ν), µ0 = N (0, 1)

We used 5 well-known distributions as the target, namelythe 25-Gaussians, 8-Gaussians, Swiss Roll, Half Moonsand Circle distributions. We compare linear (i.e., SW dis-tance), circular, homogeneous polynomial of degree 3 andhomogeneous polynomial of degree 5 as defining functions.We used the exact same optimization scheme for all meth-ods, with L = 10 random projections, and measured the2-Wasserstein distance between µt and ν at each iterationof the optimization (via solving a linear programming ateach step). We repeated each experiment 100 times and re-ported the mean and standard deviation of the 2-Wassersteindistance for all five target datasets in Figure 2. While thechoice of the defining function g(·, θ) is data-dependent,one can see that the homogeneous polynomial of degree 3is among the top two performers for all datasets.

For clarity purposes, we chose to not report themax-GSWp results for the same experiment in Figure 2.These results are included in the supplementary material.

5.2. Generative Modeling via Auto-Encoders

We now demonstrate the application of the GSW and max-GSW distances in generative modeling. We specificallyuse the recently proposed Sliced-Wasserstein Auto-Encoder(SWAE) (Kolouri et al., 2019) framework, which penalizesthe distribution of the encoded data in the latent space ofthe auto-encoder to follow a prior samplable distribution,pZ . More precisely, let xn ∼ pXNn=1 be i.i.d. samplesfrom pX , φ(x, γφ) : X → Z and ψ(z, γψ) : Z → Xbe the parametric encoder and decoder (e.g., CNNs) withparameters γφ and γψ , respectively. Then SWAE’s objectivefunction (Kolouri et al., 2019) is defined as:

minγφ,γψ

Ex[c(x, ψ(φ(x, γφ), γψ))] + λSW (pφ(x,γφ), pZ)

(14)where λ is the regularizer coefficient for matching the en-coded distribution to pZ . Here, we substitute the SW dis-tance in Equation (14) with GSW and max-GSW distances.Specifically, we encode the MNIST dataset (LeCun et al.,1998) into the encoder’s latent space and enforce the dis-tribution of the embedded data to follow a specific priordistribution, e.g. the Swiss Roll distribution as shown in Fig-ure 3, while we simultaneously enforce the encoded featuresto be decodable to the original input images.

We ran the optimization in Equation (14) with GSW dis-tances, which we denote as GSWAE, with linear, circular,and homogeneous polynomial of degree 3. At each iteration,

Figure 2. Log 2-Wasserstein distance between the source and targetdistributions as a function of the number of iterations for 5 classicaltarget distributions.

we measured the 2-Wasserstein distance between the embed-ded distribution and the prior distribution,W2(pφ(x,γφ), pZ),and also between the input distribution and the distribu-tion of the reconstructed samples, W2(pψ(φ(x,γφ),γψ), pX).Each experiment was repeated 50 times and the average 2-Wasserstein distances are reported in Figure 4. The middlerow in Figure 4 shows samples from pZ and φ(x, γφ) forx ∼ pX , and the last row shows decoded random samples,ψ(z, γψ) for z ∼ pZ . Similar to the previous experiment,we see that the GSWAE with a polynomial defining function,captures the nonlinear geometry of the input samples better.

We also compare the performance of GSWAE and Max-

Page 8: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

Figure 3. The SWAE architecture. The embedded data in the latentspace is enforced to follow a prior samplable distribution pZ .

GSWAE with those of SWAE and WAE-GAN (Tolstikhinet al., 2018). In particular, we use the improved Wasserstein-GAN (Gulrajani et al., 2017), which is among the state-of-the-art adversarial training methods, in the embeddingspace of the Wasserstein auto-encoder (Tolstikhin et al.,2018). The adversary was chosen to be a multi-layer per-ceptron. Similar to the previous experiments, we measuredthe 2-Wasserstein distance between the input and outputdistributions as well as the latent and prior distributions.Each experiment was repeated 10 times, and the average2-Wasserstein distances are reported in Figure 5. It can beseen that, while WAE-GAN provides a better matching ofdistributions in the latent space, the results of max-GSWAEdistances are on par with the WAE-GAN. In addition, bycomparing the distance between input and output distri-butions of the auto-encoder, it seems that max-GSWAEprovides a better objective function to train such networks.

6. ConclusionWe introduced a new family of optimal transport metrics forprobability measures that generalizes the sliced-Wassersteindistance: while the latter is based on linear slicing of dis-tributions, we propose to perform nonlinear slicing. Weprovided theoretical conditions that yield the generalizedsliced-Wasserstein distance to be, indeed, a distance func-tion, and we empirically demonstrated the superior per-formance of the GSW and max-GSW distances over theclassical sliced-Wasserstein distance in various generativemodeling applications. As future work, we plan to studythe existing connection between adversarial training andmax-GSW distances by showing the defining function forGRTs can be approximated with neural networks.

7. AcknowledgementThis work was partially supported by the United States AirForce and DARPA under Contract No. FA8750-18-C-0103.Any opinions, findings and conclusions or recommendationsexpressed in this material are those of the author(s) and donot necessarily reflect the views of the United States AirForce and DARPA.

Figure 4. 2-Wasserstein distance between pZ and pφ(x,γφ) andbetween pX and pψ(φ(x,γφ),γψ) at different batch iterations forSWAE and GSWAE with circular and polynomial of degree 3defining functions.

Figure 5. The 2-Wasserstein distance between pZ and pφ(x,γφ) andbetween pX and pψ(φ(x,γφ),γψ) at different batch iterations forSWAE and WAE-GAN compared to GSWAE and Max-GSWAEwith circular and polynomial of degree 3 defining functions.

Page 9: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

ReferencesArjovsky, M., Chintala, S., and Bottou, L. Wasserstein

GAN. arXiv preprint arXiv:1701.07875, 2017.

Beylkin, G. The inversion problem and applications of thegeneralized Radon transform. Communications on pureand applied mathematics, 37(5):579–599, 1984.

Bonneel, N., Rabin, J., Peyre, G., and Pfister, H. Sliced andRadon Wasserstein barycenters of measures. Journal ofMathematical Imaging and Vision, 51(1):22–45, 2015.

Bonnotte, N. Unidimensional and evolution methods foroptimal transportation. PhD thesis, Universite Paris 11,France, 2013.

Bousquet, O., Gelly, S., Tolstikhin, I., Simon-Gabriel, C.-J.,and Schoelkopf, B. From optimal transport to genera-tive modeling: the VEGAN cookbook. arXiv preprintarXiv:1705.07642, 2017.

Brenier, Y. Polar factorization and monotone rearrangementof vector-valued functions. Communications on pure andapplied mathematics, 44(4):375–417, 1991.

Carriere, M., Cuturi, M., and Oudot, S. Sliced Wassersteinkernel for persistence diagrams. In ICML 2017-Thirty-fourth International Conference on Machine Learning,pp. 1–10, 2017.

Courty, N., Flamary, R., Tuia, D., and Rakotomamonjy, A.Optimal transport for domain adaptation. IEEE transac-tions on pattern analysis and machine intelligence, 39(9):1853–1865, 2017.

Cuturi, M. Sinkhorn distances: Lightspeed computationof optimal transport. In Advances in Neural InformationProcessing Systems, pp. 2292–2300, 2013.

Cuturi, M. and Peyre, G. A smoothed dual approach forvariational Wasserstein problems. SIAM Journal on Imag-ing Sciences, December 2015. URL https://hal.archives-ouvertes.fr/hal-01188954.

Denisyuk, A. Inversion of the generalized Radon trans-form. Translations of the American Mathematical Society-Series 2, 162:19–32, 1994.

Deshpande, I., Zhang, Z., and Schwing, A. Generativemodeling using the sliced Wasserstein distance. In Pro-ceedings of the IEEE Conference on Computer Visionand Pattern Recognition, pp. 3483–3491, 2018.

Ehrenpreis, L. The universality of the Radon transform.Oxford University Press on Demand, 2003.

Frogner, C., Zhang, C., Mobahi, H., Araya, M., and Poggio,T. A. Learning with a Wasserstein loss. In Advances inNeural Information Processing Systems, pp. 2053–2061,2015.

Gel’fand, I. M., Graev, M. I., and Shapiro, Z. Y. Differentialforms and integral geometry. Functional Analysis and itsApplications, 3(2):101–114, 1969.

Gulrajani, I., Ahmed, F., Arjovsky, M., Dumoulin, V., andCourville, A. C. Improved training of Wasserstein GANs.In Advances in Neural Information Processing Systems,pp. 5767–5777, 2017.

Helgason, S. The Radon transform on Rn. In IntegralGeometry and Radon Transforms, pp. 1–62. Springer,2011.

Homan, A. and Zhou, H. Injectivity and stability for ageneric class of generalized Radon transforms. The Jour-nal of Geometric Analysis, 27(2):1515–1529, 2017.

Karras, T., Aila, T., Laine, S., and Lehtinen, J. Progressivegrowing of GANs for improved quality, stability, andvariation. arXiv preprint arXiv:1710.10196, 2017.

Kingma, D. P. and Ba, J. Adam: A method for stochasticoptimization. arXiv preprint arXiv:1412.6980, 2014.

Kitagawa, J., Merigot, Q., and Thibert, B. Convergence ofa Newton algorithm for semi-discrete optimal transport.arXiv preprint arXiv:1603.05579, 2016.

Kolouri, S., Tosun, A. B., Ozolek, J. A., and Rohde, G. K. Acontinuous linear optimal transport approach for patternanalysis in image datasets. Pattern recognition, 51:453–462, 2016a.

Kolouri, S., Zou, Y., and Rohde, G. K. Sliced-Wassersteinkernels for probability distributions. In Proceedings ofthe IEEE Conference on Computer Vision and PatternRecognition, pp. 4876–4884, 2016b.

Kolouri, S., Park, S. R., Thorpe, M., Slepcev, D., and Rohde,G. K. Optimal mass transport: Signal processing andmachine-learning applications. IEEE Signal ProcessingMagazine, 34(4):43–59, 2017.

Kolouri, S., Rohde, G. K., and Hoffmann, H. Sliced Wasser-stein distance for learning gaussian mixture models. InThe IEEE Conference on Computer Vision and PatternRecognition (CVPR), June 2018.

Kolouri, S., Pope, P. E., Martin, C. E., and Rohde,G. K. Sliced Wasserstein auto-encoders. In In-ternational Conference on Learning Representations,2019. URL https://openreview.net/forum?id=H1xaJn05FQ.

Page 10: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

Kuchment, P. Generalized transforms of Radon type andtheir applications. In Proceedings of Symposia in AppliedMathematics, volume 63, pp. 67, 2006.

LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradient-based learning applied to document recognition. Proceed-ings of the IEEE, 86(11):2278–2324, 1998.

Levy, B. A numerical algorithm for L2 semi-discreteoptimal transport in 3D. ESAIM Math. Model. Nu-mer. Anal., 49(6):1693–1715, 2015. ISSN 0764-583X.doi: 10.1051/m2an/2015055. URL http://dx.doi.org/10.1051/m2an/2015055.

Montavon, G., Muller, K.-R., and Cuturi, M. Wassersteintraining of restricted Boltzmann machines. In Advances inNeural Information Processing Systems, pp. 3718–3726,2016.

Natterer, F. The mathematics of computerized tomography,volume 32. SIAM, 1986.

Oberman, A. M. and Ruan, Y. An efficient linear program-ming method for optimal transportation. arXiv preprintarXiv:1509.03668, 2015.

Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E.,DeVito, Z., Lin, Z., Desmaison, A., Antiga, L., and Lerer,A. Automatic differentiation in pytorch. In NIPS-W,2017.

Peyre, G. and Cuturi, M. Computational optimal transport.arXiv preprint arXiv:1803.00567, 2018.

Radon, J. Uber die bestimmug von funktionen durch ihre in-tegralwerte laengs geweisser mannigfaltigkeiten. BerichteSaechsishe Acad. Wissenschaft. Math. Phys., Klass, 69:262, 1917.

Rouviere, F. Nonlinear Radon and Fourier Trans-forms. https://math.unice.fr/˜frou/recherche/Nonlinear%20RadonW.pdf, 2015.

Schmitz, M. A., Heitz, M., Bonneel, N., Ngole, F., Coeur-jolly, D., Cuturi, M., Peyre, G., and Starck, J.-L. Wasser-stein dictionary learning: Optimal transport-based unsu-pervised nonlinear dictionary learning. SIAM Journal onImaging Sciences, 11(1):643–678, 2018.

Schmitzer, B. A sparse multiscale algorithm for denseoptimal transport. Journal of Mathematical Imagingand Vision, 56(2):238–259, Oct 2016. ISSN 1573-7683. doi: 10.1007/s10851-016-0653-9. URL https://doi.org/10.1007/s10851-016-0653-9.

Simsekli, U., Liutkus, A., Majewski, S., and Durmus,A. Sliced-Wasserstein flows: Nonparametric generativemodeling via optimal transport and diffusions. arXivpreprint arXiv:1806.08141, 2018.

Solomon, J., Rustamov, R., Guibas, L., and Butscher, A.Wasserstein propagation for semi-supervised learning. InInternational Conference on Machine Learning, pp. 306–314, 2014.

Solomon, J., De Goes, F., Peyre, G., Cuturi, M., Butscher,A., Nguyen, A., Du, T., and Guibas, L. ConvolutionalWasserstein distances: Efficient optimal transportationon geometric domains. ACM Transactions on Graphics(TOG), 34(4):66, 2015.

Tolstikhin, I., Bousquet, O., Gelly, S., and Schoelkopf, B.Wasserstein auto-encoders. In International Conferenceon Learning Representations, 2018. URL https://openreview.net/forum?id=HkL7n1-0b.

Uhlmann, G. Inside out: inverse problems and applications,volume 47. Cambridge University Press, 2003.

Villani, C. Optimal transport: old and new, volume 338.Springer Science & Business Media, 2008.

Wang, W., Mo, Y., Ozolek, J. A., and Rohde, G. K. Penal-ized Fisher discriminant analysis and its application toimage-based morphometry. Pattern recognition letters,32(15):2128–2135, 2011.

Wang, W., Slepcev, D., Basu, S., Ozolek, J. A., and Rohde,G. K. A linear optimal transportation framework forquantifying and visualizing variations in sets of images.International journal of computer vision, 101(2):254–269, 2013.

Page 11: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

8. Supplementary material

9. Non-negativity and Symmetry of the GSWand max-GSW Distances

We prove that the GSW and max-GSW distances satisfynon-negativity and symmetry, using the fact that the p-Wasserstein distance is known to be a proper distance func-tion (Villani, 2008). Let µ and ν be in Pp(Ω).

9.1. Non-negativity

We use the non-negativity of the p-Wasserstein distance, i.e.Wp(µ, ν) ≥ 0 for any µ, ν in Pp(Ω), to show that the GSWand max-GSW distances are non-negative as well:

GSWp(Iµ, Iν) =

(∫Ωθ

W pp

(GIµ(., θ),GIν(., θ)

)dθ

) 1p

≥(∫

Ωθ

(0)pdθ

) 1p

= 0

max-GSWp(Iµ, Iν) = maxθ∈Ωθ

Wp

(GIµ(·, θ),GIν(·, θ)

)= Wp

(GIµ(·, θ∗),GIν(·, θ∗)

)≥ 0

where θ∗ = arg maxθ∈ΩθWp(GIµ(·, θ),GIν(·, θ)).

9.2. Symmetry

Since the p-Wasserstein distance is symmetric, we haveWp(µ, ν) = Wp(ν, µ). In particular, we can write for allθ ∈ Ωθ:

Wp(GIµ(·, θ),GIν(·, θ)) = Wp(GIν(·, θ),GIµ(·, θ))(15)

and,

maxθ∈Ωθ

Wp(GIµ(·, θ),GIν(·, θ)) = maxθ∈Ωθ

Wp(GIν(·, θ),GIµ(·, θ))(16)

The symmetry of the GSW and max-GSW distances followsfrom Equations (15) and (16) respectively.

10. Additional Experimental ResultsWe include the results of maximum generalized sliced-Wasserstein flows on the five datasets used in the mainpaper, to accompany Figure 4 of our main paper: see Figure6. It can be seen that the max-GSW distances, in the ma-jority of cases, improve the performance of GSW. Here itshould be noted that GSW distances are calculated based on10 random projections, while max-GSW distances use onlyone projection by definition.

Figure 6. Log 2-Wasserstein distance between the source and targetdistributions as a function of the number of iterations for 5 classicaltarget distributions using GSW and max-GSW distances.

11. Implementation DetailsThe PyTorch (Paszke et al., 2017) implementation of ourpaper will be available here1. Here we clarify some of theimplementation details used in our paper. First, the ‘criticiteration’ for the adversarial training, and the projectionmaximization for the max-GSW distances, were set to beequal to 50. For all optimizations, we used ADAM (Kingma& Ba, 2014) optimizer with learning rate lr = 0.001 andPyTorch’s default momentum parameters.

We used 3 × 3 convolutional filters in both encoder and1https://github.com/.../GSW/

Page 12: Generalized Sliced Wasserstein Distances · Generalized Sliced Wasserstein Distances Soheil Kolouri1 Kimia Nadjahi 2Umut S¸ims¸ekli Roland Badeau2 Gustavo K. Rohde3 Abstract The

Generalized Sliced Wasserstein Distances

decoder architectures. Encoder architecture:

x ∈ R28×28 → Conv16 → LeakyReLU0.2

→ Conv16 → LeakyReLU0.2

→ AvgPool2

→ Conv32 → LeakyReLU0.2

→ Conv32 → LeakyReLU0.2

→ AvgPool2

→ Conv64 → LeakyReLU0.2

→ Conv64 → LeakyReLU0.2

→ AvgPool2 → Flatten

→ FC128 → LeakyReLU0.2

→ FC2

Decoder architecture:

z ∈ R2 → FC128 → LeakyReLU0.2

→ FC1024 → LeakyReLU0.2

→ Reshape(4× 4× 64)→ Upsample2

→ Conv64 → LeakyReLU0.2

→ Conv64 → LeakyReLU0.2

→ Upsample2

→ Conv32 → LeakyReLU0.2

→ Conv32 → LeakyReLU0.2

→ Upsample2

→ Conv16 → LeakyReLU0.2

→ Conv1

The WGAN in WAE-GAN uses an adversary network. Ad-versary’s architecture:

z ∈ R2 → FC500 → ReLU

→ FC500 → ReLU

→ FC500 → ReLU

→ FC1 → ReLU