Generative Adversarial Networks (GANs)
GANs were the dominant approach for AI-generated images before diffusion models arrived, and they're still used in specific applications. The concept is elegant: two neural networks compete against each other. One - the generator - tries to create fake images. The other - the discriminator - tries to spot which images are fake. As each gets better, the other is forced to improve, like a counterfeiter and a detective locked in an escalating battle. Over time, the generator produces increasingly realistic outputs. GANs were responsible for those early "this person does not exist" websites showing photorealistic faces of people who had never lived. They're fast at generating outputs once trained, which makes them practical for real-time applications. However, they're notoriously difficult to train - the two networks can become unbalanced, leading to poor results or training collapse. Diffusion models have largely overtaken GANs for general image generation because they're more stable and produce more diverse outputs, but GANs remain relevant for tasks requiring speed, such as real-time style transfer and video processing. They also introduced the broader concept of adversarial training that appears throughout modern AI.