Diffusion Model
Subject: Computer and Technology noun /dɪˈfjuː.ʒən ˈmɑː.dəl/ 1 definition
- generative-ai
- machine-learning
- deep-learning
- neural-networks
-
Definition (noun)
Entry #296 · UpdatedA Diffusion Model is a probabilistic generative model that synthesizes high-dimensional data—such as images, audio, video, and 3D structures—by learning to reverse a gradual corruption process. During training, a predefined forward process incrementally adds noise (typically Gaussian) to training samples over a sequence of timesteps until the data becomes indistinguishable from a simple prior distribution, while a neural network—commonly a U-Net or Diffusion Transformer (DiT)—learns to predict the injected noise or score function at each step. At inference time, the model starts from pure random noise and executes an iterative reverse denoising schedule, optionally conditioned on text prompts, class labels, or spatial controls via cross-attention and classifier-free guidance. Unlike single-pass generators such as Generative Adversarial Networks (GANs), diffusion models avoid adversarial training instability and mode collapse, trading slower sequential sampling for high output fidelity and strong distribution coverage.
Common Types
Denoising Diffusion Probabilistic Models (DDPMs): Discrete-time formulations that apply a finite Markov chain of Gaussian noise injections and train a denoiser to predict the added noise at each step by optimizing a variational lower bound.
Latent Diffusion Models (LDMs): Compress high-dimensional inputs with a pretrained autoencoder—such as a Variational Autoencoder (VAE)—and perform forward noising and reverse denoising inside the compact latent space, cutting memory and compute overhead for high-resolution media synthesis.
Score-Based Generative Models (SGMs): Continuous-time formulations modeled via stochastic differential equations (SDEs) that train a network to estimate the score function—the gradient of the log data density—enabling sampling through standard numerical ODE or SDE solvers.
Discrete Diffusion Models: Replace continuous Gaussian noise with categorical transition kernels or absorbing mask tokens over discrete vocabularies, enabling non-autoregressive generation of text sequences, molecular graphs, and source code.
Example
Using Python's Hugging Face
diffuserslibrary, an engineer invokesStableDiffusionXLPipelinewith a text prompt encoded by CLIP,num_inference_steps=30, andguidance_scale=7.5under aDPMSolverMultistepScheduler. Starting from a random FP16 Gaussian noise tensor of shape(1, 4, 128, 128), the U-Net iteratively predicts and subtracts noise across 30 denoising steps before the VAE decoder upsamples the clean latent into a1024x1024RGB image.