what are generative adversarial networks

11 months ago 22
Nature

Generative adversarial networks (GANs) are a class of machine learning framework and a prominent framework for approaching generative AI. They are a model architecture for training a generative model, and it is most common to use deep learning models in this architecture. GANs are based on a game theoretic scenario in which the generator network must compete against an adversary. The generator network directly produces samples, while its adversary, the discriminator network, attempts to distinguish between samples drawn from the training data and samples drawn from the generator.

GANs consist of two neural networks: the generator and the discriminator. The generator learns to generate plausible data, while the discriminator learns to distinguish the generators fake data from real data. The generator model takes a fixed-length random vector as input and produces a sample as output. The discriminator model takes a sample as input and produces a binary classification as output, indicating whether the sample is real or fake.

GANs are implicit generative models, which means that they do not explicitly model the likelihood function nor provide a means for finding the latent variable corresponding to a given sample, unlike alternatives such as flow-based generative models. Compared to fully visible belief networks such as WaveNet and PixelRNN and autoregressive models in general, GANs can generate one complete sample in one pass, rather than multiple passes through the network.

GANs can be used for synthetic data generation, which can be useful for data augmentation, anomaly detection, or creative purposes. They can also learn the style of a reference image or video and apply that style to other images or videos, enabling artistic transformations, such as converting photographs into paintings or altering the appearance of videos.