Beyond large language models, the main generative families are variational autoencoders (VAEs), generative adversarial networks (GANs), normalising flows, autoregressive models and diffusion models. Deep generative models struggle to meet three requirements at once: high sample quality, coverage of the data’s variety, and fast sampling. Which one fits depends mostly on what your output is (pixels, a waveform, video frames, table rows) and which of those three you can afford to lose. The autoencoder vs VAE distinction is the best place to start, because it separates a model that compresses data from a model you can actually sample new data from.
Autoencoder vs VAE: One Compresses, the Other Can Generate
A plain autoencoder maps an input to a latent code with an encoder and reconstructs it with a decoder, trained only to minimise reconstruction loss. Nothing in that objective shapes the latent space, so in early autoencoders a randomly sampled latent code often decoded to meaningless output. That makes a plain autoencoder a tool for compression and feature learning, not sampling.
A VAE changes what the encoder produces. It does not output a single value for each latent attribute. It describes a probability distribution for each one. Training maximises the evidence lower bound (ELBO), which balances reconstruction accuracy against the divergence between the encoder’s approximate distribution and a prior over the latent variables. The Kullback-Leibler (KL) term in that bound regularises the latent space so that random samples can be reliably mapped back into data space. Kingma and Welling’s original VAE paper made this practical by reparameterising the variational lower bound so it can be optimised with standard stochastic gradient methods.
You can see the difference with an interpolation test: decode convex combinations of two latent vectors and look at what comes out. For convolutional and denoising autoencoders this often produces artefacts or unrelated output, while a VAE gives a coherent, smooth transition. A study characterising these latent spaces as matrix manifolds found that the convolutional and denoising autoencoder spaces are stratified, made of several smooth pieces with discontinuities between them, while the VAE’s latent space is a single smooth product manifold. In the same study, a VAE’s clean and noisy inputs stayed in one tight cluster in latent space, while the plain autoencoders’ noisy points drifted further from the clean ones as noise increased.
Autoencoder vs VAE at a Glance
| Property | Plain autoencoder | Variational autoencoder (VAE) |
|---|---|---|
| What the encoder outputs | A fixed point per input | A probability distribution per latent attribute |
| Training objective | Reconstruction loss | ELBO: reconstruction plus KL divergence to a prior |
| Latent geometry | Non-smooth, stratified | Smooth |
| Decoding a random latent sample | Often meaningless output | Reliably maps back to plausible data |
| Interpolation between two inputs | Artefacts or unrelated output | Coherent, smooth transition |
| Typical use | Feature learning, dimensionality reduction, anomaly detection | Generation, interpolation, representation learning |
| Known weakness | Random latent samples decode poorly | Blurry samples, posterior collapse |
When a Plain Autoencoder Is the Right Tool
Autoencoders give dense feature representations and are used for unsupervised feature learning, dimensionality reduction and anomaly detection. If your goal is to compress sensor data or flag unusual inputs, and you never need to sample new data, a VAE’s probabilistic machinery is overhead you do not need. A survey of generative AI for unmanned vehicle swarms cites one study in which a VAE trained on normal-operation data detected faults by reconstruction error with 95.6% average accuracy, and notes the approach can catch faults absent from the training set.
Blurry Samples and Posterior Collapse: Where VAEs Fall Short
VAEs train stably and learn structured latent representations, but their samples often lack sharpness and fine detail. Part of the cause is the reconstruction loss: element-wise metrics such as mean squared error do not capture perceptual similarity well, and that contributes to the blur. The second failure is posterior collapse. A powerful decoder learns to ignore the latent variables, which wastes the latent space and reduces the diversity of the outputs.
Several variants target these weaknesses:
- VQ-VAE quantises the encoder output against a learned codebook, so the encoder assigns discrete codes instead of averaging over fine detail, and reconstructions come out sharper.
- VAE-GAN (Larsen et al.) replaces the element-wise reconstruction error with feature activations from a GAN discriminator, which track perceptual quality.
- MMD-VAE replaces the KL term with Maximum Mean Discrepancy, which pushes the aggregated posterior toward the prior without collapsing the latent representation.
- InfoVAE maximises mutual information between data and latents, partly to counter posterior collapse.
Posterior collapse and difficulty modelling complex multimodal distributions still limit how widely VAEs are adopted. VAEs remain useful where interpretability and controllability of the output matter.
How GANs, Diffusion, Autoregressive Models and Flows Generate Data
GANs train two models at once: a generator that captures the data distribution and a discriminator that estimates whether a sample is real, set up as a two-player minimax game. Because generation is a single forward pass, GANs are much faster than iterative models. GANs are hard to optimise, prone to mode collapse (many outputs that look the same), sensitive to optimiser and hyperparameter choices, and their discriminator can overfit when data is limited. Wasserstein losses with gradient penalty and spectral normalisation both improve training stability. In DCGAN, vector arithmetic in the latent space mapped to interpretable image changes.
Diffusion models gradually add Gaussian noise to data in a forward process and learn to reverse it, step by step, in a reverse process. In practice the DDPM objective reduces to predicting the added noise with a mean-squared-error loss. That likelihood-based objective gives stable training and diverse samples, but inference needs many sequential passes through the network. A survey of diffusion models for wireless networks puts baseline samplers at roughly 1,000 steps. DDIM cuts that to 10–50 steps without retraining, and consistency models aim for a single pass. On quality, Dhariwal and Nichol report FIDs of 2.97 on ImageNet 128×128 and 4.59 on ImageNet 256×256, and they match BigGAN-deep with as few as 25 forward passes per sample while covering the distribution better.
Xiao, Kreis and Vahdat’s denoising diffusion GANs reach quality and mode coverage competitive with diffusion models in as few as two denoising steps, about a 2,000× sampling speed-up on CIFAR-10 over predictor-corrector sampling. StyleGAN-T outperforms distilled diffusion models on both quality and speed for fast text-to-image synthesis, although its authors say GANs still trail the best large-scale text-to-image models.
Autoregressive models generate a sequence of conditional distributions over pixels, tokens or samples, one element at a time. Their training is among the most stable of all the families, and their factorisation makes conditional generation natural, but sequential sampling is slow and expensive. A technical history of image generation notes that a single image from an autoregressive image transformer can take 30 seconds on a GPU. An LLM is an autoregressive transformer applied to text tokens.
Normalising flows turn a simple base distribution into an expressive one through a series of bijective transformations. Flows give tractable distributions with exact sampling and density evaluation, and their invertibility enables exact reverse mapping. Flows also sample in one step, but they underperform diffusion and autoregressive models on high-fidelity synthesis benchmarks. Flow matching and rectified flow build on continuous normalising flows, and many top image systems have moved toward them for more stable training at scale and fewer sampling steps. Flow matching can be viewed as a more general form that includes DDPM and score-based models.
Comparison Table: Generative Model Families
| Family | How it generates | Main strength | Main weakness | Sampling cost |
|---|---|---|---|---|
| VAE | Decodes a sample from a regularised latent distribution | Stable training, structured latent space | Blurry samples, posterior collapse | Single decoder pass |
| GAN | Generator maps noise to data, trained against a discriminator | Sharp, high-fidelity samples | Mode collapse, unstable training | Single forward pass |
| Diffusion | Iteratively denoises from Gaussian noise | Stable training, high diversity and quality | Slow, resource-intensive sampling | Many steps, reducible with DDIM or consistency models |
| Autoregressive | Predicts each element from the previous ones | Most stable training, natural conditioning | Slow, hard to scale to high resolution | One step per element |
| Normalising flow | Inverts a chain of bijective transforms | Exact likelihood, one-step sampling | Lags on complex, high-fidelity tasks | Single pass |
Latent Diffusion: The Autoencoder Inside Stable Diffusion
The autoencoder vs VAE question matters in practice because latent diffusion systems such as Stable Diffusion contain an autoencoder. Stable Diffusion v1-5 is a latent diffusion model that combines an autoencoder with a diffusion model trained in that autoencoder’s latent space. The autoencoder downsamples by a factor of 8, mapping an H×W×3 image to an H/8×W/8×4 latent, and text from a CLIP ViT-L/14 encoder enters the UNet through cross-attention. Rombach et al. moved diffusion into the latent space of pretrained autoencoders so that training fits limited compute while keeping detail, and they report much lower compute requirements than pixel-space diffusion. A survey of video diffusion models describes latent diffusion as the de facto standard for image and video generation and names a pretrained VQ-VAE as the encoder. OpenAI’s Sora report compresses videos into a lower-dimensional latent space and splits them into spacetime patches, drawing the analogy that whereas LLMs have text tokens, Sora has visual patches.
The engineering consequence is that the autoencoder limits how good the output can be. So measure the autoencoder’s reconstruction on the target data before spending effort on the denoiser.
Which Generative Model Suits Image, Audio, Video or Synthetic Tabular Data?
Images
For general image synthesis, diffusion models have overtaken GANs on many tasks. Latent diffusion also handles inpainting, semantic scene synthesis and super-resolution. GANs are still used for image-to-image translation and super-resolution, and their single forward pass makes them much faster than iterative models. Within diffusion itself the variant should follow the constraint. The wireless-networks survey maps full DDPM sampling to fidelity-critical work, DDIM and consistency models to latency-critical work, and latent diffusion to resource-constrained edge settings, and it states that no one model fits all. A GAN variant such as DAGAN was built to generate extra training samples for data augmentation in low-data settings.
Audio
WaveNet is a deep autoregressive generative model of raw audio. It models raw waveforms with each sample’s distribution conditioned on all previous samples, and it can still be trained on audio at tens of thousands of samples per second. Dilated causal convolutions let its receptive field grow exponentially with depth. Conditioning on extra inputs selects a speaker or supplies text for text-to-speech. Its text-to-speech samples scored mean opinion scores above 4.0 for naturalness, better than the baselines in the paper. For music, the samples lacked long-range consistency even with a receptive field of several seconds. Since generation runs one sample at a time and the output rate is tens of thousands of samples per second, sampling latency is the cost to plan for with this family. Diffusion has also been applied to audio, for example in DiffWave.
Video
Before diffusion, GANs and autoregressive transformers were the usual choices for video. VideoGPT, for instance, used a 3D VQ-VAE to compress video and an autoregressive transformer to predict the next frame’s latent code. Many video diffusion models denoise several frames together. Full 3D attention across frames is very expensive, so proposed designs factorise it into spatial and temporal blocks. A single denoising pass usually produces a small, fixed number of frames, such as 8 or 16. Extending a clip autoregressively from its last frames works in principle, but the results often suffer from repetition and quality loss over time. Sora’s report finds diffusion transformers scale well as video models, with sample quality improving as training compute grows.
Synthetic Tabular Data
Tabular data is hard to generate because it mixes discrete and continuous columns, continuous columns often have several modes, and categorical columns are often heavily imbalanced. In the datasets used by the CTGAN authors, 57 of 123 continuous columns were multimodal, which a vanilla GAN struggles to model, and 636 of 1,048 categorical columns had a majority category above 90%, which causes severe mode collapse. CTGAN responds with mode-specific normalisation and a conditional generator, and TVAE adapts a VAE to the same preprocessing, trained on the ELBO.
Two benchmarks rank the tabular models differently. It outperformed TVAE and CTABGAN+ on most of them, but the simple interpolation method SMOTE was competitive on machine-learning utility, and TabDDPM pulled ahead only where privacy had to be protected. A data-centric benchmark found that no generative model was best across all tasks: DDPM gave the best classification performance, CTGAN the best model selection and TVAE the best feature selection, with CTGAN and TVAE offering the best overall trade-off. Choose the generator for what the synthetic table will be used for, and always test it against SMOTE.
TabSyn uses a VAE to map mixed-type rows into a continuous latent space and runs latent diffusion there. Tabular diffusion models also memorise training rows, and the memorisation ratio rises with training epochs. If the purpose of synthetic data is privacy, memorisation is a risk to measure, not assume away.
Generative AI, LLMs and Foundation Models: How the Terms Relate
Generative AI is the broad category of models that produce new content such as text, images, audio and 3D models, as opposed to discriminative models that classify or predict. An LLM is one generative model, an autoregressive transformer for text, so every LLM is generative AI but most generative AI is not an LLM. For how LLMs themselves work, see understanding language models.
Bommasani et al. at Stanford’s Center for Research on Foundation Models define foundation models as models trained on broad data at scale and adaptable to many downstream tasks. Their examples include BERT, DALL-E and GPT-3. “Foundation model” therefore describes how a model is trained and reused, not which generative family it belongs to: a diffusion model, an autoregressive transformer or a non-generative encoder can each be one. The same report warns that the defects of a foundation model are inherited by every model adapted from it.
When a Diffusion Model, GAN or VAE Fits Better than an LLM
Applying LLMs to complex image or video generation for film production remains an open problem, mainly because natural-language instructions are hard to align with visual outputs. In systems such as Stable Diffusion, the families are combined rather than chosen exclusively. Stable Diffusion uses a fixed, pretrained text encoder for the prompt and diffusion in the autoencoder’s latent space, and recent image systems combine a large language model for instruction following with a strong image backbone. The matching rules that follow from the evidence above:
- Images or video where quality and diversity matter: latent diffusion, with a fast sampler if latency matters.
- Images where single-pass speed matters: a GAN, or a GAN-diffusion hybrid.
- Raw audio with conditioning: an autoregressive model of the WaveNet kind.
- Exact likelihoods or density estimates: a normalising flow or an autoregressive model.
- Compression or anomaly detection, with no sampling needed: a plain autoencoder, or a VAE when a smooth latent space helps.
- Synthetic tables: TabDDPM, CTGAN or TVAE chosen by downstream task, checked against SMOTE.
For worked examples of these pairings, see our article on matching model architectures to real generative AI use cases. TechnoLynx’s Generative & Agentic AI R&D practice builds transformers, diffusion and VAE/GAN models into products.
Why the Choice Is Usually per Stage, Not per Product
Stable Diffusion chains several families: an autoencoder that defines the latent space, a diffusion model that samples in it, and a text encoder that turns the prompt into conditioning. A better question is which stage limits your output. If outputs lack variety, look for mode collapse. If latency is too high, count the sampling steps. A small evaluation on your own data, against a simple baseline, is worth more than a leaderboard.
FAQ
What Is LLM vs ML?
Machine learning is the broad field of models that learn from data. A large language model is one specific kind: a large transformer trained to predict text tokens, which makes it a generative model for language.
What Are the Risks Associated with Generative AI?
Given abundant training data, GANs can produce convincing deepfakes by transposing faces onto target footage. Tabular diffusion models can memorise and reproduce training rows, and they do so more as training runs longer. Models adapted from a foundation model also inherit its defects.