Ask what should change when the equation is manipulated, then use the linked notebook demo to test that expectation.
Foundation Lab
Score Matching & Score-Based Generative Models
Score functions are the mathematical foundation of diffusion models—the denoiser learns the score at each noise level
Selected Foundation Object
Keep the equation fixed; move through the evidence.
The score is a vector field pointing "uphill" toward higher density—sampling follows this flow backward from noise
Use the linked notebook demo, this key equation, and canonical papers as separate witnesses for the same object.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
This atlas page has no local demo; the domain notebook carries the interactive witness and the fuller Intuition -> Math -> Code -> Demo sequence.
Why It Matters for Modern Models
- Score functions are the mathematical foundation of diffusion models—the denoiser learns the score at each noise level
- Explains why diffusion training is "just regression": predict noise ε, which equals -σ × score
- Unifies VAEs, diffusion, and energy-based models through the lens of learning ∇log p(x)
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- The score is a vector field pointing "uphill" toward higher density—sampling follows this flow backward from noise
- Why denoising works: optimal denoiser predicts E[x|x̃], and its gradient w.r.t. x̃ gives the score
- Score matching avoids computing intractable partition functions—you only need gradients, not absolute probabilities
Visualization Status
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation here and the linked notebook demo. Come back here for the full walkthrough.
The score function is the gradient of log-density:
Score matching learns without knowing the normalizing constant:
Denoising score matching (practical form):
For Gaussian noise , the optimal score is .