generative adversarial network (GAN)
An AI method in which two neural networks compete: one generates fakes, the other tries to expose them, making the fakes increasingly realistic.
In plain terms
Imagine a counterfeiter and an investigator. The counterfeiter creates increasingly better banknotes, while the investigator increasingly spots the flaws. Both learn from each other, and in the end, the fake banknote is almost indistinguishable from the real one. A GAN works exactly like this, but with two programs.
One program, the generator, creates images, audio, or other data starting from random numbers. The other, the discriminator, tries to decide whether what it sees is a real pattern or the work of the generator. At the end of the competition, we keep the generator because it learned to create lifelike content.
This method brought the first truly convincing portraits of non-existent people and played a major role in making deepfakes more lifelike (the very first deepfake videos were created using another technique, autoencoders). Today, spectacular image and video generation is largely led by other methods (mainly diffusion models), but GANs remain useful where speed matters: in image upscaling, sharpening, and face swapping.
How it works
- The generator starts from random numbers (noise) and tries to produce an image from it; at first, it only creates meaningless blobs.
- The discriminator alternately receives real images from the training data and fake ones from the generator, and guesses for each which group it belongs to.
- The discriminator receives feedback on when it erred, becoming a better judge over time; the generator learns how successfully it deceived the discriminator and improves accordingly.
- This cycle repeats thousands of times: the two networks pull each other upward like two increasingly strong chess players.
- In theory, the ideal endpoint is when the discriminator can only guess; in practice, training is stopped when the result is good enough. After this, the generator can independently, in a single step, and very quickly produce new, lifelike content.
An everyday example
You upload an old, blurry family photo to an image-enhancement app and receive a sharp, detailed image within seconds. Behind the scenes, a GAN often works: it does not restore missing details but plausibly invents them. The same technology underlies many face-swapping applications.
Who is affected
A common misconception
Limits and risks
- Details in a photo "corrected" by a GAN are fabricated, not real: they are not reliable on their own for evidence, identification, or medical decisions.
- Its training is delicate: the competition between the two networks can easily be disrupted, and in such cases the generator repeats only a few, very similar results.
- Less flexible than newer methods: typically trained on a narrow area (e.g., faces) and harder to control with text instructions.
- Deceptive content can be created with it, and programs that detect forgeries often lag behind newer forgery methods.
Similar, but not the same
- diffusion model – A diffusion model does not learn through competition but cleans a noisy image in multiple steps; it is generally slower (though accelerated versions may require only a few steps), but yields more diverse and controllable results.
- deepfake – A deepfake is the result, meaning a deceptively lifelike fake image, audio, or video, while a GAN is just one technique used to create such content.
- large language model – The large language model generates text by predicting the next word, while the GAN relies on the competition of two networks and is mainly used for images and audio.
Related concepts
generator, discriminator, StyleGAN, CycleGAN
diffusion model, deepfake, synthetic data, image generation, variational autoencoder
A brief history
The method was described by Ian Goodfellow and his colleagues in 2014 at the University of Montreal. The general public truly took notice in 2019 when the "This Person Does Not Exist" website began showing photos of non-existent people using StyleGAN.
Where things stand
By the end of 2026, GAN is a mature, widely used technique but has moved out of the center of attention: diffusion and other newer models lead in image and video generation. GAN remains where speed matters, such as in image enhancement, upscaling, real-time face swapping, and synthetic data generation.
Also known as
GAN · GAN-ok · generative adversarial network · generative adversarial network · generative adversarial network · generative adversarial networks · generative adversarial network · generative adversarial networks
Sources
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.