logo

AI Fitted

Generative Adversarial Networks - an implementation of game theory for Generative AI

Generative Adversarial Networks (GANs) is a popular technique in generatiing realistic images, like dog portraits. And it's based on game theory. The concept was introduced by Ian Goodfellow and his colleagues in a paper published in 2014. GANs consist of two neural networks: the generator and the discriminator. These networks are trained simultaneously, but they have competing objectives, which is where the game-theoretic aspect comes into play

Here's how the game works:

1. Generator

The generator's objective is to generate data (e.g., dog images) that are indistinguishable from the thing. It takes random noise as input and tries to produce image samples that are realistic.

2. Discriminator

The discriminator's objective is to distinguish between real data and data generated by the generator. It is trained on both real data and data generated by the generator, and learns to classify them correctly.

The Training

During training, the generator and discriminator are playing a min-max game:

  • The generator aims to minimise the discriminator's ability to distinguish between real and generated data. It tries to generate data that is so realistic that the discriminator cannot tell the difference.
  • Conversely, the discriminator aims to maximise its ability to differentiate between real and generated data. It learns to become better at distinguishing real data from generated data.

As training progresses, the generator and discriminator improve iteratively. Ideally, the generator becomes better at generating realistic data, while the discriminator becomes better at distinguishing real from fake data. This adversarial process leads to the generator producing increasingly realistic samples.

The Game Theory

The game-theoretic aspect arises from the fact that the generator and discriminator are in a competitive relationship: as one gets better, the other must also improve to keep up. This dynamic equilibrium drives the training process and ultimately results in the generator producing high-quality synthetic data.

So, the game-theoretic framework of GANs involves this adversarial relationship between the generator and discriminator, where each is striving to outperform the other, leading to the overall improvement of the generative model.

GAN is one of the main techniques used in DALL-E, the popular image generation software from OpenAI.

We, at AI Fitted don't use GAN's. We use Stable Diffusion which is different technic all together.

But that's a story for another day

Author: John Chukwuma for AI Fitted. (We create AI Dog Portraits)