Title: ENTROPIC GANS MEET VAES: A STATISTICAL APPROACH TO COMPUTE SAMPLE LIKELIHOODS IN GANS

Abstract: Building on the success of deep learning, two modern approaches to learn a probability model of the observed data are Generative Adversarial Networks (GANs) and Variational AutoEncoders (VAEs). VAEs consider an explicit probability model for the data and compute a generative distribution by maximizing a variational lower-bound on the log-likelihood function. GANs, however, compute a generative model by minimizing a distance between observed and generated probability distributions without considering an explicit model for the observed data. The lack of having explicit probability models in GANs prohibits computation of sample likelihoods in their frameworks and limits their use in statistical inference problems. In this work, we show that an optimal transport GAN with the entropy regularization can be viewed as a generative model that maximizes a lower-bound on average sample likelihoods, an approach that VAEs are based on. In particular, our proof constructs an explicit probability model for GANs that can be used to compute likelihood statistics within GAN's framework. Our numerical results on several datasets demonstrate consistent trends with the proposed theory.

1. INTRODUCTION:

Learning generative models is becoming an increasingly important problem in machine learning and statistics with a wide range of applications in self-driving cars (Santana & Hotz, 2016) , robotics (Hirose et al., 2017) , natural language processing (Lee & Tsao, 2018 ), domain-transfer (Sankaranarayanan et al., 2018) , computational biology (Ghahramani et al., 2018) , etc. Two modern approaches to deal with this problem are Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) and Variational AutoEncoders (VAEs) (Kingma & Welling, 2013; Makhzani et al., 2015; Rosca et al., 2017; Tolstikhin et al., 2017; Mescheder et al., 2017b) .

VAEs (Kingma & Welling, 2013 ) compute a generative model by maximizing a variational lowerbound on average sample likelihoods using an explicit probability distribution for the data. GANs, however, learn a generative model by minimizing a distance between observed and generated distributions without considering an explicit probability model for the data. Empirically, GANs have been shown to produce higher-quality generative samples than that of VAEs (Karras et al., 2017) . However, since GANs do not consider an explicit probability model for the data, we are unable to compute sample likelihoods using their generative models. Computations of sample likelihoods and posterior distributions of latent variables are critical in several statistical inference. Inability to obtain such statistics within GAN's framework severely limits their applications in such statistical inference problems.

In this paper, we resolve these issues for a general formulation of GANs by providing a theoreticallyjustified approach to compute sample likelihoods using GAN's generative model. Our results can open new directions to use GANs in massive-data applications such as model selection, sample selection, hypothesis-testing, etc (see more details in Section 5). Now, we state our main results informally without going into technical conditions while precise statements of our results are presented in Section 2. Let Y and Ŷ ∶= G(X) represent observed (i.e. real) and generative (i.e. fake or synthetic) variables, respectively. X (i.e. the latent variable) is the randomness used as the input to the generator G(.). Consider the following explicit probability By training a GAN model, we first compute optimal generator G * and optimal coupling between the observed variable Y and the latent variable X. The likelihood of a test sample y test can then be lower-bounded using a combination of three terms: (1) the expected distance of y test to the distribution learnt by the generative model, (2) the entropy of the coupled latent variable given y test and (3) the likelihood of the coupled latent variable with y test .

model of the data given a latent sample X = x:

EQUATION

where (., .) is a loss function. f Y X=x (y) is the model that we are considering for the underlying data distribution. This is a reasonable model for the data as the function G can be a complex function. Similar data models have been used in VAEs. Under this explicit probability model, we show that minimizing the objective of an optimal transport GAN (e.g. Wasserstein GAN Arjovsky et al. (2017) ) with the cost function (., .) and an entropy regularization (Cuturi, 2013; Seguy et al., 2017) maximizes a variational lower-bound on average sample likelihoods. I.e.

average sample likelihoods ≥ -(entropic GAN objective) + constants.

(1.2)

If (y, ŷ) = yŷ 2 , the optimal transport (OT) GAN simplifies to WGAN (Arjovsky et al., 2017) while if (y, ŷ) = yŷ 2 2 , the OT GAN simplifies to the quadratic GAN (or, W2GAN) (Feizi et al., 2017) . The precise statement of this result can be found in Theorem 1. This result provides a statistical justification for GAN's optimization and puts it in par with VAEs whose goal is to maximize a lower bound on sample likelihoods. We note that the entropy regularization has been proposed primarily to improve computational aspects of GANs (Genevay et al., 2018) . Our results provide an additional statistical justification for this regularization term. Moreover, using GAN's training, we obtain a coupling between the observed variable Y and the latent variable X. This coupling provides the conditional distribution of the latent variable X given an observed sample Y = y. The explicit model of equation 1.1 acts similar to the decoder in the VAE framework, while the coupling computed using GANs acts as an encoder.

Connections between GANs and VAEs have been investigated in some of the recent works as well (Hu et al., 2018; Mescheder et al., 2017a) . In Hu et al. (2018) , GANs are interpreted as methods performing variational inference on a generative model in the label space. In their framework, observed data samples are treated as latent variables while the generative variable is the indicator of whether data is real or fake. The method in Mescheder et al. (2017a) , on the other hand, uses an auxiliary discriminator network to rephrase the maximum-likelihood objective of a VAE as a twoplayer game similar to the objective of a GAN. Our method is different from both these approaches as we consider an explicit probability model for the data, and show that the entropic GAN objective maximizes a variational lower bound under this probability model, thus allowing sample likelihood computation in GANs similar to VAEs.

Of relevance to our work is Wu et al. (2016) , in which annealed importance sampling (AIS) is used to evaluate the approximate likelihood of decoder-based generative models. More specifically, a Gaussian observation model with a fixed variance is used as the generative distribution for GANbased models on which the AIS is computed. Gaussian observation models may not be proper specially in high-dimensional spaces. Our approach, on the other hand, makes a connection between GANs and VAEs by constructing a theoretically-motivated model for the data distribution in GANs. We then leverage this approach in computing sample likelihood estimates in GANs.

Another key question that we address here is how to estimate the likelihood of a new sample y test given the generative model trained using GANs. For instance, if we train a GAN on stop-sign images, upon receiving a new image, one may wish to compute the likelihood of the new sample y test according to the trained generative model. In standard GAN formulations, the support of the generative distribution lies on the range of the optimal generator function. Thus, if the observed sample y test does not lie on that range (which is very likely in practice), there is no way to assign a sensible likelihood score to that sample. Below, we show that using the explicit probability model of equation 1.1, we can lower-bound the likelihood of this sample y test . This is similar to the variational lower-bound on sample likelihoods used in VAEs. Our numerical results show that this lower-bound well-reflect the expected trends of the true sample likelihoods.

Let G * and P * Y,X be the optimal generator and the optimal coupling between real and latent variables, respectively. The optimal coupling P * Y,X can be computed efficiently for entropic GANs as we explain in Section 3. For other GAN architectures, one may approximate such couplings as we explain in Section 4. The log likelihood of a new test sample y test can be lower-bounded as

log f Y (y test ) log likelihood ≥ -E P * X Y =y test (y test , G * (x))

distance to the generative model

+ H P * X Y =y test coupling entropy + E P * X Y =y test - x 2 2 likelihood of latent variable . (1.3)

We present the precise statement of this result in Corollary 2. This result combines three components in order to approximate the likelihood of a sample given a trained generative model:

• The distance between y test to the generative model. If this distance is large, the likelihood of observing y test from the generative model is small. • The entropy of the coupled latent variable. If the entropy term is large, the coupled latent variable has a large randomness. This contributes positively to the sample likelihood. • The likelihood of the coupled latent variable. If latent samples have large likelihoods, the likelihood of the observed test sample will be large as well.

Figure 2a provides a pictorial illustration of these components. In what follows, we explain the technical ingredients of our main results. In Section 3, we present computational methods for GANs and entropic GANs, while in Section 4, we provide numerical experiments on benchmark datasets.

2. MAIN RESULTS:

Let Y ∈ R d represent the real-data random variable with a probability density function f Y (y).

GAN's goal is to find a generator function G ∶ R r → R d such that Ŷ ∶= G(X) has a similar distribution to Y . Let X be an r-dimensional random variable with a fixed probability density function f X (x). Here, we assume f X (.) is the density of a normal distribution. In practice, we observe m samples {y 1 , ..., y m } from Y and generate m ′ samples from Ŷ , i.e., {ŷ 1 , ..., ŷm ′ } where ŷi = G(x i ) for 1 ≤ i ≤ m. We represent these empirical distributions by P Y and P Ŷ , respectively. Note that the number of generative samples m ′ can be arbitrarily large.

GAN computes the optimal generator G * by minimizing a distance between the observed distribution P Y and the generative one P Ŷ . Common distance measures include optimal transport measures (e.g. Wasserstein GAN (Arjovsky et al., 2017) , WGAN+Gradient Penalty (Gulrajani et al., 2017) , GAN+Spectral Normalization (Miyato et al., 2018 ), WGAN+Truncated Gradient Penalty (Petzka et al., 2017) , relaxed WGAN (Guo et al., 2017) ), and divergence measures (e.g. the original GAN's formulation (Goodfellow et al., 2014) , f -GAN (Nowozin et al., 2016) ), etc.

In this paper, we focus on GANs based on optimal transport (OT) distance (Villani, 2008; Arjovsky et al., 2017) defined for a general loss function (., .) as follows

W (P Y , P Ŷ ) ∶= min P Y, Ŷ E (Y, Ŷ ) .

(2.1) P Y, Ŷ is the joint distribution whose marginal distributions are equal to P Y and P Ŷ , respectively. If (y, ŷ) = yŷ 2 , this distance is called the first-order Wasserstein distance and is referred to by W 1 (., .), while if (y, ŷ) = yŷ 2 2 , this measure is referred to by W 2 (., .) where W 2 is the second-order Wasserstein distance (Villani, 2008) .

The optimal transport (OT) GAN is formulated using the following optimization (Arjovsky et al., 2017; Villani, 2008) :

min G∈G W (P Y , P Ŷ ), (2.2)

where G is the set of generator functions. Examples of the OT GAN are WGAN (Arjovsky et al., 2017) corresponding to the first-order Wasserstein distance W 1 (., .)1 and the quadratic GAN (or, the W2GAN) (Feizi et al., 2017) corresponding to the second-order Wasserstein distance W 2 (., .).

Note that optimization 2.2 is a min-min optimization. The objective of this optimization is not smooth in G and it is often computationally expensive to obtain a solution (Sanjabi et al., 2018) .

One approach to improve computational aspects of this optimization is to add a regularization term to make its objective strongly convex (Cuturi, 2013; Seguy et al., 2017) . The Shannon entropy function is defined as H(P Y, Ŷ ) ∶= -E log P Y, Ŷ . The negative Shannon entropy is a common strongly-convex regularization term. This leads to the following optimal transport GAN formulation with the entropy regularization, or for simplicity, the entropic GAN formulation:

min G∈G min P Y, Ŷ E (Y, Ŷ ) -λH P Y, Ŷ , (2.3)

where λ is the regularization parameter.

There are two approaches to solve the optimization problem 2.3. The first approach uses an iterative method to solve the min-min formulation (Genevay et al., 2017) . Another approach is to solve an equivelent min-max formulation by writing the dual of the inner minimization (Seguy et al., 2017; Sanjabi et al., 2018) . The latter is often referred to as a GAN formulation since the min-max optimization is over a set of generator functions and a set of discriminator functions. The details of this approach are further explained in Section 3.

In the following, we present an explicit probability model for entropic GANs under which their objective can be viewed as maximizing a lower bound on average sample likelihoods.

Theorem 1 Let the loss function be shift invariant, i.e., (y, ŷ) = h(yŷ). Let

EQUATION

be an explicit probability model for Y given X = x for a well-defined normalization

C ∶= 1 ∫ y∈R d exp(-(y, G(x)) λ)

.

(2.5)

Then, we have

E P Y [log f Y (Y )] ave. sample likelihoods ≥ - 1 λ E P Y, Ŷ (Y, Ŷ ) -λH P Y, Ŷ entropic GAN objective

+constants.

(2.6)

In words, the entropic GAN maximizes a lower bound on sample likelihoods according to the explicit probability model of equation 2.4.

The proof of this theorem is presented in Section A. This result has a similar flavor to that of VAEs (Makhzani et al., 2015; Rosca et al., 2017; Tolstikhin et al., 2017; Mescheder et al., 2017b) where a generative model is computed by maximizing a lower bound on sample likelihoods.

Having a shift invariant loss function is critical for Theorem 1 as this makes the normalization term C independent from G and x (to see this, one can define y ′ ∶= y -G(x) in equation 2.6). The most standard OT GAN loss functions such as the L 2 for WGAN (Arjovsky et al., 2017) and the quadratic loss for W2GAN (Feizi et al., 2017) satisfy this property.

One can further simplify this result by considering specific loss functions. For example, we have the following result for the entropic GAN with the quadratic loss function.

Corollary 1 Let (y, ŷ) = yŷ2 2. Then, f Y X=x (.) of equation 2.4 corresponds to the multivariate Gaussian density function and

C = 1 (2πλ) d . In this case, the constant term in equation 2.6 is equal to -log(m) -d log(2πλ) 2 -r 2 -log(2π) 2.

Let G * and P * Y,X be optimal solutions of an entropic GAN optimization 2.3 (note that the optimal coupling can be computed efficiently using equation 3.7). Let y test be a newly observed sample. An important question is what the likelihood of this sample is given the trained generative model. Using the explicit probability model of equation 2.4 and the result of Theorem 1, we can (approximately) compute sample likelihoods as explained in the following corollary.

Corollary 2 Let G * and P * Y, Ŷ (or, alternatively P * Y,X ) be optimal solutions of the entropic GAN equation 2.3. Let y test be a new observed sample. We have

log f Y (y test ) ≥ - 1 λ E P * X Y =y test (y test , G * (x)) -λH P * X Y =y test

(2.7)

+ E P * X Y =y test - x 2 2 + constants.

The inequality becomes tight iff D KL P * X Y =y test f X Y =y test = 0 where D KL (. .) is the Kullback-Leibler divergence between two distributions.

3. GAN'S DUAL FORMULATION:

In this section, we discuss dual formulations for OT GAN (equation 2.2) and entropic GAN (equation 2.3) optimizations. These dual formulations are min-max optimizations over two function classes, namely the generator and the discriminator. Often local search methods such as alternating gradient descent (GD) are used to compute a solution for these min-max optimizations.

First, we discuss the dual formulation of OT GAN optimization 2.2. Using the duality of the inner minimization, which is a linear program, we can re-write optimization 2.2 as follows (Villani, 2008) :

EQUATION

where D 1 (y) -D 2 (ŷ) ≤ (y, ŷ) for all (y, ŷ). The maximization is over two sets of functions D 1 and D 2 which are coupled using the loss function. Using the Kantorovich duality Villani (2008) , we can further simplify this optimization as follows:

EQUATION

where ) and D is restricted to -convex functions (Villani, 2008) . The above optimization provides a general formulation for OT GANs. If the loss function is . 2 , then the optimal transport distance is referred to as the first order Wasserstein distance. In this case, the min-max optimization 3.2 simplifies to the following optimization (Arjovsky et al., 2017) :

D ( ) ( Ŷ ) ∶= inf Y (Y, Ŷ ) + D(Y ) is the -conjugate function of D(.

min G∈G max D:1-Lip E [D(Y )] -E [D(G(X))] . (3.3)

This is often referred to as Wasserstein GAN, or WGAN (Arjovsky et al., 2017) . If the loss function is quadratic, then the OT GAN is referred to as the quadratic GAN (or, W2GAN) (Feizi et al., 2017) .

Similarly, the dual formulation of the entropic GAN equation 2.3 can be written as the following optimization (Cuturi, 2013; Seguy et al., 2017) 2 :

EQUATION

where v(y, ŷ) ∶= D 1 (y) -D 2 (ŷ) -(y, ŷ).

(3.5) Note that the hard constraint of optimization 3.1 is being replaced by a soft constraint in optimization 3.2. In this case, optimal primal variables P * Y, Ŷ can be computed according to the following lemma (Seguy et al., 2017) :

Lemma 1 Let D *

1 and D * 2 be the optimal discriminator functions for a given generator function G according to optimization 3.4. Let

v * (y, ŷ) ∶= D * 1 (y) -D * 2 (ŷ) -(y, ŷ). (3.6) Then, P * Y, Ŷ (y, ŷ) = P Y (y)P Ŷ (ŷ) exp (v * (y, ŷ) λ). (3.7)

This lemma is important for our results since it provides an efficient way to compute the optimal coupling between real and generative variables (i.e. P * Y, Ŷ ) using the optimal generator (G * ) and discriminators (D * 1 and D * 2 ) of optimization 3.4. It is worth noting that without the entropy regularization term, computing the optimal coupling using the optimal generator and discriminator functions is not straightforward in general (unless in some special cases such as W2GAN (Villani, 2008; Feizi et al., 2017) ). This is another additional computational benefit of using entropic GAN.

4. EXPERIMENTAL RESULTS:

In this section, we supplement our theoretical results with experimental validations. One of the main objectives of our work is to provide a framework to compute sample likelihoods in GANs. Such likelihood statistics can then be used in several statistical inference applications that we discuss in Section 5. With a trained entropic WGAN, the likelihood of a test sample can be lower-bounded using Corollary 2. Note that this likelihood estimate requires the discriminators D 1 and D 2 to be solved to optimality. In our implementation, we use the algorithm presented in Sanjabi et al. (2018) to train the Entropic GAN. It has been proven (Sanjabi et al., 2018) that this algorithm leads to a good approximation of stationary solutions of Entropic GAN.

To obtain the surrogate likelihood estimates using Corollary 2, we need to compute the density P * X Y =y test (x). As shown in Lemma 1, WGAN with entropy regularization provides a closedform solution to the conditional density of the latent variable (equation 3.7). When G * is injective, P * X Y =y test (x) can be obtained from equation 3.7 by change of variables. In general case, P * X Y =y test (x) is not well defined as multiple x can produce the same y test . In this case,

P * Ŷ Y =y test (ŷ) = x G * (x)=y P * X Y =y test (x). (4.1)

Also, from equation 3.7, we have

P * Ŷ Y =y test (ŷ) = x G * (x)=y P X (x) exp v * y test , G * (x) λ . (4.2)

One solution (which may not be unique) that satisfies both equation 4.1 and 4.2 is

P * X Y =y test (x) = P X (x) exp v * y test , G * (x) λ . (4.3)

Ideally, we would like to choose P * X Y =y test (x) satisfying equation 4.1 and 4.2 that maximizes the lower bound of Corollary 2. But finding such a solution can be difficult in general. Instead we use equation 4.3 to evaluate the surrogate likelihoods of Corollary 2 (note that our results still hold in this case). In order to compute our proposed surrogate likelihood, we need to draw samples from the distribution P * X Y =y test (x). One approach is to use a Markov chain Monte Carlo (MCMC) method to sample from this distribution. In our experiments, however, we found that MCMC demonstrates poor performance owing to the high dimensional nature of X. A similar issue with MCMC has been reported for VAEs in Kingma & Welling (2013) . Thus, we use a different estimator to compute the likelihood surrogate which provides a better exploration of the latent space. We present our sampling procedure in Alg. 1 of Appendix. 

4.2. LIKELIHOOD COMPARISON ACROSS DIFFERENT DATASETS:

In this section, we perform experiments across different datasets. An entropic WGAN is first trained on a subset of samples from the MNIST dataset containing digit 1 (which we call the MNIST-1 dataset). With this trained model, likelihood estimates are computed for (1) samples from the entire MNIST dataset, and (2) samples from the Street View House Numbers (SVHN) dataset (Netzer et al., 2011) (Fig. 2b ). In each experiment, the likelihood estimates are computed for 1000 samples. We note that highest likelihood estimates are obtained for samples from MNIST-1 dataset, the same dataset on which the GAN was trained. The likelihood distribution for the MNIST dataset is bimodal with one mode peaking inline with the MNIST-1 mode. Samples from this mode correspond to digit 1 in the MNIST dataset. The other mode, which is the dominant one, contains the rest of the digits and has relatively low likelihood estimates. The SVHN dataset, on the other hand, has much smaller likelihoods as its distribution is significantly different than that of MNIST. Furthermore, we observe that the likelihood distribution of SVHN samples has a large spread (variance). This is because samples of the SVHN dataset is more diverse with varying backgrounds and styles than samples from MNIST. We note that SVHN samples with high likelihood estimates correspond to images that are similar to MNIST digits, while samples with low scores are different than MNIST samples. Details of this experiment are presented in Appendix E.

4.3. APPROXIMATE LIKELIHOOD COMPUTATION IN UN-REGULARIZED GANS:

Most standard GAN architectures do not have the entropy regularization. Likelihood lower bounds of Theorem 1 and Corollary 2 hold even for those GANs as long as we obtain the optimal coupling P *

Y,:

Ŷ in addition to the optimal generator G * from GAN's training. Computation of optimal cou- Ŷ from the dual formulation of OT GAN can be done when the loss function is quadratic (Feizi et al., 2017) . In this case, the gradient of the optimal discriminator provides the optimal coupling between Y and Ŷ (Villani, 2008) 

(see Lemma. 2 in Appendix C).

For a general GAN architecture, however, the exact computation of optimal coupling P * Y, Ŷ may be difficult. One sensible approximation is to couple Y = y test with a single latent sample x (we are assuming the conditional distribution P * X Y =y test is an impulse function). To compute x corresponding to a y test , we sample k latent samples {x ′ i } k i=1 and select the x ′ i whose G * (x ′ i ) is closest to y test . This heuristic takes into account both the likelihood of the latent variable as well as the distance between y test and the model (similarly to equation 3.7). We can then use Corollary 2 to approximate sample likelihoods for various GAN architectures.

We use this approach to compute likelihood estimates for CIFAR-10 ( Krizhevsky, 2009) and LSUN-Bedrooms (Yu et al., 2015) datasets. For CIFAR-10, we train DCGAN while for LSUN, we train WGAN (details of these experiments can be found in Appendix E). Fig. 3a demonstrates sample likelihood estimates of different datasets using a GAN trained on CIFAR-10. Likelihoods assigned to samples from MNIST and Office datasets are lower than that of the CIFAR dataset. Samples from the Office dataset, however, are assigned to higher likelihood values than MNIST samples. We note that the Office dataset is indeed more similar to the CIFAR dataset than MNIST. A similar experiment has been repeated for LSUN-Bedrooms (Yu et al., 2015) dataset. We observe similar performance trends in this experiment (Fig. 3b ).

5. CONCLUSION:

In this paper, we have provided a statistical framework for a family of GANs. Our main result shows that the entropic GAN optimization can be viewed as maximization of a variational lower-bound on average log-likelihoods, an approach that VAEs are based upon. This result makes a connection between two most-popular generative models, namely GANs and VAEs. More importantly, our result constructs an explicit probability model for GANs that can be used to compute a lower-bound on sample likelihoods. Our experimental results on various datasets demonstrate that this likelihood surrogate can be a good approximation of the true likelihood function. Although in this paper we mainly focus on understanding the behavior of the sample likelihood surrogate in different datasets, the proposed statistical framework of GANs can be used in various statistical inference applications. For example, our proposed likelihood surrogate can be used as a quantitative measure to evaluate the performance of different GAN architectures, it can be used to quantify the domain shifts, it can be used to select a proper generator class by balancing the bias term vs. variance, it can be used to detect outlier samples, it can be used in statistical tests such as hypothesis testing, etc. We leave exploring these directions for future work. Consider a joint density function P X,Y such that its marginal distributions match P X and P Y . Note that the equation A.1 is true for every x. Thus, we can take the expectation of both sides with respect to a distribution P X Y =y . This leads to the following equation:

log f Y (y) =E P X Y =y -(y, G(x)) λ + log C - 1 2 log 2π - x 2 2 -log f X Y =y (x) (A.2) =E P X Y =y -(y, G(x)) λ + log C - 1 2 log 2π - x 2 2 -log f X Y =y (x) + log P X Y =y (x) -log P X Y =y (x) = -E P X Y =y [ (y, G(x)) λ] - 1 2 log 2π + log C + E P X Y =y - x 2 2 + KL P X Y =y f X Y =y + H P X Y =y ,

where H(.) is the Shannon-entropy function.

Next we take the expectation of both sides with respect to P Y :

E [log f Y (Y )] = - 1 λ E P X,Y [ (y, G(x))] - 1 2 log 2π + log C + E f X - x 2 2 (A.3) + E P Y KL P X Y =y f X Y =y + H (P X,Y ) -H (P Y ) .

Here, we replaced the expectation over P X with the expectation over f X since one can generate an arbitrarily large number of samples from the generator. Since the KL divergence is always nonnegative, we have

E [log f Y (Y )] ≥ - 1 λ E P X,Y [ (y, G(x))] -λH (P X,Y ) + log C -log(m) - r + log 2π 2 (A.4)

Moreover, using the data processing inequality, we have Thomas, 2012) . Thus,

H(P X,Y ) ≥ H(P G(X),Y ) (Cover &

E [log f Y (Y )] sample likelihood ≥ - 1 λ E P X,Y [ (y, G(x))] -λH P Y, Ŷ

GAN objective with entropy regularizer

+ log C -log(m) - r + log 2π 2 (A.5)

This inequality is true for every P X,Y satisfying the marginal conditions. Thus, similar to VAEs, we can pick P X,Y to maximize the lower bound on average sample log-likelihoods. This leads to the entropic GAN optimization 2.3.

APPENDIX B TIGHTNESS OF THE BOUND:

In Theorem 1, we showed that the Entropic GAN objective maximizes a lower-bound on the average sample log-likelihoods. This result is in the same flavor of variational lower bounds used in VAEs, thus providing a connection between these two areas. One drawback of VAEs in general is about the lack of tightness analysis of the employed variational lower bounds.

In this section, we aim to understand the tightness of the entropic GAN lower bound for some generative models. Corollary 2 shows that the entropic GAN lower bound is tight when KL P X Y =y f X Y =y approaches 0. Quantifying this term can be useful for assessing the quality of the proposed likelihood surrogate function. We refer to this term as the approximation gap.

Computing the approximation gap can be difficult in general as it requires evaluating f X Y =y . Here we perform an experiment for linear generative models and a quadratic loss function (same setting of Corrolary 1). Let the real data Y be generated from the following underlying model 

f Y X=x ∼ N (Gx, λI)

where X ∼ N (0, I)

Using the Bayes rule, we have

f X y test ∼ N (Ry test , I -RG)

where R = G T (GG T + λI) -1

Since we have a closed-form for f X Y , KL P X Y =y f X Y =y can be computed efficiently.

The matrix G to generate Y is chosen randomly. Then, an entropic GAN with a linear generator and non-linear discriminators are trained on this dataset. P X Y =y is then computed using equation 4.3. Table 1 reports the average surrogate log-likelihood values and the average approximation gaps computed over 100 samples drawn from the underlying data distribution. We observe that the approximation gap is orders of magnitudes smaller than the log-likelihood values.

Additionally, in Figure 4 , we demonstrate the density functions of P X Y =y and f X Y =y for a random y and a two-dimensional case (r = 2) . In this figure, one can observe that both distributions are very similar to one another making the approximation gap very small.

Architecture and hyper-parameter details: For the generator network, we used 3 linear layers without any non-linearities (2 → 128 → 128 → 2). Thus, it is an over-parameterized linear system. The discriminator architecture (both D 1 and D 2 ) is a 2-layer MLP with ReLU non-linearities (2 → 128 → 128 → 1). λ = 0.1 was used in all the experiments. Both generator and discriminator were trained using the Adam optimizer with a learning rate 10 -6 and momentum 0.5. The discriminators were trained for 10 steps per generator iteration. Batch size of 512 was used. 

i i.i.d ∼ P X (x) 2: Compute u i ∶= P X (x i ) exp (v * (y test , G * (x i )) λ) 3: Normalize to get probabilities p i = ui ∑ N i=1 ui 4: Compute L = -1 λ [∑ N i=1 p i l(y test , G * (x i )) + λ ∑ N i=1 p i log p i ] -∑ N i=1 p i xi 2 2 5: Return L APPENDIX C OPTIMAL COUPLING FOR W2GAN Optimal coupling P * Y,

Ŷ for the W2GAN (quadratic GAN (Feizi et al., 2017) ) can be computed using the gradient of the optimal discriminator (Villani, 2008) as follows.

Lemma 2 Let P Y be absolutely continuous whose support contained in a convex set in R d . Let D opt be the optimal discriminator for a given generator G in W2GAN. This solution is unique. Moreover, we have

Ŷ dist = Y -∇D opt (Y ), (C.1)

where dist = means matching distributions.

APPENDIX D SINKHORN LOSS:

In practice, it has been observed that a slightly modified version of the entropic GAN demonstrates improved computational properties (Genevay et al., 2017; Sanjabi et al., 2018) . We explain this modification in this section. Let Since H(P Y ) + H(P Ŷ ) is constant in our setup, optimizing the GAN with the Sinkhorn loss is equivalent to optimizing the entropic GAN. So, our likelihood estimation framework can be used with models trained using Sinkhorn loss as well. This is particularly important from a practical standpoint as training models with Sinkhorn loss tends to be more stable in practice.

APPENDIX E TRAINING ENTROPIC GANS:

In this section, we discuss how WGANs with entropic regularization is trained. As discussed in Section 3, the dual of the entropic GAN formulation can be written as We trained a WGAN model on LSUN-Bedrooms dataset with DCGAN architectures for generator and discriminator networks (Arjovsky et al., 2017) . The hyperparameter details are given in Table . 6, and some sample generations are provided in Fig. 8 Table 

:

Note some references (e.g.(Arjovsky et al.,

2017)) refer to the first-order Wasserstein distance simply as the Wasserstein distance. In this paper, we distinguish between different Wasserstein distances explicitly.

Note that optimization

3.4 is dual of optimization 2.3 when the terms λH(P Y ) + λH(P Ŷ ) have been added to its objective. Since for a fixed G (fixed marginals), these terms are constants, they can be ignored from the optimization objective without loss of generality.

Figures and Tables:

Figure1: A statistical framework for GANs. By training a GAN model, we first compute optimal generator G * and optimal coupling between the observed variable Y and the latent variable X. The likelihood of a test sample y test can then be lower-bounded using a combination of three terms: (1) the expected distance of y test to the distribution learnt by the generative model, (2) the entropy of the coupled latent variable given y test and (3) the likelihood of the coupled latent variable with y test .

Figure 2: (a) Distributions of surrogate sample likelihoods at different iterations of entropic WGAN's training using MNIST dataset. (b) Distributions of surrogate sample likelihoods of MNIST, MNIST-1 and SVHM datasets using a GAN trained on MNIST-1.

Figure 3: (a) Sample likelihood estimates of MNIST, Office and CIFAR datasets using a GAN trained on the CIFAR dataset. (b) Sample likelihood estimates of MNIST, Office and LSUN datasets using a GAN trained on the LSUN dataset.

Figure 4: A visualization of density functions of P X Y =y test and f X Y =y test for a random twodimensional y test . Both distributions are very similar to one another making the approximation gap (i.e. KL P X Y =y test f X Y =y test ) very small. Our other experimental results presented inTable 1 are consistent with this result.

Figure 5: Samples generated by Entropic GAN trained on MNIST

Figure 7: Samples generated by DCGAN model trained on CIFAR dataset

X Y =y test and f X Y =y test for a random twodimensional y

Table content: <table/>

The tightness of the entropic GAN lower bound. Approximation gaps are orders of magnitudes smaller than the surrogate log-likelihood values. Results are averaged over 100 samples drawn from the underlying data distribution.

Table content: <table><tr><td colspan="3">Noise Dimension Approximation Gap Surrogate Log-Likelihood</td></tr><tr><td>2 5 10</td><td>9.3 × 10 -4 4.7 × 10 -2 6.2 × 10 -2</td><td>-4.15 -15.35 -46.3</td></tr></table>

KL (. .) is the KullbackLeibler divergence. Note that the objective of this optimization differs from that of the entropic GAN optimization 2.3 by a constant term λH(P Y ) + λH(P Ŷ ). A sinkhorn distance function is then defined as(Genevay et al., 2017):W ,λ (P Y , P Ŷ ) ∶= 2W ,λ (P Y , P Ŷ ) -W ,λ (P Y , P Y ) -W ,λ (P Ŷ , P Ŷ ). (D.2)W is called the Sinkhorn loss function. ReferenceGenevay et al. (2017) has shown that as λ → 0, W ,λ (P Y , P Ŷ ) approaches W ,λ (P Y , P Ŷ ). For a general λ, we have the following upper and lower bounds:Lemma 3 For a given λ > 0, we haveW ,λ (P Y , P Ŷ ) ≤ 2W ,λ (P Y , P Ŷ ) ≤ W ,λ (P Y , P Ŷ ) + λH(P Y ) + λH(P Ŷ ).Proof From the definition equation D.2, we have W ,λ (P Y , P Ŷ ) ∶≥ W ,λ (P Y , P Ŷ ) 2. Moreover, since W ,λ (P Y , P Y ) ≤ H(P Y ) (this can be seen by using an identity coupling as a feasible solution for optimization D.1) and similarly W ,λ (P Ŷ , P Ŷ ) ≤ H(P Ŷ ), we have W ,λ (P Y , P Ŷ ) ≤ W ,λ (P Y , P Ŷ ) 2 + λ 2H(P Y ) + λ 2H(P Ŷ ).

Table content: <table><tr><td>(D.3)</td></tr></table>

4: Hyper-parameter details for MNIST experiment

Table content: <table><tr><td>Parameter</td><td>Config</td></tr><tr><td>λ</td><td>5</td></tr><tr><td>Generator learning rate</td><td>0.0002</td></tr><tr><td>Discriminator learning rate</td><td>0.0002</td></tr><tr><td>Batch size</td><td>100</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Optimizer params Number of critic iters / gen iter</td><td>β 1 = 0.5, β 2 = 0.9 5</td></tr><tr><td>Number of training iterations</td><td>10000</td></tr><tr><td colspan="2">Table 5: Hyper-parameter details for CIFAR-10 experiment</td></tr><tr><td>Parameter</td><td>Config</td></tr><tr><td>Generator learning rate</td><td>0.0002</td></tr><tr><td>Discriminator learning rate</td><td>0.0002</td></tr><tr><td>Batch size</td><td>64</td></tr><tr><td>Optimizer</td><td>Adam</td></tr><tr><td>Optimizer params Number of training epochs</td><td>β 1 = 0.5, β 2 = 0.99 100</td></tr></table>

Peer review (iclr2019):
 The contribution of the paper is to show that WGAN with entropic regularization maximize a lower bound on the likelihood of the observed data distribution. While the WGAN formulation minimizes the Wasserstein distance of the transformed latent distribution and the empirical distribution which is already a nice measure of "progress", having a bound on the likelihood can be interesting. Pros: + I like the entropic GAN formulation and believe it is very interesting as it gives access to the joint distribution of latent and observed variables. + While there are some doubtful statements, overall the paper is well written and easy to read. Cons: - The assumption of injectivity of the generator could be problematic, as it might not be fulfilled due to mode collapse. - I feel the theory is not very deep. Since one has a closed form of the transportation map (Eq. 3.7), the likelihood of the data is obtained by marginalizing out the latent space. However, this assumes that the inner dual maximization problem is solved to stationarity so that Eq 3.7 holds, which is not the case in practice (5 discriminator updates). - Thus in Sec. 4.1 for the likelihood at various points in training it is not clear what is actually happening. - Sec 4.3 for unregularized GANs might be problematic. In general, the transportation plan is not a density function, so I*m not certain whether Theorem 1 / Corollary 2 still hold. Furthermore, the heuristic for "inverting" G^* is very crude. - There are also some minor problematic statements in the paper. While they can be easily fixed, they give me doubts: * The original VAE paper is not cited in the introduction for VAEs * The 2013 paper by Cuturi cited on page 2 has nothing to do with "computational aspects of GANs". It is about fast computation of approximate OT between two discrete prob. measures. * First-order / second-order Wasserstein distance is I think a bit unusual name for W_1, W_2 * On pg. 4, the point of the entropy term is to make the objective strongly convex. Strict convexity has no computational benefits.