GANs — Generative Adversarial Networks

KEEP IN TOUCH | THE GEN AI SERIES

Rahul S

--

A discriminative model learns features from the input data and uses the information about them to determine boundaries in observed data and use those (statistical boundaries) to make predictions like the kind of regression or classification.

But a generative model uses the features learned from the training data to create more data out of the random noise supplied to it.

Credits: Janani Ravi

It does not require labels and hence is unsupervised.

The model is generative because the sample it creates is absolutely unique. The sample does not exist in the training data, but is very similar to it. Also, a generative model is probabilistic. The sample it creates is unique, but it is different for every input. In other words, a generative model incorporates a kind of randomness- which leads to new entities with different inputs.

A discriminative model, on the other hand, is deterministic. For the same input, its output is always the same.

Generative models are used for up-sampling an imbalanced dataset, missing value imputation, and anonymizing sensitive data- which is preferred over traditional masking because it reduces data leakage.

GENERATIVE ADVERSARIAL NETWORKS

GANs are used to generate realistic images. A typical GAN model is made of two neural networks which compete (in a way) and hence the term ‘adversarial’. One is called Generator, and the other is Discriminator. They are involved in a zero-sum game. When one network does better, the does worse. They cannot improve together. If one gets better, the other has to do worse. And both seek to be more accurate with each epoch.

Source: Stanford CS231n

The generator network tries to create fake images out of the input random noise. The Fake images from generator network need to be as realistic as the training data. But the discriminator–being a…

--

--