Markovian Sliced Wasserstein Distances: Beyond Independent Projections
Abstract
Sliced Wasserstein (SW) distance suffers from redundant projections due to independent uniform random projecting directions. To partially overcome the issue, max K sliced Wasserstein (Max-K-SW) distance (), seeks the best discriminative orthogonal projecting directions. Despite being able to reduce the number of projections, the metricity of the Max-K-SW cannot be guaranteed in practice due to the non-optimality of the optimization. Moreover, the orthogonality constraint is also computationally expensive and might not be effective. To address the problem, we introduce a new family of SW distances, named Markovian sliced Wasserstein (MSW) distance, which imposes a first-order Markov structure on projecting directions. We discuss various members of the MSW by specifying the Markov structure including the prior distribution, the transition distribution, and the burning and thinning technique. Moreover, we investigate the theoretical properties of MSW including topological properties (metricity, weak convergence, and connection to other distances), statistical properties (sample complexity, and Monte Carlo estimation error), and computational properties (computational complexity and memory complexity). Finally, we compare MSW distances with previous SW variants in various applications such as gradient flows, color transfer, and deep generative modeling to demonstrate the favorable performance of the MSW111Code for this paper is published at https://github.com/UT-Austin-Data-Science-Group/MSW..
1 Introduction
Sliced Wasserstein (SW) [7] distance has been well-known as a great alternative statistical distance for Wasserstein distance [57, 49]. In short, SW takes the average of Wasserstein distances between corresponding pairs of one-dimensional projected measures as the distance between the two original measures. Hence, the SW has a low computational complexity compared to the conventional Wasserstein distance due to the closed-form solution of optimal transport in one dimension. When the probability measures have at most supports, the computational complexity of the SW is only . This complexity is much lower than the computational complexity of Wasserstein distance and the complexity [1, 34, 35, 33] of entropic Wasserstein [11] (Sinkhorn divergence). Moreover, the memory complexity of the SW is which is lower than of the Wasserstein (Sinkhorn) distance. The reason is that SW does not need to store the cost matrix between supports which cost . An additional appealing property of the SW is that it does not suffer from the curse of dimensionality, namely, its sample complexity is [40, 46] compared to [19] of the Wasserstein distance ( is the number of dimensions).
Due to the scalability, the SW has been applied to almost all applications where the Wasserstein distance is used. For example, we refer to some applications of the SW which are generative modeling [60, 15, 27, 42], domain adaptation [30], clustering [28], approximate Bayesian computation [39], gradient flows [37, 5], and variational inference [61]. Moreover, there are many attempts to improve the SW. The generalized sliced Wasserstein (GSW) distance that uses non-linear projection is proposed in [26]. Distributional sliced Wasserstein distance is proposed in [44, 45] by replacing the uniform distribution on the projecting directions in SW with an estimated distribution that puts high probabilities for discriminative directions. Spherical sliced Wasserstein which is defined between distributions that have their supports on the hyper-sphere is introduced in [4]. A sliced Wasserstein variant between probability measures over images with convolution is defined in [43].
Despite having a lot of improvements, one common property in previous variants of the SW is that they use independent projecting directions that are sampled from a distribution over a space of projecting direction e.g., the unit-hypersphere. Those projecting directions are further utilized to project two interested measures to corresponding pairs of one-dimensional measures. Due to the independence, practitioners have reported that many projections do not have the power to discriminative between two input probability measures [26, 15]. Moreover, having a lot of projections leads to redundancy and losing computation for uninformative pairs of projected measures. This problem is known as the projection complexity limitation of the SW.
To partially address the issue, the max sliced Wasserstein (Max-SW) distance is introduced in [14]. Max-SW seeks the best projecting direction that can maximize the projected Wasserstein distance. Since the Max-SW contains a constraint optimization problem, the projected subgradient ascent algorithm is performed. Since the algorithm only guarantees to obtain local maximum [46], the performance of empirical estimation Max-SW is not stable in practice [42] since the metricity of Max-SW can be only obtained at the global optimum. Another approach is to force the orthogonality between projecting directions. In particular, K-sliced Wasserstein [50] (K-SW) uses orthogonal projecting directions. Moreover, to generalize the Max-SW and the K-SW, max-K sliced Wasserstein (Max-K-SW) distance () appears in [12] to find the best projecting directions that are orthogonal to each other via the projected sub-gradient ascent algorithm. Nevertheless, the orthogonality constraint is computationally expensive and might not be good in terms of reflecting discrepancy between general measures. Moreover, Max-K-SW also suffers from the non-optimality problem which leads to losing the metricity property in practice.
To avoid the independency and to satisfy the requirement of creating informative projecting directions efficiently, we propose to impose a sequential structure on projecting directions. Namely, we choose a new projecting direction based on the previously chosen directions. For having more efficiency in computation, we consider first-order Markovian structure in the paper which means that a projecting direction can be sampled by using only the previous direction. For the first projecting direction, it can follow any types of distributions on the unit-hypersphere that were used in the literature e.g., uniform distribution [7] and von Mises-Fisher distribution [23, 45] to guarantee the metricity. For the transition distribution on the second projecting direction and later, we propose two types of family which are orthogonal-based transition and input-awared transition. For the orthogonal-based transition, we choose the projecting direction uniformly on the unit hypersphere such that it is orthogonal to the previous direction. In contrast to the previous transition which does not use the information from the two input measures, the input-awared transition uses the sub-gradient with respect to the previous projecting direction of the corresponding projected Wasserstein distance between the two measures to design the transition. In particular, the projected sub-gradient update is used to create the new projecting direction. Moreover, we further improve the computational time and computational memory by introducing the burning and thinning technique to reduce the number of random projecting directions.
Contribution. In summary, our contributions are two-fold:
-
1.
We propose a novel family of distances on the space of probability measures, named Markovian sliced Wasserstein (MSW) distances. MSW considers a first-order Markovian structure on random projecting directions. Moreover, we derive three variants of MSW that use two different types of conditional transition distributions: orthogonal-based and input-awared. We investigate the theoretical properties of MSW including topological properties (metricity, weak convergence, and connection to other distances), statistical properties (sample complexity, and Monte Carlo estimation error), and computational properties (computational complexity and memory complexity). Moreover, we introduce a burning and thinning approach to further reduce computational and memory complexity, and we discuss the properties of the resulting distances.
-
2.
We conduct experiments to compare MSW with SW, Max-SW, K-SW, and Max-K-SW in various applications, namely, gradient flows, color transfer, and deep generative models on standard image datasets: CIFAR10 and CelebA. We show that the input-awared MSW can yield better qualitative and quantitative performance while consuming less computation than previous distances in gradient flows and color transfer, and comparable computation in deep generative modeling. Finally, we investigate the role of hyper-parameters of distances e.g., the number of projections, the number of time-steps, and so on, in applications.
Organization. We first provide background for Wasserstein distance, sliced Wasserstein distance, and max sliced Wasserstein distance in Section 2. In Section 3, we propose Markovian sliced Wasserstein distances and derive their theoretical properties. Section 4 contains the comparison of MSW to previous SW variants in gradient flows, color transfer, and deep generative modeling. We then conclude the paper in Section 5. Finally, we defer the proofs of key results in the paper and supplementary materials to Appendices.
Notation. For , is the set of all probability measures on that have finite -moments. For any , we denote is the uniform measure over the unit hyper-sphere . For any two sequences and , the notation means that for all , where is some universal constant. We denote is the push-forward measures of through the function that is .
2 Background
We start with reviewing the background on Wasserstein distance, sliced Wasserstein distances, their computation techniques, and their limitations.
Wasserstein distance. Given two probability measures and , the Wasserstein distance [57, 48] between and is :
(1) |
where is set of all couplings that have marginals are and respectively. The computational complexity and memory complexity of Wasserstein distance are and in turn when and have at most supports. When , the Wasserstein distance can be computed with a closed form: where and are the cumulative distribution function (CDF) of and respectively.
Sliced Wasserstein distance. By randomly projecting two interested high-dimensional measures to corresponding pairs of one-dimensional measures, sliced Wasserstein (SW) distance can exploit the closed-form benefit of Wasserstein distance in one dimension. The definition of sliced Wasserstein distance [7] between two probability measures and is:
(2) |
Monte Carlo samples are often used to approximate the intractable expectation unbiasedly:
(3) |
where are drawn randomly from . When and are discrete measures that have at most supports in dimension, the computational complexity of SW is and the memory complexity for storing the projecting directions and the projected supports is . Here, is for sorting sets of projected supports and is for projecting supports to sets of scalars.
Max sliced Wasserstein distance. To select the best discriminative projecting direction, the max sliced Wasserstein (Max-SW) distance [14] between and is introduced as follows:
(4) |
Computing Max-SW requires solving the constrained optimization problem. In practice, the projected sub-gradient ascent algorithm with iterations is often used to obtain a surrogate projecting direction for the global optimum. Hence, the empirical Max-SW distance is . The detail of the projected sub-gradient ascent algorithm is given in Algorithm 1 in Appendix A.1. The computational complexity of Max-SW is and the memory complexity of Max-SW is . It is worth noting that the projected sub-gradient ascent can only yield local maximum [46]. Therefore, the empirical Max-SW might not be distance even when since the metricity of Max-SW can be only obtained at the global maximum.
K-sliced Wasserstein distance. The authors in [50] propose to estimate the sliced Wasserstein distance based on orthogonal projecting directions. We refer to the distance as K-sliced Wasserstein distance (K-SW). The definition of K-SW between two probability measures and is:
(5) |
where the expectation is with respect to with is the Stiefel manifold. The expectation can be approximated with Monte Carlo samples from . In the original paper, is set to 1. To sample from the uniform distribution over the Stiefel manifold , it requires using the Gram-Schmidt orthogonality process which has the computational complexity (quadratic in ). Therefore, the total computational complexity of K-SW is and the memory complexity of K-SW is . More detail related to K-SW including Gram-Smith process and sampling uniformly from the Stiefel manifold is given in Appendix A.1.
Max K sliced Wasserstein distance. To generalize both Max-SW and K-SW, Max K sliced Wasserstein is introduced in [12]. Its definition between and is:
(6) |
Similar to Max-SW, a projected sub-gradient ascent algorithm with iterations is used to approximate Max-K-SW. We refer the reader to Algorithm 4 in Appendix A.1 for greater detail. Since the projecting operator to the Stiefel manifold is the Gram-Smith process, the computational complexity of Max-K-SW is . The memory complexity of Max-K-SW is . Similar to Max-SW, the metricity of Max-K-SW is only obtained at the global optimum, hence, the empirical estimation might not be stable. Moreover, the orthogonality constraint is also computationally expensive i.e., quadratic in terms of the number of orthogonal projections .
3 Markovian Sliced Wasserstein distances
We first define Markovian sliced Wasserstein (MSW) distance and discuss its theoretical properties including topological properties, statistical properties, and computational properties in Section 3.1. In Section 3.2, we discuss some choices in designing the Markov chain including the prior distribution and the transition distribution. Finally, we discuss the burning and thinning variant of MSW which can reduce the computational and memory complexity in Section 3.3.
3.1 Definitions, Topological, Statistical, and Computational Properties
We first start with a general definition of Markovian sliced Wasserstein distance in Definition 1.
Definition 1.
For any , , and dimension , the Markovian sliced Wasserstein of order between two probability measures and is:
(7) |
where is the number of time steps, the expectation is under the projecting distribution with , and for all .
The first projecting direction follows the distribution with to be any distributions on the unit hyper-sphere, e.g., the uniform distribution, a von Mises-Fisher distribution, and so on. By designing the transition distribution , we can obtain various variants of MSW. It is worth noting that the MSW can be rewritten as the average of expectation of one-dimensional Wasserstein distance, , however, are not the same for . Moreover, sampling directly from is intractable, hence, using the definition of the MSW in Definition 1 is more reasonable in terms of approximating the expectation using Monte Carlo samples.
Monte Carlo estimation. Similar to SW, we also need to use Monte Carlo samples to approximate the expectation in Definition 1. We first samples for , then we samples for and . After that, we can form an unbiased empirical estimation of MSW as follows:
Before going to the specific design of those distributions, we first discuss the empirical estimation of MSW, and investigate its theoretical properties including topological properties, statistical properties, and computational properties.
Topological Properties. We first state the following assumption: A1. In MSW, the prior distribution is supported on all the unit-hypersphere or there exists a transition distribution being supported on all the unit-hypersphere. The assumption A1 is easy to satisfy and it holds for all later choices of the prior distribution and transition distribution. We now consider the metricity properties of the Markovian sliced Wasserstein distance.
Theorem 1 (Metricity).
For any , , and dimension , if A1 holds, Markovian sliced Wasserstein is a valid metric on the space of probability measures , namely, it satisfies the (i) non-negativity, (ii) symmetry, (iii) triangle inequality, and (iv) identity.
The proof of Theorem 1 is in Appendix B.1. Next, we show that the convergence in MSW implies the weak convergence of probability measures and the reverse also holds.
Theorem 2 (Weak Convergence).
For any , , and dimension , if A1 holds, the convergence of probability measures in under the Markovian sliced Wasserstein distance implies weak convergence of probability measures and vice versa.
Theorem 2 means that for any sequence of probability measures and in , if and only if for any continuous and bounded function , . The proof of Theorem 2 is in Appendix B.2. Next, we discuss the connection of MSW to previous sliced Wasserstein variants.
Proposition 1.
For any and dimension ,
(i) For any and , .
(ii) If and the prior , .
Statistical Properties. We investigate the sample complexity (empirical estimation rate) of the MSW.
Proposition 2 (Sample Complexity).
Let be i.i.d. samples from the probability measure being supported on compact set of . We denote the empirical measure . Then, for any and , there exists a universal constant such that where the outer expectation is taken with respect to the data .
The proof of Proposition 2 is in Appendix B.4. The proposition suggests that MSW does not suffer from the curse of dimensionality. Next, we investigate the MSW’s Monte Carlo approximation error.
Proposition 3 (Monte Carlo error).
For any , , dimension , and , we have: where the variance is with respect to .
The proof of Proposition 3 is in Appendix B.5. From the above proposition, we know that increasing the number of projections reduces the approximation error.
Computational Properties. When and are two discrete probability measures in that have at most supports, the computational complexity for the Monte Carlo approximation of MSW is where is for computation of one-dimensional Wasserstein distances and is the projecting complexity for projections from dimension to dimension. The memory complexity of MSW is for storing the projecting directions and the projections.
3.2 Specific Choices of Projecting Distributions
Designing the projecting distribution is the central task in using MSW since it controls the projecting behavior. For each choice of the , we obtain a variant of MSW. Since we impose the first order Markov structure , there are two types of distributions that we need to choose: the prior distribution and the transition distribution for all .
Prior distribution. The most simple choice of when we know nothing about probability measures that we want to compare is the uniform distribution over the unit hypersphere . Moreover, the metricity of MSW is guaranteed regardless of the transition distribution with this choice. Therefore, the uniform distribution is the choice that we use in our experiments in the paper. It is worth noting that we could also use a distribution that is estimated from two interested probability measures [44]; however, this approach costs more computation.
Transition distribution. We discuss some specific choices of the transition distributions . Detailed algorithms for computing MSW with specific transitions are given in Appendix A.3.
Orthogonal-based transition. Motivated by the orthogonality constraint in Max-K-SW and K-SW, we can design a transition distribution that gives us an orthogonal projecting direction to the previous one. In particular, given a previous projecting direction , we want to have such that , namely, we want to sample from the subsphere . To the best of our knowledge, there is no explicit form of distribution (known pdf) that is defined on that set. However, we can still sample from the uniform distribution over that set: since that distribution can be constructed by pushing the uniform distribution over the whole unit hypersphere through the projection operator: where is the normalizing operator. In a greater detail, we first sample and then set . Therefore, we have .
Input-awared transition. The above two transition distributions do not take into account the information of the two probability measures and that we want to compare. Hence, it could be inefficient to explore good projecting directions by comparing and . Motivated by the projected sub-gradient ascent [9] update in finding the “max" projecting direction, we could design the transition distribution as follows: where denotes the Dirac Delta function and the transition function with is the stepsize hyperparameter. As the current choice is a deterministic transition, it requires the prior distribution to have supports on all to obtain the metricity for MSW. A choice to guarantee the metricity regardless of the prior distribution is the von Mises-Fisher (vMF) distribution [23], namely, . The details about the vMF distribution including its probability density function, its sampling procedure, and its properties are given in Appendix A.2. In summary, the vMF distribution has two parameters: the location parameter which is the mean, and the concentration parameter which plays the role as the precision. Thank the interpolation properties of the vMF distribution: and , the transition distribution can balance between heading to the “max" projecting direction and exploring the space of directions.
Stationarity of . A natural important question arises: what is the distribution of when ? The answer to the above questions depends on the choice of the projection distribution which is discussed in Section 3.2. For the Orthogonal-based transitions and the uniform distribution prior, it is unclear whether the stationary distribution exists. For the deterministic Input-awared transition and the uniform prior, we have with where () are local maximas of the optimization problem and some unknown weights that depend on and . This property is due to the fact that the projected sub-gradient ascent can guarantee local maxima convergence [46]. For the Input-awared vMF transition, it is also unclear if the stationary distribution exists when the parameter .
3.3 Burning and Thinning
In the definition of MSW in Definition 1, we take the expectation on the joint distribution over all timesteps which leads to the time and memory complexities to be linear with in the Monte Carlo approximation. Therefore, we can adapt the practical technique from MCMC methods which is burning and thinning to reduce the number of random variables while still having the dependency.
Definition 2.
For any , , dimension , the number of burned steps , and the number of thinned steps , the burned thinned Markovian sliced Wasserstein of order between two probability measures and is:
(8) |
where the expectation is under the projection distribution with being the marginal distribution which is obtained by integrating out random projecting directions at the time step such that or from for all .
Similar to MSW, the burned-thinned MSW is also a metric on when there exists a time step that is not burned, is not thinned, and is a random variable that has the supports on all . We discuss more details about the burned-thinned MSW including its topological and statistical properties in Appendix A.4. The Monte Carlo estimation of the burned-thinned MSW is given in Equation 10 in Appendix A.4. The approximation is the average of the projected Wasserstein distance from with and . By reducing the number of random projecting directions, the computational complexity of the burned-thinned MSW is improved to in the orthogonal-based transitions. In the case of the input-awared transition, the computational complexity is still since the transition requires computing the gradient of the projected Wasserstein distance. However, in all cases, the memory complexity is reduced to .
Burned thinned MSW is the generalization of Max-SW. the empirical computation of Max-SW [14] with the projected sub-gradient ascent and uniform random initialization can be viewed as a special case of burned thinned MSW with the input-awared transition and with the number of burned samples . The difference is that Max-SW uses only one local maximum to compute the distance while the burned thinned MSW uses maximums (might not be unique).
More discussions. We refer the reader to Appendix A.5 for other related discussions e.g., “K-SW is autoregressive decomposition of projecting distribution", “sequential generalization of Max-K-SW", and related literature.
![]() |
![]() |
![]() |
![]() |
4 Experiments
In this section, we refer MSW with orthogonal-based transition as oMSW, MSW with input-awared transition as iMSW (using the Dirac distribution) and viMSW (using the vMF distribution). We compare MSW variants to SW, Max-SW, K-SW, and Max-K-SW in standard applications e.g., gradient flows, color transfer, and deep generative models. Moreover, we also investigate the role of hyperparameters, e.g., concentration parameter , the number of projections , the number of time steps , the number of burning steps , and the number of thinning steps in applications.
4.1 Gradient Flows and Color Transfer
![]() |
Gradient flows. We follow the same setting in [17]. The gradient flow models a distribution flowing with time along the gradient flow of a loss functional that drives it towards a target distribution [53] where is a given distance between probability measures. In this setup, we consider as a fixed empirical target distribution and the model distribution . Here, the model distribution is parameterized by a time-varying point cloud . Starting from an initial condition at time , we integrate the ordinary differential equation for each iteration. In the experiments, we utilize the Euler scheme with timesteps and the step size is to move the empirical distribution over colorful 1000 points to the distribution over S-shape 1000 points () (see Figure 1). For Max-SW, Max-K-SW, iMSW, and viMSW, we use the learning rate parameter for projecting directions . We report the Wasserstein-2 distances between the empirical distribution and the target empirical distribution , and the computational time in Table 1. We also give the visualization of some obtained flows in Figure 1. We refer the reader to Figure 4 in Appendix C.1 for the full visualization of all flows and detailed algorithms. We observe that iMSW gives better flows than SW, Max-SW, K-SW, and Max-K-SW. Namely, the empirical distribution () with iMSW is closer to in terms of Wasserstein distance. More importantly, iMSW consumes less computation than its competitors since it can use a smaller number of projections due to more informative projecting directions. Furthermore, viMSW gives better final results than iMSW, however, the trade-off is doubling the time computation due to the sampling step of vMF distribution. In this case, K-SW is equivalent to our oMSW with T=K=2 since the dimension . We refer the reader to Appendix C.1 for more discussion.
Distances | Wasserstein-2 () | Time () | Distances | Wasserstein-2 () | Time () |
---|---|---|---|---|---|
SW (L=30) | 1.55 | Max-K-SW (K=2,T=15) | 3.35 | ||
Max-SW (T=30) | 3.48 | iMSW (L=2,T=5) (ours) | 1.41 | ||
K-SW (L=15,K=2) | 1.71 | viMSW (L=2,T=5,=50)(ours) | 2.94 |
Studies on hyperparameters. From Table 3 in Appendix C.1, increasing the number of projections yields better performance for SW, K-SW, and iMSW. Similarly, increasing the number of timesteps also helps Max-SW and iMSW better. Moreover, we find that for the same number of total projections e.g., and , a larger timestep might lead to a better result for iMSW. For burning and thinning, we see that they help to reduce the computation while the performance stays comparable or even better if choosing the right value of and . Also, iMSW the burning steps is still better than Max-SW with time steps. For the concentration parameter in viMSW, the performance of viMSW is not monotonic in terms of .
Color transfer. We aim to transfer the color palate (RGB) of a source image to the color palette (RGB) target image. Therefore, it is natural to build a gradient flow that starts from the empirical distribution over the color palette of the source image to the empirical distribution over the color palette of the target image. Since the value of color palette is in the set , we round the value of the supports of the empirical distribution at the final step of the Euler scheme with 2000 steps and step size. Greater detail can be found in Appendix C.2. For Max-SW, Max-K-SW, iMSW, and viMSW, we use the learning rate parameter for projecting directions . We show the transferred images, the corresponding Wasserstein-2 distances between the empirical distribution over the transferred color palette and the empirical distribution over the target color palette, and the corresponding computational time in Figure 2. From the figures, iMSW and viMSW give the best transferred images quantitatively and qualitatively. Moreover, oMSW is comparable to SW, Max-SW, K-SW, and are better than Max-K-SW while consuming much less computation. We refer the reader to Figure 5 in Appendix C.2 for the color palette visualization and to Figure 6 for another choice of the source and target images. We also conduct studies on hyperparameters in Appendix C.2 where we observe some similar phenomenons as in gradient flow.
4.2 Deep Generative Models
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
SW | Max-K-SW | iMSW |
We follow the setup of sliced Wasserstein deep generative models in [15]. The full settings of the framework including neural network architectures, training framework, and hyperparameters are given Appendix C.3. We compare MSW with previous baselines including SW, Max-SW, K-SW, and Max-K-SW on benchmark datasets: CIFAR10 (image size 32x32) [29], and CelebA [36] (image size 64x64). The evaluation metrics are FID score [21] and Inception score (IS) [51] (except on CelebA since IS score poorly captures the perceptual quality of face images [21]). A notable change in computing Max-SW is that we do not use momentum in optimization for max projecting direction like in previous works [26, 42], which leads to a better result.
Method | CIFAR10 (32x32) | CelebA (64x64) | Method | CIFAR10 (32x32) | CelebA (64x64) | ||
---|---|---|---|---|---|---|---|
FID () | IS () | FID () | FID () | IS () | FID () | ||
SW | 14.211.12 | 8.190.07 | 8.930.23 | oMSW (ours) | 14.120.54 | 8.200.05 | 9.680.55 |
Max-K-SW | 14.380.08 | 8.150.02 | 8.940.35 | iMSW (ours) | 14.120.48 | 8.240.09 | 8.890.23 |
K-SW | 15.240.02 | 8.150.03 | 9.410.16 | viMSW (ours) | 13.980.59 | 8.120.20 | 8.910.11 |
Summary of generative performance. We train generative models with SW (), K-SW (), Max-K-SW ()(Max-K-SW (K=1) is Max-SW), MSW (all variant, ), iMSW and viMSW (), and viMSW and (). We report the best FID score and the best IS score for each distance in Table 2. In addition, we show how scores change with respect to the training epochs in Figure 3. Overall, we observe that viMSW and iMSW give the best generative performance in terms of the final scores and fast convergence on CIFAR10 and CelebA. The oMSW gives comparable results to baselines. Since most computation in training deep generative models is for updating neural networks, the computational time for distances is almost the same. Furthermore, we show some generated images on CelebA in Figure 3 and all generated images on CIFAR10 and CelebA in Figure 7 and Figure 8 in Appendix C.3. We visually observe that the qualitative results are consistent with the quantitative results in Table 2.
Studies on hyperparameters. We conduct experiments to understand the behavior of the burning and thinning technique, and to compare the role of and in Table 5 in Appendix C.3. Overall, burning (thinning) sometimes helps to improve the performance of training generative models. There is no clear sign of superiority between burning and thinning. We compare two settings of the same number of total projections (same complexities): and . On CIFAR10, the first setting is better while the reverse case happens on CelebA.
5 Conclusion
We have introduced the Markovian sliced Wasserstein (MSW), a novel family of sliced Wasserstein (SW) distances, which imposes a first-order Markov structure on projecting directions. We have investigated the theoretical properties of MSW including topological properties, statistical properties, and computational properties. Moreover, we have discussed three types of transition distribution for MSW, namely, orthogonal-based, and input-awared transitions. In addition, we have proposed a burning and thinning technique to improve the computational time and memory of MSW. Finally, we have compared MSW to previous variants of SW in gradient flows, color transfer, and generative modeling to show that MSW distances are both effective and efficient.
Acknowledgements
NH acknowledges support from the NSF IFML 2019844 and the NSF AI Institute for Foundations of Machine Learning.
References
- [1] J. Altschuler, J. Niles-Weed, and P. Rigollet. Near-linear time approximation algorithms for optimal transport via Sinkhorn iteration. In Advances in Neural Information Processing Systems, pages 1964–1974, 2017.
- [2] Y. Bai, B. Schmitzer, M. Thorpe, and S. Kolouri. Sliced optimal partial transport. arXiv preprint arXiv:2212.08049, 2022.
- [3] V. I. Bogachev and M. A. S. Ruas. Measure theory, volume 1. Springer, 2007.
- [4] C. Bonet, P. Berg, N. Courty, F. Septier, L. Drumetz, and M.-T. Pham. Spherical sliced-wasserstein. arXiv preprint arXiv:2206.08780, 2022.
- [5] C. Bonet, N. Courty, F. Septier, and L. Drumetz. Efficient gradient flows in sliced-Wasserstein space. Transactions on Machine Learning Research, 2022.
- [6] N. Bonneel and D. Coeurjolly. Spot: sliced partial optimal transport. ACM Transactions on Graphics (TOG), 38(4):1–13, 2019.
- [7] N. Bonneel, J. Rabin, G. Peyré, and H. Pfister. Sliced and Radon Wasserstein barycenters of measures. Journal of Mathematical Imaging and Vision, 1(51):22–45, 2015.
- [8] N. Bonnotte. Unidimensional and evolution methods for optimal transportation. PhD thesis, Paris 11, 2013.
- [9] S. Bubeck. Convex optimization: Algorithms and complexity. Foundations and Trends® in Machine Learning, 8(3-4):231–357, 2015.
- [10] X. Chen, Y. Yang, and Y. Li. Augmented sliced Wasserstein distances. International Conference on Learning Representations, 2022.
- [11] M. Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, pages 2292–2300, 2013.
- [12] B. Dai and U. Seljak. Sliced iterative normalizing flows. In International Conference on Machine Learning, pages 2352–2364. PMLR, 2021.
- [13] T. R. Davidson, L. Falorsi, N. De Cao, T. Kipf, and J. M. Tomczak. Hyperspherical variational auto-encoders. In 34th Conference on Uncertainty in Artificial Intelligence 2018, UAI 2018, pages 856–865. Association For Uncertainty in Artificial Intelligence (AUAI), 2018.
- [14] I. Deshpande, Y.-T. Hu, R. Sun, A. Pyrros, N. Siddiqui, S. Koyejo, Z. Zhao, D. Forsyth, and A. G. Schwing. Max-sliced Wasserstein distance and its use for GANs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10648–10656, 2019.
- [15] I. Deshpande, Z. Zhang, and A. G. Schwing. Generative modeling using the sliced Wasserstein distance. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3483–3491, 2018.
- [16] L. Devroye, L. Györfi, and G. Lugosi. A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013.
- [17] J. Feydy, T. Séjourné, F.-X. Vialard, S.-i. Amari, A. Trouve, and G. Peyré. Interpolating between optimal transport and MMD using Sinkhorn divergences. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2681–2690, 2019.
- [18] R. Flamary, N. Courty, A. Gramfort, M. Z. Alaya, A. Boisbunon, S. Chambon, L. Chapel, A. Corenflos, K. Fatras, N. Fournier, L. Gautheron, N. T. Gayraud, H. Janati, A. Rakotomamonjy, I. Redko, A. Rolet, A. Schutz, V. Seguy, D. J. Sutherland, R. Tavenard, A. Tong, and T. Vayer. Pot: Python optimal transport. Journal of Machine Learning Research, 22(78):1–8, 2021.
- [19] N. Fournier and A. Guillin. On the rate of convergence in Wasserstein distance of the empirical measure. Probability Theory and Related Fields, 162:707–738, 2015.
- [20] A. Genevay, G. Peyré, and M. Cuturi. Learning generative models with Sinkhorn divergences. In International Conference on Artificial Intelligence and Statistics, pages 1608–1617. PMLR, 2018.
- [21] M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, and S. Hochreiter. GANs trained by a two time-scale update rule converge to a local Nash equilibrium. In Advances in Neural Information Processing Systems, pages 6626–6637, 2017.
- [22] M. Huang, S. Ma, and L. Lai. A Riemannian block coordinate descent method for computing the projection robust Wasserstein distance. In International Conference on Machine Learning, pages 4446–4455. PMLR, 2021.
- [23] P. E. Jupp and K. V. Mardia. Maximum likelihood estimators for the matrix von Mises-Fisher and Bingham distributions. The Annals of Statistics, 7(3):599–606, 1979.
- [24] O. Kallenberg and O. Kallenberg. Foundations of modern probability, volume 2. Springer, 1997.
- [25] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
- [26] S. Kolouri, K. Nadjahi, U. Simsekli, R. Badeau, and G. Rohde. Generalized sliced Wasserstein distances. In Advances in Neural Information Processing Systems, pages 261–272, 2019.
- [27] S. Kolouri, P. E. Pope, C. E. Martin, and G. K. Rohde. Sliced Wasserstein auto-encoders. In International Conference on Learning Representations, 2018.
- [28] S. Kolouri, G. K. Rohde, and H. Hoffmann. Sliced Wasserstein distance for learning Gaussian mixture models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3427–3436, 2018.
- [29] A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Master’s thesis, Department of Computer Science, University of Toronto, 2009.
- [30] C.-Y. Lee, T. Batra, M. H. Baig, and D. Ulbricht. Sliced Wasserstein discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10285–10295, 2019.
- [31] J. Lezama, W. Chen, and Q. Qiu. Run-sort-rerun: Escaping batch size limitations in sliced Wasserstein generative models. In International Conference on Machine Learning, pages 6275–6285. PMLR, 2021.
- [32] T. Lin, C. Fan, N. Ho, M. Cuturi, and M. Jordan. Projection robust Wasserstein distance and Riemannian optimization. Advances in Neural Information Processing Systems, 33:9383–9397, 2020.
- [33] T. Lin, N. Ho, X. Chen, M. Cuturi, and M. I. Jordan. Fixed-support Wasserstein barycenters: Computational hardness and fast algorithm. In NeurIPS, pages 5368–5380, 2020.
- [34] T. Lin, N. Ho, and M. Jordan. On efficient optimal transport: An analysis of greedy and accelerated mirror descent algorithms. In International Conference on Machine Learning, pages 3982–3991, 2019.
- [35] T. Lin, N. Ho, and M. I. Jordan. On the efficiency of entropic regularized algorithms for optimal transport. Journal of Machine Learning Research (JMLR), 23:1–42, 2022.
- [36] Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015.
- [37] A. Liutkus, U. Simsekli, S. Majewski, A. Durmus, and F.-R. Stöter. Sliced-Wasserstein flows: Nonparametric generative modeling via optimal transport and diffusions. In International Conference on Machine Learning, pages 4104–4113. PMLR, 2019.
- [38] N. Naderializadeh, J. Comer, R. Andrews, H. Hoffmann, and S. Kolouri. Pooling by sliced-Wasserstein embedding. Advances in Neural Information Processing Systems, 34, 2021.
- [39] K. Nadjahi, V. De Bortoli, A. Durmus, R. Badeau, and U. Şimşekli. Approximate Bayesian computation with the sliced-Wasserstein distance. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5470–5474. IEEE, 2020.
- [40] K. Nadjahi, A. Durmus, L. Chizat, S. Kolouri, S. Shahrampour, and U. Simsekli. Statistical and topological properties of sliced probability divergences. Advances in Neural Information Processing Systems, 33:20802–20812, 2020.
- [41] K. Nadjahi, A. Durmus, U. Simsekli, and R. Badeau. Asymptotic guarantees for learning generative models with the sliced-Wasserstein distance. In Advances in Neural Information Processing Systems, pages 250–260, 2019.
- [42] K. Nguyen and N. Ho. Amortized projection optimization for sliced Wasserstein generative models. Advances in Neural Information Processing Systems, 2022.
- [43] K. Nguyen and N. Ho. Revisiting sliced Wasserstein on images: From vectorization to convolution. Advances in Neural Information Processing Systems, 2022.
- [44] K. Nguyen, N. Ho, T. Pham, and H. Bui. Distributional sliced-Wasserstein and applications to generative modeling. In International Conference on Learning Representations, 2021.
- [45] K. Nguyen, S. Nguyen, N. Ho, T. Pham, and H. Bui. Improving relational regularized autoencoders with spherical sliced fused Gromov-Wasserstein. In International Conference on Learning Representations, 2021.
- [46] S. Nietert, R. Sadhu, Z. Goldfeld, and K. Kato. Statistical, robustness, and computational guarantees for sliced wasserstein distances. Advances in Neural Information Processing Systems, 2022.
- [47] F.-P. Paty and M. Cuturi. Subspace robust Wasserstein distances. In International Conference on Machine Learning, pages 5072–5081, 2019.
- [48] G. Peyré and M. Cuturi. Computational optimal transport: With applications to data science. Foundations and Trends® in Machine Learning, 11(5-6):355–607, 2019.
- [49] G. Peyré and M. Cuturi. Computational optimal transport, 2020.
- [50] M. Rowland, J. Hron, Y. Tang, K. Choromanski, T. Sarlos, and A. Weller. Orthogonal estimation of Wasserstein distances. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 186–195. PMLR, 2019.
- [51] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training GANs. Advances in Neural Information Processing Systems, 29, 2016.
- [52] T. Salimans, H. Zhang, A. Radford, and D. Metaxas. Improving GANs using optimal transport. In International Conference on Learning Representations, 2018.
- [53] F. Santambrogio. Optimal transport for applied mathematicians. Birkäuser, NY, 55(58-63):94, 2015.
- [54] M. Sommerfeld and A. Munk. Inference for empirical wasserstein distances on finite spaces. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 80(1):219–238, 2018.
- [55] S. Sra. Directional statistics in machine learning: a brief review. arXiv preprint arXiv:1605.00316, 2016.
- [56] N. M. Temme. Special functions: An introduction to the classical functions of mathematical physics. John Wiley & Sons, 2011.
- [57] C. Villani. Optimal transport: Old and New. Springer, 2008.
- [58] C. Villani. Optimal transport: old and new, volume 338. Springer Science & Business Media, 2008.
- [59] M. J. Wainwright. High-dimensional statistics: A non-asymptotic viewpoint. Cambridge University Press, 2019.
- [60] J. Wu, Z. Huang, D. Acharya, W. Li, J. Thoma, D. P. Paudel, and L. V. Gool. Sliced Wasserstein generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3713–3722, 2019.
- [61] M. Yi and S. Liu. Sliced Wasserstein variational inference. In Fourth Symposium on Advances in Approximate Bayesian Inference, 2021.
Supplement to “Markovian Sliced Wasserstein Distances: Beyond Independent Projections"
In this supplementary material, we present additional materials in Appendix A. In particular, we provide additional background on sliced Wasserstein variants in Appendix A.1, background on von Mises-Fisher distribution in Appendix A.2, algorithms for computing Markovian sliced Wasserstein distances in Appendix A.3, additional information about burned thinned MSW in Appendix A.4, and discussion on related works in Appendix A.5. We then provide skipped proofs in the main paper in Appendix B. Additional experiments are presented in Appendix C.
Appendix A Additional Materials
A.1 Background on Sliced Wasserstein Variants
We review computational aspects of sliced Wasserstein variants.
Computation of Max sliced Wasserstein distance. We demonstrate the empirical estimation of Max-SW via projected sub-gradient ascent algorithm in Algorithm 1. The initialization step for is rarely discussed in previous works. Normally, is randomly initialized by drawing from the uniform distribution over the unit-hypersphere. Many previous works [26, 44, 45, 42] use Adam update instead of the standard gradient ascent update for Max-SW. In this work, we find out that using the standard gradient ascent update is more stable and effective.
K sliced Wasserstein distance. We first review the Gram–Schmidt process in Algorithm 2. With the Gram–Schmidt process, the sampling from can be done by sampling i.i.d from then applying the Gram-Schmidt process on them. Therefore, we present the computation of K sliced Wasserstein distance in Algorithm 3. We would like to recall that the original work of K-SW [50] uses only one set of orthogonal projecting directions. Here, we generalize the original work by using sets of orthogonal projecting directions.
Max K sliced Wasserstein distance. We now present the empirical estimation of Max-K-SW via projected sub-gradient ascent algorithm in Algorithm 4. This algorithm is first discussed in the original paper of Max-K-SW [12]. The optimization of Max-K-SW can be solved by using Riemannian optimization since the Stiefel manifold is a Riemannian manifold. However, to the best of our knowledge, Riemannian optimization has not been applied to Max-K-SW.
A.2 Von Mises-Fisher Distribution
We first start with the definition of von Mises-Fisher (vMF) distribution.
Definition 3.
The vMF distribution is a continuous distribution, its mass concentrates around the mean , and its density decrease when goes away from . When , vMF converges in distribution to , and when , vMF converges in distribution to the Dirac distribution centered at [55].
Sampling: We review the sampling process in Algorithm 5 [13, 45]. The sampling process of vMF distribution is based on the rejection sampling procedure. It is worth noting that the sampling algorithm is doing reparameterization implicitly. However, we only use the algorithm to obtain random samples without estimating stochastic gradients.
A.3 Algorithms for Computing Markovian Sliced Wasserstein Distances
We first start with the general computation of MSW in Algorithm 6. For the orthogonal-based transition in oMSW, we use by first sampling then set then normalize . For deterministic input-awared transition, iMSW, we set then normalize . For probabilistic input-awared transition, viMSW, with .
A.4 Burned Thinned Markovian Sliced Wasserstein Distance
We continue the discussion on burned thinned MSW in Section 3.3. We first start with the Monte Carlo estimation of burned thinned MSW.
Monte Carlo Estimation: We samples for , then we samples for and . We then obtain samples by filtering out and from the set for and . The Monte Carlo approximation of the burned-thinned Markovian sliced Wasserstein distance is:
(10) |
Theoretical properties. We first state the following assumption: A2. Given , , the prior distribution and the transition distribution are chosen such that there exists marginals with and , .
The assumption A2 can be easily obtained by using vMF transition, e.g., in probabilistic input-awared transition. From this assumption, we can derive theoretical properties of burned-thinned MSW including topological properties and statistical complexity.
Proposition 4.
For any , , , , and dimension , if A2 holds, the burned thinned Markovian sliced Wasserstein distance is a valid metric on the space of probability measures , namely, it satisfies the (i) non-negativity, (ii) symmetry, (iii) triangle inequality, and (iv) identity.
Proposition 5 (Weak Convergence).
For any , , , , and dimension , if A2 holds, the convergence of probability measures in under the burned thinned Markovian sliced Wasserstein distance implies weak convergence of probability measures and vice versa.
Proposition 6.
For any and dimension , for any , , and , .
Proposition 7 (Sample Complexity).
Let be i.i.d. samples from the probability measure being supported on compact set of . We denote the empirical measure . Then, for any and , , , there exists a universal constant such that
where the outer expectation is taken with respect to the data .
Proposition 8 (Monte Carlo error).
For any , , , , dimension , and , we have:
where the variance is with respect to .
A.5 Discussions on Related Works
K-SW is autoregressive decomposition. In MSW, we assume that the joint distribution over projecting directions has the first-order Markov structure: . However, we can consider the full autoregressive decomposition . Let in K-SW, hence the transition distribution that is used in K-SW is: where denotes the Gram-Schmidt process update that applies on .
Generalization of Max-K-SW. Similar to Max-SW, we can derive a Markovian-based K-sliced Wasserstein distance that generalizes the idea of the projected gradient ascent update in Max-K-SW. However, the distance considers the transition on the Stiefel manifold instead of the unit hypersphere, hence, it will be more computationally expensive. Moreover, orthogonality might not be a good constraint. Therefore, the generalization of Max-K-SW might not have many advantages.
Beyond the projected sub-gradient ascent update. In the input-awared transition for MSW, we utilize the projected sub-gradient update as the transition function to create a new projecting direction. Therefore, we could other optimization techniques such as momentum, adaptive stepsize, and so on to create the transition function. We will leave the investigation about this direction to future work.
Applications to other sliced Wasserstein variants. The Markovian approach can be applied to other variants of sliced Wasserstein distances e.g., generalized sliced Wasserstein [26], augmented sliced Wasserstein distance [10], projected robust Wasserstein (PRW) [47, 32, 22] ( dimensional projection), convolution sliced Wasserstein [43], sliced partial optimal transport [6, 2], and so on.
Markovian sliced Wasserstein distances in other applications. We can apply MSW to the setting in [31] which is an implementation technique that utilizes both RAM and GPUs’ memory for training sliced Wasserstein generative models. MSW can also replace sliced Wasserstein distance in pooling in [38]. Similarly, MSW can be used in applications that exist sliced Wasserstein distance e.g., clustering [28], Bayesian inference [39, 61], domain adaptation [60], and so on.
Appendix B Proofs
B.1 Proof of Theorem 1
(i), (ii): the MSW is an expectation of the one-dimensional Wasserstein distance hence the non-negativity and symmetry properties of the MSW follow directly by the non-negativity and symmetry of the Wasserstein distance.
(iii) From the definition of MSW in Definition 1, given three probability measures we have:
where the first inequality is due to the triangle inequality of Wasserstein distance and the second inequality is due to the Minkowski inequality. We complete the triangle inequality proof.
(iv) We need to show that if and only if . First, from the definition of MSW, we obtain directly implies . For the reverse direction, we use the same proof technique in [8]. If , we have . If A1 holds, namely, the prior distribution is supported on all the unit-hypersphere or exists a transition distribution is supported on all the unit-hypersphere, we have for all where denotes the prior or the transition distribution that satisfies the assumption A1. From the identity property of the Wasserstein distance, we obtain for -a.e . Therefore, for any and , we have:
where denotes the Fourier transform of . By the injectivity of the Fourier transform, we obtain which concludes the proof.
B.2 Proof of Theorem 2
Our goal is to show that for any sequence of probability measures and in , if and only if for any continuous and bounded function , . The proof follows the techniques in [41]. We first state the following lemma.
Lemma 1.
For any , and dimension , if A1 holds and a sequence of probability measures satisfies with in , there exists an increasing function such that the subsequence converges weakly to .
Proof.
We are given that , therefore . If A1 holds, namely, the prior distribution is supported on all the unit-hypersphere or exists a transition distribution is supported on all the unit-hypersphere, we have
where denotes the prior or the transition distribution that satisfies the assumption A1. From Theorem 2.2.5 in [3], there exists an increasing function such that for -a.e . Since the Wasserstein distance of implies weak convergence [58], converges weakly to for -a.e .
Let be the characteristic function of , we have the weak convergence implies the convergence of characteristic function (Theorem 4.3 [24]): for -a.e . Therefore, for almost most every .
For any and a continuous function with compact support, we denote where is the density function of . We have:
where the third equality is due to the fact that and denotes the Fourier transform of the bounded function . Similarly, we have
Since is assumed to have compact support, exists and is bounded by . Hence, for any and , we have and . Using the proved result of and Lebesgue’s Dominated Convergence Therefore, we obtain
Moreover, we have:
which implies converges weakly to . ∎
We now continue the proof of Theorem 2. We first show that if , converges weakly to . We consider a sequence such that and we suppose does not converge weakly to . Therefore, let be the Lévy-Prokhorov metric, that implies there exists and a subsequence with an increasing function such that for any : . However, we have
by the Holder inequality with . Therefore, which implies that there exists s a subsequence with an increasing function such that converges weakly to by Lemma 1. Hence, which contradicts our assumption. We conclude that if , converges weakly to .
Now, we show that if converges weakly to , we have . By the continuous mapping theorem, we obtain converges weakly to for any . Since the weak convergence implies the convergence under the Wasserstein distance [58], we obtain . Moreover, the Wasserstein distance is also bounded, hence the bounded convergence theorem:
By the continuous mapping theorem with function , we obtain which completes the proof.
B.3 Proof of Proposition 1
(i) We recall the definition of Max-SW:
Let , from Definition 1, for any , , dimension , and we have:
Furthermore, by applying the Cauchy-Schwartz inequality, we have:
which completes the proof.
(ii) This result can be directly obtained from the definitions of MSW and SW.
B.4 Proof of Proposition 2
In this proof, we denote as the compact set of the probability measure . From Proposition 1, we find that
Therefore, the proposition follows as long as we can demonstrate that
where is some universal constant and the outer expectation is taken with respect to the data. The proof for this result follows from the proof of Proposition 3 in [43]. Here, we provide the proof for the completeness. By defining and as the cumulative distributions of and , the closed-form expression of the Wasserstein distance in one dimension leads to the following equations and inequalities:
We can check that
where is the set of half-spaces for all such that . From VC inequality (Theorem 12.5in [16]), we have
with is the growth function which is upper bounded by due to the Sauer Lemma (Proposition 4.18 in [59]). From Example 4.21 in [59], we get .
Let , we have . Therefore, we obtain
Now we convert the probability statement to inequality with expectation. Using the Jensen inequality and the tail sum expectation for non-negative random variable, we have:
Let , we have , hence the minima . Since the inequality holds for any , we have:
by using Sauer Lemma. Putting the above results together leads to
where is some universal constant. As a consequence, we obtain the conclusion of the proposition.
B.5 Proof of Proposition 3
For any , , dimension , and , using the Holder’s inequality, we have:
which completes the proof.
Appendix C Additional Experiments
In this section, we present the detail of experimental frameworks and additional experiments on gradient flows, color transfer, and deep generative modeling which are not in the main paper.
C.1 Gradient Flows
Framework. We have discussed in detail the framework of gradient flow in Section 4.1 in the main paper. Here, we summarize the Euler scheme for solving the gradient flow in Algorithm 7.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Visualization of gradient flows. We show the visualization of gradient flows from all distances (Table 1) in Figure 4. Overall, we observe that the quality of the flows is consistent with the quantitative Wasserstein-2 score which is computed using [18]. From the figures, we see that iMSW and viMSW help the flows converge very fast. Namely, Wasserstein-2 scores at steps 200 of iMSW and viMSW are much lower than other distances. For oMSW, with , it achieves a comparable result to SW, K-SW, and Max-SW while being faster.
Distances | Wasserstein-2 () | Time () | Distances | Wasserstein-2 () | Time () |
---|---|---|---|---|---|
SW (L=10) | 0.85 | SW (L=100) | 4.32 | ||
Max-SW (T=5) | 1.02 | Max-SW (T=100) | 10.46 | ||
K-SW (L=5,K=2) | 0.92 | K-SW (L=20,K=2) | 1.97 | ||
Max-K-SW (K=2,T=5) | 1.41 | Max-K-SW (K=2,T=100) | 10.46 | ||
iMSW (L=1,T=5) | 1.07 | iMSW (L=5,T=5) | 2.44 | ||
iMSW (L=2,T=10) | 2.79 | iMSW (L=5,T=2) | 1.14 | ||
iMSW (L=2,T=5,M=4) | 1.2 | iMSW (L=2,T=5,M=2) | 1.25 | ||
iMSW (L=2,T=5,M=0,N=2) | 1.28 | iMSW (L=2,T=5,M=2,N=2) | 1.19 | ||
viMSW (L=2,T=5,=10) | 3.12 | viMSW (L=2,T=5,=100) | 2.76 |
![]() |
![]() |
Studies on hyper-parameters. We run gradient flows with different values of hyper-parameters and report the Wasserstein-2 scores and computational time in Table 3. From the table and Figure 4, we see that SW with is worse than oMSW, iMSW, and viMSW with (10 total projections). Increasing the number of projections to 100, SW gets better, however, its Wasserstein-2 score is still higher than the scores of iMSW and viMSW while its computational time is bigger. Similarly, Max-(K)-SW with is better than Max-(K)-SW with and , however, it is still worse than iMSW and viMSW in terms of computation and performance. For burning and thinning, we see that the technique can help improve the computation considerably. More importantly, the burning and thinning techniques do not reduce the performance too much. For iMSW, increasing and leads to a better flow. For the same number of total projections e.g., , is better than . For viMSW, it usually performs better than iMSW, however, its computation is worse due to the sampling complexity of the vMF distribution. We vary the concentration parameter and find that is the best. Hence, it might suggest that a good balance between heading to the “max" projecting direction and exploring the space of projecting directions is the best strategy.
C.2 Color Transfer
Framework. In our experiments, we first compress the color palette of the source image and the target image to 3000 colors by using K-Mean clustering. After that, the color transfer application is conducted by using Algorithm 8 which is a modified version of the gradient flow algorithm since the color palette contains only positive integer in . The flow can be seen as an incomplete transportation map that maps from the source color palette to a color palette that is close to the target color palette. This is quite similar to the iterative distribution transfer algorithm [8], however, the construction of the iterative map is different.
Visuallization of transferred images. We show the source image, the target image, and the corresponding transferred images from distances in Figure 5 and Figure 6. The color palates are given below the corresponding images. The corresponding Wasserstein-2 distance between the empirical distribution over transferred color palates and the empirical distribution over the target color palette and the computational time (in second) is reported at the top of the figure. First, we observe that the qualitative comparison (transferred images and color palette) is consistent with the Wasserstein scores. We observe that iMSW and viMSW have their transferred images closer to the target image in terms of color than other distances. More importantly, iMSW and viMSW are faster than other distances. Max-SW and Max-K-SW do not perform well in this application, namely, they are slow and give high Wasserstein distances. For oMSW, it is comparable to SW and K-SW while being faster.
Distances | Wasserstein-2 () | Time () | Distances | Wasserstein-2 () | Time () |
---|---|---|---|---|---|
SW (L=45) | 414.51 | 41.77 | SW (L=15) | 421.5 | 12.96 |
Max-SW (T=45) | 449.42 | 59.13 | Max-SW (T=15) | 450.37 | 19.03 |
K-SW (L=15,K=3) | 411.74 | 38.86 | K-SW (L=5,K=3) | 413.16 | 14.2 |
Max-K-SW (K=3,T=15) | 479.43 | 53.95 | Max-K-SW (K=3,T=5) | 510.43 | 17.46 |
oMSW (L=3,T=5) | 415.06 | 13.69 | oMSW (L=3,T=15) | 414.29 | 38.51 |
iMSW (L=3,T=5) | 16.97 | 25.91 | iMSW (L=3,T=15) | 15.23 | 79.47 |
iMSW (L=5,T=5) | 21.63 | 39.82 | iMSW (L=5,T=3) | 24.02 | 22.27 |
iMSW (L=3,T=15,M=14) | 26.23 | 48.08 | iMSW (L=3,T=15,M=10) | 18.67 | 55.55 |
iMSW (L=3,T=15,M=0,N=2) | 16.6 | 62.66 | iMSW (L=3,T=15,M=10,N=2) | 19.2 | 50.1 |
viMSW (L=3,T=5,=50) | 16.48 | 29.14 | viMSW (L=3,T=5,=100) | 16.49 | 29.06 |
Studies on hyper-parameters. In addition to result in Figure 5, we run color transfer with other settings of distances in Table 4. From the table, increasing the number of projections lead to a better result for SW and K-SW. However, they are still worse than iMSW and viMSW with a smaller number of projections. Similarly, increasing helps Max-SW, Max-K-SW, and iMSW better. As discussed in the main paper, the burning and thinning technique improves the computation and sometimes enhances the performance.
C.3 Deep Generative Models
Framework. We follow the generative modeling framework from [20, 42]. Here, we state an adaptive formulation of the framework. We are given a data distribution through its random samples (data). Our goal is to estimate a parametric distribution that belongs to a family of distributions indexed by parameters in a parameter space . Deep generative modeling is interested in constructing via pushforward measure. In particular, is implicitly represented by pushing forward a random noise e.g., standard multivariable Gaussian, through a parametric function (a neural network with weights ). To estimate (), the expected distance estimator [54, 41] is used:
where , can be any distance on space of probability measures, is the product measures, namely, is equivalent to for , and . Similarly, with for , and is the output of the neural work given the input mini-batch .
By using Wasserstein distance, sliced Wasserstein distance, and their variants as the distance , we obtain the corresponding estimators. However, applying directly those estimators to natural image data cannot give perceptually good results [20, 15]. The reason is that Wasserstein distance, sliced Wasserstein distances, and their variants require a ground metric as input e.g., , however, those ground metrics are not meaningful on images. Therefore, previous works propose using a function that maps the original data space to a feature space where the norm is meaningful [52]. We denote the feature function . Now the estimator becomes:
The above optimization can be solved by stochastic gradient descent algorithm with the following stochastic gradient estimator:
where are drawn i.i.d from and are drawn i.i.d from . There are several ways to estimate the feature function in practice. In our experiments, we use the following objective [15]:
where . The above optimization problem is also solved by the stochastic gradient descent algorithm with the following gradient estimator:
where are drawn i.i.d from and are drawn i.i.d from .
![]() |
![]() |
![]() |
SW | Max-K-SW | K-SW |
![]() |
![]() |
![]() |
oMSW | iMSW | viMSW |
Settings. We use the following neural networks for and :
-
•
CIFAR10:
-
–
: .
-
–
: .
-
–
: .
-
–
and .
-
–
-
•
CelebA.
-
–
: .
-
–
: .
-
–
: .
-
–
and .
-
–
For all datasets, the number of training iterations is set to 50000. We update the generator each 5 iterations while we update the feature function every iteration. The mini-batch size is set in all datasets. The learning rate for and is and the optimizer is Adam [25] with parameters . We use the order for all sliced Wasserstein variants. We use 50000 random samples from estimated generative models for computing the FID scores and the Inception scores. In evaluating FID scores, we use all training samples for computing statistics of datasets222We evaluate the scores based on the code from https://github.com/GongXinyuu/sngan.pytorch..
Method | CIFAR10 (32x32) | CelebA (64x64) | |
---|---|---|---|
FID () | IS () | FID () | |
iMSW (L=100,T=10,M=0,N=1) | 14.610.72 | 8.150.15 | 9.730.33 |
iMSW (L=100,T=10,M=9,N=1) | 14.161.11 | 8.170.07 | 9.100.34 |
iMSW (L=100,T=10,M=5,N=1) | 13.930.21 | 8.150.05 | 9.490.52 |
iMSW (L=100,T=10,M=0,N=2) | 14.330.32 | 8.150.06 | 8.990.64 |
iMSW (L=10,T=100,M=0,N=1) | 14.260.74 | 8.150.07 | 8.890.23 |
iMSW (L=10,T=100,M=99,N=1) | 14.500.70 | 8.120.08 | 9.550.35 |
iMSW (L=10,T=100,M=50,N=1) | 14.410.58 | 8.120.06 | 9.460.73 |
iMSW (L=10,T=100,M=0,N=2) | 14.650.01 | 8.110.06 | 9.490.39 |
Generated images. We show generated images on CIFAR10 and CelebA from different generative models trained by different distances in Figure 7 and in Figure 8 in turn. Overall, images are visually consistent with the quantitative FID scores in Table 2.
![]() |
![]() |
![]() |
SW | Max-K-SW | K-SW |
![]() |
![]() |
![]() |
oMSW | iMSW | viMSW |
Studies on hyperparameters. We run some additional settings of iMSW to investigate the performance of the burning thinning technique and to compare the role of and in Table 5. First, we see that burning and thinning helps to improve FID score and IS score on CIFAR10 and CelebA in the settings of . It is worth noting that the original purpose of burning and thinning is to reduce computational complexity and memory complexity. The side benefit of improving performance requires more investigation that is left for future work. In addition, we find that for the same number of total projections without burning and thinning, the setting of is better than the setting of on CIFAR10. However, the reverse direction happens on CelebA. Therefore, on different datasets, it might require hyperparameter tunning for finding the best setting of the number of projections and the number of timesteps .