---
title: "Generative AI overview"
description: "Explore learned representations, adversarial training, and repeated denoising. Compare reconstruction error, sample resemblance, and distribution coverage."
source: https://vizlearn.app/ai/generative
---

# Generative AI Visualizations

These lessons examine learned representations and ways to generate data. An autoencoder reconstructs an existing input through a latent code. GANs and diffusion models produce samples from noise. For generation, one plausible output is a limited test: the model might produce that same output every time. Inspect both where samples land and what parts of the data they miss.

## What These Lessons Cover

| Lesson | What you watch | What the experiment tests |
| --- | --- | --- |
| [Autoencoder](https://vizlearn.app/ai/generative/autoencoder) | Trained encoder and decoder networks reconstruct an 8×8 image through a small latent code. | A wider bottleneck improves the selected digit but does not make a digit-trained decoder a universal copier. |
| [GAN](https://vizlearn.app/ai/generative/gan) | Two small networks train on a one-dimensional distribution. D revises its judgments, then G learns through the fixed D. | A mean discriminator score near 0.5 does not prove a match. Identical latent inputs produce identical outputs even after training. |
| [Diffusion Models](https://vizlearn.app/ai/generative/diffusion-models) | A deterministic DDIM sampler repeatedly applies an exact analytical denoiser to two-dimensional samples. | One high-noise estimate can land between data groups; repeated estimates at changing noise levels resolve their structure. |

## A Recommended Learning Order

Start with [Training Loop](https://vizlearn.app/ai/neural-networks/training-loop) if parameter updates and evaluation are unfamiliar. **Autoencoder** introduces a latent representation with the original input as its reconstruction target. Then open **GAN**, where generated samples have no paired real targets. Watch the first D update: the score curve changes while G's output positions stay fixed. During the G update, the curve stays fixed while output positions change. The final fresh batch shows why D can be removed from the generation path.

Continue with **Diffusion Models** to examine an iterative generation procedure. Its denoiser is an exact calculation for a known distribution, not a neural network trained during the lesson. Compare the first clean estimate with the repeated-denoising result while holding the starting noise fixed.

## Compare the Evidence, Not Just the Samples

The GAN experiment runs real small-network optimization. Its losses and outputs can oscillate, and 400 rounds do not establish convergence. The diffusion experiment isolates sampling with a fixed denoiser; it does not demonstrate the optimization needed to train an image model.

GAN and diffusion use low-dimensional synthetic distributions to make missing groups visible. Neighborhood counts are descriptive checks on finite batches, not general measures of image quality. The autoencoder uses held-out digit images and an unfamiliar checkerboard to test reconstruction. Keep the input and other controls fixed when comparing one changed parameter.

## All Generative AI Visualizations

Open a lesson below to play its default experiment, inspect a training or sampling step, and apply a failure-case recipe.
