Diffusion & generative models interview questions

9 questions across 5 sections, in the order you would learn them. Every answer here is one that works — but an answer you have read is not an answer you can give, so use Test yourself and say it out loud first.

Generating by removing noise

Read the section that teaches this

If this comes up in an interview

How do diffusion models work?

A fixed forward process gradually adds noise to data. A model learns to reverse one step by predicting the noise added. Generation starts from pure noise and applies the learned reverse step repeatedly.

Why did diffusion displace GANs?

Training stability. A GAN's adversarial objective suffers mode collapse and oscillation, while diffusion has a simple regression objective that trains reliably and scales predictably. The cost is much slower sampling.

What is latent diffusion?

Running the diffusion process in a compressed latent space rather than on raw pixels, so each denoising step is far cheaper. It is what made high-resolution text-to-image practical on ordinary hardware.

Using diffusion models in practice

Read the section that teaches this

If this comes up in an interview

How do you trade quality against latency in a diffusion model?

Step count, primarily, since latency scales roughly with it. Modern samplers reach good quality in around twenty steps, and distilled models go much lower at a real quality cost. Guidance strength is the second dial.

What is classifier-free guidance?

Contrasting the model's conditioned and unconditioned predictions and pushing away from the unconditioned one, which strengthens how closely output follows the prompt. Too low drifts from the prompt, too high produces oversaturated rigid results.

How would you add a specific style to a diffusion model?

A LoRA adapter for most cases, since it is cheap and composable. Textual inversion if you only need a new concept token and want to avoid touching the weights. Full fine-tuning only with substantial data and a reason.

The maths of denoising diffusion, just enough

Read the section that teaches this

If this comes up in an interview

Write down the diffusion training objective and explain it.

Sample a clean example, a random step t and Gaussian noise, form x_t as sqrt(alphabar_t) times the clean example plus sqrt(1 minus alphabar_t) times the noise, and train the model to predict that noise with a squared error loss.

Then they push further

Why can training jump straight to any step?

The sum of Gaussian noise steps is itself Gaussian with a known variance, so x_t has a closed form given x_0. There is no need to simulate the chain during training.

How does classifier-free guidance work?

The model is trained with and without the condition. At sampling, the unconditional prediction is pushed further in the direction of the conditional one by a guidance weight, strengthening adherence to the prompt at the cost of diversity.

What gets marked up. Marked up for the closed-form forward process, the noise-prediction objective and the guidance formula.

Train a tiny diffusion model

Read the section that teaches this

If this comes up in an interview

You trained a diffusion model and samples look like blurry blobs. What might be wrong?

Too little training, a network too small for the data, a wrong noise schedule so the final step is not near pure noise, a bug in the sampling formula, or the time step not reaching the network properly. Checking that the forward process at the last step is indistinguishable from noise and plotting intermediate samples narrow it down fast.

Working with pretrained image models

Read the section that teaches this

If this comes up in an interview

You need image generation under one second per image. What are your options?

Fewer steps with a better sampler, a distilled few-step model, smaller resolution with upscaling, 16-bit weights and compiled models, batching, and caching repeated prompts. Measure quality on representative prompts at each setting rather than choosing by eye.

These are the questions for one topic. The whole question bank covers every topic on the site.