Approximation and Convergence Properties of Generative Adversarial Learning
Shuang Liu, Olivier Bousquet, Kamalika Chaudhuri
Introduction
Generative adversarial networks (GANs) have attracted an enormous amount of recent attention in machine learning. In a generative adversarial network, the goal is to produce an approximation to a target data distribution from which only samples are available. This is done iteratively via two components – a generator and a discriminator, which are usually implemented by neural networks. The generator takes in random (usually Gaussian or uniform) noise as input and attempts to transform it to match the target distribution ; the discriminator aims to accurately discriminate between samples from the target distribution and those produced by the generator. Estimation proceeds by iteratively refining the generator and the discriminator to optimize an objective function until the target distribution is indistinguishable from the distribution induced by the generator. The practical success of GANs has led to a large volume of recent literature on variants which have many desirable properties; examples are the f-GAN , the MMD-GAN , the Wasserstein-GAN , among many others.
In spite of their enormous practical success, unlike more traditional methods such as maximum likelihood inference, GANs are theoretically rather poorly-understood. In particular, two very basic questions on how well they can approximate the target distribution , even in the presence of a very large number of samples and perfect optimization, remain largely unanswered. The first relates to the role of the discriminator in the quality of the approximation. In practice, the discriminator is usually restricted to belong to some family, and it is not understood in what sense this restriction affects the distribution output by the generator. The second question relates to convergence; different variants of GANs have been proposed that involve different objective functions (to be optimized by the generator and the discriminator). However, it is not understood under what conditions minimizing the objective function leads to a good approximation of the target distribution. More precisely, does a sequence of distributions output by the generator that converges to the global minimum under the objective function always converge to the target distribution under some standard notion of distributional convergence?
In this work, we consider these two questions in a broad setting. We first characterize a very general class of objective functions that we call adversarial divergences, and we show that they capture the objective functions used by a variety of existing procedures that include the original GAN , f-GAN , MMD-GAN , WGAN , improved WGAN , as well as a class of entropic regularized optimal transport problems . We then define the class of strict adversarial divergences – a subclass of adversarial divergences where the minimizer of the objective function is uniquely the target distribution. This characterization allows us to address the two questions above in a unified setting, and translate the results to an entire class of GANs with little effort.
We next address convergence in Section 5. We show that convergence in an adversarial divergence implies some standard notion of topological convergence. Particularly, we show that provided an objective function is a strict adversarial divergence, convergence to in the objective function implies weak convergence of the output distribution to . While convergence properties of some isolated objective functions were known before , this result extends them to a broad class of GANs. An additional consequence of this result is the observation that as the Wasserstein distance metrizes weak convergence of probability distributions (see e.g. ), Wasserstein-GANs have the weakestWeakness is actually a desirable property since it prevents the divergence from being too discriminative (saturate), thus providing more information about how to modify the model to approximate the true distribution. objective functions in the class of strict adversarial divergences.
Notations
For a topological space , we denote by the set of continuous functions on , the set of bounded continuous functions on , the set of finite signed regular Borel measures on , and the set of probability measures on .
Given a non-empty subspace of a topological space , denote by the quotient space equipped with the quotient topology , where for any , if and only if or both belong to . The equivalence class of each element is denoted as .
General Framework
Let be the target data distribution from which we can draw samples. Our goal is to find a generative model to approximate . Informally, most GAN-style algorithms model this approximation as solving the following problem
where is a class of functions. The process is usually considered adversarial in the sense that it can be thought of as a two-player minimax game, where a generator is trying to mimick the true distribution , and a adversary is trying to distinguish between the true and generated distributions. However, another way to look at it is as the minimization of the following objective function
This objective function measures how far the target distribution is from the current estimate . Hence, minimizing this function can lead to a good approximation of the target distribution .
This leads us to the concept of adversarial divergence.
Let be a topological space, , . An adversarial divergence over is a function
Observe that in Definition 1 if we have a fixed target distribution , then (2) is reduced to the objective function (1). Also, notice that because is the supremum of a family of linear functions (in each of the variables and separately), it is convex in each of its variables.
Definition 1 captures the objective functions used by a variety of existing GAN-style procedures. In practice, although the function class can be complicated, it is usually a transformation of a simple function class , which is the set of discriminators or critics, as they have been called in the GAN literature. We give some examples by specifying and for each objective function.
Wasserstein-GAN (WGAN) . Assume is a metric space.
where is a positive constant, denotes the Lipschitz constant.
WGAN-GP (Improved WGAN) . Assume is a convex subset of a Euclidean space.
where is the uniform distribution on $\etap\in(1,\infty)$.
In order to study an adversarial divergence , it is critical to first understand at which points the divergence is minimized. More precisely, let be an adversarial divergence and be the target probability measure. We are interested in the set of probability measures that minimize the divergence when the first argument of is set to , i.e., the set . Formally, we define the set as follows.
Let be an adversarial divergence over a topological space , . Define to be the set of probability measures that minimize the function . That is,
Ideally, the target probability measure should be one and the only one that minimizes the objective function. The notion of strict adversarial divergence captures this property.
Let be an adversarial divergence over a topological space , is called a strict adversarial divergence if for any , .
For example, if the underlying space is a compact metric space, then examples (c) and (d) induce metrics on (see, e.g., ), therefore are strict adversarial divergences.
In the next two sections, we will answer two questions regarding the set : how well do the elements in approximate the target distribution when restricting the class of discriminators? (Section 4); and does a sequence of distributions that converges in an adversarial divergence also converges to under some standard notion of distributional convergence? (Section 5)
Generalized Moment Matching
To motivate the discussion in this section, recall example (b) in Section 3). It can be shown that under some mild conditions, , the objective function of -GAN, is actually the -divergence, and the minimizer of is only . However, in practice, the discriminator class is usually implemented by a feedforward neural network, and it is known that a fixed neural network has limited capacity (e.g., it cannot implement the set of all the bounded continuous function). Therefore, one could ask what will happen if we restrict to a sub-class ? Obviously one would expect not be the unique minimizer of anymore, that is, contains elements other than . What can we say about the elements in now? Are all of them close to in a certain sense? In this section we will answer these questions.
We will now relate the matching condition to the optimality of the divergence. In particular, define
We will give sufficients conditions for members of to be in .
We now review the examples (a)-(e) in Section 3, show how to write each into , and specify in each case such that the conditions of Theorem 4 can be satisfied.
GAN. Note that for any , . Let ,
MMD-GAN or Wasserstein-GAN. Let ,
We now refine the previous result and show that under some additional conditions on and , the optimal elements of are fully characterized by the matching condition, i.e. .
We remark that Theorem 4 is relatively intuitive, while Theorem 5 requires extra conditions, and is quite counter-intuitive especially for algorithms like -GANs.
2 Example: Neural Network f𝑓f-GAN
Now observe that when all the weights before the last layer are fixed, the last layer acts as a discriminator in a linear -GAN. More precisely, let be the index set for the weights before the last layer. Then each corresponds to a feature map . Let the linear -GAN that corresponds to be , the adversarial divergence induced by the Neural Network -GAN is
Clearly . For the other direction, note that by Corollary 6, for any , and . Therefore and . If , then . As a consequence, for any . Therefore . Therefore, by Corollary 6,
That is, the minimizer of the Neural Network -GAN are exactly those distributions that are indistinguishable under the expectation of any discriminator network .
Convergence
Now returning to our adversarial divergence framework. Given an adversarial divergence , is it possible that convreges to the global minimum of ? How to we define convergence to a set of points instead of only one point, in order to explain the convergence behaviour of any adversarial divergence? In this section we will answer these questions.
We start from two standard notions from functional analysis.
The definition of weak-* topology and weak convergence respect the topological structure of the sample space. For example, it is easy to check that the sequence of delta distributions weakly converges to , but not to .
Now note that Definition 8 only defines weak convergence of a sequence of probability measures to a single target measure. Here we generalize the definition for the single target measure to a set of target measures through quotient topology as follows.
Let be a compact metric space, equip with the weak-* topology and let be a non-empty subspace of . A sequence of probability measures in is said to weakly converge to the set if converges to in the quotient space .
With everything properly defined, we are now ready to state our convergence result. Note that an adversarial divergence is not necessarily a metric, and therefore does not necessarily induce a topology. However, convergence in an adversarial divergence can still imply some type of topological convergence. More precisely, we show a convergence result that holds for any adversarial divergence as long as the sample space is a compact metric space. Informally, we show that for any target probability measure, if converges to the global minimum of , then weakly converges to the set of measures that achieve the global minimum. Formally,
Let be a compact metric space, be an adversarial divergence over , , then . Let be a sequence of probability measures in . If , then weakly converges to the set .
As a special case of Theorem 10, if is a strict adversarial divergence, i.e., , then converging to the minimizer of the objective function implies the usual weak convergence to the target probability measure. For example, it can be checked that the objective function of -GAN is a strict adversarial divergence, therefore converging in the objective function of an -GAN implies the usual weak convergence to the target probability measure.
To compare this result with our intuition, we return to the example of a sequence of delta distributions and show that as long as is a strict adversarial divergence, does not converge to the global minimum of . Observe that if converges to the global minimum of , then according to Theorem 10, will weakly converge to , which leads to a contradiction.
However Theorem 10 does more than excluding undesired possibilities. It also enables us to give general statements about the structure of the class of adversarial divergences. The structural result can be easily stated under the notion of relative strength between adversarial divergences, which is defined as follows.
Let and be two adversarial divergences, if for any sequence of probability measures and any target probability measure , implies , then we say is stronger than and is weaker than . We say is equivalent to if is both stronger and weaker than . We say is strictly stronger (strictly weaker) than if is stronger (weaker) than but not equivalent. We say and are not comparable if is neither stronger nor weaker than .
Not much is known about the relative strength between different adversarial divergences. If the underlying sample space is nice (e.g., subset of Euclidean space), then the variational (GAN-style) formulation of -divergences using bounded continuous functions coincides with the original definition , and therefore -divergences are adversarial divergences. showed that the KL-divergence is stronger than the JS-divergence, which is equivalent to the total variation distance, which is strictly stronger than the Wasserstein-1 distance.
However, the novel fact is that we can reach the weakest strict adversarial divergence. Indeed, one implicatoin of Theorem 10 is that if is a compact metric space and is a strict adversarial divergence over , then -convergence implies the usual weak convergence on probability measures. In particular, since the Wasserstein distance metrizes weak convergence of probability distributions (see e.g. ), as a direct consequence of Theorem 10, the Wasserstein distance is in the equivalence class of the weakest strict adversarial divergences. In the other direction, there exists a trivial strict adversarial divergence
that is stronger than any other strict adversarial divergence. We now incorporate our convergence results with some previous results and get the following structural result.
The class of strict adversarial divergences over a bounded and closed subset of a Euclidean space has the structure as shown in Figure 1, where is defined as in (8), is corresponding to example (c) in Section 3, is corresponding to example (d) in Section 3, and , , , , are corresponding to example (b) in Section 3 with being , , , , , respectively. Each rectangle in Figure 1 represents an equivalence class, inside of which are some examples. In particular, is in the equivalence class of the strongest strict adversarial divergences, while and are in the equivalence class of the weakest strict adversarial divergences.
Related Work
There has been an explosion of work on GANs over the past couple of years; however, most of the work has been empirical in nature. A body of literature has looked at designing variants of GANs which use different objective functions. Examples include , which propose using the f-divergence between the target and the generated distribution , and , which propose the MMD distance. Inspired by previous work, we identify a family of GAN-style objective functions in full generality and show general properties of the objective functions in this family.
There has also been some work on comparing different GAN-style objective functions in terms of their convergence properties, either in a GAN-related setting , or in a general IPM setting . Unlike these results, which look at the relationship between several specific strict adversarial divergences, our results apply to an entire class of GAN-style objective functions and establish their convergence properties. For example, shows that KL-divergnce, JS-divergence, total-variation distance are all stronger than the Wasserstein distance, while our results generalize this part of their result and says that any strict adversarial divergence is stronger than the Wasserstein distance and its equivalences. Furthermore, our results also apply to non-strict adversarial divergences.
That being said, it does not mean our results are a complete generalization of the previous convergence results such as . Our results do not provide any methods to compare two strict adversarial divergences if none of them is equivalent to the Wasserstein distance or the trivial divergence. In contrast, show that the KL-divergence is stronger than the JS-divergence, which is equivalent to the total variation distance, which is strictly stronger than the Wasserstein-1 distance.
Finally, there has been some additional theoretical literature on understanding GANs, which consider orthogonal aspects of the problem. address the question of whether we can achieve generalization bounds when training GANs. focus on optimizing the estimating power of kernel distances. study generalization bounds for MMD-GAN in terms of fat-shattering dimension.
Acknowledgments
We thank Iliya Tolstikhin, Sylvain Gelly, and Robert Williamson for helpful discussions. The work of KC and SL were partially supported by NSF under IIS 1617157.
References
Appendix A Proof of Theorem 4
We observe that the assumptions of the theorem imply that for any ,
The assumptions also imply that for any ,
Therefore .
Appendix B Proof of Theorem 5
Since by Theorem 4 we already have , we only need to prove for any ,
where the last equality is due to (9). Finally note that
Therefore . This concludes the proof.
Appendix C Proof of Corollary 6
Because is an interior point of , we have is an interior point of , due to the compactness of and all being continuous and therefore bounded continuous. Also, it is easy to see that is a constant function.
Appendix D Proof of Theorem 10
We first need a standard result in functional analysis. A brief proof is provided for completeness.
If is a compact metric space, then is weak-* compact.
By the Banach-Alaoglu theorem, the following closed unit ball is weak-* compact.
Since the constant function is in . The following set is weak-* closed.
which is weak-* closed. To justify the claim, on one hand, the l.h.s. is clearly a subset of the r.h.s.; on the other hand, to show the r.h.s. is also a subset of the l.h.s., consider a with a Borel set such that (i.e., is not in the l.h.s.), then by Lusin’s Theorem the measurable function can be approximated by functions in in the sense that for any , there exists a such that
Since the intersection of a compact subset and a closed subset is a compact subset, we conclude that is weak-* compact. ∎
Now we can start the main proof. We equip with the weak-* topology. Let . Note that the function is the supremum of a family of affine continuous functions on , therefore is lower semi-continuous on . Note that by Lemma 13, is compact. Therefore by Weierstrass extreme value theorem, attains its minimual value on , therefore .
Let be a sequence in . Assume , we need to show that in the quotient space , converges to . Let be any open neighbourhood of in . We need to show that is eventually in .
First we show that is compact. By Lemma 13, is compact. Since is a quotient space of , is compact. Observe that is a closed subset of , therefore is compact.
Recall that is lower semi-continuous on . Now observe that is also a function on , and since is a quotient space of , is also lower semi-continuous on . By Weierstrass extreme value theorem, there exists such that
Since , we have . Therefore . Recall that , will be eventually less than . This means will eventually be in .
Appendix E Proof of Corollary 12
It is known that for nice spaces (e.g., bounded and closed subset of a Euclidean space), the variational (GAN-style) formulation of -divergences using bounded continuous functions is equivalent to the original definition . Therefore we them interchangeably. already showed that total variation is equivalent to JS divergence and they are not equivalent to the Wasserstein distance. These two are also known to be equivalent to the squared Hellinger distance by noticing that
Both KL and Reverse-KL divergence are stronger than total variation by Pinsker’s inequality. They are in fact strictly stronger than total variation. Let , , where is the uniform distribution on . Note for any while . We can also show they are not comparable with each other by considering and while is still . The same examples also show they are strictly weaker than the trivial divergence.
It is also known that and metrize the weak-* topology of if is a compact metric space (see, e.g., ), therefore by Theorem 10 they are in the equivalence class of the weakest strict adversarial divergences.
It remains to show the trivial divergence is stronger than any strict adversarial divergence. Any sequence converging to under the trivial divergence is eventually , therefore trivially converges under any other strict adversarial divergence.