Given training data, Generative Adversarial Networks (or simply, GANs) learn to generate new data with the same statistics as the training data. For example, if we train a GAN model on photographs, then a trained model will be able to generate new photographs that look similar to the input photographs.
A GAN contains two parts: a generator and a discriminator. The generator model creates new data while the discriminator tries to determine real data from generated data. As the generator and discriminator get better at their respective jobs, the generated data improves as a result, until it is (ideally) nearly identical in quality to the training data.
Think of the relationship as that of cops and robbers. Both are always trying to outsmart the other; the robbers to steal, and the police to catch the robbers.
Using the generator, we first create random noise samples and pass them through the discriminator. The discriminator can easily differentiate between the two types of data, so we adjust the generator model and train again. As the iterations increase, the generator model creates data that is indistinguishable from the training data.
GANs are commonly used to create cartoon images or faces for gaming and animated movies. Also, GANs can help generate synthetic data from a small amount of data to help improve machine learning models. GANs are also a popular choice for artists looking to use machine learning models to expand their expression.