NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Diffusion Models for Generative Artificial Intelligence: An Introduction for Applied Mathematicians

Catherine F. Higham, Desmond J. Higham, Peter Grindrod

TL;DR

This paper introduces diffusion models for generative AI to applied mathematicians, explaining their core mechanism of adding and then learning to reverse noise. It provides a mathematically rigorous derivation of the underlying formulas and connects them to partial differential equations, offering a valuable resource for those interested in the theoretical underpinnings of this powerful generative technique.

What Problem Does This Paper Address?

Generative Artificial Intelligence (AI) aims to create synthetic, realistic outputs. While various models like VAEs, GANs, and transformers have emerged, denoising diffusion probabilistic models (diffusion models) have recently achieved state-of-the-art performance, particularly in image generation. These models are also integral to advanced tools like text-to-image generators. However, the mathematical derivations and connections to established fields like PDEs are not always readily accessible to applied mathematicians. This paper bridges that gap by providing a clear, mathematically grounded introduction to diffusion models, making them understandable and relevant to a broader audience of mathematicians and statisticians.

Methods

The core idea behind diffusion models is a two-stage process:

  1. Forward Process (Noising): Gradually add noise to training data (e.g., images) until the original information is completely lost, resulting in pure Gaussian noise. This process is modeled as a Markov chain where each step adds a controlled amount of noise.
  2. Reverse Process (Denoising): Learn to reverse the noising process. A neural network is trained to predict the noise added at each step, allowing it to gradually denoise a random sample and generate a synthetic output.

The paper meticulously derives the mathematical formulas governing these processes, including the transition densities of the forward and backward steps. A key contribution is showing how the forward process can be viewed as a single leap from the initial data to pure noise, and how the reverse process can be formulated to predict the noise that was added. The paper also draws a connection between these discrete-time diffusion models and continuous-time partial differential equations (PDEs), suggesting a deeper theoretical link.

Datasets

The paper uses the widely studied MNIST dataset for its illustrative examples. MNIST consists of black-and-white images of handwritten digits (0-9), typically 28x28 pixels. The models are trained and demonstrated on these images, which are resized to 32x32 for the experiments.

Key Insights and Ideas

  • The "Destroy and Rebuild" Paradigm: The counterintuitive yet powerful idea of destroying data with noise and then learning to reverse that destruction is central to diffusion models' success.
  • Mathematical Rigor for Applied Mathematicians: The paper provides a careful derivation of the underlying mathematical formulas, making the models accessible to those with a strong mathematical background.
  • Connection to PDEs: The exploration of how diffusion models relate to parabolic PDEs offers a bridge between modern generative AI and classical mathematical physics, potentially opening new avenues for theoretical understanding and development.
  • Stochasticity in Generation: The reverse process is inherently stochastic, meaning that even starting from the same initial noise, multiple denoising runs can produce significantly different, yet plausible, outputs.
  • Unpredictability of Output: For unconditional models, there's no direct control over the specific class of the generated output (e.g., which digit is produced), highlighting the probabilistic nature of the generation.

Key Results

The paper demonstrates the effectiveness of diffusion models through illustrative examples using the MNIST dataset.

  • Image Generation: Figures 2-4 showcase the forward noising process and the reverse denoising process, showing how pure noise can be transformed into recognizable handwritten digits.
  • Stochasticity Illustrated: Figures 5 and 6 highlight how different denoising runs, even from the same starting noise or initial image, produce distinct results, emphasizing the stochastic nature of the generation.
  • Algorithm Summaries: Algorithms 1 (Training) and 2 (Sampling) are provided, outlining the practical steps for implementing and using diffusion models.

Limitations and Future Work

  • Computational Expense: While simple examples are feasible on standard hardware, high-resolution image generation with state-of-the-art diffusion models is computationally intensive and requires expensive GPUs. Training these models can also be very time-consuming.
  • Interpretability: The output of simple diffusion models can be difficult to predict and interpret, posing a challenge for Explainable AI.
  • Ethical Considerations: The paper touches upon broader issues such as memorization of training data, potential for misuse (e.g., deepfakes), fairness, bias, and copyright infringement, suggesting these are active areas of concern and research.
  • PDE Connection Speculation: The connection to PDEs is presented as "speculative material," indicating that further research is needed to fully explore and formalize these links.
  • Future Directions: The authors suggest that the material can be a starting point for advanced undergraduate and postgraduate students, with many directions for further exploration in the rapidly expanding literature. They also hope it provides useful examples for educators in various fields.

Summary updated

BibTeX
@inproceedings{higham2023diffusion,
  author = {Catherine F. Higham and Desmond J. Higham and Peter Grindrod},
  title = {{Diffusion Models for Generative Artificial Intelligence: An Introduction for Applied Mathematicians}},
  booktitle = {SIAM Rev},
  year = {2023},
}
Figure