Improving Model Compatibility of Generative Adversarial Networks by Boundary Calibration

Generative Adversarial Networks ( GANs ) is a powerful family of models that learn an underlying distribution to generate synthetic data . Many existing studies of GANs focus on improving the realness of the generated image data for visual applications , and few of them concern about improving the quality of the generated data for training other classifiers—a task known as the model compatibility problem . Literature also show that some GANs often prefer generating ‘ easier ’ synthetic data that are far from the boundaries of the classifiers , and refrain from generating near-boundary data , which are known to play an important roles in training the classifiers . To improve GAN in terms of model compatibility , we propose Boundary-Calibration GANs ( BCGANs ) , which leverage the boundary information from a set of pre-trained classifiers using the original data . In particular , we introduce an auxiliary Boundary-Calibration loss ( BC-loss ) into the generator of GAN to match the statistics between the posterior distributions of original data and generated data with respect to the boundaries of the pre-trained classifiers . The BC-loss is provably unbiased and can be easily coupled with different GAN variants to improve their model compatibility . Experimental results demonstrate that BCGANs not only generate realistic images like original GANs but also achieves superior model compatibility than the original GANs . 1 INTRODUCTION . The success of machine learning relies on not only the advances of different models ( e.g . deep learning ) but also data with sufficient quality and quantity . Nowadays , companies spend tremendous efforts and expense collecting data to build their products . To better solve complicated real-world problems with public or third-party machine learning experts , many companies now needs release some data sets for competitions ( e.g . Kaggle ) or proof-of-concept purposes . However , considering the costs of collecting data , companies may not be willing to release the dataset if possible . As a result , a technique which can generate synthetic data with properties similar to the original data is in demand . To be specific , we are looking for generating a dataset with the property that machine learning models trained on the generated dataset can exhibit similar performance to ones trained on the original data . This property is called model compatibility ( Park et al. , 2018 ) or machine learning efficacy ( Xu et al. , 2019 ) . The organizations can share the generated data with high model compatibility to the public and enjoy the solution derived from it without leaking the real dataset . When it comes to data generation , generative adversarial networks ( GANs , Goodfellow et al . 2014 ) is the most popular family of generative algorithms because of its impressive performance on generating realistic images ( Karras et al. , 2018 ) . In GANs , the generator is trained via minimizing a neural network ( discriminator ) defined probability divergence ( Goodfellow et al. , 2014 ; Arjovsky et al. , 2017 ; Nowozin et al. , 2016 ) . In addition to image generation , GANs are also widely used in other applications , such as style transfer ( Isola et al. , 2017 ; Zhu et al. , 2017 ; Kim et al. , 2017 ) and image processing ( Pathak et al. , 2016 ; Ledig et al. , 2017 ; Chang et al. , 2017 ) , and generating different types of data , including time series ( Luo et al. , 2018 ; Chang et al. , 2019 ) , text ( Yu et al. , 2017 ; Press et al. , 2017 ) , point clouds ( Li et al. , 2018 ) , voxels ( Wu et al. , 2016 ) and tabular data ( Park et al. , 2018 ; Xu et al. , 2019 ) . Although GANs are versatile as mentioned above , most of their development focus on the metrics such as quality and diversity of the data Salimans et al . ( 2016 ) ; Heusel et al . ( 2017 ) ; Lucic et al . ( 2018 ) . Generating high model compatibility data via GANs is still under explored . The pioneering work ( Xu et al. , 2019 ) first shows that data generated from conditional GANs ( Mirza & Osindero , 2014 ) enjoys better model compatibility than VAEs ( Kingma & Welling , 2013 ) . So we wonder can we improve the model compatibility if we consider information from the models trained on the original data ? For example , Wasserstein GAN ( WGAN , Arjovsky et al . 2017 ) performs a meanmatching between the distribution of real data and generated data . However , only mean-matching is sometimes not enough to learn the whole distribution especially for those boundary cases . Apparently , if a GAN knows the boundary between different classes , it may be able to generate instances which are close to the boundary with correct labels . These boundary points will guide a classifier to learn the correct decision boundary . In this work , we try to improve GANs with regards to model compatibility in classification problems . We use a set of pre-trained classifiers to obtain multiple decision boundaries . Then use an auxiliary loss function called Boundary-Calibration loss ( BC-loss ) to calibrate the generating distribution according to the decision boundaries of these pre-trained classifiers . The main contributions of this work are : • In Section 2 , we propose a way to evaluate model compatibility in classification problems . We consider a variety of machine learning algorithms and average the performance to obtain a comprehensive metric . • In Section 4 , we propose a loss function called Boundary-Calibration loss ( BC-loss ) which helps typical GANs to learn a distribution with better model compatibility . The loss considers the decision boundaries of pre-trained classifiers and minimizes the maximum mean discrepancy ( MMD , Gretton et al . 2012 ) between the original dataset and the generated dataset . In addition , we show that optimizing the BC-loss would not change the optimal solution of the original GAN , but it reduces the feasible set to ensure the model compatibility . • In Section 5 , we demonstrate how BC-loss affects the boundary of the generated data with a two-dimensional toy dataset . We also show that the BC-loss improves model compatibility of the generated data with different types of classifiers and a variety of datasets . Finally , we inspect the feature selection results to examine how the interpretation of machine learning models may be effected . Last , in Section 3 , we discuss some works which are similar to our work and describe how does our work differ from them . 2 MODEL COMPATIBILITY IN CLASSIFICATION . In this work , we focus on generating data for fully-supervised classification learning . Given a dataset D = { ( xi , yi ) } ni=1 , where xi ∈ X represents features of an instance , yi = f ( xi ) ∈ Y represents the corresponding label of xi according f : X → Y , and ( xi , yi ) ∼ PD , a learning algorithm A : ( X , Y ) n → H learns a hypothesis h ∈ H to approximate the mapping function , i.e . A ( D ) = h ≈ f . Our goal is to obtain a generator G which generates a synthetic dataset D′ = { ( x′j , y′j ) } mj=1 such that A ( D′ ) = h′ ≈ h. We call this property model compatibility as proposed in Park et al . ( 2018 ) . To measure the model compatibility of a generated dataset quantitatively , we consider the performance of a classifier trained on the generated dataset comparing to the one trained on the real dataset . We evaluate the accuracy on a separate test dataset to indicate the performance of a given classifier . In addition , we calculate relative accuracy by scaling the test accuracy of the classifier trained on the generated dataset by the accuracy of the classifier trained on the real dataset . The relative accuracy allows us to average the results from different machine learning algorithms more fairly . The final evaluation is : 1 |A| ∑ A∈A acc ( h′ , D ( t ) ) acc ( h , D ( t ) ) , ( 1 ) where A is a set of learning algorithms , D ( t ) = { ( x ( t ) i , y ( t ) i ) } Ni=1 is the test dataset , and acc ( h , D ( t ) ) is the accuracy of hypothesis h on test data D ( t ) . We can determine A as a wide variety of learning algorithms to make the metric provide a more comprehensive measurement of model compatibility . 3 RELATED WORK . Research about generating data for classification can be divided into two categories : formulation and architecture . For formulation , Conditional GAN ( CGAN , Mirza & Osindero 2014 ) is an intuitive way to generate instances with corresponding labels . We can learn the distribution of labels by counting and sample the instances from CGAN conditionally . Auxiliary Classifier GAN ( ACGAN , Odena et al . 2017 ) is considered as a better way for conditional generation . It uses an auxiliary classifier to provide information about the boundary between each classes . However , ACGAN has been proved that the objective is biased so it tends to generate data with lower entropy for the auxiliary classifier ( Shu et al. , 2017 ) . Thus , the lose of instances near the decision boundary may worsen the model compatibility . In this work , we use CGAN along with the proposed BC-loss to generate data with model compatibility . On the other hand , the other line of research focuses on generating data with different network architecture or data processing procedure . Recent works that also consider model compatibility are Table GAN ( Park et al. , 2018 ) and Tabular GAN ( Xu et al. , 2019 ) . Table GAN focuses on the privacy of generated data and thus their is a trade off between privacy and model compatibility . To achieve privacy preserving , they do not improve the model compatibility compared to the original GAN . On the other hand , Tabular GAN puts emphasis on increasing model compatibility of generated data . They propose a framework with a more complicated data processing procedure and use LSTM to better parameterize the target distribution . In contrast to these works , our work focus on the formulation of GANs and can be applied to most variants of GANs , including Table-GAN and Tabular GAN . Moreover , while these former works only focus on tabular data , our BC-loss is applicable to generate image datasets as well . Some GAN variants are named similarly to our work but they pay attention to different problems . For example , the boundary described in boundary-seeking GAN ( Hjelm et al. , 2017 ) means the decision boundary of the discriminator rather than the decision boundary for the supervised labels . To the best of our knowledge , we are the first work trying to improve model compatibility by modifying the formulation of GANs . 4 BOUNDARY-CALIBRATION GAN . To achieve better model compatibility of GAN , we propose an auxiliary GAN loss which we call boundary-calibration loss ( or BC-loss ) . We assume that we have a set of pre-trained classifiers which are well-trained on the original dataset . The BC-loss helps GANs to calibrate the distribution with respect to the distribution of decision values predicted by pre-trained classifiers . The calibration leads to more accurate data generation near the decision boundary and thus enabling a machine learning algorithm to learn a similar hypothesis to one that learns from the original dataset . To ease the complexity of learning to generate ( x , y ) jointly , we infer P ( y ) by counting the proportion of each class in the original dataset and train a conditional generator G such that G ( z , y ) ∼ PX|y , where PX|y is the conditional data distribution and z ∼ PZ is the initial randomness such as Gaussian distribution . Therefore we can generate ( x , y ) by sampling y ∼ P ( y ) and G ( z , y ) .

Summary: This paper aims at training a GAN that can generate data matches the real data distribution well especially at the boundaries of the classifiers. A Boundary-Calibration loss (BC-loss) base on multi pretrained classifiers is introduced to match the statistics between the distributions of original data and generated data. The motivation is interesting. The story is clearly explained. However, the experiments part is weak.