DG-GAN: the GAN with the duality gap

1 INTRODUCTION . In the past few years , Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) are impactful because it has shown lots of great results for many AI tasks , such as image generation , dialogue generation , and images inpainting ( Abadi & G Andersen , 2016 ; Goodfellow , 2016 ; Ho & Ermon , 2016 ) . Differing from other unsupervised learning methods for model generation that concentrate on the hard optimization of the measure of distribution fit such as the maximum likelihood method , GANs , which are a kind of methods of implicit models ( Mohamed & Lakshminarayanan , 2017 ; Tran et al. , 2017 ) , can be seen as a game between two networks , the generator and the discriminator . Training GANs will improve the two networks ’ capability synchronously . Denote the discriminator as f and a generator as g. The objective of GANs is inf g sup f V ( f , g ) = E x∼pdata [ φ ( f ( x ) ) ] + E x∼pz [ φ ( 1− f ( g ( x ) ) ) ] , ( 1 ) where pdata is the true data distribution and pz is the standard Gaussian distribution . Here , the goal of f is to discriminate the difference between two distributions and the goal of g is to generate a distribution with the Gaussian noise . Therefore the problem of GANs is a min-max problem . The minimization problem is to search for the optimal discriminator f that can distinguish two distributions as much as possible and the maximization problem is to find the optimal generator g such that the discriminator can not find the difference . So the GAN is just like a game between these two players . This is in general a challenging task to find the best solution because it may be not a concave-convex min-max optimization . This means that the objective , denoted by V ( f , g ) , may not be a convex function when fixing f and not a concave function when fixing g. The first major problem of GANs is how to measure the difference between the generated distribution and the true data distribution . It means that there is no an unanimous metric to represent the difference between the true data distribution and the generated distribution ( Borji , 2018 ) . Different metrics have achieved different performances on the different benchmark datasets , although many state-of-the-art models can show similar results ( Lucic et al. , 2017 ) . It is also difficult to know whether the generated distribution is close to the true distribution , and this is often observed by human eyes . Another problem is the convergence of the training algorithm of GANs , especially the global convergence . It means that if the original generator and discriminator are random , it is difficult to confirm that the generator and discriminator can converge to the ideal conclusion by training with given data . So the existed algorithms should be heuristic or it can get a bad result even we train the neural networks with lots of datasets . Although it can be proved that the generator and discriminator can converge to the local Nash equilibrium under some strong assumptions ( Martin et al. , 2017 ) , many GAN algorithms can not converge globally ( Gemp & Mahadeven , 2019 ) , In this paper , our main contributions are : • We propose a new metric of GANs and prove that the metric can be an upper bound of the traditional metrics . • We establish a generalization error bound under the new metric and show that the empirical metric can be viewed as the loss function for GANs . • We propose an new algorithm with the new metric which demonstrates better results than state-of-the-art algorithms . The remainder of this paper is organized as follows . In Section 2 , some related work are reviewed . Section 3 gives the new metric named duality gap that can be seen as an upper bound of traditional metrics . In Section 4 , we establish a generalization error bound under the new metric and show that the empirical duality gap can be viewed as the loss function for GANs . Section 5 and 6 provide the new algorithm and some experimental results . Finally , we give our conclusions and future work . 2 RELATED WORK . The problem of the GANs ’ metric and convergence has been extensively explored over the past few decades , and a substantial amount of work has been proposed in the categories of convergence and new metric . The duality gap has ever been suggested by Grnarova et al . ( 2018 ) . However , they only take the original GAN ( Goodfellow et al. , 2014 ) into consideration . Theis et al . ( 2015 ) has showed that even though the log-likelihood of the data can be seen as a loss function to train a generative model and thus can be seen as a metric of GANs , it has severe limitations because it may generate some low quality models with a high likelihood . Tolstikhin et al . ( 2017 ) proposed to use the probability mass of the real data “ covered ” by the model distribution as a metric . They used a kernel density estimation method to approximate the density of generated models ’ distribution and this metric is more interpretable than the likelihood , making it easier to assess the difference in performance of the algorithms . One of the most famous metric of GANs is the inception score ( IS ) ( Salimans et al. , 2016 ) , which uses a pre-trained neural network ( the Inception Net ( Szegedy et al. , 2016 ) trained on the ImageNet ( Deng et al. , 2009 ) ) to capture the desirable properties of generated samples . It can measure the quality of the generated models and discriminability . There are some modifications of IS such as ( Martin et al. , 2017 ; Gurumurthy et al. , 2017 ) and so on . Furthermore , Martin et al . ( 2017 ) proposed Frechet Inception Distance ( FID ) between two Gaussian distribution for evaluating the quality of these models . However , even though these kinds of metrics can get some good enough results on some samples , the Gaussian assumption is not always right and the FID can not work well with the non-labeled datasets . There are some other research concentrating on the metric to estimate the generated distribution . Such as Maximum Mean Discrepancy ( MMD ) ( Gretton et al. , 2012 ) , which measures the dissimilarity between two probability distributions using samples drawn independently from each other . However , the MMD method ’ s computation complexity is the quadratic in the sample size , which is difficult to train . Arora & Zhang ( 2017 ) proposed to use the birthday paradox test to evaluate GANs , this test approximates the support size of a discrete distribution and can also be used to detect mode collapse in GANs . Generative Adversarial Metric ( GAM ) is proposed by Jiwoong Im et al . ( 2016 ) , which means exchanging discriminators or generators of two GANs and then comparing the two GANs by engaging them in a battle against each other . Image Retrieval Performance ( Wang et al. , 2016 ) evaluates GANs with an image retrieval measure , the main idea of which is to examine the badly modeled images . There are some research that view the GANs as a zero-sum game.Grnarova et al . ( 2018 ) proposed the duality gap , but the paper only takes the log-likelihood into consideration . Balduzzi et al . ( 2018 ) introduced the Hamiltonian mechanics in the games and designed an algorithm that can converge to the Nash Equilibrium faster , and this method has showed some desirable results if applying in GANs . Oliehoek et al . ( 2017 ) studied GANs from the view of game theory and suggested an algorithm of training GANs to the Nash equilibrium . Grnarova et al . ( 2017 ) considered the Nash equilibrium for semi-shallow GAN architectures and other more complex architectures . 3 THE DUALITY GAP . In the section , we give the definition of the duality gap . Because the duality gap comes from game theory , we give some knowledge of game theory at first . Definition 3.1 . ( Game ) A strategy game is a tuple < P , { Si } ni=1 , { ui } ni=1 > , where P = { p1 , ... , pn } is the players sets , Si is the set of pure strategies for player i and ui is i ’ s payoff real-valued function defined on the pure strategy profiles ’ s set : S = S1 × ... × Sn The key of the game theory is the Nash Equilibrium , which is a strategy profile such that no player can change his payoff unilaterally . Definition 3.2 . ( Nash Equilibrium ) A Nash Equilibrium is a strategy profile < s1 , ... , si , ... sn > ∈ S s.t . ∀ < s1 , ... , s′i , ... , sn > ∈ S , we have ui ( s1 , ... , si , ... , sn ) ≥ ui ( s1 , ... , s′i , ... , sn ) for any player i . In this paper , we only discuss GANs with only two players , the game mentioned below are twoplayers ’ game . Definition 3.3 . ( Zero-sum game ) A zero-sum game is a game with the two payoff functions u1 ( s1 , s2 ) and u2 ( s1 , s2 ) s.t . u1 ( s1 , s2 ) + u2 ( s1 , s2 ) = 0 for any ( s1 , s2 ) ∈ S For a two-players ’ zero-sum game , its equilibria also is called saddle point , which has some important properties and has attracted lots of attentions . Because the saddle point is difficult to research , this leads the difficulty of the GANs ’ research . About the equilibria , we have the following theorem : Theorem 3.1 . In a zero-sum game , we have sup s2 inf s1 ui ( s1 , s2 ) = inf s1 sup s2 ui ( s1 , s2 ) = v ( 2 ) where the v is called the value of the zero-sum game . The strategy ( s1 , s2 ) ∈ S is called the maximin strategy . For these two players , they have different maximin strategies . The player 1 ’ s maximin strategy is ŝ1 such that sups2 ui ( ŝ1 , s2 ) = v and the player 2 ’ s maximin strategy is ŝ2 such that infs1 u ( s1 , ŝ2 ) = v. Furthermore , if we combine the two maximin strategies of these two players , we can achieve an equilibrium . 3.1 THE DUALITY GAP OF GANS . The traditional machine learning problem can be seen as an optimization problem . The objective to be minimized is denoted by a loss function . However , because the GAN objective is a minmax problem , it can be seen as the zero-sum game , with the 2 players being the generator and the discriminator . We will introduce the duality gap metric , which can be used to estimate the ability of the generators and the discriminators , and the relationship of duality gap and the classical metric– F − distance when the generator ’ s and discriminator ’ s capacity are unbounded . A zero-sum game comes from game theory , consisting of 2 players D ( Discriminator ) and G ( Generator ) with their strategy-fields F and G. A function V : F × G → R is the utilities of the 2 players . By selecting ( f , g ) ∈ F × G , the D ’ s utility is +V and the G ’ s utility is −V . The goal of the 2 players is to maximize the worst case utility , which is sup f∈F inf g∈G V ( f , g ) & inf g∈G sup f∈F V ( f , g ) . ( 3 ) The strategy ( f∗ , g∗ ) ∈ F × G is called ( Pure ) Equilibrium if it satisfies that sup f∈F V ( f , g∗ ) = inf g∈G V ( f∗ , g ) . ( 4 ) According to the above discussion , the GANs ’ duality gap metric of the pure strategy can be defined . Definition 3.4 . ( Duality Gap of GANs ) Given 2 strategy fields F and G , strategy ( f∗ , g∗ ) ∈ F ×G , a convex function φ , a true data distribution pdata , and a Gaussian distribution pz , the duality gap of ( f∗ , g∗ ) is DG ( f∗ , g∗ ) : = sup f∈F V ( f , g∗ ) − inf g∈G V ( f∗ , g ) ( 5 ) Here the V ( f , g ) is the the function that GANs concentrate on : V ( f , g ) = E x∼pdata [ φ ( f ( x ) ) ] + E x∼pz [ φ ( 1− f ( g ( x ) ) ) ] ( 6 )

Summary: This paper proposed to use the duality gap sup_f V(f, g*) – inf_g V(f*, g) as a metric for GAN training. It proves that this metric is an upper bound of F-distance. It also proves a generalization bound for this metric. Simulation resultson MNIST, CIFAR10, etc. are reported.