D-GAN: Divergent generative adversarial network for positive unlabeled learning and counter-examples generation

1 INTRODUCTION . Nowadays , the number of available labeled datasets dedicated to perception applications has considerably augmented ( Russakovsky et al. , 2015 ) , ( Yu et al. , 2015 ) , ( Cordts et al. , 2016 ) . However , when learning methods trained on these datasets are applied on real data , their performances are likely to deteriorate . Consequently , it is necessary to use a dataset specialized for the given target application . It turns out that it can be easy to get unlabeled data in some applications domains such as autonomous driving . Positive Unlabeled ( PU ) learning enables to use these unlabeled data such that they are combined with labeled samples of our class of interest : the positive class . The interest is that unlabeled data can contain relevant counter-examples : the negative samples . The difficulty is that unlabeled data can also contain a fraction πp of unlabeled positive samples . ( Sansone et al. , 2018 ) enumerates several learning problems which can be addressed in this way like the information retrieval and the One-vs-Rest task . Several PU learning methods exist and some of them are adapted for image classification . They are generally classified into these two categories : - censoring PU learning , formalized by Elkan & Noto ( 2008 ) and recently improved by Northcutt et al . ( 2017 ) ; - case-control PU learning , introduced by Ward et al . ( 2009 ) , formalized by du Plessis et al . ( 2014 ) , and then consecutively improved by Du Plessis et al . ( 2015 ) and Kiryo et al . ( 2017 ) . However we focus our attention in this article on the recently proposed GAN-based PU approaches . So we classify PU learning approaches into the two following groups suggested by Kiryo et al . ( 2017 ) : one-stage and two-stage PU methods . Onestage ones such as the unbiased PU method ( uPU ) ( Du Plessis et al. , 2015 ) and the non-negative PU method ( nnPU ) ( Kiryo et al. , 2017 ) consist in training a classifier directly with the PU dataset . These methods have the advantage to need only one training of the classifier . But they require dataset prior knowledge and consequently uPU and nnPU need to be combined with an approach estimating the prior knowledge ( Jain et al. , 2016 ) , ( Ramaswamy et al. , 2016 ) , ( Christoffel et al. , 2016 ) . On the other hand , two-stage PU methods prepare during the first stage a PN dataset . For example , Rank Pruning method ( RP ) ( Northcutt et al. , 2017 ) realizes several consecutive trainings of a binary classifier . After each training , only the samples considered as the most confident are kept in order to substitute the unlabeled samples for the next training of the same classifier . RP achieves two-stage state of the art performances without prior knowledge , but with a high training computational cost and is limited in its prediction performances on complex image datasets like CIFAR-10 . Recently , a new subcategory of two-stage PU methods appeared : GAN-based PU methods . They address the PU learning challenge by producing , thanks to an adversarial training ( Goodfellow et al. , 2014 ) , relevant generated samples from a PU dataset during the first step . Then they are used to train a standard Positive Negative ( PN ) classifier during the second step . Existing GAN-based PU methods PGAN ( Chiaroni et al. , 2018 ) and GenPU ( Hou et al. , 2018 ) are presented and their issues are discussed in the next section 2 . This article addresses these issues with a new GAN-based PU learning approach : the Divergent-GAN . Our contributions are the following : • we propose to incorporate a PU learning risk inside the standard GAN ( Goodfellow et al. , 2014 ) discriminator loss function . The intuition behind is to have the generative model solving the PU learning problem formulated in the discriminator loss function . In this way the generator learns the distribution of the samples which are both unlabeled and not positive : the negative ones included in the unlabeled dataset ; • ( side contribution ) we highlight a Batch Normalization ( BN ) ( Ioffe & Szegedy , 2015 ) critical issue : A learning model which manipulates different minibatches distributions should not use BN . Alternative normalization techniques are discussed ( section 3.2 ) and experimented ( section 4.1 ) in the context of the proposed framework which manages positive , unlabeled and generated minibatches . Thanks to this new framework , we address the previous GAN-based PU methods main issues : It reduces the overfitting problem of the PGAN method , and it learns the counter-examples distribution included in the unlabeled dataset without using prior knowledge while keeping a standard GAN architecture . Consequently , the D-GAN globally outperforms two-stage state of the art PU learning performances on simple MNIST and complex CIFAR-10 image datasets . From a practical point of view , several previous PU methods benefits are combined in the proposed framework as listed in Table 1 . The D-GAN code is available at 1 . The article is structured as follow . Section 2 presents GAN-based PU learning approaches . Section 3 describes the proposed method . Section 4 presents the corresponding experimental results . Then in section 5 , we finish by a conclusion where we also discuss perspectives . 2 RELATED WORK . GAN-based PU learning approaches are a recent subcategory of two-stage PU methods , as proposed in PGAN ( Chiaroni et al. , 2018 ) and GenPU ( Hou et al. , 2018 ) . The interest of using GANs is double : GANs enable relevant data augmentation and they use high-level feature metrics to evaluate generated samples quality , thanks to the use of a discriminator . The generated samples replace the unlabeled ones by learning on the latter ( Chiaroni et al. , 2018 ) , or on both unlabeled and positive labeled ones as ( Hou et al. , 2018 ) during the first step . Both methods exploit GANs ( Goodfellow et al. , 2014 ) benefits , but they are not suitable under the same datasets conditions and the reasonings are different : • GenPU method is based on the original GAN convergence ( Goodfellow et al. , 2014 ) , such that : πP · pGP + ( 1 − πP ) · pGN −→ pU , with pGP the distribution of positive samples generated by the generator GP , pGN the distribution of the negative samples generated by GN , and pU the distribution of real unlabeled samples . The same idea can be expressed by using one single generator GN such that we replace the generated positive samples by the positive labeled samples initially present in a PU dataset . In practice , GenPU seems to be an interesting PU method on simple datasets when we own few positive labeled samples , and it generates relevant counter-examples . However , training adversarially five learning models instead of two to address standard PU learning challenge is not necessary and more computational demanding . Moreover , this amplifies the mode collapse issue , and GenPU 1The code will be publicly available after the anonymous reviewing period . training optimization functions need three additional hyper-parameters combined with prior knowledge . This is not practical . • PGAN method is trained to converge towards the unlabeled dataset distribution during the first step . During the second step , it exploits GANs imperfections such that the generated distribution at the adversarial equilibrium is still separable from the unlabeled samples distribution by a classifier . It presents a relatively steadier behaviour and better prediction performances than the two-stage baseline RP method on the complex RGB image dataset CIFAR-10 without prior knowledge . However , it is less suitable for relatively simpler datasets like MNIST . The generated samples are all considered as negative samples by the classifier . But this is possible only if the generated samples distribution converges close enough towards the unlabeled samples distribution , while not matching with it . So if the PGAN first stage works as expected theoretically by Goodfellow et al . ( 2014 ) , then the PGAN classification second stage falls back into the initial PU learning problem . We highlight this first stage overfitting problem in figure 5 ( b ) . The proposed approach overcomes previous enumerated GAN-based PU methods issues , while merging their respective advandages to address the standard PU learning task . This is achieved with the novel reasoning presented in the next section . 3 PROPOSED METHOD . This section starts by discussing some particularities of a standard PU learning risk ( equation 1 ) . Then we propose to incorporate this risk into a generic GAN framework in order to guide the generator convergence towards the distribution of the negative samples included in the unlabeled dataset . In addition , we discuss normalization techniques in the context of this framework which manipulates three different types of minibatches : positive , unlabeled and generated ones . 3.1 A DIVERGENT APPROACH FROM THE DISCRIMINATOR POINT OF VIEW . The D-GAN intuition can be expressed as follow . The discriminator D addresses to the generator G the riddle : Show me what IS unlabeled AND NOT positive . It turns out that negative samples included in the unlabeled dataset are both unlabeled and not positive . Consequently G addresses this riddle by learning to show the negative samples distribution to D. The Positive Unlabeled ( PU ) learning problem consists in trying to distinguish positive samples from negative samples by using a PU dataset . We start by detailing the expected PU functionality that we want to incorporate into the GAN discriminator loss function . Let X ∈ Rm be the input random variable and Y ∈ { 0 , 1 } its associated label . X can be a positive XP , negative XN or unlabeled XU sample which respectively follow the distributions pP = p ( X|Y = 0 ) , pN = p ( X|Y = 1 ) and pU = ( 1−πP ) · pN +πP · pP , with πP ∈ ( 0 , 1 ) the unknown prior which represents the fraction of unlabeled positive samples included in the unlabeled dataset . Let D : Rm → [ 0 , 1 ] be the decision function which is then considered as the discriminator network of the proposed framework . We have l ( ŷ , y ) such that l : [ 0 , 1 ] × [ 0 , 1 ] → R is the arbitrary cost function with the predicted output ŷ of D for a given sample and the corresponding label y as inputs . D is trained with a PU risk RPU to predict the label value 1 for the unlabeled samples , and the label value 0 for the positive labeled ones . Given the composition of the unlabeled dataset , we develop RPU ( D ) such that : RPU ( D ) = ExU∼pU [ l ( D ( xU ) ,1 ) ] + ExP∼pP [ l ( D ( xP ) ,0 ) ] = ( 1− πP ) · ExN∼pN [ l ( D ( xN ) ,1 ) ] + πP · ExP∼pP [ l ( D ( xP ) ,1 ) ] + ExP∼pP [ l ( D ( xP ) ,0 ) ] . ( 1 ) We notice that negative samples are associated exclusively to the label value 1 for any πP value . Labeled and unlabeled positive samples follow the same distribution pP . So pP is associated to both contradictory labels 0 and 1 . Consequently , as discussed in annexe section 6.1 , we assume it is equivalent to associate the positive distribution pP with a unified intermediate label value δ ∈ ( 0 , 1 ) . So if we train D with the risk RPU , then D prediction concerning the unlabeled positive samples is shifted away from the label value 1 . Thus D predicts the label value 1 exclusively for the negative samples . Next , let us consider the decision function D as the discriminator of a generative adversarial network . We propose to incorporate the risk RPU into the value function of the original GAN model ( Goodfellow et al. , 2014 ) by adding the loss function term ExP∼pP [ log ( 1−D ( xP ) ) ] . Consequently , the training loss function LD of D is : LD ( G , D ) = ExU∼pU [ logD ( xU ) ] + Ez∼pz [ log ( 1−D ( G ( z ) ) ) ] + ExP∼pP [ log ( 1−D ( xP ) ) ] , ( 2 ) with z the input random vector of the generative model G such that G ( z ) is a generated sample . z can follow a uniform or normal distribution . The equation 2 is justified intuitively as follow . Instead of asking to G to converge towards the distribution pU , we want that G learns to converge towards the distribution pN of negative samples . Thus we propose to replace the standard GAN task show me what is unlabeled by the task show me what is both unlabeled and not positive . This results in addressing directly the risk RPU to D such that LD is as follow : LD ( G , D ) = RPU ( D ) + Ez∼pz [ l ( D ( G ( z ) ) , 0 ) ] , ( 3 ) with 0 the label associated to the samples G ( z ) generated by G. Let the cost function l used in the proposed D-GAN framework be the binary cross-entropy H such that l = −H . So : LD ( G , D ) = ExU∼pU [ −H ( D ( xU ) , 1 ) ] + ExP∼pP [ −H ( D ( xP ) , 0 ) ] + Ez∼pz [ −H ( D ( G ( z ) ) , 0 ) ] , ( 4 ) We recall that the binary cross-entropy H is defined as below : H ( D ( X ) , Y ) = −Y · log ( D ( X ) ) − ( 1− Y ) · log ( 1−D ( X ) ) , ( 5 ) with Y the label associated to the D input X . Thus H ( D ( X ) , 1 ) = −log ( D ( X ) ) and H ( D ( X ) , 0 ) = −log ( 1 −D ( X ) ) . Consequently , LD can be developed as in the equation 2 . This shows the incorporation of RPU risk ( equation 1 ) inside the D-GAN discriminator loss function ( equation 2 ) . On the other hand , the role of G during the adversarial training is to generate samples considered by D as 1 . So , as suggested by Goodfellow et al . ( 2014 ) in practice , the training loss function LG of G is such that LG ( G , D ) = Ez∼pz [ log ( D ( G ( z ) ) ) ] . We recall that exclusively the negative samples are considered as 1 by D thanks to the RPU risk , as shown previously . Consequently this justifies intuitively the G convergence towards the negative samples distribution pN . The corresponding implementation algorithm 1 of this first stage is presented in annexe 6 . Once the D-GAN training is finished , we can start the second step which consists in using a classifier C to distinguish fake generated samples xFN = G ( z ) , which are ideally equivalent to the real negative samples , from real positive labeled samples as illustrated in figure 1 . The Divergent-GAN behaviour is only possible if the discriminator D associates the label value 1 exclusively with the negative samples distribution . Nonetheless , in the worst-case scenario where the discriminator D is not able to sufficiently encode the complexity of the boundary between positive and negative samples included in the unlabeled dataset , the D-GAN will behave like the PGAN , which is the best solution in this situation . This is observed experimentally in the section 4 .

Summary: PU learning is the problem of learning a binary classifier given labelled data from the positive class and unlabelled data from both the classes. The authors propose a new  GAN architecture in this paper called the Divergent Gan (DGAN) which they claim has the benefits of two previous GAN architectures proposed for PU learning: The GenPU method and the Positive-Gan architecture. The key-equation of the paper is (5) which essentially adds an additional loss term to the GAN objective to encourage the generator to generate samples from the negative class and not from the positive class. The proposed method is validated through experiments on CIFAR and MNIST.