TorchLean API

NN.Proofs.Probability.DiffusionForward

Diffusion forward process: Gaussian noising #

This file gives a small, Mathlib-backed formalization of the forward (noising) step used in diffusion models, expressed as an affine pushforward of the standard Gaussian measure.

We work in a finite-dimensional real inner product space E equipped with its Borel σ-algebra.

Main definitions:

Main facts:

Forward noising measure for a diffusion step: x' = a • x + b • z with z ∼ stdGaussian E.

This is the measure-level analogue of the forward process used in DDPM-style diffusion models: the current clean state x is scaled by a, and isotropic Gaussian noise is scaled by b and added. The exact schedule that chooses a and b belongs to the model spec; this theorem layer only needs the affine-Gaussian kernel shape.

Instances For
    @[simp]

    The two-step definition of forwardNoising is equal to one direct affine pushforward.

    The definition is written in stages so typeclass inference can see a Gaussian pushforward through a linear map followed by translation; this lemma is the cleaner formula downstream proofs usually want.

    Affine images of a finite-dimensional standard Gaussian are Gaussian.

    @[simp]

    The explicit total-mass theorem for the forward-noising measure.

    Forward noising kernel for a diffusion step, as a Markov kernel.

    Instances For

      The forward diffusion transition is a Markov kernel.

      This packages measurability and probability-mass obligations so later verification statements can compose diffusion steps as kernels rather than manually carrying measure facts.

      Applying the kernel at state x recovers exactly the forward-noising measure at x.

      The kernel is built from id × const stdGaussian so it fits Mathlib kernel composition; this theorem reconnects that construction to the simpler noising formula.

      Each transition distribution of the forward kernel is Gaussian.