# Generative Adversarial Network (GAN)

> Two networks in a contest. One makes fakes, the other tries to catch them.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** GAN

## Think of it like

Think of it like a cop and a fake coin maker. The coins get better until the cop is fooled.

## Definition

A generative adversarial network is two neural networks that train by competing. One, the generator, makes fake examples, like fake photos of faces. The other, the discriminator, tries to tell fake from real. Each time one wins, the other learns from it. In the end, the fakes look real.

## Example

A game studio trains a GAN on 50,000 photos of stone walls. The generator learns to make new wall patterns that never existed.

## Why it matters

GANs were the first method to make truly lifelike fake images. They showed what generative AI could do.

## Common mistake

Expecting training to go smoothly. The two networks can get stuck, and the generator may make only a few kinds of output.

## Three principles

- **Two networks.** A maker and a judge.
- **They compete.** Each learns from the other.
- **Fakes get real.** Until the judge is fooled.

## Related terms

- [Generative AI](https://learn.benibix.com/term/ai/generative-ai)
- [Diffusion Model](https://learn.benibix.com/term/ai/diffusion-model)
- [Neural Network](https://learn.benibix.com/term/ai/neural-network)
- [Autoencoder](https://learn.benibix.com/term/ai/autoencoder)

## Told apart from

- [GAN vs Diffusion Model](https://learn.benibix.com/compare/gan-vs-diffusion-model): People often think every AI image maker works the same way. These two do not. A GAN makes a picture in one go, and a second network judges it. A diffusion model starts from noise and cleans it up over many steps. Most image makers today use diffusion.

## Taught in

- [GANs and Diffusion Models](https://learn.benibix.com/learn/ai-machine-learning/gans-and-diffusion-models): Machine Learning, 16/18

![Random noise goes into a generator, which makes a fake photo. A discriminator gets both fake and real photos and says real or fake. Its verdict is sent back to both networks.](https://learn.benibix.com/diagrams/nn-gan.svg)

---

Source: https://learn.benibix.com/term/ai/generative-adversarial-network
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
