I NFLUENCE E STIMATION FOR G ENERATIVE A DVERSARIAL N ETWORKS
A BSTRACT
Identifying harmful instances, whose absence in a training dataset improves model performance, is important for building better machine learning models.
Although previous studies have succeeded in estimating harmful instances under supervised settings, they cannot be trivially extended to generative adversarial networks (GANs).
This is because previous approaches require that (1) the absence of a training instance directly affects the loss value and that (2) the change in the loss directly measures the harmfulness of the instance for the performance of a model.
In GAN training, however, neither of the requirements is satisﬁed.
This is because, (1) the generator’s loss is not directly affected by the training instances as they are not part of the generator’s training steps, and (2) the values of GAN’s losses normally do not capture the generative performance of a model.
To this end, (1) we propose an inﬂuence estimation method that uses the Jacobian of the gradient of the generator’s loss with respect to the discriminator’s parameters (and vice versa) to trace how the absence of an instance in the discriminator’s training affects the generator’s parameters, and (2) we propose a novel evaluation scheme, in which we assess harmfulness of each training instance on the basis of how GAN evaluation metric (e.g., inception score) is expect to change due to the removal of the instance.
We experimentally veriﬁed that our inﬂuence estimation method correctly inferred the changes in GAN evaluation metrics.
Further, we demonstrated that the removal of the identiﬁed harmful instances effectively improved the model’s generative performance with respect to various GAN evaluation metrics.
I NTRODUCTION
Generative adversarial networks (GANs) proposed by Goodfellow et al.
(2014) are a powerful subclass of generative model, which is successfully applied to a number of image generation tasks (Antoniou et al., 2017; Ledig et al., 2017; Wu et al., 2016).
The expansion of the applications of
GANs makes improvements in the generative performance of models increasingly crucial.
An effective approach for improving machine learning models is to identify training instances that harm the model performance.
Traditionally, statisticians manually screen a dataset for harmful instances, which misguide a model into producing biased predictions.
Recent inﬂuence estimation methods (Khanna et al., 2019; Hara et al., 2019) automated the screening of datasets for deep learning settings, in which the sizes of both datasets and data dimensions are too large for users to manually determine the harmful instances.
Inﬂuence estimation measures the effect of removing an individual training instance on a model’s prediction without the computationally prohibitive cost of model retraining.
The recent studies identiﬁed harmful instances by estimating how the loss value changes if each training instance is removed from the dataset.
Although previous studies have succeeded in identifying the harmful instances in supervised settings, the extension of their approaches to GAN is non-trivial.
Previous approaches require that (1) the existence or absence of a training instance directly affects a loss value, and that (2) the decrease in the loss value represents the harmfulness of the removed training instance.
In GAN training, however, neither of the requirements is satisﬁed.
(1) As training instances are only fed into the discriminator, they only indirectly affect the generator’s loss, and (2) the changes in the losses of
GAN do not necessarily capture how the removed instances harm the generative performance.
This is because the ability of the loss to evaluate the generator is highly dependent on the performance of the discriminator.
To this end, (1) we propose an inﬂuence estimation method that uses the Jacobian of the gradient of the discriminator’s loss with respect to the generator’s parameters (and vice versa), which traces how the absence of an instance in the discriminator’s training affects the generator’s parameters.
In addition, (2) we propose a novel evaluation scheme to judge if an instance is harmful or not on the basis of inﬂuence on GAN evaluation metric , that is, how a GAN evaluation metric (e.g., inception score (Salimans et al., 2016))
changes if a given training instance is removed from the dataset.
We identify harmful instances by estimating the inﬂuence on GAN evaluation metric by leveraging our inﬂuence estimation method.
We veriﬁed that the proposed inﬂuence estimation method correctly estimated the inﬂuence on GAN evaluation metrics across different settings of the dataset, model architecture, and GAN evaluation metrics.
We also demonstrated that removing harmful instances, which were identiﬁed by the proposed method, effectively improved various GAN evaluation metrics.
Our contributions are summarized as follows:
• We propose an inﬂuence estimation method that uses the Jacobian of the gradient of the discriminator’s loss with respect to the generator’s parameters (and vice versa), which traces how the absence of an instance in the discriminator’s training affects the generator’s parameters.
• We propose a novel evaluation scheme to judge if an instance is harmful or not on the basis of inﬂuence on GAN evaluation metrics rather than that on the loss value, and to leverage the proposed inﬂuence estimation method to identify harmful instances.
• We experimentally veriﬁed that our inﬂuence estimation method correctly inferred the inﬂuence on GAN evaluation metrics.
Further, we demonstrated that the removal of the harmful instances suggested by the proposed method effectively improved the generative performance with respect to various GAN evaluation metrics.
P RELIMINARIES
Notation For column vectors a , b ∈ R p , we denote the inner product by (cid:104) a , b (cid:105) =
(cid:80) pi
=1 a i b i .
For a function f ( a ) , we denote its gradient with respect to a by ∇ a f ( a ) .
We denote the identity matrix of size p by I p , the zero vector of length p by 0 p , and the ones vector of length p by 1 p .
Generative Adversarial Networks (GAN) For simplicity, we consider an unconditional GAN that consists of the generator G : R d z → R d x and the discriminator D : R d x → R , where d z and d x are the number of dimensions of latent variable z ∼ p ( z ) and data point x ∼ p ( x ) , respectively.
The parameters of generator θ G ∈ R
d
G and discriminator θ D ∈ R
d D are learned though the adversarial training; G tries to sample realistic data while D tries to identify whether the data is real or generated.
Formulation of GAN Objectives For the generality, we adopt the formulation of Gidel et al.
(2018) in which G and D try to minimize L G and L D , respectively, to obtain the following Nash equilibrium ( θ ∗ G , θ ∗ D ) :
[Equation]
For the latter part of this paper, we use a coupled parameter vector θ := ( θ G , θ D ) (cid:62) ∈ R d θ = d G + d D when we refer to the whole parameters of GAN.
In this paper, we assume that L G and L D have the following forms 1 :
[Equation]
We can recover the original minimax objective by taking f G ( z ; θ )
= log (1 − D θ D
( G θ G ( z ))) , f [ z ] D = − f G , and f [ x ] D ( x ; θ ) = − log D θ D ( x ) .
Adversarial SGD (ASGD)
To make our derivation easier to understand, we newly formulate the parameter update of a GAN trained by stochastic gradient descent, which we call adversarial SGD ( ASGD ).
For simplicity, this paper considers simultaneous training, in which the generator and the discriminator are simultaneously updated in one step.
We denote the dataset by D x := { x n ∼ p ( x ) } Nn =1 , which consists of N data points.
Let S t ⊂ { 1 , . . .
, N } be a set of sample indices at the t -th step.
We assume that the mini-batch of the t -th step consists of instances { x i } i ∈S t and a set of latent variables Z t = { z [ t ] l ∼ p ( z ) } |S t | l =1 , which are sampled independently at each step t .
We denote the mean of L G and L D across the mini-batch by L G ( Z ; θ ) :
= 1 |Z| (cid:80) z ∈Z f G ( z ; θ ) and L D ( S , Z ; θ ) :
= 1 |Z| (cid:16)(cid:80) z ∈Z f
[ z ] D ( z ; θ ) + (cid:80) i ∈S f
[ x ] D ( x i ; θ ) (cid:17) , respectively.
The t -th step of
ASGD updates the coupled parameters by θ [ t +1]
= θ [ t ] − B t g (cid:0) S t , Z t ; θ [ t ] (cid:1) , where
[Equation]
η [ t ] G ∈ R + and η [ t ] D ∈ R
+ are the learning rates of the t -th step for θ G and θ D , respectively.
P ROPOSED M ETHOD
This section explains the two main contributions of our paper: the inﬂuence estimation method for
GANs that predicts how the removal of a training instance changes the output of the generator and the discriminator (Section 3.1), and two important parts of our instance evaluation scheme, that are, the deﬁnition of inﬂuence on GAN evaluation metric and its estimation algorithm
(Section 3.2).
3. I NFLUENCE E STIMATION FOR GAN
We refer to inﬂuence estimation as the estimation of changes in a model’s output under a training instance’s absence.
As the model’s output changes through the changes in the model’s parameters, we start with the deﬁnition of ASGD-Inﬂuence, which represents the changes in parameters, and then formulate its estimator.
ASGD-Inﬂuence ASGD-Inﬂuence is deﬁned on the basis of the following counterfactual ASGD .
Let θ [ t ] − j denote the parameters at t -th step trained without using j -th training instance.
Counterfactual ASGD starts optimization from θ [1] − j = θ [1] and updates the parameters of the t -th step by θ [ t +1] − j = θ [ t ] − j − B t g (cid:16) S t \ { j } , Z t ; θ
[ t ] − j (cid:17) .
We deﬁne ASGD-Inﬂuence ∆ θ − j as the parameter difference between counterfactual ASGD and ASGD at the ﬁnal step t = T , namely ∆ θ − j := θ [ T ] − j − θ [ T ] .
Estimator of ASGD-
Inﬂuence Our estimator uses approximation of mean of the gradient.
Let (cid:0) ∇ θ G L G
( Z ; θ ) , ∇ θ D L D ( S , Z ; θ ) (cid:1) (cid:62) be the joint gradient vector of the mini-batch.
We introduce the Jacobian of the joint gradient vector of the t -th mini-batch with respect to θ :
[Equation]
When we assume both L G ( θ ) and L G ( θ ) are second-order differentiable with respect to θ , the ﬁrst-order Taylor approximation gives g (cid:16) S t , Z t ; θ
[ t ] − j (cid:17) − g (cid:0) S t , Z t ; θ [ t ] (cid:1)
≈ J t (cid:16) θ
[ t ] − j − θ [ t ] (cid:17) .
With this approximation, we have
[Equation]
For simplicity, we ﬁrst focus on 1-epoch ASGD in which each instance appears only once.
Let π ( j ) be the step where the j -th instance is used.
Considering the absence of ∇ θ D f [ x ] D ( x j ; θ [ π ( j )] ) in the π ( j ) -th step of counterfactual ASGD, we have θ [ π ( j )+1] − j − θ [ π ( j )+1] = η [ π
[Equation]
j )]
D | [-(cid:16) 
-][Equation]
, ∇ [Equation] D f
[ x ] D ( x j ; θ [ π ( j )] ) (cid:17) (cid:62) .
By denoting Z t := I d θ − B t J t and recursively applying the approximation (5), we obtain [Equation]
[Equation]
For the practical situation of K -epoch ASGD, in which the j -th instance is sampled K times at t = π 1 ( j ) , . . .
, π K ( j ) , the estimator of the ASGD-Inﬂuence is given by
[Equation]
Linear Inﬂuence To estimate the inﬂuence on outputs, we introduce linear inﬂuence
L [ T ] − j ( u ) :
=
(cid:104) u , ∆ θ − j (cid:105) of a given query vector u ∈ R d θ .
If we take u = ∇ θ f G (cid:0) z ; θ [ T ] (cid:1) , the linear inﬂuence approximates the inﬂuence on the generator’s loss L [ [Equation] ] (cid:1) .
Let (cid:16) u
[ t ] (cid:62) G ∈ R d G , u [ t ] (cid:62)
[Equation]
∈ R d D (cid:17) :
= u (cid:62) Z T − 1 Z T − 2 · · · Z t +1 .
The linear inﬂuence of the j -th instance is approximated by the proposed estimator:
[Equation]
The estimation algorithm consists of two phases; training phase performs K -epoch ASGD by storing information A [ t ] ← ( S t , η [ t ] G , η [ t ] D , θ [ t ] , Z t ) and inference phase calculates (8) using
A [1] , . . . ,
A [ T − 1] .
See Appendix A for the detailed algorithm.
3. I NFLUENCE ON GAN E VALUATION M ETRIC
This section explains our proposal of a new evaluation approach for data screening for GANs.
Firstly we propose to evaluate harmfulness of an instance on the basis of inﬂuence on GAN evaluation metrics.
Secondly we propose to leverage the inﬂuence-estimation algorithm explained in Section 3.1 to identify harmful instances with respect to the GAN evaluation metrics.
Inﬂuence on GAN Evaluation Metric Let V ( D ) be a GAN evaluation metric that maps a set of data points D :=
{ ˜ x m ∈ R d x } Mm =1 into a scalar value that gives the performance measure of
G .
Let generated dataset D G ( Z ; θ G ) :
= { G ( z ; θ G ) | z ∈ Z} .
Using a set of latent variables
Z [Equation]
n =1 that is sampled independently from the training, we deﬁne the inﬂuence on
GAN evaluation metric by
[Equation]
where θ [ T ] G, − j and θ [ T ] G are the generator parameters of counterfactual ASGD and the ASGD of the
T -th step, respectively.
Estimation Algorithm
In order to build the estimation algorithm of the inﬂuence on GAN evaluation metric, we focus on an important property of some common evaluation metrics for which the gradient with respect to the element of their input ∇ ˜ x m V ( D ) is computable.
For example, Monte
Carlo estimation of inception score has a form of exp( 1 |D| (cid:80)
˜ x m ∈D KL ( p c ( y | ˜ x m ) (cid:107) p c ( y )) where p c is a distribution of class label y drawn by a pretrained classiﬁer.
When the classiﬁer is trained using back-propagation, ∇ ˜ x m V ( D ) is computable.
Here, we assume V ( D ) is ﬁrst-order differentiable with respect to ˜ x m .
From the chain rule, we have a gradient of the GAN evaluation metrics with respect to θ :
[Equation]
Our estimation algorithm performs the inference phase of linear inﬂuence taking u
[Equation]
R ELATED S TUDIES
SGD-Inﬂuence Hara et al.
(2019) proposed a novel deﬁnition of the inﬂuence called SGDInﬂuence and its estimator, which greatly inspired us to propose the inﬂuence estimation method for GANs.
Suppose a machine learning model with parameters
φ ∈ R
d φ is trained to minimize the mean of the loss 1 N (cid:80)
Nn =1 L ( χ n ; φ ) across the training instances χ 1 , . . .
, χ N .
Let the mean of the loss of the mini-batch L ( S ; φ ) :
= 1 |S| (cid:80) i ∈S L ( χ i ; φ ) .
They introduced two SGD steps with learning rate η t ∈ R + : SGD given by φ [ t +1] =
φ [ t ] − η t ∇ φ L (cid:0) S t ; φ [ t ] (cid:1) , and counterfactual SGD given by φ [ t +1]
− j = φ [ t ] − j − η t ∇ φ L (cid:16) S t \ { j } ; φ [ t ] − j (cid:17) .
Their estimator of SGD-Inﬂuence φ [ T ] − j − φ [ T ] is based on the following approximation:
[Equation]
Hara et al.
(2019) also identiﬁed harmful instances for classiﬁcation based on linear inﬂuence of the cross-entropy loss estimated using a validation dataset.
Removing the estimated harmful instances with their approach demonstrated improvements in the classiﬁcation accuracy.
Our approach differs from Hara et al.
(2019)’s work in two ways.
Firstly, our approach uses the
Jacobian of the joint gradient vector J t instead of the Hessian of the mean loss ∇ 2 φ L (cid:0) S t ; φ [ t ] (cid:1) .
As long as L G (cid:54) =
L D , J t is asymmetric and inherently different from the Hessian.
Moreover, a source of the asymmetry J [ t ] GD plays an important role in transferring the effect of removal of a training instance from the discriminator to the generator.
Let θ [ t ] G, − j − θ [ t ] G ∈ R d
G
and θ [ t ] D, − j − θ [ t ] D ∈ R
d D be ASGD-Inﬂuence on θ G and θ D of the t -th step, respectively.
The upper blocks of (5) can be rewritten as
[Equation]
Note that J [ t ] GD transfers the t -th step of ASGD-Inﬂuence on θ D to the next step of ASGD-Inﬂuence on θ G .
The Hessian of Hara et al.
(2019), which uses a single combination of the parameters and the loss function, cannot handle this transfer between the two models.
Secondly, we use the inﬂuence on GAN evaluation metrics for identifying harmful instances rather than that on the loss value.
This alleviates the problem of the GAN’s loss not representing the generative performance.
Inﬂuence Function Koh & Liang (2017) proposed inﬂuence estimation method that incorporated the idea of inﬂuence function (Cook & Weisberg, 1980) in robust statistics.
They showed that inﬂuences on parameters and predictions can be estimated with the inﬂuence function assuming the satisfaction of the optimality condition and strong convexity of the loss function.
They also identiﬁed harmful instances on the basis of the inﬂuence on the loss value, assuming consistency of the loss value with the task performance.
Our inﬂuence estimation method is designed to eliminate these assumptions because normally GAN training does not satisfy the assumptions regarding the optimality condition, the convexity in the loss function, and the consistency of the loss value with the performance.
E XPERIMENTS
We evaluated the effectiveness of the proposed method in two aspects: the accuracy of inﬂuence estimation on GAN evaluation metrics (Section 5.1), and the improvement in generative performance by removing estimated harmful instances (Section 5.2)
GAN Evaluation Metrics
In both experiments, we used three GAN evaluation metrics: average log-likelihood (ALL), inception score (IS), and Fr´echet inception distance (FID) (Heusel et al., 2017).
ALL is the de-facto standard for evaluating generative models (Tolstikhin et al., 2017).
Let
D (cid:48)
x :=
{ x (cid:48) n ∼ p ( x ) } N (cid:48) n =1 , which is sampled separately from the training dataset D x .
ALL measures the likelihood of the true data under the distribution that is estimated from generated data using kernel density estimation.
We calculated ALL of D (cid:48)
x under the distribution estimated from generated [Figure] dataset D G ( Z (cid:48) ; θ [ T ] G ) .
Recall Z (cid:48) is the set of latent variables sampled independently from the training (Section 3.2).
FID measures Fr´echet distance between two sets of feature vectors of real images
D (cid:48)
x and those of generated images D G ( Z (cid:48) ; θ [ T ] G ) .
The feature vectors are calculated on the basis of a pre-trained classiﬁer.
Larger values of ALL and IS and a smaller value of FID indicate the better generative performance.
See Appendix C.1 for the detailed setting of each GAN evaluation metric.
5. E XPERIMENT 1: E STIMATION A CCURACY
We ran the inﬂuence estimation method on GANs to estimate inﬂuence on various GAN evaluation metrics, and then compared the estimated inﬂuence with true inﬂuence.
The detailed setup can be found in Appendix C.2.
Setup ALL is known to be effective for low-dimensional data distributions (Borji, 2018) and both
FID and IS are effective for image distributions.
We thus prepared two different setups: fullyconnected GAN (FCGAN) trained with 2D multivariate normal distribution (2D-Normal) for ALL, and DCGAN (Radford et al., 2015) trained with MNIST (LeCun et al., 1998) for IS and FID.
IS and
FID require classiﬁers to obtain class label distribution and feature vectors, respectively.
We thus trained CNN classiﬁer of MNIST 2 using D (cid:48) x .
We set N = 10k and N (cid:48)
=
|D (cid:48)
x | = |Z (cid:48) | = 10k .
The experiment was conducted as follows.
Firstly, we ran the K -epoch of the training phase of linear inﬂuence with the training dataset D x .
We determined K = 50 since we observed the convergence of GAN evaluation metrics at K = 50 .
For IS and FID, we trained the classiﬁer using D (cid:48) x and corresponding labels.
We then randomly selected 200 target instances from D x .
We obtained estimated inﬂuence on GAN evaluation metrics of each target instance by performing the inference phase of linear inﬂuence with u = ∇ θ V ( D G ( Z (cid:48) ; θ [ T ] G )) .
The true inﬂuence of each target instance was computed by running the counterfactual ASGD.
We used the same evaluation measures as the previous work (Hara et al., 2019): Kendall’s Tau and the Jaccard index.
Kendall’s Tau measures the ordinal correlation between the estimated and true inﬂuence on GAN evaluation metrics.
It has a value of 1 when the orders of the two sets of values are identical.
For the Jaccard index, we selected 10 instances with the largest positive and largest negative inﬂuence values to construct a set of 20 critical instances.
The Jaccard index is equal towhen a set of estimated critical instances is identical to that of true critical instances.
To investigate the relationship between a number of tracing back steps and the estimation accuracy, we also evaluated the inﬂuence on GAN evaluation metrics of k -epoch ASGD.
In k -epoch training, both inference phase of linear inﬂuence and the counterfactual ASGD traced back only k ≤ K epochs from the latest epoch K .
We varied k = 1 , 5 , 10 , 20 , 50 and ran the experiment ten times for each k by changing the random seeds of the experiments.
, 2016) trained with ImageNet, we instead adopted a domain-speciﬁc classiﬁer as encouraged by several studies (Zhou et al., 2018;
Liu et al., 2018) to alleviate the domain mismatch with ImageNet.
Results and Discussion Figure 1 shows the average Kendal’s Tau and the Jaccard index of the repeated experiments.
Hereinafter, we use p < .
05 to judge the statistical signiﬁcance of the results.
For all k , Kendall’s Tau and the Jaccard index of estimated inﬂuence on ALL were statistically signiﬁcantly better than the result in which the order of estimated inﬂuence values were random (random case).
Even in the more difﬁcult setups of IS and FID, which handled the high-dimensional dataset and complex architecture, the results were statistically signiﬁcantly better than that of the random case except for Jaccard index of IS with k = 50 .
We also observed the estimation accuracy dropped as k increased.
This reﬂects the nature of our estimator that recursively performs linear approximation as many times as the number of steps.
We thus conclude that when the required number of tracing back steps is small enough, our inﬂuence estimation method is effective and the estimated inﬂuence on GAN evaluation metrics are useful for identifying harmful instances.
5. E XPERIMENT 2: D ATA C LEANSING
We investigated if removing identiﬁed harmful instances actually improved the generative performance to evaluate the effectiveness of our proposed method for data cleansing .
We deﬁne data cleansing as an attempt to improve GAN evaluation metrics by removing a set of training instances.
See appendix C.3 for the detailed settings.
Setup We studied the data cleansing for the two setups explained in the previous section: 2DNormal with FCGAN and MNIST with DCGAN.
We mostly followed the settings of Section 5.
but set training dataset size N = 50k for both setups.
We identiﬁed harmful instances in 2D-Normal training dataset using estimated inﬂuence on ALL, and those in MNIST using estimated inﬂuence on IS and FID.
We considered an training instance was harmful when it had negative (positive) inﬂuence on FID (ALL or IS).
For both setups, we also selected instances using baseline approaches: anomaly detection method, inﬂuence on the discriminator loss, and random values.
For anomaly detection, we adopted isolation forest (Liu et al., 2008).
Isolation forest ﬁtted the model using the data points of D x for 2D-Normal and feature vectors of the classiﬁer of D x for MNIST.
We adopted the selection based on the inﬂuence on the discriminator loss to verify our assumption that the inﬂuence on the loss does not represent the harmfulness of the instances.
Inﬂuence on the discriminator loss was calculated on the expected loss of L D ( θ ) with D G ( Z (cid:48) ; θ [ T ] G ) and D (cid:48) x .
We considered instances with negative inﬂuence were harmful.
We conducted the experiments as follows.
After the training phase of K epoch, we determined n h < N harmful instances with the proposed approach and baselines.
Then, we ran counterfactual
ASGD with the determined harmful instances excluded.
For the reliable estimation accuracy of inﬂuence and reasonable costs of the computation and storage, the inference phase traced back only 1-epoch from the last epoch, and counterfactual ASGD only re-ran the latest epoch.
We refer to the generator of the ﬁnal model as the cleansed generator and denote its parameters by θ (cid:63)G .
We evaluated the cleansed generator with test GAN evaluation metrics V ( D G ( Z test ); θ (cid:63)G )) , in which a set of test latent variables Z test was obtained by sampling N test times from p ( z ) independently from Z (cid:48) and Z 1 , . . .
, Z T .
ALL and FID used N test data points newly sampled from 2D-Normal and the original test dataset of MNIST, respectively.
We set N test = 10k .
We tested with various n h .
We ran the experiment 15 times for each n h with different random seeds.
Results and Discussion Figure 2 shows the average test GAN evaluation metrics of the repeated experiments for each selection approach.
For the data cleansing on 2D-Normal, the proposed approach with inﬂuence on ALL showed statistically signiﬁcant improvement from the original model and it outperformed the baselines (Figure 2a).
For the MNIST setup, our approach with inﬂuence on FID and IS statistically signiﬁcantly improved FID (Figure 2c) and IS (Figure 2b), respectively.
They also outperformed the baselines.
In addition, the results indicate that data cleansing based on the inﬂuence on a speciﬁc GAN evaluation metric is also effective for another metric that is not used for the selection; removing harmful instances based on the inﬂuence on FID (IS) statistically signiﬁcantly improved IS (FID).
However, we make no claim that the proposed method can improve all the other evaluation metrics, such as Kullback-Leibler divergence.
This is because all the current GAN evaluation metrics have their own weaknesses (e.g., IS fails to detect whether a model is trapped [Figure] into one bad mode (Zhou et al., 2018)) , and the proposed method based on those GAN evaluation metrics cannot inherently avoid their weaknesses.
These improvements thus can be observed only in a subclass of GAN evaluation metrics.
Further evaluation of data cleansing with our method should incorporate the future improvements of the GAN evaluation metrics.
While the improvements were smaller than the proposed approach, we also observed that data cleansing based on the inﬂuence on the discriminator loss improved all the GAN evaluation metrics.
This counter-intuitive result indicates that the discriminator loss weakly measures the performance of the generator that is trained along with the discriminator.
C ONCLUSION
We proposed an inﬂuence estimation method for GAN that uses the Jacobian of the gradient of the discriminator’s loss with respect to the generator’s parameters (and vice versa), which traces how the absence of an instance in the discriminator’s training affects the generator’s parameters.
We also proposed a novel evaluation scheme to judge if an instance is harmful or not on the basis of the inﬂuence on GAN evaluation metrics rather than that on the loss value, and to leverage the proposed inﬂuence estimation method to identify harmful instances.
We experimentally veriﬁed that estimated and true inﬂuence on GAN evaluation metrics had statistically signiﬁcant correlation.
We also demonstrated removing identiﬁed harmful instances effectively improved the generative performance with respect to various GAN evaluation metrics.
A A LGORITHM FOR L INEAR I NFLUENCE
The proposed estimation algorithm of linear inﬂuence, which is explained in Section 3.1, is divided into the training phase (Algorithm 1) and inference phase (Algorithm 2).
The training phase executes ASGD training while storing the mini-batch indices S t , the learning rate η [ t ] G , η [ t ] D , the parameters θ [ t ] and the sampled latent variable Z t into the information A [ t ] for each step.
In the inference phase, L [ T ] − j ( u ) is estimated by the recursive calculation.
First, we set L [ T ] − j ( u ) to 0 and set the query vector u .
The information A [ t ] , which is obtained in the training phase, is read in the order of t =
T − 1 , T − 2 , . .
When j ∈ S t , L [ T ] − j ( u ) is updated using (8).
Let u t
=
(cid:16) u
[ t ] G , u [ t ] D (cid:17) (cid:62) .
Each step updates u based on u t +1 =
u (cid:62) t ( I d θ − B t J t ) .
A naive calculation of u (cid:62) t J t requires O (cid:0) d 2 θ (cid:1) memory to store the matrix J t , which can be prohibitive for very large models.
We can avoid this difﬁculty by directly computing u (cid:62) t J t without the explicit computation of J t .
Because u (cid:62) t J t = ∇ θ (cid:10) u t , ( ∇ θ G L G , ∇ θ D L D ) (cid:62) (cid:11) , we need only to compute the derivative of the inner product of u t and the joint gradient vector.
B O THER R ELATED W ORKS
Anomaly Detection
A typical approach for identifying harmful instances is outlier detection.
Outlier detection is used to remove abnormal instances from the training set before training the model to ensure that the model is not affected by the abnormal instances.
For tabular data, there are several popular methods, such as One-class support vector machine (Sch¨olkopf et al., 2001), local outlier factor (Breunig et al., 2000), and isolation forest (Liu et al., 2008).
Although these methods can ﬁnd abnormal instances, they are not necessarily harmful for the resulting models, as we showed in the experiment.
Training GAN from Noisy Images One typical type of data that harm generative performance is noisy images.
AmbientGAN (Bora et al., 2018) and noise-robust GAN (Kaneko & Harada, 2020) are learning algorithms that make it possible to train a clean image generator from noisy images.
The difference between these studies and ours is that these studies assume that the noise (e.g., Gaussian noise on pixels) given independently from the data distribution of the clean images is the only problem.
However, some instances can affect the performance even if the instances are drawn only from the data distribution, which is the case robust statistics (Huber, 2004) typically focuses on.
Our experiment 5.2 indicates that the model performance depends not only on noisy images but also on a non-negligible number of harmful instances in the original dataset.
[Table]
[Table]
C D ETAILED E XPERIMENTAL S ETTINGS AND RESULTS C. GAN EVALUATION METRICS
We adopted Gaussian kernel with the band-width 1 for kernel density estimation used in ALL.
The architecture of CNN classiﬁer of MNIST used for IS and FID can be found in Table 1.
We selected the output of the 4-th layer for the feature vectors for FID.
C.
E XPERIMENT 1: ESTIMATION ACCURACY
Setup In the experiment of Section 5.
[Table]
we adopted the hyper parameters shown in Table 2.
We trained fullly-connected GAN (FCGAN) for 2D multivariate normal distribution, in which the both
G and D has 1 hidden layer of h G and h D units, respectively (Table 3).
2D-Normal is given by
N ( µ , Σ ) , in which the mean vector µ = 1 2 and the covariance matrix Σ =
8) , (0 . 8 , 1)) (cid:62) .
DCGAN consists of transposed convolution (or deconvolution) layers and convolution layers (Table 4).
The channels of the both layers in G and D were determined by h G and h D , respectively.
We used Layer Normalization (Ba et al., 2016) for the layers shown in Table 4 for the stability of the training.
We also introduced the L2-norm regularization with the rate γ ∈ R + for all the kernels of both FCGAN and DCGAN.
We used the non-zero-sum game objective of the original paper (Goodfellow et al., 2014) in which G tries to minimize − D θ D ( G θ G ( z )) for both models.
C. E XPERIMENT 2: DATA CLEANSING
Setup We adopted the same architecture as the Section 5.1 (Table 3) for FCGAN and slightly different architecture (Table 4) in which h G and h D are larger (Table 5) for DCGAN.
Other hyper parameters followed Table 5. [Table]
[Table] [Table] Results Table 6-8 show the detailed results of Figure [Table]
And they clarify with which n h and selection approach the test GAN evaluation metrics were statistically signiﬁcantly improved [Table] [Table] [Table]
[Table]
D D ETAILED D ISCUSSION ON E XPERIMENT
This section ﬁrst discusses three aspects of the results in Section 5.2: Section D.1 explains the common characteristics of harmful instances suggested by our approach, Section D.2 discusses qualitative aspects of the data cleansing using generated samples, and Section D.3 discusses how the characteristics of harmful instances and effect of the data cleansing are consistent among the trainings with different random seeds.
Finally, we explain the limitation of our method and present the future direction in Section D.4.
D. C HARACTERISTICS OF H ARMFUL INSTANCE
In this section, we examine the characteristics of instances that are evaluated to be harmful or helpful by our method. We regard a sample is helpful if its inﬂuence on a metric is opposite of harmful instances. Table 9 shows the estimated harmfulness of the training instances of 2D-Normal and the distribution of the generated samples. The proposed approach with inﬂuence on ALL evaluated the instances around lower-left and upper-right regions to be harmful (Table 9 (a, i)).
These regions correspond to the regions where the generated distribution has higher density than that of the true distribution; The generator before the cleansing (Table 9 (a, ii, No removal)) sampled too frequently from lower-left and upper-right regions compared to the true distribution (Table 9 (a, ii, True)).
This characteristics was not observed in the plots of baseline approaches.
The approach based on inﬂuence on the discriminator loss seems to ignore the difference in the density around the lower-left region (Table 9 (b, i)) and isolation forest did not take the generator’s distribution into account (Table 9 (c, i)).
Similar characteristics were seen in harmful MNIST instances suggested by our approach with inﬂuence on IS and FID.
When the generator over-sampled a speciﬁc digit (e.g., the digit 1 in Table 10 (a, iii)), our approach tended to judge the images of the digit to be harmful (e.g., a large number of 1 in Table 10 (b-c, i)).
Similarly, our method judged instances of a speciﬁc digit as helpful (e.g., the digit 6 in Table 10 (b-c, ii)) when the generator failed to sample the digit (e.g., the absence of 6 in Table 10 (a, iii)).
On the contrary, harmful instances suggested on the basis of inﬂuence on the discriminator loss did not show the tendency (Table 10 (d, i)).
The baseline approach with isolation forest based on the classiﬁer feature-space seems to have judged the images that were difﬁcult to be classiﬁed as harmful, rather than the over-sampled digit (Table 10 (e, i)).
It regarded that instances are helpful when they belong to a digit that seems to have been easy to be classiﬁed (Table 10 (e, ii)).
To summarize, our method tends to judge instances as harmful when they belong to regions from which the generators sample too frequently compared to the true distribution.
D. Q UALITATIVE STUDY OF DATA CLEANSING
We then investigate how the data cleansing using the suggested harmful instances visually change generated samples.
As seen from Table 9 (a, ii), the probability density in the upper-right region decreased after the data cleansing (from “No removal” to “Cleansed”).
As a result, the generator distribution got closer to the true distribution.
Although the baselines indicated the same direction of changes in the distributions (Table 9 (b-c, ii)), these were not as signiﬁcant as ours.
The same effect was observed in visually more interesting form in the data cleansing for MNIST.
The generated samples originating from some latent variables changed from the image of digit 1 to that of other digits after the data cleansing based on the estimated inﬂuence on IS and FID (highlighted samples in Table 10 (b-c, iii)).
This implies that a certain amount of density that are over-allocated for the digit 1 moved to the regions of other digits.
We assume this effect improved the diversity in the generated samples, resulting in better FID and IS.
This characteristics was not clearly observed in the baselines (highlighted samples in Table 10 (d-f, iii)).
These observations suggest that our method helps the GAN’s training so that the generator re-assigns the densities that were over-allocated to certain regions to other regions.
D. C ONSISTENCY OF QUALITATIVE CHARACTERISTICS AMONG DIFFERENT TRAININGS
We show additional visual results to conﬁrm the consistency of the ﬁndings on the characteristics of harmful instances and generated samples after data cleansing, which we described in Section D. and Section D.3, respectively.
Table 11 shows the harmfulness of the training instances and the distribution of the generated samples obtained using 5 different random seeds in 2D-Normal case.
As seen from the table, regardless of which region a generator assigns high density to, our method consistently regards the training samples around the region as harmful.
In addition, the distributions of the generated samples get closer to the true distribution by removing these harmful training instances in the data cleansing.
Table 12 visualizes the MNIST examples of harmful instances, helpful instances, and generated images before and after the data cleansing.
Different rows correspond to different random seeds.
We found the consistency in visual characteristics was moderate in MNIST case.
A few results demonstrated the common qualitative characteristics when the improvements in GAN evaluation metrics were large (Table 12 (a) and (d)).
In the training with the 4th random seed (d), the suggestion of harmful instances showed some tendency; many instances of digit 7 were regarded as harmful whereas those of digit 4 were not at all (Table 12 (d, i)).
The data cleansing based on this suggestion seems to have improved the diversity of the generated samples by reducing the samples of digit 7 and increasing those of digit 4 (highlighted samples in Table 12 (d, iv)).
This indicates the consistent characteristics of the data cleansing discussed in the previous section to some extent; it helps the
GAN’s training so that the generator re-assigns the densities that were over-allocated to certain data regions to other regions.
The limitation of our method is that it does not guarantee the harmful instances suggested on the basis of inﬂuence on one GAN evaluation metric are not necessarily harmful from the viewpoint of other metrics. For example, we have demonstrated that removing instances that predicted to have negative inﬂuence on FID improved both test FID and IS (Figure 2) and increased visual diversity in generated images (Table 10 and 12). However, it does not seem to have improved visual quality (e.g., sharpness, reality, etc.) of the individual generated-samples.
Therefore, it is possible that these instances are harmful only for some particular aspects of generative performance, i.e. the diversity in this case, and they are not harmful for the other aspect, i.e. the visual quality in this case.
We would argue that this limitation is closely tied with the limitation of the current GAN evaluation metrics.
For example, FID takes the diversity of generated samples into account, but they only partly take the visual quality into account; e.g., FID based on Inception Net was shown to focus on textures rather than shapes of the objects (Karras et al.
In this sense, we clarify that we never claim our method can improve the “true” generative performance from all the aspects, considering the situation that there is no “true” evaluation metric that measures all the aspects of the generative performance.
The advantage of our method is that it does not have to care how the evaluation metrics are deﬁned as long as they are differentiable with respect to the generated samples. Furthermore, our evaluation method makes no assumption about what the harmful characteristics of instances are. This means that it is expected to be easily applied to another evaluation metric if better metric is developed in the future. One of our main contributions in such sense is that we experimentally veriﬁed that our method successfully improved the generative performance in terms of a targeted metric, using limited but currently widely accepted metrics.
Our future work includes incorporating such future improvements in the GAN evaluation metric to obtain better insights on the relationship between training instances and generative performance. In addition, we would like to relax the current constraint on the optimizer. Our method is currently applicable only to SGD but we would like to ﬁnd a way to extend it to other optimizers such as Adam (Kingma & Ba (2014)) to deal with the latest GAN models.
[Table] [Table]
[Table] [Table]