Types of generative models: LLMs, diffusion, GANs and VAEs
Generative AI isn't one technique. Four families of models do most of the creating: LLMs write text, diffusion models create images and video by removing noise, GANs learn through a contest between two networks, and VAEs learn a compressed map of their data and sample new examples from it. Multimodal models combine several kinds of input and output.
Everyday analogy
Four kinds of artist. A storyteller (LLM), a sculptor who chips away noise (diffusion), a forger trying to fool an art expert (GAN), and a sketch artist who learns the essence of faces and draws new ones (VAE).
Example
ChatGPT, Claude and Gemini are built on LLMs; Stable Diffusion and Midjourney are diffusion models; StyleGAN made the famous "this person does not exist" faces; and a VAE sits inside Stable Diffusion to compress images.
| Family | Mainly creates | How it learns | Known for |
|---|---|---|---|
| LLM | Text and code | Predicts the next token | Chatbots, writing, coding |
| Diffusion | Images, video, audio | Learns to remove noise step by step | Stable Diffusion, Midjourney, video tools |
| GAN | Images and video | A generator and a discriminator compete | Realistic faces, style transfer, fast filters |
| VAE | Images, molecules, structured data | Encodes data into a latent space, then decodes | Compression, anomaly detection, drug discovery |
| Multimodal | Several types at once | Shares one representation across text, images and sound | Assistants that see, hear and speak |
GANs: the forger and the expert
The generator turns random noise into fake examples. The discriminator sees real and fake examples and guesses which is which. Both are trained together: every time the forger is caught, it learns to make better fakes. GANs generate very fast, but they can be unstable to train.
VAEs: learning a map of the data
The encoder squeezes each input into a small latent space (a mean and a spread rather than a single point). You can pick any point on that map and the decoder turns it into a new example, or move smoothly between two examples.
Today: most image and video tools use diffusion, text tools use LLMs, and GANs remain useful where speed matters, such as real-time camera filters.
Going deeper: autoencoders and the hidden map
An autoencoder learns without any labels. An encoder squeezes each input into a much smaller code, and a decoder tries to rebuild the original from that code alone. Training simply rewards a good rebuild (a small reconstruction loss). Because the middle is so narrow, the network is forced to keep only what really matters.
Analogy: you summarise a 10-page report into 5 bullet points, and a colleague rebuilds the report from those bullets. If their version is close to the original, your bullets captured the essentials. The bullets are the latent space.
The numbers in that small code are latent variables: hidden factors you never see directly but that explain the data. For photos of faces they might end up meaning smile, head angle or lighting.
| Plain autoencoder | Variational autoencoder (VAE) | |
|---|---|---|
| Each input becomes | One fixed point on the map | A small cloud: a mean and a spread |
| The map is | Patchy; random points may decode to rubbish | Smooth and organised by a regularisation term, so nearby points decode to similar things |
| Can create new examples? | Not reliably | Yes: pick any point and decode it |
With a well-organised VAE you can turn one dial at a time, for example slowly increasing "smile" while head angle stays the same. Versions such as β-VAE push each dial to control one separate feature, which is called disentanglement.
More from GANs: changing one style into another
A trained GAN generator turns random noise into realistic new data. A variant called CycleGAN learns to translate between two collections without matching pairs: horse photos into zebra photos, summer scenes into winter, or one person's voice into another's. That same power is behind many deepfakes, so see Staying safe with AI.
Useful beyond creating new content
| Use | How it helps | Example |
|---|---|---|
| Spotting outliers | The model learns what "normal" looks like, so rare cases stand out | An unusual claim pattern; rare road conditions a self-driving car rarely saw in training |
| Reducing bias | The hidden map shows which kinds of examples are rare in the training data, so they can be given more weight | A face dataset with very few older faces or darker skin tones |
| Extra training data | Generate realistic synthetic examples where real ones are scarce or private | Synthetic patient records for testing software |
Try it yourself
About 10 minSpot the model family
- List 6 AI tools you know (chatbots, image makers, face filters, voice tools).
- Write which family each mainly uses: LLM, diffusion, GAN, VAE or multimodal.
- Check two of them online.
What you should see: Most chat tools are LLMs, most image tools are diffusion, and assistants that see and speak are multimodal.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.