Generative Adversarial Network · GAN
Generative Adversarial Network
What is a generative adversarial network?
- Learns by pitting a generator against a discriminator
- Generates realistic data
- Where deepfakes and AI image generation began
What GANs have changed in practice is the order in which we approach data. Before, training a model required collecting enough data that people had already labeled with correct answers. A GAN instead trains the generator with a single signal: whether the discriminator got it right or wrong. That means learning can run without an answer key, which opened a path to creating data that is hard to collect in the first place, such as images of rare defects. This is where the approach of making missing data rather than hunting it down comes from.
Breaking GANs into branches makes their uses clear. DCGAN is the basic form that added convolutions to raise image quality; CycleGAN is for translation, turning photos into a painting style without paired ground-truth examples; StyleGAN is the family that generates faces at 1024×1024 resolution and underlies 'people who don't exist' services. A conditional GAN (cGAN) lets you specify the kind you want, such as 'scratch defect.' The fork in the road with diffusion models is speed versus stability. Diffusion gets its quality by removing noise dozens of times, which makes it slow; a GAN produces a result in a single pass, which suits real-time processing, but it carries the weakness that training easily collapses to one side.
The most common mismatch in the field is the expectation that 'running a GAN gives you unlimited data.' Once the generator finds a few patterns that easily fool the discriminator, it settles there — this is mode collapse. Even if you generate 10,000 images, they are really variations of three or four types, so an inspection model trained on them misses defects it has never seen. If the 300 originals had a particular lighting or angle bias, that bias gets copied too. Never fill the validation set alone with synthetic data — testing on fakes raises the score while line performance stays put. When synthesizing human faces or voices, check portrait rights and legal liability for deepfakes before the technical review.
Ara LimExpert in global leadership, AI, and business communication
Seungtae ParkAX practitioner who teaches AI business development and marketing automation by building it hands-onProposed in 2014 by Ian Goodfellow et al., the structure has a generator and a discriminator competing like a zero-sum game.
Let's look at a hypothetical case. Company A, an auto parts maker with 420 employees, had spent six months working on a visual inspection AI. It had accumulated 120,000 normal images, but across all its lines it had only 287 real defect images. The model's defect detection rate would not climb past 76%.
- When Deputy Manager Park of Quality Assurance asked, 'Do we have to make defects on purpose to collect more of them?', the AI partner proposed using a GAN to synthesize scratch and foreign-matter defect images.
- Using a conditional GAN, they specified four defect types (scratch, foreign matter, dent, and paint smear), trained it on 287 images, and generated 3,000 images per type, 12,000 in total, over three weeks.
- After seeing the first output, the inspection supervisor said, 'That's a flaw that never comes off our line,' and filtered out 40%. We made a review step where people from the shop floor weed out synthetic images a formal part of the process.
- Suspecting mode collapse, the team sorted the generated images by type and found that foreign-matter defects accounted for 68% of the total, so they adjusted the loss function weights and retrained for two weeks.
- Validation used only the 87 images held out from the 287 real defect images, with no synthetic images mixed in. Never test on fakes was the rule Deputy Manager Park set.
- Three months later, the defect detection rate rose from 76% to 93% and the false-reject rate fell from 11% to 4%, cutting the staff tied up in re-inspection from 3 people a day to 1.