Naru News日本語

Home › Glossary › AI

What is a generative adversarial network (GAN)?

Also called: Generative adversarial nets

Term explainer · Checked November 14, 2026 · 12 min read

In one minute

A generative adversarial network (GAN) is one way for AI to make realistic data such as photos: an AI that makes fakes and an AI that tries to spot them are pitted against each other, and both get better.

It was introduced in a 2014 paper. The maker AI takes random numbers and computes a picture from them; different numbers give different pictures. The spotter AI looks at real photos and made pictures and judges whether each one is real. The two take turns learning, each trying not to lose to the other. The maker never uses real photos directly; it improves using the spotter’s verdicts as clues. Round after round, its pictures get closer to the real thing.

In a 2022 experiment, people told GAN-made face photos from real ones no better than by guessing. Its weak points are that training easily becomes unstable and that it can end up making the same kind of thing over and over (mode collapse). In the two years or so from around 2021, most picture-making AIs moved to a different method, the diffusion model.

A common mix-up

“A GAN makes fake photos by cutting and pasting real photos.”

Only partly right. A GAN learns from lots of real photos, so its pictures come to resemble the ones it learned from. But the maker AI never uses real photos directly. Only the spotter AI looks at them. The maker turns a list of random numbers into a picture and improves only through clues coming back from the spotter’s verdicts: how to change the picture so it looks more real. When making a picture, too, it just passes random numbers through the maker once; there is no step that looks up photos and pastes them together. The 2014 paper also placed, next to pictures it made, the most similar photo from the training data, to show they weren’t simply copies. Still, a GAN can sometimes turn out a near-copy of a photo it learned from. A 2023 study found pictures nearly identical to training photos among those made by GANs too. That said, the same study found more such pictures from the diffusion models it compared.

Explained in pictures

A sketch of how a GAN learns (pictures drawn for this page). Title: “A maker AI and a spotter AI improve by competing.” Bottom row, left to right: dice, “Random numbers” → a robot holding a pencil, “Maker AI” → a framed face, “Made picture.” Top row: three stacked face photos, “Real photos.” Arrows carry both to a robot holding a magnifying glass, “Spotter AI.” To its right are its verdicts: “Real” for the real photo and “Fake” for the made picture. A navy arrow runs from the verdicts back to the spotter: “① Fix the spotter: to judge correctly.” An orange dotted arrow runs from the verdicts back to the maker: “② Fix the maker: to fool the spotter.” Band at the bottom, “Repeat”: a scribble, “Start” → a lopsided face, “Midway” → a clear face, “Later.” To the right: “Pictures get closer to real. Ideally, the spotter is right only half the time.”
This sketch shows how a GAN learns. In the bottom row, the maker AI (the robot with a pencil) takes random numbers (the dice) and makes a picture. The top row shows real photos. As the arrows show, the real photos and the made picture both go to the spotter AI (the robot with a magnifying glass), which judges whether each is real or fake. Then, taking turns, the spotter is adjusted to judge correctly (navy arrow), and the maker is adjusted to fool the spotter (orange dotted arrow). The maker never looks at real photos directly. As the band at the bottom shows, with repetition its pictures get closer to real. The paper considered an ideal case on paper, where both AIs are large enough and training goes as well as it can, and showed mathematically that the spotter can then tell real from made only half the time.
A sketch of mode collapse (a GAN trained on dog photos; dogs drawn for this page). Title: “Mode collapse: different numbers, same-looking pictures.” Left box, “When it learns well”: four dice showing different numbers of pips, each with an arrow to a dog’s face: a brown dog with floppy ears, a cream dog with pointed ears, a white dog with dark patches, and a golden dog with its tongue out. Below: “Different numbers, many kinds of dogs.” Right box with a dotted border, “After mode collapse”: four dice the same way, but every arrow leads to the same brown floppy-eared dog, its head tilted at different angles. Below: “Different numbers, the same dog again.” Band at the bottom: Each picture looks fine, but there aren’t enough kinds.
This sketch shows mode collapse, using a GAN trained on dog photos. The dice are the random numbers the maker AI takes in; different pips mean different numbers. Each arrow points to the picture made from that number. On the left, when it learns well, different numbers give many kinds of dogs, with different ear shapes and fur colors. On the right, after mode collapse, different numbers give only pictures of the same dog, with just the angle changed. Each picture may look fine, but many of the kinds of dogs in the training photos are no longer being made.
A sketch comparing how a GAN and a diffusion model make a picture (middle steps left out). Title: “GAN: one pass. Diffusion model: many small steps.” Top row, “GAN”: dice → a robot, “Maker AI” → a long arrow, “Just one pass” → a picture of mountains and a sun. To the right: “Fast.” Bottom row, “Diffusion”: a square of pure grainy noise → a small robot → a square where mountains faintly show → a small robot → a square where they show more → a small robot → the picture of mountains and a sun. Under the arrows: “The AI removes a little noise, again and again.” To the right: “Slow.” Band at the bottom: A 2021 paper: diffusion models beat GANs on picture quality.
This sketch compares, top and bottom, how a GAN and a diffusion model make a picture. The GAN at the top finishes a picture by passing random numbers (the dice) through the maker AI (the robot) just once. The diffusion model at the bottom starts from a picture of pure noise (grainy speckles), and the AI removes a little noise again and again until a picture slowly appears (middle steps are left out). That is why a diffusion model takes longer to make a picture. Even so, in a 2021 paper, diffusion models beat GANs on picture quality. They also learn differently: a GAN learns by competing with the spotter AI, and a diffusion model by practicing guessing the noise deliberately mixed into a picture.

You’re free to use these figures in lessons, slides and posts if you credit Naru News (naru.news). CC BY 4.0.

Think of it like this

Counterfeiters and the police (the paper’s own comparison)

The 2014 paper compared a GAN to counterfeiting. The maker AI is a team of counterfeiters, trying to produce fake money and use it without being caught. The spotter AI is the police, trying to detect the fake money. When the police catch them, the counterfeiters improve their methods, and then the police look more closely too. Through this competition both get better, until the fakes can’t be told from the real thing.

As the word “adversarial” suggests, the two AIs compete, each trying to beat the other. But the goal isn’t for either one to win. In the end, only the maker AI is used to make pictures. The spotter AI is a sparring partner for training the maker.

But the comparison has limits. Real counterfeiters can hold real banknotes and compare them closely. A GAN’s maker AI never looks at real photos directly; it improves only from clues coming back from the verdicts of the spotter AI, the police in the story. And real police aim to catch every fake, but a GAN that succeeds ends with the spotter AI unable to say anything about any picture except “half real, half fake” (the ideal case the paper showed mathematically).

Key points

Why is it called a “generative adversarial network”?

The name is made of three words. The 2014 paper was titled “Generative Adversarial Nets,” where nets is short for networks. Taking the first letters gives GAN.

Adversarial means competing against an opponent. The paper describes the generating AI as pitted against an adversary: the AI that judges. The maker tries not to be caught and the spotter tries to catch it, each trying to beat the other.

Generative means producing data. The maker AI produces new data resembling the photos or other data it learned from. It is the same “generative” as in “generative AI” (more on the “Generative AI” page).

Network means a neural network (a computing system made of small parts that take in numbers, calculate and pass the result on, stacked and connected in many stages). In the paper, both the maker and the spotter were neural networks. The maker is also called the generator, and the spotter the discriminator.

How does it learn?

The maker AI takes a list of randomly chosen numbers, computes with them, and turns them into data such as a picture. Inside a computer, a picture is also a list of numbers, one for the color of each dot, so computing one list of numbers into another can produce a picture. Different numbers go in each time, so a different picture comes out each time. The spotter AI takes a picture and answers with a number between 0 and 1: how likely it is to be a real photo. A 1 means it sees the picture as surely real, and a 0 as surely fake.

In training, the two are trained in turns. First the spotter is shown real photos and pictures the maker made, and adjusted to tell them apart correctly. Then the maker is adjusted in the direction that makes the spotter more likely to mistake its pictures for real. In the 2014 paper’s experiments, they alternated one step for the spotter and one step for the maker.

The maker never looks at a real photo directly, not even once. It can still improve because the spotter’s verdict is made by calculation. Change the color of a dot in the made picture a little, and the verdict’s number changes a little too. So by tracing the spotter’s calculation backward, you can find which parts of the picture to change, and which way, to bring the verdict closer to 1, “real.” The maker uses only this direction to adjust how it makes pictures, little by little. Since the spotter was trained by looking at real photos, the maker is in effect learning from real photos indirectly, through the spotter. As a comparison, it is like a blindfolded player of fukuwarai (a Japanese game of placing the parts of a face on a blank face) finishing the face only by following the voices of people who can see it: “a bit to the right,” “a bit higher.”

Keeping the two in balance matters too. The paper warns that if the maker is trained too much without training the spotter, it ends up making the same picture from too many different numbers, without enough variety.

The paper examined, mathematically, an ideal case on paper: both AIs are large enough and training goes as well as it can. Then the maker becomes able to make data just like the data it learned from, and the spotter can only answer “the chance it’s real is one half” for anything it sees. In other words, real and made become impossible to tell apart.

The paper tried this method on data of handwritten digits, face photos, and small photos of things such as vehicles and animals. It said it made no claim that its pictures were better than those of earlier methods, but believed they were at least competitive with the better ones and showed the promise of the adversarial approach.

How realistic did it get?

GANs improved a lot in later research. GANs were known to be unstable to train and to often make nonsensical pictures, and a 2015 study changed how the AI is put together so that they could train stably in most settings. Trained on photos of bedrooms, it made bedroom-like pictures.

StyleGAN, released in 2018, is a GAN that makes face photos and other pictures. Trained on 70,000 detailed face photos, it beat earlier methods on the commonly used yardsticks of picture quality.

So can people tell them apart? In an experiment published in 2022, face photos made by a GAN were mixed with real face photos, shown one at a time, and people were asked whether each was real or made. On average they got 48.2% right, about the same as the 50% you would get by choosing at random. Another group, first told about the odd spots that fakes tend to have and given the answer after each photo, got 59.0%, only a little better than guessing. However, made faces with obvious flaws had been removed beforehand, which made telling them apart that much harder.

Being able to make realistic faces also feeds worries about deepfakes (fake videos, photos or voices made with AI to look real).

What are its weak points?

The first is that training easily becomes unstable. Because each AI keeps shifting in response to the other, the two have trouble settling where they are exactly balanced. A 2016 overview of GANs says the two AIs often seem to go back and forth, undoing each other’s progress. The 2021 paper that reported diffusion models beating GANs on picture quality also says GANs often collapse in training unless their settings are chosen carefully.

The second is mode collapse: the maker starts making the same kind of picture even when given different random numbers. A “mode” is a spot in the data where many similar examples gather. In dog photos, for instance, each kind of dog that shows up often has many similar photos gathered together; each of those is a mode. The name comes from the maker producing only some of them. One likely cause is the maker crowding toward whichever picture the spotter currently finds most real.

It is rare for everything to become the same picture, but partial collapse is common: for example, pictures that all share the same colors or patterns, or pictures of the same dog from different angles. Each picture may look fine on its own, but there aren’t enough kinds. The same 2021 paper also says GANs cover a narrower range of variety than some other methods.

How is it different from a diffusion model?

They make pictures differently. A GAN finishes a picture by passing random numbers through the maker AI just once. A diffusion model (an AI method that starts from a picture of pure noise and removes the noise a little at a time) repeats that removal over many steps. So it is slower than a GAN at making pictures.

They learn differently too. In a GAN, the opponent the maker is trying to beat (the spotter) keeps getting stronger during training, so the training goal keeps moving. A diffusion model deliberately mixes noise into pictures and practices guessing what noise was mixed in. Since it mixed in the noise itself, the right answer is always fixed.

A 2021 paper titled “Diffusion Models Beat GANs on Image Synthesis” reported that diffusion models had overtaken GANs, which until then led in picture quality. As strengths of diffusion models, it lists that the training goal doesn’t move, that the models are easy to make bigger, and that they can make a wide range of the kinds of pictures they learned from; as a weak point, it says they are slower than GANs at making pictures. A 2023 paper says that over the previous two years, diffusion models largely replaced GANs and became the basis of well-known picture-making AIs such as Stable Diffusion (more on the “Diffusion model” page).

Check yourself

  1. Q1In a GAN, introduced in a 2014 paper, an AI that makes pictures and an AI that judges whether a picture is a real photo or a made one are trained in turns. What does the maker AI use as its clue to improve how it makes pictures?

    Answer and explanation

    Answer: A From the spotter AI: changes that make its verdict more real

    The maker AI never uses real photos directly. The spotter’s verdict is made by calculation, so by tracing that calculation backward you can find which parts of the made picture to change, and which way, to bring the verdict closer to “real.” That direction is all the maker uses to adjust. It is never handed pieces cut out of real photos, nor told dot-by-dot differences from a real photo. Only the spotter looks at real photos.

    More on this → Key points: How does it learn?

  2. Q2When a GAN is trained to make dog photos, a failure called “mode collapse” can happen. What does the maker AI do after mode collapse?

    Answer and explanation

    Answer: B It makes similar dogs from any numbers

    In mode collapse, the maker AI makes the same kind of picture even when given different random numbers. It may produce only pictures of the same dog from different angles. Each picture may look fine and isn’t broken; what runs short is the variety of things it makes. And since the maker never uses real photos directly, it isn’t copying photos either.

    More on this → Key points: What are its weak points?

  3. Q3A 2021 paper reported that diffusion models (one AI method for making pictures) had overtaken GANs in picture quality. What weak point of diffusion models, compared with GANs, did this paper point out?

    Answer and explanation

    Answer: C Making a picture takes more time

    Diffusion models repeat the removal of noise over many steps, so the paper says they are slower than GANs at making pictures. A GAN makes a picture by passing random numbers through the maker AI just once. On the contrary, being easy to make bigger and being able to make a wide range of the kinds of pictures they learned from are strengths of diffusion models listed in the same paper. Tending to make similar pictures is a weak point of GANs.

    More on this → Key points: How is it different from a diffusion model?

Sources and how we checked

AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 14, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].

AI terms

All 58 AI terms →