# Generative Adversarial Network (GAN) Training Algorithm

An Generative Adversarial Network (GAN) Training Algorithm is a neural network training algorithm in which a generator NNet predicts a sample from the space while the discriminator NNet predicts whether the sample is generated or real.

**Context:**- It can be implemented by a GAN Training System (to solve a GAN training task)
- …

**Example(s):**- the algorithm proposed in (Goodfellow et al., 2014).

**Counter-Example(s):**- an Adversarial Machine Learning Algorithm (which assumes the existence of an adversarial opponent to foil its effectiveness).
- Deep Belief Networks.

**See:**Backpropagation, Adversarial Model.

## References

### 2018a

- (Miyato et al., 2018) ⇒ Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. (2018). “Spectral Normalization for Generative Adversarial Networks.” In: Proceedings of the Sixth International Conference on Learning Representations (ICLR-2018).

### 2018b

- (Fedus et al., 2018) ⇒ William Fedus, Ian Goodfellow, and Andrew M. Dai. (2018). “MaskGAN: Better Text Generation via Filling in the ________.” In: Proceedings of the Sixth International Conference on Learning Representations (ICLR-2018).
- QUOTE: … Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are a framework for training generative models in an adversarial setup, with a generator generating images that is trying to fool a discriminator that is trained to discriminate between real and synthetic images. GANs have had a lot of success in producing more realistic images than other approaches but they have only seen limited use for text sequences. This is due to the discrete nature of text making it infeasible to propagate the gradient from the discriminator back to the generator as in standard GAN training. ...

### 2017a

- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Generative_adversarial_networks Retrieved:2017-6-14.
**Generative adversarial networks (GANs)**are a type of artificial intelligence algorithms used in unsupervised machine learning, implemented by a system of two neural networks competing against each other in a zero-sum game framework. They were first introduced by Ian Goodfellow*et al.*in 2014.

### 2017b

- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Generative_adversarial_networks#Method Retrieved:2017-6-14.
- One network is generative and one is discriminative.
^{[1]}Typically, the generative network is taught to map from a latent space to a particular data distribution of interest, and the discriminative network is simultaneously taught to discriminate between instances from the true data distribution and synthesized instances produced by the generator. The generative network's training objective is to increase the error rate of the discriminative network (i.e., "fool" the discriminator network by producing novel synthesized instances that appear to have come from the true data distribution). These models are used for computer vision tasks.^{[1]}In practice, a particular dataset serves as the training data for the discriminator. Training the discriminator involves presenting the discriminator with samples from the dataset and samples synthesized by the generator, and backpropagating from a binary classification loss. In order to produce a sample, typically the generator is seeded with a randomized input that is sampled from a predefined latent space (e.g., a multivariate normal distribution). Training the generator involves back-propagating the negation of the binary classification loss of the discriminator. The generator adjusts its parameters so that the training data and generated data cannot be distinguished by the discriminator model. The goal is to find a setting of parameters that makes generated data look like the training data to the discriminator network.^{[2]}In practice, the generator is typically a deconvolutional neural network, and the discriminator is a convolutional neural network. The idea to infer models in a competitive setting (model versus discriminator) was first proposed by Li, Gauci and Gross in 2013.^{[3]}Their method is used for behavioral inference. It is termed Turing Learning,^{[4]}as the setting is akin to that of a Turing test.

- One network is generative and one is discriminative.

### 2017c

- (Kim et al., 2017) ⇒ Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. (2017). “Learning to Discover Cross-Domain Relations with Generative Adversarial Networks.” In: Proceedings of the 34th International Conference on Machine Learning.
- QUOTE: … we address the task of discovering cross-domain relations given unpaired data. We propose a method based on a generative adversarial network that learns to discover relations between different domains (DiscoGAN). Using the discovered relations, our proposed network successfully transfers style from one domain to another while preserving key attributes such as orientation and face identity.

### 2017d

### 2016a

- https://www.quora.com/What-are-Generative-Adversarial-Networks
- QUOTE: Generative Adversarial Networks (GANs) are neural networks that are trained in an adversarial manner to generate data mimicking some distribution. To understand this deeply, first you'll have to understand what a generative model is. In machine learning, the two main classes of models are generative and discriminative. A discriminative model is one that discriminates between two (or more) different classes of data - for example a convolutional neural network that is trained to output 1 given an image of a human face and 0 otherwise. A generative model on the other hand doesn't know anything about classes of data. Instead, its purpose is to generate new data which fits the distribution of the training data - for example, a Gaussian Mixture Model is a generative model which, after trained on a set of points, is able to generate new random points which more-or-less fit the distribution of the training data (assuming a GMM is able to mimic the data well). More specifically, a generative model g trained on training data X sampled from some true distribution D is one which, given some standard random distribution Z, produces a distribution D′ which is close to D according to some closeness metric (a sample z∼Z maps to a sample g(z)∼D′).
The 'standard' way to determine a generative model g given training data X is maximum-likelihood, which requires all sorts of calculations of marginal probabilities, partition functions, most-likely estimates, etc. This may be feasible when your generative model is a GMM, but if you want to try to make a generative model out of a deep neural network, this quickly becomes intractable.

Adversarial training allows you to train a generative model without all of these intractable calculations. Let's assume our training data X⊂Rd . The basic idea is that you will have two adversarial models - a generator g:Rn→Rd and a discriminator d:Rd→{0,1}. The generator will be tasked with taking in a given sample from a standard random distribution (e.g. a sample from an n-dimensional Gaussian) and producing a point that looks sort of like it could come from the same distribution as X. The discriminator, on the other hand, will be tasked with discriminating between samples from the true data X and the artificial data generated by g. Each model is trying to best the other - the generator's objective is to fool the discriminator and the discriminator's objective is to not be fooled by the generator.

In our case, both g and d are neural nets. And what happens is that we train them both in an alternating manner. Each of their objectives can be expressed as a loss function that we can optimize via gradient descent. So we train g for a couple steps, then train d for a couple steps, then give g the chance to improve itself, and so on. The result is that the generator and the discriminator each get better at their objectives in tandem, so that at the end, the generator is able to or is close to being able to fool the most sophisticated discriminator. In practice, this method ends up with generative neural nets that are incredibly good at producing new data (e.g. random pictures of human faces).

- QUOTE: Generative Adversarial Networks (GANs) are neural networks that are trained in an adversarial manner to generate data mimicking some distribution. To understand this deeply, first you'll have to understand what a generative model is. In machine learning, the two main classes of models are generative and discriminative. A discriminative model is one that discriminates between two (or more) different classes of data - for example a convolutional neural network that is trained to output 1 given an image of a human face and 0 otherwise. A generative model on the other hand doesn't know anything about classes of data. Instead, its purpose is to generate new data which fits the distribution of the training data - for example, a Gaussian Mixture Model is a generative model which, after trained on a set of points, is able to generate new random points which more-or-less fit the distribution of the training data (assuming a GMM is able to mimic the data well). More specifically, a generative model g trained on training data X sampled from some true distribution D is one which, given some standard random distribution Z, produces a distribution D′ which is close to D according to some closeness metric (a sample z∼Z maps to a sample g(z)∼D′).

### 2016b

- Ian Goodfellow. (2016). “NIPS 2016 Tutorial: Generative Adversarial Networks." Tutorial at NIPS-2016
- QUOTE: This report summarizes the tutorial presented by the author at NIPS 2016 on generative adversarial networks (GANs). The tutorial describes: (1) Why generative modeling is a topic worth studying, (2) how generative models work, and how GANs compare to other generative models, (3) the details of how GANs work, (4) research frontiers in GANs, and (5) state-of-the-art image models that combine GANs with other methods. Finally, the tutorial contains three exercises for readers to complete, and the solutions to these exercises.

### 2014

- (Goodfellow et al., 2014) ⇒ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. (2014). “Generative Adversarial Nets.” In: Advances in Neural Information Processing Systems.
- QUOTE: We propose a new framework for estimating generative models via adversarial nets, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G. …
… In the case where G and D are defined by multilayer perceptrons, the entire system can be trained with backpropagation. There is no need for any Markov chains or unrolled approximate inference networks during either training or generation of samples.

- QUOTE: We propose a new framework for estimating generative models via adversarial nets, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G. …

### 2004

- (Lysyanskaya, et al., 2014) ⇒ Anna Lysyanskaya, Roberto Tamassia, and Nikos Triandopoulos. "Multicast authentication in fully adversarial networks.” In: Security and Privacy, 2004. Proceedings. 2004 IEEE Symposium on, pp. 241-253. IEEE, 2004.

- ↑
^{1.0}^{1.1}Cite error: Invalid`<ref>`

tag; no text was provided for refs named`MyUser_Arxiv.org_April_7_2016c`

- ↑ Cite error: Invalid
`<ref>`

tag; no text was provided for refs named`OpenAI_com`

- ↑ Cite error: Invalid
`<ref>`

tag; no text was provided for refs named`Li-etal-GECCO2013`

- ↑ Cite error: Invalid
`<ref>`

tag; no text was provided for refs named`TuringLearning2016`