---
title: "Diffusion Models: Learning to Undo Noise"
description: "Training adds noise to a sample in small steps and asks the network to predict the noise mixed into the result. Generation runs that chain backwards from pure noise, so one hard sampling problem becom"
canonical: https://lightmysky.com/learn/computing/diffusion-models-learning-to-undo-noise-mt_kZdQJ96iZ3
source: https://lightmysky.com/learn/computing/diffusion-models-learning-to-undo-noise-mt_kZdQJ96iZ3.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Diffusion Models: Learning to Undo Noise

Training adds noise to a sample in small steps and asks the network to predict the noise mixed into the result. Generation runs that chain backwards from pure noise, so one hard sampling problem becomes a long series of easy denoising ones.

Subject: Computing · Area: Machine Learning · Ages 22 to 24
Page: https://lightmysky.com/learn/computing/diffusion-models-learning-to-undo-noise-mt_kZdQJ96iZ3

## Ready when they can

- Describe the forward corruption process and say why it needs no training
- State what the network predicts at each step and how repeating it yields a sample
- Say what more sampling steps buy and what they cost

## Lesson: Pictures from unmaking noise

A diffusion model is a generative model whose hidden code is a noisy version of the sample itself. Training starts by wrecking a sample on purpose. Noise is added in small steps until nothing but static remains. This forward corruption is a fixed recipe, so it needs no training at all.

**Example.** Every forward step mixes in fresh noise, so the noisy sample at any level is the clean sample blended with one lump of noise. At each level the network is shown the noisy sample and predicts that whole lump: the noise mixed in so far, not just the last small dose. Generation runs the chain backwards: start from pure noise, remove a small part of the predicted noise, and repeat until a clean sample stands, with the usual recipe stirring a little fresh noise back in at every step but the last. One hard sampling problem becomes a long series of easy denoising ones.

More sampling steps usually buy a cleaner sample and always cost more waiting. Fewer steps run fast but can leave rough edges and odd textures.

**Tip.** When results look noisy, add steps before touching anything else. When results look fine but slow, trim steps first.

**Recap.** Learn each denoising step, then walk backwards from noise to sample.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Generative Models: Learning a Distribution You Can Sample](https://lightmysky.com/learn/computing/generative-models-learning-a-distribution-you-can-sample-mt_3CHsmpWVX5)
