What is a generative adversarial network?
The AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
A generative adversarial network, or GAN, is a way to train a model to create data using feedback from another model. The original approach trains two neural networks together: a generator and a discriminator.
The generator produces synthetic examples, often starting from random numbers. The discriminator attempts to distinguish generated examples from real training examples. Feedback from the discriminator helps update the generator, while the discriminator is also updated to improve its distinctions.
An art forger and an examiner provide a rough analogy: one tries to produce convincing work, while the other tries to identify it. The actual system uses numerical training objectives rather than intentions. A well-trained generator can produce examples that resemble the training distribution—the patterns found across the original collection.
The competition can be difficult to stabilize. One problem is mode collapse: the generator produces a limited range of convincing examples while missing other important variations. Attractive sample images do not establish that the model represents the diversity of the underlying data.
The original theory describes conditions under which the generated and real distributions match and the discriminator cannot reliably distinguish them. Those are theoretical conditions, not a promise that an actual training run reaches that result. A weak discriminator can also be fooled by poor outputs.
GANs have been explored for image synthesis, translation between image types and other generation tasks. Diffusion models offer a different approach to generation, but neither architecture guarantees factual or anatomical fidelity.
In medical imaging research, a team might investigate producing an image resembling one scan type from another. The crucial question is whether clinically important information is preserved, not whether the result looks like a typical scan. A generator may make an unusual case look more ordinary because ordinary patterns dominate its training examples. Evaluation needs to examine relevant findings and failure cases against appropriate references. Synthetic images can support research, but visual plausibility alone is not evidence that a generated structure exists in the patient.
Sources: Goodfellow and colleagues — Generative Adversarial Networks (2014); Ho, Jain and Abbeel — Denoising Diffusion Probabilistic Models (2020)
To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy
Lead with AI in Health Care
The AI Pragmatist is a monthly newsletter from ALA faculty, with new explainers & essays from the Advanced Learning Academy