Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

difficulty 4/5

Diffusion model

Definition

Destroy an image with noise in a thousand fixed steps, then train a network to undo one step at a time. Sampling runs the chain backwards from pure noise.

Formula
q(xt∣x0)=N ⁣(αˉt x0,  (1−αˉt)I),αˉt=∏s=1t(1−βs)q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\!\left(\sqrt{\bar{\alpha}_t}\,\mathbf{x}_0,\; (1 - \bar{\alpha}_t)\mathbf{I}\right), \qquad \bar{\alpha}_t = \prod_{s=1}^{t} (1 - \beta_s)

Intuition

A GAN learns to produce an image in one jump, supervised by an opponent. A diffusion model refuses the jump. It defines a process that destroys an image gradually, and learns only to reverse one small step of it.

The destruction is not learned. "What distinguishes diffusion models from other types of latent variable models is that the approximate posterior q(x₁:T | x₀), called the forward process or diffusion process, is fixed to a Markov chain that gradually adds Gaussian noise to the data according to a variance schedule β₁, …, βT" [1, §2]. Fixed — no parameters, nothing to train, and therefore nothing to destabilise.

What is learned is the reverse: a chain of "learned Gaussian transitions starting at p(xT) = N(0, I)" [1, §2]. Sampling starts from noise and walks back.

Undoing a little noise is an easy, well-posed, supervised problem. Undoing a thousand little bits of noise in sequence turns out to be image generation.

Formal definition

How it works

Where it's used

Why & when

Worked example

Pitfalls

Check yourself

3 questions

The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.

Unlock all quizzes

On the cheat sheet: Vision tasks →

Sources

  1. Ho, Jain, Abbeel. Denoising Diffusion Probabilistic Models (2020)paperhttps://ar5iv.labs.arxiv.org/html/2006.11239
  2. Goodfellow, Pouget-Abadie, Mirza, Xu, Warde-Farley, Ozair, Courville, Bengio. Generative Adversarial Nets (2014)paperhttps://ar5iv.labs.arxiv.org/html/1406.2661
  3. Ronneberger, Fischer, Brox. U-Net: Convolutional Networks for Biomedical Image Segmentation (2015)paperhttps://ar5iv.labs.arxiv.org/html/1505.04597
  4. Rombach, Blattmann, Lorenz, Esser, Ommer. High-Resolution Image Synthesis with Latent Diffusion Models (2022)paperhttps://arxiv.org/abs/2112.10752

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com