Skip to content
mlmentorship

Autoregressive vs. diffusion generation

Two paradigms for generative modeling: predict the next element step-by-step (autoregressive) or iteratively denoise from pure noise (diffusion). Different costs, different strengths.

Published · 7 min read ·Core ·Intermediate

Visual quick review

Distinguish autoregressive sampling, which appends one element per serial step, from diffusion sampling, which revises every element of the current state in parallel at each serial denoising step.

Learning objective

Append one new position or revise the whole provisional sample

Append a new position, or revise the whole provisional sampleAutoregression extends a committed prefix. Diffusion repeatedly updates all provisional positions; its intermediate tokens are not a finished prefix.Append committed positions or reviseprovisional onesAutoregression: committed prefixgrowsA--AB-ABCDiffusion: every intermediateposition remains provisional??????ABC
Read it this way: Autoregression extends a committed prefix. Diffusion repeatedly updates all provisional positions; its intermediate tokens are not a finished prefix. Can the middle diffusion sample be treated as a committed left prefix?
Full explanation 7 min read
Reading depth

Summary

Autoregressive sampling appends an element conditioned on the retained prefix; conventional diffusion sampling revises a complete provisional state. Both can require dependent rounds even when a model call contains parallel computation. Compare output support, streaming behavior, quality, and actual work, not a modality stereotype.

The two paradigms produce very different production tradeoffs:

AspectAutoregressiveDiffusion
State changeAppend under the ordinary samplerRevise provisional positions
Outer dependenceNext prefix depends on sampled elementsNext state depends on the previous transition
Within-call workArchitecture-dependent matrix parallelismArchitecture-dependent whole-state work
LikelihoodNormalized factors under the chosen representationBounds/estimates depend on the model and objective
Reference drawing

Learning objective

Append one new position or revise the whole provisional sample

Append a new position, or revise the whole provisional sampleAutoregression extends a committed prefix. Diffusion repeatedly updates all provisional positions; its intermediate tokens are not a finished prefix.Append committed positions or reviseprovisional onesAutoregression: committed prefixgrowsA--AB-ABCDiffusion: every intermediateposition remains provisional??????ABC
Derivation
Autoregressive appending versus diffusion whole-state revision Two aligned sampling timelines each contain four positions. On the autoregressive timeline, A is given, then each serial model call appends exactly one new element while earlier elements remain fixed. On the diffusion timeline, a complete four-position noise state exists from the start, and each serial denoising call revises all four positions together until a clean sample is reached. AUTOREGRESSIVE: append one element; keep the prefix fixed given prefix A ? ? ? serial call 1 append B A B ? ? serial call 2 append C A B C ? serial call 3 append D A B C D one new element one new element one new element DIFFUSION: revise the entire current state within each denoising step xT: full noise state ·×~· serial call 1 xT−1: less noisy ╱○△╲ serial call 2 xT−2: structure emerges AB△D … serial calls x0: clean sample ABCD all positions revised together all positions revised together Both timelines are serial across calls; diffusion revises all positions within each illustrated call.
scan each row from left to right. An ordinary autoregressive call appends one element. A diffusion call revises the provisional whole state. Both illustrated timelines depend on earlier calls. The original schematic follows PixelRNN and DDPM.
Check: Which positions can change on the second call? Why are both illustrated timelines serial?
Read it this way: Autoregression extends a committed prefix. Diffusion repeatedly updates all provisional positions; its intermediate tokens are not a finished prefix. Can the middle diffusion sample be treated as a committed left prefix?

Autoregressive

The model factorizes the joint distribution by the chain rule:

Given prefix A, let , , and . Then , and ordinary sampling needs three dependent append calls. Teacher-forced scoring knows the targets, allowing parallel positions in suitable causal-transformer implementations without revealing future targets. Teacher forcing does not remove every architecture’s sequential dependencies.

Diffusion

Gaussian diffusion trains a reverse model using corrupted states. Sampling begins from a chosen noise prior and applies valid reverse transitions. A three-transition teaching sampler can revise all four positions each round, but its rounds remain dependent. The AR product above supplies no diffusion likelihood.

Require an Immediately Usable Prefix

New task: Release B before C or D exists.

Picture and change: The append state AB is already a valid prefix; a conventional whole-state intermediate remains provisional.

Check: One append releases B; one denoising transition does not generally finalize the first position.

Use when: Streaming is an explicit service requirement.

Compare Actual Call Costs

New task: Compare three-call fixtures costing two versus five milliseconds per call.

Picture and change: Multiply evaluated calls by call cost; account for overhead separately.

Check: Totals are six versus fifteen milliseconds despite equal round counts.

Use when: Quality is separately qualified; these invented costs are not a performance benchmark.

For a Gaussian schedule, and . Training can construct and fit a noise predictor by squared error. A conventional reverse parameterization is

Use with the sampler’s declared variance and endpoint policy. A finite forward schedule need not make its terminal marginal exactly standard Gaussian.

When AR vs. diffusion

ModalityPossible model families
Text/codeAR, discrete diffusion, hybrids
Images/audio/videoAR, diffusion, flows, hybrids
StructuresRepresentation-dependent generative models

Hybrid and emerging approaches

  • Latent diffusion: noising in a learned representation.
  • Discrete diffusion: categorical corruption/reconstruction, including LLaDA.
  • Flow matching: learn a probability-path vector field.
  • Consistency models: train compatible few-step mappings under their specified objectives.

Common pitfalls

  • Incompatible measures. Probability masses, densities, and variational bounds are not interchangeable likelihood reports.
  • Invalid skipping. Removing trained timesteps without a compatible sampler need not preserve a valid transition or quality.
  • Round-count rankings. Work, batching, hardware, and quality matter separately.