Demonstrating the Evolution of GANs through t-SNE
DDemonstrating the Evolution of GANs throught-SNE
Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado
CISUC, Department of Informatics EngineeringUniversity of Coimbra, Coimbra, Portugal { vfc, naml, jncor, machado } @dei.uc.pt Abstract.
Generative Adversarial Networks (GANs) are powerful gen-erative models that achieved strong results, mainly in the image domain.However, the training of GANs is not trivial, presenting some challengestackled by different strategies. Evolutionary algorithms, such as CO-EGAN, were recently proposed as a solution to improve the GAN train-ing, overcoming common problems that affect the model, such as vanish-ing gradient and mode collapse. In this work, we propose an evaluationmethod based on t-distributed Stochastic Neighbour Embedding (t-SNE)to assess the progress of GANs and visualize the distribution learned bygenerators in training. We propose the use of the feature space extractedfrom trained discriminators to evaluate samples produced by generatorsand from the input dataset. A metric based on the resulting t-SNE mapsand the Jaccard index is proposed to represent the model quality. Ex-periments were conducted to assess the progress of GANs when trainedusing COEGAN. The results show both by visual inspection and met-rics that the Evolutionary Algorithm gradually improves discriminatorsand generators through generations, avoiding problems such as modecollapse.
Keywords: neuroevolution, coevolution, generative adversarial networks
Generative Adversarial Networks (GANs) [12] gained relevance in the past yearsfor producing impressive results in the context of images. The GAN model usesadversarial training to achieve strong discriminative and generative components.The typical model is comprised of two neural networks: a generator and a dis-criminator. These networks compete in a unified training process where thegenerator uses its neural network to produce samples and the discriminator triesto classify these samples as fake or real (i.e., drawn from the input dataset).Although the discriminator trained by a GAN also represents an important out-come of the training process, GANs are mostly used as a generative model toproduce innovative samples based on an input distribution.Despite the progress regarding generative models, the training of GANs ischallenging and is affected by some well-known issues, such as the vanishing gra-dient and mode collapse [6,10]. Therefore, a trial-and-error approach is usually a r X i v : . [ c s . N E ] F e b Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado applied to obtain the expected results, making the training of GANs an uncer-tain process. The vanishing gradient and the mode collapse problems are relatedto the balance between the discriminator and the generator. Vanishing gradi-ent occurs when the discriminator or generator becomes much more powerfulthan the other, leading to stagnation of training. Mode collapse occurs when thegenerator captures only a small fraction of the input distribution.Several improvements were proposed for the initial GAN model. These pro-posals aim not only to improve the GAN training but also to produce morerealistic results, focusing on two aspects of GANs: loss functions and architec-tural mechanisms of the neural networks. Therefore, more efficient loss functionsand architectural improvements were proposed, such as WGAN [2], BEGAN [5],LSGAN [21], SN-GAN [23], StyleGAN [16], and DCGAN [24]. However, stabilityissues in GAN training are still present.Neuroevolution is an approach used to design and optimize neural networksthrough the application of evolutionary algorithms [22,28,33]. These algorithmsare based on the evolutionary mechanism found in nature, evolving a popula-tion of individuals through selective pressure, leading to the discovery of efficientsolutions for a certain problem [27]. Recently, a combination of evolutionary al-gorithms and GANs were proposed to improve the original model. Progress wasmade in both the resulting quality of the outcome and the stability of the GANtraining. Methods such as E-GAN [31], Pareto GAN [11], Lipizzaner [1], Mus-tangs [30], and COEGAN [7,9] use different approaches to apply EvolutionaryAlgorithms on the training of GANs.Coevolutionary GAN (COEGAN) [7,9] combines neuroevolution and coevo-lution on the orchestration of the GAN training. Namely, competitive coevolu-tion is used to design the algorithm in order to produce evolutionary pressureand overcome the stability issues affecting the training of GANs. The authorsshowed through experimental analysis that the method was able to discoverefficient models for GANs in different datasets [7].We propose in this paper a new method to evaluate the progress of GANsduring the training process. Therefore, we design an evaluation method thatuses t-distributed Stochastic Neighbour Embedding (t-SNE) [20] to visualizeand quantify the performance of discriminators and generators during the evo-lutionary process. For this, we use the feature space produced by discriminatorsto analyze images produced by generators and drawn from the input dataset.The t-SNE algorithm was fed with this feature space in order to distribute thoseimages in a two-dimensional grid. A metric based on the Jaccard index in theresulting t-SNE maps was proposed to quantify the performance achieved byGAN models.This evaluation method was applied to analyze the evolution of discrimina-tors and generators in COEGAN. The experiments evidenced that the distribu-tion of samples produced by our evaluation method is able to create a consistentvisualization of the evolutionary process in COEGAN. The results provide ad-ditional evidence of the evolution of generators and discriminators achieved byCOEGAN. emonstrating the Evolution of GANs through t-SNE 3
The remainder of this paper is organized as follows: Section 2 introduces t-SNE, GANs, and neuroevolution, presenting state-of-the-art works using theseconcepts; Section 3 summarizes the COEGAN algorithm; Section 4 presents themethod proposed in this work to evaluate the progress of discriminators andgenerators; Section 5 displays the experimental results of COEGAN using ourevaluation method; finally, Section 6 presents our conclusions and future work.
In this section, we present the concepts used in this work to develop the evalua-tion method and apply it in Evolutionary Algorithms. Therefore, we will intro-duce concepts of neuroevolution and GANs. We will also describe works proposedto use Evolutionary Algorithms in the training of GANs. Finally, we describethe t-SNE algorithm and show works using it to represent and evaluate datadistributions.
Evolutionary Algorithms find inspiration in nature to design mechanisms basedon biological evolution [27]. Several strategies to apply these evolution mecha-nisms were proposed in the literature, offering new perspectives to solve a varietyof problems. In general, Evolutionary Algorithms use a population of potentialsolutions to solve a defined problem, using variation operators and selective pres-sure to adapt individuals toward the target. Thus, each solution is an individualrepresented through an abstraction called genotype. The genotype transforma-tion derives the concrete solution, called phenotype.Neuroevolution is the application of Evolutionary Algorithms to the evolutionof neural networks. In this case, the genotype represents an abstraction for theimplementation of a neural network. This representation can be direct, i.e., allnodes and connections of the neural architecture are encoded [22,28], or indirect,i.e., rules are specified to derive the concrete implementation of neural networks,such as in structured grammatical evolution [3,19].Weights, topology, and hyperparameters can be evolved through neuroevo-lution [33]. Thus, the manual process used by researchers to discover efficientmodels can be transformed into an automatic process. It is important to notethat the training of neural networks is a time-consuming task, impacting theperformance of neuroevolution algorithms.NeuroEvolution of Augmenting Topologies (NEAT) [28] is a well-known modelthat uses neuroevolution in the evolution of both weights and topologies of neuralnetworks. The genotype is a direct representation of the neural network, whereNEAT defines two lists for the genome of individuals: a list of neurons and alist of connections between these neurons. A further expansion of NEAT wasproposed to enable larger search spaces in DeepNEAT and CoDeepNEAT [22].In these models, the genes composing a genome are abstractions of entire layers,
Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado enabling the representation of deep neural networks. Deep neural networks be-came popular and achieved strong performance in several tasks. Thus, the needfor automation became relevant to improve progress on deeper models [22].
In Generative Adversarial Networks (GANs) [12], two neural networks are used inan adversarial way in a unified training process. These networks are representedby one generator and one discriminator. The discriminator is trained with someinput dataset and has to classify samples as originated from this dataset (i.e.,real samples) or samples produced by the generator (i.e., fake samples). Thus,the discriminator outputs a probability of each sample belonging to the inputdataset. On the other hand, the generator receives a probability distribution asinput and transforms this input into fake samples similar to the input dataset.These fake samples are also used as input to the discriminator to evaluate theirquality. This adversarial model leads to the creation of strong generative anddiscriminative models, taking advantage of these adversarial characteristics toprogressively improve their performance. Generators trained by GANs producehigh-quality results without losing the characteristics of the input data.Figure 1 describes the interaction between discriminators and generators ina GAN when using a dataset such as Fashion MNIST [32]. random input Generatorloss created sampleDiscriminatorlossinput dataset
Fig. 1: Interaction between the components of a GAN during the training process.The GAN training algorithm works iteratively. At each iteration, backprop-agation is applied for training the discriminator and the generator with theirrespective loss functions in order to update their network parameters. The lossfunction of the discriminator ( L GAND ) is defined as follows: L GAND = − E x ∼ p d [log D ( x )] − E z ∼ p z [log(1 − D ( G ( z )))] . (1)For the generator, the non-saturating version of the loss function ( L GANG ) isdefined by: L GANG = − E z ∼ p z [log( D ( G ( z )))] . (2) emonstrating the Evolution of GANs through t-SNE 5 In Eq. (1), p d represents the input dataset and x represents its samples. InEq. (1) and Eq. (2), p z is the distribution used for the generator, z is the latentspace drawn from p z , G is the generator, and D represents the discriminator.GANs lead to relevant progress for generative models. However, the trainingof GANs is challenging, and stability issues frequently affect the process. Twocommon issues that impact training are the vanishing gradient and the modecollapse problem. The vanishing gradient occurs when the capacities of the gen-erator and the discriminator are not in equilibrium, making one of them toopowerful when compared to the other. Thus, the gradient does not properly im-prove the performance and the training progress stagnates. The mode collapseissue occurs when the generator fails to capture the input distribution used ontraining. In this case, samples created by the generator will partially representthis distribution. For example, the mode collapse occurs in a digits dataset whenonly some digits are represented in the set of created samples.The Fr´echet Inception Distance (FID) [14] is frequently used to evaluate theperformance of GANs. FID uses the outcome of the last hidden layer in InceptionNet [29] (trained on ImageNet [25]) to transform images from the input datasetand created by generators into a feature space. This feature space is interpretedas a continuous multivariate Gaussian, and the mean and covariance of the tworesulting Gaussians are used to calculate the Fr´echet distance as: F ID ( x, g ) = || µ x − µ g || + T r ( Σ x + Σ g − Σ x Σ g ) / ) , (3)with µ x , Σ x , µ g , and Σ g representing the mean and covariance estimated forthe input dataset x and fake samples g , respectively. FID is able to quantify thequality and diversity of the generative model, outperforming other metrics suchas the Inception Score [26].Several improvements over the original GAN model were proposed to min-imize these issues and leverage the quality of the results. In this context, newloss functions were proposed to replace the original losses (Eq. (1) and Eq. (2)),such as in WGAN [2], LSGAN [21], and SN-GAN [23]. Besides loss functions,architectural improvements were proposed for the GAN model. In DCGAN [24],a reference architecture for the discriminator and the generator was proposed.In [15], the authors propose a predefined strategy to progressively grow a GANduring the training process. SAGAN [34] uses self-attention modules to modelthe relationship between spatial regions of the input sample.These alternative loss functions and architectural improvements minimizesome problems and produce better results, but issues still affect the trainingof GANs [2,13,26]. Besides, efficient models designed for a specific task are notguaranteed to work properly in other tasks. Thus, the discovery of efficient mod-els and hyperparameters is not trivial, requiring recurrent empirical validationdepending on the underlying problem. Recently, Evolutionary Algorithms were proposed to train and evolve GANs.These solutions make use of different mechanisms of evolutionary computation
Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado not only to minimize stability problems in GANs but also to produce betteroutcomes concerning the quality of created samples.E-GAN [31] proposes a variation operator that switches the loss functions ofgenerators. The architectures of generators and the discriminator are fixed andbased on DCGAN [24]. In [11], neuroevolution was used in combination withPareto set approximations to evolve GANs. In this case, the architecture is notfixed and evolves through generations. Lipizzaner [1] uses spatial coevolutionto train GANs. The architectures of generators and discriminators are fixed. Amixture of weights is used to compose generators through an evolution strategybased on their spatial neighborhood. In Mustangs [30], the Lipizzaner modelwas extended to combine the E-GAN dynamic loss function with the spatialcoevolution mechanism from Lipizzaner. COEGAN [7,9] designs an algorithmthat combines competitive coevolution and neuroevolution with the GAN train-ing process. We provide an overview of the method in Section 3. A comparisonbetween these algorithms can be seen in [8]. t-distributed Stochastic Neighbour Embedding (t-SNE) [20] is a technique usedto produce a map (two or three dimensions) that represents the data distribution.Therefore, t-SNE is useful to provide the visualization of complex distributionsby revealing the structure of the data. t-SNE was applied in a variety of problemsfrom different fields [4,18]. It was also used to visualize the distribution of imagesproduced by GANs in [35].The t-SNE algorithm works iteratively. A set of pairwise affinities is calcu-lated for the input data and the solution is randomly initialized using a prob-abilistic distribution. At each iteration, the gradient is calculated based on theKullback-Leibler divergence between the high-dimensional input space and thecorresponding lower-dimensional representation. The gradient is used to updatethe solution. After all iterations, t-SNE outputs the final solution, representingpoints in a two or three-dimensional grid for the input data.The number of iterations and perplexity are two important parameters forthe t-SNE algorithm. Perplexity defines how the neighborhood of each datapoint is handled. The range [5 ,
50] is recommended for perplexity. The numberof iterations limits the number of steps used to update the final solution.Principal Components Analysis (PCA) can be used as a preprocessing stepto reduce the dimensionality of the data, suppress noise, and achieve a fastercomputation [18,20]. For example, PCA was used to reduce the dimensionalityof the data to 30 and 50 in [20] and [18], respectively.
Coevolutionary Generative Adversarial Networks (COEGAN) algorithm com-bines neuroevolution and competitive coevolution on the training and evolutionof GANs [7,9]. COEGAN was initially inspired by NEAT [28] and DeepNEAT emonstrating the Evolution of GANs through t-SNE 7 [22] to develop a representation for neural networks. Nevertheless, COEGANadapts the evolutionary model to the context of GANs. In this section, we de-scribe the fundamental aspects of the algorithm. More details of the algorithmcan be found in [7,9].In COEGAN, a population of discriminators and another of generators areused in a competitive coevolution setup. At each generation, generators and dis-criminators are paired for the application of the original GAN training algorithm,using backpropagation to learn internal weights and bias of neural networks. CO-EGAN can be used with different pairing strategies. One simple strategy is the all vs. all pairing, which defines all possible pairs between generators and dis-criminators in the current population. Another possibility is to take only the bestindividuals for pairing. This strategy defines the all vs. k -best pairing, using thetop k individuals from each population for the GAN training. For performancereasons, each pair in COEGAN is trained with a limited set of data at eachgeneration. However, COEGAN reuses the weights and bias of individuals inthe breeding process, resembling a transfer learning mechanism to obtain a fullrepresentation of the input distribution. The fitness of each individual is derivedfrom the results of these matches between generators and discriminators. In COEGAN, individuals use a genotype composed of a sequential array ofgenes. These genes are directly transformed into sequential layers in a neuralnetwork and can represent a linear (fully connected), convolution, or deconvo-lution (transpose convolution) layer. Each type of gene has internal parameters,such as the activation function and the number of output features, that aresubject to the variation operators. Some internal parameters are dynamicallydefined at the phenotype transformation phase, making use of the setup of thegenome to form a valid neural network for the application of backpropagation.Therefore, the number of input channels, stride, and kernel size are parametersadjusted based on the configuration of the previous layer for convolution layers.Figure 2 illustrates the genotypes of a discriminator and a generator. InFigure 2(a), the discriminator contains a convolutional section with two layers,followed by a linear section of a single output layer. This output layer returnsthe probability of samples to be real or fake. In Figure 2(b), the generator startswith a linear layer followed by two deconvolutional layers. The last layer returnssynthetic samples with the same characteristics (i.e., shape and number of colorchannels) as samples from the input dataset.
COEGAN uses specific fitness functions for discriminators and generators. Thefitness of discriminators is based on the loss function of the original GAN model(Eq. (1)). The fitness of generators is based on the FID score (Eq. (3)). Thesefitness functions were chosen to produce selection pressure on the evolution ofbetter individuals.
Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado
Convolution activation: ELUkernel size: 3out channels: 256
Convolution activation: ELUkernel size: 3out channels: 64
Linear activation: Sigmoidin features: 3136out features: 1(a) Discriminator
Linear activation: ReLUin features: 100out features: 4096
Deconvolution activation: ReLUkernel size: 3out channels: 128
Deconvolution activation: ELUkernel size: 3out channels: 1(b) Generator
Fig. 2: Example of genotypes of a discriminator and a generator. The discrim-inator contains two convolution layers and one linear layer. The generator hasone linear and two deconvolution layers. The parameters are listed for each gene(e.g., activation type, kernel size, and the number of channels).
The selection mechanism in COEGAN is based on the speciation originally pro-posed on NEAT [28]. In COEGAN, a distance function based on the genomesimilarity is used to subdivide each population into species. Thus, individualswith similar neural networks have a tendency to belong to the same group. Onthe other hand, individuals modified by mutation can form new species, makinguse of speciation to protect their innovation.In the selection phase, COEGAN uses the speciation strategy to select indi-viduals for asexual reproduction. Individuals from each population are selectedin proportion to the average fitness of their species. Tournament is also appliedinside each species to finally determine the survivors.
COEGAN uses only mutations as variation operators. Three types of mutationswere defined with the purpose of adding, removing, and modifying layers. Theaddition operator randomly initializes a new layer and inserts it into the geno-type. The removal operator randomly removes a layer from the genotype. Thechange operator modifies the internal attributes of a randomly selected gene(e.g., the activation function, number of channels, and number of features).An adaptive step is executed after reproduction to ensure the transference ofthe learned internal parameters between compatible individuals through genera-tions. Thus, when possible, COEGAN copies the weights and bias of the parentinto the offspring. However, parameters are reinitialized when architectures areincompatible. emonstrating the Evolution of GANs through t-SNE 9
We proposed in this work a new method to visualize and evaluate the progressof discriminators and generators in GANs. We applied this method in COEGANto provide further evidence of the evolutionary contribution of the model to thecreation of strong generators and discriminators. Nevertheless, this method canalso be applied in regular GANs (e.g., the original GAN model or WGAN).
COEGAN
Discriminator
Generatorinput dataset PCA t-SNE2d gridMetric:Jaccard Index
Fig. 3: Overview of the evaluation method proposed in this work to analyze theprogress of generators and discriminators in GANs.Figure 3 presents an overview of the evaluation method. We initially trainCOEGAN with the input dataset. After training, we use snapshots of the bestdiscriminators and generators from different generations to visualize the perfor-mance through t-SNE. For the t-SNE calculation, we provide to discriminatorssamples from the input dataset and samples created by generators, using theoutput of the last hidden layer to construct a high-dimensional features matrix.To improve the performance, we apply Principal Components Analysis (PCA)to reduce the number of features and use the resulting matrix to fed t-SNE.This matrix contains data from the input dataset and also from all evaluatedgenerators. Thus, the resulting data of all inputs are jointly used for creatinga lower-dimensional representation of the data through the t-SNE algorithm.Then, the output of t-SNE is transformed into a two-dimensional grid that spa-tially distributes the input images. This grid represents a map revealing thedistribution of samples according to their inner characteristics. Thus, we canvisualize problems such as mode collapse by inspecting the grid and ensuringthat the distribution of samples is not concentrated in a single region. We canalso visually compare the distribution of samples from the input dataset withsamples from the generator to assess the completeness of the generative model.Furthermore, by using discriminators to transform images into a feature space,we also assess their capacity to classify samples.
Besides these visualizations, we also propose a metric to quantify the perfor-mance of the model. For this, given a map M G of samples produced by a gen-erator (in a specific generation) and a map M d produced by the input dataset,we calculate the Euclidean distances D ( i,j ) between all samples in M G and M d : D i,j = (cid:107) M Gi − M dj (cid:107) . (4)Samples in M G and M d are not perfectly equal and distances in D i,j arenot zeroed. Thus, we use these distances to define a threshold for the similaritybetween samples. A global threshold τ is defined by the median of the minimumdistances in D i for maps M G related to the last generation. This thresholddefines the set of samples in M G with corresponding samples in M d as: I G = { M Gi |∃ j, D i,j < τ } . (5)The set I G contains the samples in M G that were successfully approximatedby a sample in M d , evidencing that this part of the input distribution wascaptured by the model. Thus, we consider this set as the intersection betweenthese two grids and calculate the Jaccard index as: J G = |I G || M G ∪ M d | (6)In this work, we use Eq.(6) to quantify the quality of models. A high J G indi-cates that the generator was able to capture the input distribution successfully.On the other hand, a perfect score in this metric indicates that the generativemodel is not able to produce innovative samples. Experiments were conducted to assess the evolution of generators and discrim-inators in COEGAN using the evaluation method proposed in this work. TheFashion MNIST dataset was used in COEGAN training to gauge the character-istics of the proposed evaluation method.
Table 1 describes the parameters used in COEGAN, chosen based on previousexperiments [7,9]. We train COEGAN for 100 generations in a population of gen-erators and discriminators of 10 individuals using the all vs. all pairing strategy.The probabilities for mutations to add, remove, or change genes are 30%, 10%,and 10%, respectively. The genome was limited to four genes, representing a net-work of four layers in the maximum allowed setup. Only convolution and trans-pose convolution were used as options when creating new layers. This setup wassufficient to discover efficient solutions in the experiments with Fashion MNIST. emonstrating the Evolution of GANs through t-SNE 11
Table 1: Experimental Parameters
Evolutionary Parameters Value
Number of generations 100Population size (generators and discriminators) 10, 10Probabilities (add, remove, change) 30%, 10%, 10%Output channels range [32, 512]Tournament k t GAN Parameters Value
Batch size 64Batches per generation 10Optimizer AdamLearning rate 0.003
Evaluation Parameters Value
PCA dimensions 50t-SNE Perplexity 30t-SNE Iterations 1000Samples per model 1000
We use three species in each population of generators and discriminators. TheFID score was applied with 5000 samples to evaluate generators.For each training pair where the GAN training is applied, we use 10 batchesof 64 images and the Adam optimizer [17] with 0 .
003 as the learning rate.In Table 1, we also list the parameters used in the evaluation method. PCAwas applied to reduce the dimensionality of the data to 50. For the t-SNE algo-rithm, 30 and 1000 were used as perplexity and number of iterations, respectively.We use 1000 samples for each model and from the input dataset to obtain thetwo-dimensional map through t-SNE.
First, we show the results of a single execution of COEGAN using the param-eters defined in Table 1. Figure 4 presents the resulting map of images afterthe application of t-SNE with the feature map of the best discriminator at thelast generation. In Figures 4(a), 4(b), and 4(c), we can see the distribution ofsamples created by the best generators at generation 5, 10 and 100, respectively.Figure 4(d) represents the distribution of the input dataset. Initially, at genera-tion 5, samples are concentrated in a compact region of the grid, indicating that the distribution was not successfully captured yet. The distribution of samplesimproves at generation 10. At the final generation, we can see that the distribu-tion of samples is similar to the input dataset. Therefore, Figures 4(c) and 4(d)presents similar structure regarding the two-dimensional grid. Furthermore, thedistribution of samples shows that the mode collapse issue does not affect theGAN model in this experiment. (a) Generation 5 (b) Generation 10(c) Generation 100 (d) Input Dataset
Fig. 4: Two-dimensional grid revealing the distribution of images after applyingt-SNE for generations 5 (a), 10 (b), 100 (c), and for the input dataset (d).We use the outcome of t-SNE to extract some metrics to quantify and rep-resent the observations we made by visual inspection. For this, we calculate thedistances between each sample created at generations 5, 10, and 100 with thesamples from the input dataset.We show in Figure 5 examples of created samples and their respective nearestand farthest samples from the input dataset concerning the t-SNE map. We cansee that the t-SNE map, calculated through the features trained for discrimina-tors, is able to aggregate images based on the similarity. Thus, the neighborhoodof a sample in the t-SNE grid contains images with similar characteristics. emonstrating the Evolution of GANs through t-SNE 13
Fig. 5: Comparison of samples created by the generator and samples from the in-put dataset using t-SNE. First row shows samples created by generators from thelast generation. Second and third rows display the nearest and farthest samplesfrom Fashion MNIST using distances from the resulting t-SNE grid. (a) Histogram of distances (b) Boxplot of distances
Fig. 6: Minimum distances between samples from the input dataset and samplescreated by generators at the last generation.Figure 6 shows the distribution of the minimum distances between each gen-erated sample in the last generation and samples from the input dataset. Thisdistribution is used to calculate the threshold for the next step. In this case, weuse the value of the median (0 . Fig. 7: Average Jaccard index (10 executions) for generators when comparingcreated samples with samples drawn from the input dataset.generators in the last generation is smaller than 1 (0 . ± . In this paper, we propose a new evaluation method to assess the progress ofgenerators and discriminators in Generative Adversarial Networks (GANs). Forthis, we propose a method based on t-SNE to visually inspect the quality ofdiscriminators and generators in GANs. Furthermore, a metric based on theJaccard index between t-SNE maps was designed to quantitatively represent theaspects of the model.This evaluation method was applied to a GAN trained by an EvolutionaryAlgorithm to validate our proposal. COEGAN combines competitive coevolu-tion and neuroevolution on the evolution of GANs and is capable of avoidingstability issues on training, using selective pressure to guide the progress of gen-erators and discriminators. Therefore, we use this model in experiments to showthe evolution of discriminators and generators through our evaluation method,providing further evidence of the evolutionary aspects of COEGAN.Results demonstrate both by visual inspection and the proposed metric thatCOEGAN is able to gradually evolve GANs, avoiding problems such as modecollapse. We also show that the use of t-SNE proposed in this work can aggregatesimilar samples and provide their efficient distribution in a two-dimensional grid.For future work, we intend to expand the experiments to analyze the results inmore complex datasets, such as CelebA and CIFAR10. Furthermore, we expect toincorporate new mechanisms proposed for GANs into an Evolutionary Algorithmto assess the contributions of them when evaluated with our method.
Acknowledgments
This work is partially funded by the project grant DSAIPA/DS/0022/2018(GADgET), by national funds through the FCT - Foundation for Science and emonstrating the Evolution of GANs through t-SNE 15
Technology, I.P., within the scope of the project CISUC - UID/CEC/00326/2020and by European Social Fund, through the Regional Operational Program Cen-tro 2020. We also thank the NVIDIA Corporation for the hardware granted tothis research.
References
1. Al-Dujaili, A., Schmiedlechner, T., Hemberg, E., O’Reilly, U.M.: Towards dis-tributed coevolutionary GANs. In: AAAI 2018 Fall Symposium (2018)2. Arjovsky, M., Chintala, S., Bottou, L.: Wasserstein generative adversarial networks.In: International Conference on Machine Learning. pp. 214–223 (2017)3. Assun¸c˜ao, F., Louren¸co, N., Machado, P., Ribeiro, B.: DENSER: Deep evolutionarynetwork structured representation. Genetic Programming and Evolvable Machines (1), 5–35 (2019)4. Belkina, A.C., Ciccolella, C.O., Anno, R., Halpert, R., Spidlen, J., Snyder-Cappione, J.E.: Automated optimized parameters for t-distributed stochasticneighbor embedding improve visualization and analysis of large datasets. Naturecommunications (1), 1–12 (2019)5. Berthelot, D., Schumm, T., Metz, L.: BEGAN: Boundary equilibrium generativeadversarial networks. arXiv preprint arXiv:1703.10717 (2017)6. Brock, A., Donahue, J., Simonyan, K.: Large scale GAN training for high fidelitynatural image synthesis. In: International Conference on Learning Representations(2019)7. Costa, V., Louren¸co, N., Correia, J., Machado, P.: COEGAN: Evaluating the co-evolution effect in generative adversarial networks. In: Proceedings of the Geneticand Evolutionary Computation Conference. pp. 374–382. ACM (2019)8. Costa, V., Louren¸co, N., Correia, J., Machado, P.: Neuroevolution of generativeadversarial networks. In: Deep Neural Evolution, pp. 293–322. Springer (2020)9. Costa, V., Louren¸co, N., Machado, P.: Coevolution of generative adversarial net-works. In: International Conference on the Applications of Evolutionary Compu-tation (Part of EvoStar). pp. 473–487. Springer (2019)10. Fedus, W., Rosca, M., Lakshminarayanan, B., Dai, A.M., Mohamed, S., Goodfel-low, I.: Many paths to equilibrium: GANs do not need to decrease a divergence atevery step. In: International Conference on Learning Representations (2018)11. Garciarena, U., Santana, R., Mendiburu, A.: Evolved GANs for generating paretoset approximations. In: Proceedings of the Genetic and Evolutionary ComputationConference. pp. 434–441. GECCO ’18, ACM, New York, NY, USA (2018)12. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S.,Courville, A., Bengio, Y.: Generative adversarial nets. In: NIPS. Curran Associates,Inc. (2014)13. Gulrajani, I., Ahmed, F., Arjovsky, M., Dumoulin, V., Courville, A.C.: Improvedtraining of wasserstein GANs. In: Advances in Neural Information Processing Sys-tems. pp. 5769–5779 (2017)14. Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., Hochreiter, S.: GANstrained by a two time-scale update rule converge to a local nash equilibrium. In:Advances in Neural Information Processing Systems. pp. 6629–6640 (2017)15. Karras, T., Aila, T., Laine, S., Lehtinen, J.: Progressive growing of GANs forimproved quality, stability, and variation. In: International Conference on LearningRepresentations (2018)6 Victor Costa, Nuno Louren¸co, Jo˜ao Correia, and Penousal Machado16. Karras, T., Laine, S., Aila, T.: A style-based generator architecture for generativeadversarial networks. arXiv preprint arXiv:1812.04948 (2018)17. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. In: Interna-tional Conference on Learning Representations (ICLR) (2015)18. Kobak, D., Berens, P.: The art of using t-SNE for single-cell transcriptomics. Na-ture communications (1), 1–14 (2019)19. Louren¸co, N., Pereira, F.B., Costa, E.: SGE: A structured representation for gram-matical evolution. In: International Conference on Artificial Evolution (EvolutionArtificielle). pp. 136–148. Springer (2015)20. Maaten, L.v.d., Hinton, G.: Visualizing data using t-SNE. Journal of machinelearning research (Nov), 2579–2605 (2008)21. Mao, X., Li, Q., Xie, H., Lau, R.Y., Wang, Z., Smolley, S.P.: Least squares gener-ative adversarial networks. In: 2017 IEEE International Conference on ComputerVision (ICCV). pp. 2813–2821. IEEE (2017)22. Miikkulainen, R., Liang, J., Meyerson, E., Rawal, A., Fink, D., Francon, O., Raju,B., Navruzyan, A., Duffy, N., Hodjat, B.: Evolving deep neural networks. arXivpreprint arXiv:1703.00548 (2017)23. Miyato, T., Kataoka, T., Koyama, M., Yoshida, Y.: Spectral normalization forgenerative adversarial networks. In: International Conference on Learning Repre-sentations (2018)24. Radford, A., Metz, L., Chintala, S.: Unsupervised representation learning with deepconvolutional generative adversarial networks. arXiv preprint arXiv:1511.06434(2015)25. Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z.,Karpathy, A., Khosla, A., Bernstein, M., et al.: Imagenet large scale visual recog-nition challenge. International Journal of Computer Vision (3), 211–252 (2015)26. Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., Chen, X.:Improved techniques for training GANs. In: Advances in Neural Information Pro-cessing Systems. pp. 2234–2242 (2016)27. Sims, K.: Evolving 3d morphology and behavior by competition. Artificial life (4),353–372 (1994)28. Stanley, K.O., Miikkulainen, R.: Evolving neural networks through augmentingtopologies. Evolutionary computation (2), 99–127 (2002)29. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the incep-tion architecture for computer vision. In: Proceedings of the IEEE Conference onComputer Vision and Pattern Recognition. pp. 2818–2826 (2016)30. Toutouh, J., Hemberg, E., O’Reilly, U.M.: Spatial evolutionary generative adver-sarial networks. arXiv preprint arXiv:1905.12702 (2019)31. Wang, C., Xu, C., Yao, X., Tao, D.: Evolutionary generative adversarial networks.arXiv preprint arXiv:1803.00657 (2018)32. Xiao, H., Rasul, K., Vollgraf, R.: Fashion-MNIST: A novel image dataset for bench-marking machine learning algorithms. arXiv preprint arXiv:1708.07747 (2017)33. Yao, X.: Evolving artificial neural networks. Proceedings of the IEEE (9), 1423–1447 (1999)34. Zhang, H., Goodfellow, I., Metaxas, D., Odena, A.: Self-attention generative ad-versarial networks. arXiv preprint arXiv:1805.08318 (2018)35. Zhang, H., Xu, T., Li, H., Zhang, S., Wang, X., Huang, X., Metaxas, D.N.: Stack-GAN++: Realistic image synthesis with stacked generative adversarial networks.IEEE Transactions on Pattern Analysis and Machine Intelligence41