Amortized Projection Optimization for Sliced Wasserstein Generative Models
Anonymous Author(s)
AfﬁliationAddress email
Abstract
Seeking informative projecting directions has been an important task in utilizingsliced Wasserstein distance in applications.
However, ﬁnding these directionsusually requires an iterative optimization procedure over the space of projectingdirections, which is computationally expensive.
Moreover, the computationalissue is even more severe in deep learning applications, where computing thedistance between two mini-batch probability measures is repeated several times.
This nested loop has been one of the main challenges that prevent the usage ofsliced Wasserstein distances based on good projections in practice.
To address thischallenge, we propose to utilize the learning-to-optimize technique or amortizedoptimization to predict the informative direction of any given two mini-batchprobability measures.
To the best of our knowledge, this is the ﬁrst work that bridgesamortized optimization and sliced Wasserstein generative models.
In particular,we derive linear amortized models, generalized linear amortized models, andnon-linear amortized models which are corresponding to three types of novel minibatch losses, named amortized sliced Wasserstein .
We demonstrate the favorableperformance of the proposed sliced losses in deep generative modeling on standardbenchmark datasets.
Introduction
Generative modeling is one of the most important tasks in machine learning and data science.
Leveraging the expressiveness of neural networks in parameterizing the model distribution, deep generativemodels such as GANs [17], VAEs [23] and diffusion models [19, 53], achieve a signiﬁcant quality ofsampling images.
Despite differences in the way of modeling the model distribution, optimization objectives of training generative models can be written as minimizing a discrepancy D ( · , · ) between datadistribution µ and the model distribution ⌫  with  2  , parameter space of neural networks weights,namely, we solve for ˆ  2 arg min  2  D ( µ, ⌫  ) .
For example, Kullback–Leibler divergence is usedin VAEs and diffusion models, Jensen–Shannon divergence appears in GANs, and f-divergences areutilized in f-GANs [41].
Because of the complexity of the neural networks  , closed-form optimalsolutions to these optimization problems are intractable.
Therefore, gradient-based methods and theirstochastic versions are widely used in practice to approximate these solutions.
Recently, optimal transport-based losses, which we denote as D ( · , · ) , are utilized to train generative models due to their training stability, efﬁciency, and geometrically meaning.
Examples ofthese models include Wasserstein GAN [3] with the dual form of Wasserstein-1 distance [44], and
OT-GANs [14, 49] with the primal form of Wasserstein distance and with Sinkhorn divergence [8] between mini-batch probability measures.
Although these models considerably improve the generative performance, there have been remained certain problems.
In particular, Wasserstein GAN is reportedto fail to approximate the Wasserstein distance [54] while OT-GAN suffers from high computationalcomplexity of Wasserstein distance: O ( m 3 log m ) and its curse of dimensionality: the sample complexity of O ( m  1 /d ) where m is the number of supports of two mini-batch measures.
The entropicregularization [8] had been proposed to improve the computational complexity of approximatingoptimal transport to O ( m 2 ) [1, 30, 31, 29] and to remove the curse of dimensionality [34].
Howeverpractitioners usually choose to use the slicing (projecting version) of Wasserstein distance [56, 11, 25]due to a fast computational complexity O ( m log m ) and no curse of dimensionality O ( m  1 / 2 ) .
Thedistance is known as sliced Wasserstein distance (SW) [4].
Sliced Wasserstein distance is deﬁned asthe expected one-dimensional Wasserstein distance between two projected measures over the uniformdistribution over the unit sphere.
Due to the intractability of the expectation, Monte Carlo samplesfrom the uniform distribution over the unit sphere are used to approximate the distance.
The numberof samples is often called the number of projections and it is denoted as L .
From applications, practitioners observe that sliced Wasserstein distance requires a sufﬁciently largenumber of projections
L relative to the dimension of data to perform well [25, 11].
Increasing L leadsto a linear increase in computational time and memory.
However, when data lie in a low dimensionalmanifold, several projections are redundant since they collapse projected measures to a Dirac-Deltameasure at zero.
There are some attempts to overcome that issue including sampling orthogonaldirections [47] and mapping the data to a lower-dimensional space [11].
The most popular approachis to search for the direction that maximizes the projected distance, which is known as max-sliced
Wasserstein distance (Max-SW) [10].
Nevertheless, in the context of deep generative models anddeep learning in general, the optimization over the unit sphere requires iterative projected gradientdescent methods that can be computationally expensive.
In detail, each gradient-update of the modelparameters (neural networks) requires an additional loop for optimization of Max-SW between twomini-batch probability measures.
Therefore, we have two nested optimization loops: the global loop(optimizing model parameters) and the local loop (optimizing projection).
These optimization loopscan slow down the training considerably.
Contribution.
To overcome the issue, we propose to leverage learning to learn techniques ( amortizedoptimization ) to predict the optimal solution of the local projection optimization.
We bridge theliterature on amortized optimization and optimal transport by designing amortized models to solvethe iterative optimization procedure of ﬁnding optimal slices in the sliced Wasserstein generativemodel.
To the best of our knowledge, this is the ﬁrst time amortized optimization is used in sliced
Wasserstein literature.
In summary, our main contributions are two-fold:
First, we introduce a novel
family of
mini-batch sliced
Wasserstein losses that utilize amortized models to yield informative projecting directions, named amortized sliced
Wasserstein
losses ( A -SW
We specify three types of amortized models: linear amortized, generalized linear amortized, andnon-linear amortized models that are corresponding to three mini-batch losses: linear amortized sliced
Wasserstein ( LA -SW), generalized linear amortized sliced Wasserstein ( GA -SW), and non-linearamortized sliced Wasserstein ( NA -SW).
Moreover, we discuss some properties of A -SW lossesincluding metricity, complexities, and connection to mini-batch Max-SW.2.
We then introduce the application of A -SW in generative modeling.
Furthermore, we carry outextensive experiments on standard benchmark datasets including CIFAR10, CelebA, STL10, and
CelebAHQ to demonstrate the favorable performance of A -SW in learning generative models.
Finally,we measure the computational speed and memory of A -SW, mini-batch Max-SW, and mini-batch
SW to show the efﬁciency of A -SW.
Organization.
The remainder of the paper is organized as follows.
We ﬁrst provide background about
Wasserstein distance, sliced Wasserstein distance, max-sliced Wasserstein distance, and amortizedoptimization in Section 2.
In Section 3, we propose amortized sliced Wasserstein distances andanalyze some of their theoretical properties.
The discussion on related works is given in Section 4.
Section 5 contains the application of A -SW to generative models, qualitative experimental results,and quantitative experimental results on standard benchmarks.
In Section 6, we provide a conclusion.
Finally, we defer the proofs of key results and extra materials to the Appendices.
Notation.
For any d  2 , S d  1 := { ✓ 2 R d | || ✓ || 22 = 1 } denotes the d dimensional unit hyper-spherein L 2 norm, and U ( S d  1 ) is the uniform measure over S d  1 .
Moreover,  denotes the Dirac deltafunction.
For p  1 , P p ( R d ) is the set of all probability measures on R d that has ﬁnite p -moments.
For µ, ⌫ 2 P p ( R d ) , ⇧ ( µ, ⌫ ) := { ⇡ 2 P p ( R d ⇥ R d ) | R R d ⇡ ( x, y ) dx = ⌫ , R
R d ⇡ ( x, y ) dy = µ } is theset of transportation plans between µ and ⌫ .
For m  1 , we denotes µ ⌦ m as the product measurewhich has the supports are the joint vector of m random variables that follows µ .
For a vector X 2 R dm , X :=
( x 1 , . . .
, x m ) , P X denotes the empirical measures 1 m[-(cid:80) mi =
-]
P mi =1  x i .
We denote ✓] µ asthe push-forward probability measure of µ through the function T ✓ : R d ! R where T ✓ ( x ) =
✓ > x .
Background
In this section, we ﬁrst review the deﬁnitions of the Wasserstein distance, the sliced Wassersteindistance, and the max-sliced Wasserstein distance.
We then formulate generative models based on themax-sliced Wasserstein distances and review the amortized optimization problem and its applicationto the max-sliced Wasserstein generative models.
2.1 (Sliced)-Wasserstein Distances
We ﬁrst deﬁne the Wasserstein- p distance [55, 43] between two probability measures µ 2 P p ( R d )and ⌫ 2 P p ( R d ) as follows: W p [Equation]
µ, ⌫ ) := [Equation]
When d = 1 ,the Wasserstein distance has a closed form which is W
[Equation]
[Equation]
where F µ and F ⌫ are the cumulative distribution function (CDF) of µ and ⌫ respectively.
To utilize this closed-form property of Wasserstein distance in one dimension and overcomethe curse of dimensionality of Wasserstein distance in high dimension, the sliced Wassersteindistance [4] between µ and ⌫ had been introduced and admitted the following formulation:
[Equation]
1 p .
For each ✓ 2 S d  1 , W pp ( ✓] µ, ✓]⌫ ) can be computedin linear time O ( n log n ) where n is the number of supports of µ and ⌫ .
However, due to theintegration over the unit sphere, the sliced Wasserstein distance does not have closed-form expression.
To approximate the intractable expectation, Monte Carlo scheme is used, namely, we drawuniform samples ✓ 1 , . . .
, ✓ L ⇠ U ( S d  1 ) from the unit sphere and obtain the following approximation:
[Equation]
In practice, L should be chosen to be sufﬁciently largecompared to the dimension d .
It is not appealing since the computational complexity of SW is linearwith L .
To reduce projection complexity, max-sliced Wasserstein (Max-SW) is introduced [10] .
Inparticular, the max-sliced Wasserstein distance between µ and ⌫ is given by:
[Equation]
To solve the optimization problem, a projected gradient descent procedure is used.
We present asimple algorithm in Algorithm 1 in Appendix B.
In practice, practitioners often set a ﬁxed number ofgradient updates, e.g., T = 100 .
2.2 Learning Generative Models with Max-Sliced Wasserstein and Amortized Optimization
We now provide an application of (sliced)-Wasserstein distances to generative models settings.
Theproblem can be seen as the following optimization:
[Equation]
where D ( · , · ) can be Wasserstein distance or SW distance or Max-SW distance.
Despite the recentprogress on scaling up Wasserstein distance in terms of the size of supports of probability measures [1,30], using the original form of Wasserstein distances is still not tractable in real training due to both thememory constraint and time constraint.
In more detail, the number of training samples is often huge,e.g., one million, and the dimension of data is also huge ,e.g., ten thousand.
Therefore, mini-batchlosses based on Wasserstein distances have been proposed [52, 12, 13, 39, 40].
The corresponding population form of these losses between two probability measures µ and ⌫ is:
[Equation]
where m  1 is the mini-batch size and D is a Wasserstein metric.
In the generative model context [17], a stochastic gradient of the parameters of interest is utilized toupdate these parameters, namely,
[Equation]
where k is the number of mini-batches (is often set to 1), and ( X i , Y  i ) is i.i.d sample from µ ⌦ m ⌦⌫ ⌦ m  .
The exchangeability between derivatives and expectation, and unbiasedness of the stochasticgradient are proven in [13].
Mini-batch losses are not distances; however, we can derive mini-batchenergy distances from them [49].
Learning generative models via max-sliced Wasserstein: As we mentioned in Section 2.1, the maxsliced Wasserstein distance can overcome the curse of dimensionality of the Wasserstein distance andthe issues of Monte Carlo samplings in the sliced Wasserstein distance.
Therefore, it is an appealingdivergence for learning generative models.
By replacing the Wasserstein metric in equation (3), wearrive at the following formulation of the mini-batch max-sliced Wasserstein loss, which is given by:
[Equation]
Here, we can observe that each pair of mini-batch contains its own optimization problem of ﬁndingthe "max" slice.
Placing this in the context of iterative training of generative models, we can foreseeits expensive computation.
For a better understanding, we present an algorithm for training generativemodels with mini-batch max-sliced Wasserstein in Algorithm 2 in Appendix B.
In practice, thereare some modiﬁcations of training generative models with mini-batch Max-SW for dealing withunknown metric space [11].
We defer the details of these modiﬁcations in Appendix D.
Amortized optimization: A natural question appears: "How can we avoid the nested loop in minibatch Max-SW due to several local optimization problems?".
In this paper, we propose a practicalsolution for this problem, which is known as amortized optimization [2].
In amortized optimization,instead of solving all optimization problems independently, an amortized model is trained to predictoptimal solutions to all problems.
We now state the adapted deﬁnition of amortized models based onthat in [50, 2]:
{+Deﬁnition 
+} For each context variable x in the context space X , ✓ ? ( x ) is the solution of the optimization problem ✓ ? ( x ) =
arg min ✓ 2 ⇥ L ( ✓ , x ) , where ⇥ is the solution space.
A parametric functionf : X ! ⇥ , where , is called an amortized model if
[Equation]
The amortized model is trained by the amortized optimization objective which is deﬁned as:
[Equation]
where p ( x ) is a probability measure on X which measures the "importance" of optimization problems.
The amortized model in Deﬁnition 1 is sometimes called a fully amortized model for a distinctionwith the other concept of semi amortized model [2].
The gap between the predicted solution and theoptimal solution E x ⇠ p ( x ) || f
( x )  ✓ ? ( x ) || 2 is called the amortization gap.
However, understandingthis gap depends on speciﬁc conﬁgurations of the objective L ( · , x ) , such as convexity and smoothness,which are often non-trivial to obtain in practice.
Amortized Sliced Wasserstein
In this section, we discuss an application of amortized optimization to the mini-batch max-sliced
Wasserstein.
In particular, we ﬁrst formulate the approach into a novel family of mini-batch losses,named Amortized Sliced Wasserstein .
Each member of this family utilizes an amortized model forpredicting informative slicing directions of mini-batch measures.
We then propose several usefulamortized models in practice, including the linear model, the generalized linear model, and thenon-linear model.
3.1 Amortized Sliced Wasserstein and Amortized Models
We extend the deﬁnition of the mini-batch max-sliced Wasserstein in Equation (5) with the usage ofan amortized model to obtain the amortized sliced Wasserstein as follows.
Deﬁnition 2 Let p  1 , m  1 , and µ, ⌫ are two probability measures in P ( R d ) .
Given an amortizedmodel f : R dm ⇥ R dm ! S d  1 where , the amortized sliced Wasserstein between µ and ⌫ is:
[Equation]
From the deﬁnition, we can see that the amortized model maps each pair of mini-batches to the optimalprojecting direction on the unit hypersphere between two corresponding mini-batch probabilitymeasures.
We have the following result about the symmetry and positivity of A -SW.
Proposition 1 The amortized sliced Wasserstein losses are positive and symmetric.
However, theyare not metrics since they do not satisfy the identity property, namely, A -SW ( µ, ⌫ ) = [-
 ̸⇐⇒ µ = ν .-][Equation]
Proof of Proposition 1 is in Appendix A.1.
Our next result indicates that we can upper bound theamortized sliced Wasserstein in terms of mini-batch max-sliced Wasserstein.
Proposition [-
-]2 Assume that the space is a compact set and the function f is continuous in terms of.
Then, the amortized sliced Wasserstein are lower-bounds of the mini-batch max-sliced Wasserstein(Equation 5), i.e., A -SW ( µ, ⌫ )  m-Max-SW ( µ, ⌫ ) for all probability measures µ and ⌫ .
Proof of Proposition 2 is in Appendix A.2.
Parametric forms of the amortized model: Now we deﬁne three types of amortized models that wewill use in the experiments.
Deﬁnition
Given X, Y 2 R dm , and the one-one "reshape" mapping T : R dm ! R d ⇥ m , the linearamortized model is deﬁned as:
[Equation]
where w 1 , w 2 2 R m , w 0 2 R d and = ( w 0 , w 1 , w 2 ) .
In Deﬁnition 3, the assumption is that the optimal projecting direction lies on the subspace that isspanned by the basis { x 1 , . . .
, x m , y 1 , . . .
, y m , w 0 } where
X =
( x 1 , . .
x m ) and Y =
( y 1 , . . .
, y m ) .
The computational complexity of this function is O ((2 m + 1) d ) since those of the operators T ( X ) w 1and T ( Y ) w 2 are O ( md ) while adding the bias w 0 costs an additional computational complexity
O ( d ) .
The number of parameters in linear amortized model is 2 m + d .
To increase the expressiveness of the linear amortized model, we apply some (non-linear) mappingsto the inputs X and Y , which results in the generalized linear amortized model as follows.
Deﬁnition
Given X, Y 2 R dm , and the one-one "reshape" mapping T : R dm ! R d ⇥ m , thegeneralized linear amortized model is deﬁned as:
[Equation]
where w 1 , w 2 2 R m , w 0 2 R d , 11 , g 1 : R dm ! R dm and = ( w 0 , w 1 , w 2 , 1 ) .
In Deﬁnition 4, the assumption is that the optimal projecting direction lies on the subspace that isspanned by the basis { x 0 1 , . . .
, x 0 m , y 0 1 , . . .
, y 0 m , w 0 } where g 1 ( X ) =
( x 0 1 , . . .
, x 0 m ) and g 1 ( Y ) =( y 0 1 , . . .
, y 0 m ) .
To specify, we let g 1 ( X ) =
( W 2  ( W 1 x 1 ) + b 0 , . . .
, W 2  ( W 1 x m ) + b 0 ) , where  ( · )is the Sigmoid function, W 1 2 R d ⇥ d , W 2 2 R d ⇥ d , and b 0 2 R d .
Compared to the linear model, thegeneralized linear model needs additional computations for g ( T ( X )) and g ( T ( Y )) , which are atthe order of O (2 m ( d 2 + d )) .
It is because we need to include the complexity for matrix multiplication,e.g., W 1 x 1 that costs O ( d 2 ) , for Sigmoid function that costs O ( d ) , and for adding bias b 0 that costs
O ( d ) .
Therefore, the total computational complexity of the function f is O (4 md 2 + 6 md + d )while the number of parameters is 2( m + d 2 + d ) .
We ﬁnally propose another amortized model where we instead consider some mapping on the function!
+ T ( X ) ! 1 + T ( Y ) ! 2 in the linear amortized model so as to increase the approximation power ofthe function f .
Deﬁnition
Given X, Y 2 R dm , and the one-one "reshape" mapping T : R dm ! R d ⇥ m , thenon-linear amortized model is deﬁned as:
[Equation]
(11) where w 1 , w 2 2 R m , w 0 2 R d , 22 , h 2 : R d ! R d and = ( w 0 , w 1 , w 2 , 2 ) .
In Deﬁnition 5, the assumption is that the optimal projecting direction lies on the image of thefunction h 2 ( · ) that maps from the subspace spanned by { x 1 , . . .
, x m , y 1 , . . .
, y m , w 0 } where X =( x 1 , . . .
, x m ) and Y =
( y 1 , . . .
, y m ) .
The computational complexity for h 2 ( x ) =
W 4  ( W 3 x ))
+ b [-
 whenx ∈-]0when x 2 R d , W 3 2 R d ⇥ d , W 4 2 R d ⇥ d , and b 0 2 R d is at the order of O (2( d 2 + d )) .
Therefore,the total computational complexity of the function f is O (2 md + 2 d 2 + 3 d ) while the number ofparameters is 2( m + d 2 + d ) .
Using amortized models in Deﬁnitions 3-5 leads to three corresponding amortized sliced Wassersteinlosses, which are linear amortized sliced Wasserstein loss ( LA -SW), generalized linear amortizedsliced Wasserstein loss ( GA -SW), and non-linear amortized sliced Wasserstein loss ( NA -SW) inturn.
Remark
The parametric forms in Deﬁnitions 3-5 are chosen as they are well-known choices forparametric functions.
There are still several other ways of parameterization that can be utilizedin practice based on prior knowledge about data, e.g., we can use convolution operator for savingparameters or we can strengthen the dependence between samples via recursive functions.
We leavethe design of these amortized models for future work.
3.2 Amortized Sliced Wasserstein Generative Models
Based on the amortized sliced Wasserstein losses, our objective function for training a generativemodel ⌫  parametrized by  2  now becomes:
[Equation]
Since the above optimization forms a minimax problem, we can use an alternating stochastic gradientdescent-ascent algorithm to solve it.
In particular, the stochastic gradients of  and can be estimatedfrom mini-batches ( X 1 , Y  , 1 ) , . .
, ( X k , Y  ,k ) ⇠ µ ⌦ m ⌦ ⌫ ⌦ m  as follows:
[Equation]
For more details, we present the procedure in Algorithm 3 in Appendix B.
Computational complexity:
From Algorithm 2 and Algorithm 3 in Appendix B, we can see thattraining with A -SW can escape the inner while-loop for ﬁnding the optimal projecting directions.
In each iteration of the global while-loop, the computational complexity of computing the minibatch Max-SW is O (2 kT 2 ( m log m + dm )) , which is composed by k mini-batches with T 2 loopsof the projection to one-dimension operator which costs O (2 dm ) and the computation of the sliced
Wasserstein which costs O (2 m log m ) .
For the mini-batch sliced Wasserstein, the overall computational complexity is O (2 kL ( m log m + dm )) where L is the number of projections.
For LA -SW,the overall computation complexity is O (2 k ( m log m + 3 md + d )) where the extra complexity
O ((2 m + 1) d ) comes from the computation of f ( · ) (see Section 3.1).
Similarly, the computationalcomplexities of GA -SW and NA -SW are respectively O
(2 k ( m log m + 4 md
+ 7 md + d )) and
O (2 k ( m log m + 3 md + 2 d 2 + 3 d )) .
Projection Complexity:
Compared to the sliced Wasserstein, Max-SW reduces the space forprojecting directions from O ( L ) to O (1) .
For LA -SW, GA -SW, and NA -SW, the projectioncomplexity is also O (1) .
However, compared to d parameters of Max-SW, LA -SW needs 2 m + dparameters for creating the projecting directions while GA -SW and NA -SW respectively need
O (2( m + d 2 + d )) parameters for producing the directions (see Section 3.1).
Remark
The computational complexities and the projection complexities of GA -SW and NA -SWare based on the speciﬁc parameterization that we choose in Section 3.
We would like to recallthat these complexities can be reduced by lighter parameterization as in the remark at the end of
Section 3.1.
Related Works
Generalized sliced Wasserstein [24] was introduced by changing the push-forward function fromlinear T ✓ ( x ) =
✓ > x to non-linear T ✓ ( x ) =
g ( ✓ , x ) for some non-linear function g ( · , · ) .
To cope withthe projection complexity of sliced Wasserstein, a biased approximation based on the concentration of Gaussian projections was proposed in [37].
An implementation technique that utilizes both RAM and GPUs’ memory for training sliced Wasserstein generative model was introduced in [27].
Augmentingthe data to a higher-dimensional space for a better linear separation results in augmented sliced
Wasserstein [6].
Projected Robust Wasserstein (PRW) metrics appeared in [42] that ﬁnds the bestorthogonal linear projecting operator onto d 0 > 1 dimensional space.
Riemannian optimizationtechniques for solving PRW were proposed in [28, 20].
We would like to recall that, amortizedoptimization techniques can be also applied to the case of PRW, max-K-sliced Wasserstein [9], sliceddivergences [36], and might be applicable for sliced mutual information [16].
Statistical guaranteesof training generative models with sliced Wasserstein were derived in [38].
Amortized optimization was ﬁrst introduced in the form of amortized variational inference [23, 45].
Several techniques were proposed to improve the usage of amortized variational inference such asusing meta sets in [57], using iterative amortized variational inference in [33], using regularizationin [51].
Amortized inference was also applied into many applications such as probabilistic reasoning [15], probabilistic programming [46], and structural learning [5].
However, to the best of ourknowledge, it is the ﬁrst time that amortized optimization is used in the literature of optimal transport.
We refer to [2] for a tutorial about the amortized optimization.
Experiments
In this section, we focus on comparing A -SW generative models with SNGAN [35], the sliced
Wasserstein generator [11], and the max-sliced Wasserstein generator [10].
The parameterization ofmodel distribution is based on the neural network architecture of SNGAN [35].
The detail of thetraining processes of all models is given in Appendix D. For datasets, we choose standard benchmarkssuch as CIFAR10 (32x32) [26], STL10 (96x96) [7], CelebA (64x64), and CelebAHQ (128x128) [32].
For quantitative comparison, we use the FID score [18] and the Inception score (IS) [48].
We alsoshow some randomly generated images from different models for qualitative comparison.
We givefull experimental results in Appendix E.
The detailed settings about architectures, hyperparameters,and evaluation of FID and IS are given in Appendix F.
We would like to recall that all losses that areused in this section are in their mini-batch version.
We ﬁrst demonstrate the quality of using A -SW in the training generative model compared tothe baseline SNGAN, and other mini-batch sliced Wasserstein variants.
Then, we investigate theconvergence of generative models trained by different losses including the standard SNGAN’s loss,mini-batch SW, mini-batch Max-SW, and A -SW by looking at their FID scores and IS scores overtraining epochs of their best settings.
After that, we compare models qualitatively by showing theirrandomly generated images.
Finally, we report the training speed (number of training iterations persecond) and the training memory (megabytes) of all settings of all training losses.
Summary of FID and IS scores: We show FID scores and IS scores of all models at the lasttraining step on all datasets in Table 1.
For SW and Max-SW, we select the best setting of hyperparameters for each score.
In particular, we search for the best setting of the number of projections L 2 { 1 , 100 , 1000 , 10000 } .
Also, we do a grid search on two hyperparameters of Max-SW,namely, the slice maximum number of iterations T 2 2 { 1 , 10 , 100 } and the slice learning rate⌘ 2 2 { 0 . 001 , 0 . 01 , 0 . 1 } .
The detailed FID scores and IS scores for all settings are reported in Table 3in Appendix E. For amortized models, we ﬁx the slice learning rate ⌘ 2 = 0 .
From Table 1, the bestamortized model provides lower FID scores and IS scores than SNGAN, SW, and Max-SW on all
[Table]
datasets of multiple image resolutions.
We would like to recall that, SNGAN is reported to be better [Table] than WGAN [3] in [35].
Furthermore, the best generative models trained by A -SW are better thanmodels trained with SNGAN, SW, and Max-SW.
Interestingly, the LA -SW performs consistentlywell compared to other members of A -SW.
Also, we observe that Max-SW performs worse thanboth A -SW and SW.
This might be because the local optimization of Max-SW gets stuck at somebad optimum.
However, we would like to recall that Max-SW is still better than SW with L = 1 (see
Table 3 in Appendix E).
It emphasizes the beneﬁt of searching for a good direction for projecting.
FID and IS scores over training epochs: We show the values of FID scores and Inception scoresover epochs on CIFAR10, CelebA, STL10, and CelebA-HQ in Figure 1.
According to the ﬁguresin Figure 1, we observe that using SW and A -SW helps the generative models converge faster than
SNGAN.
Moreover, FID lines of A -SW are usually under the lines of other losses and the IS lines of
A -SW are usually above the lines of others.
Therefore, A -SW losses including LA -SW, GA -SW,and NA -SW can improve the convergence of training generative models.
Generated images: We show generated images on CIFAR10, CelebA, STL10 from SNGAN, and
LA -SW in Figure 2 as a qualitative comparison.
The generated images on CelebAHQ and thegenerated images of Max-SW, GA -SW, and NA -SW are given in Appendix E. From these images,we observe that the quality of generated images is consistent with the FID scores and the IS scores.
Therefore, it reinforces the beneﬁts of using A -SW to train generative models.
Again, we would liketo recall that all generated images are completely random without cherry-picking.
Computational time and memory: We report the number of training iterations per second and thememory in megabytes (MB) in Table 2.
We would like to recall that reported numbers are undersome errors due to the state of the computational device.
From the table, we see that LA -SW iscomparable to Max-SW and SW ( L = 1) about the computational memory and the computationaltime.
More importantly, LA -SW is faster and consumes less memory than SW ( L  100 ) and
[Figure]
[Table]
Max-SW ( T 2  10 ).
Compared to SNGAN, SW variants increase the demand for memory andcomputation slightly.
From LA -SW to GA -SW and NA -SW, the computational time is slowerslightly; however, we need between 800 to 2100 MB of memory in extra.
Again, the additionalmemory depends on the chosen parameterization (see Section 3).
From this table, we can see thatusing sliced Wasserstein models gives better generative quality than SNGAN but it also costs morecomputational time and memory.
Among sliced Wasserstein variants, LA -SW is the best option sinceit costs the least additional memory and time while it gives consistently good results.
We refer to
Section 3 for discussion of the time and projection complexities of A -SW.
Conclusion
We propose using amortized optimization for speeding up the training of generative models that arebased on mini-batch sliced Wasserstein with projection optimization.
We introduce three types ofamortized models, including the linear, generalized, and non-linear amortized models, for predictingoptimal projecting directions between all pairs of mini-batch probability measures.
Moreover, usingthree types of amortized models leads to three corresponding mini-batch losses which are the linearamortized sliced Wasserstein, the generalized linear amortized sliced Wasserstein, and the non-linearamortized sliced Wasserstein.
We then show that these losses can improve the result of training deepgenerative models in both training speed and generative performance.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes]
(c) Did you discuss any potential negative societal impacts of your work?
[Yes]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes]
(b) Did you include complete proofs of all theoretical results?
[Yes]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes]
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes]
(c) Did you report error bars (e.g., with respect to the random seed after running experi-
ments multiple times)?
[Yes]
(d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
[Yes]
If you are using existing assets (e
g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes]
(b) Did you mention the license of the assets?
[N/A]
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes]
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identiﬁable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]