Abstract

Score-based diffusion models have emerged as one of the most promising frameworks for deep generative modelling, due to both their mathematical foundations and their state-of-the art performance in many tasks. Empirically, it has been reported that samplers based on ordinary differential equations (ODEs) are inferior to those based on stochastic differential equations (SDEs). In this article, we systematically analyse the difference between the ODE and SDE dynamics of score-based diffusion models and show how this relates to an associated Fokker-Planck equation. We rigorously describe the full range of dynamics and approximations arising when training score-based diffusion models and derive a theoretical upper bound on the Wasserstein 2-distance between the ODE- and SDE-induced distributions in terms of a Fokker-Planck residual. We also show numerically that conventional score-based diffusion models can exhibit significant differences between ODE- and SDE-induced distributions that we demonstrate using explicit comparisons. Moreover, we show numerically that reducing this Fokker-Planck residual by adding it as an additional regularization term during training closes the gap between ODE- and SDE-induced distributions. Our experiments suggest that this regularization can improve the distribution generated by the ODE; however this can come at the cost of degraded SDE sample quality. This article is part of the theme issue 'Partial differential equations in data science'.

Original languageEnglish
Article number20240503
JournalPhilosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences
Volume383
Issue number2298
Early online date5 Jun 2025
DOIs
Publication statusPublished - 5 Jun 2025

Data Availability Statement

The code and data to reproduce the results is available at https://github.com/teojd/ODESDEGap/tree/main.

They are also available on Zenodo: https://zenodo.org/records/15303316.

Funding

TD, LMK, CBS and CB acknowledge support from the EPSRC programme grant in ‘The Mathematics of Deep Learning’, under the project EP/L015684/1 which also funded TD’s 6-month research visit at the University of Cambridge. JS, LMK and CBS acknowledge support from the Cantab Capital Institute for the Mathematics of Information. JS additionally acknowledges the support from Aviva. CBS additionally acknowledges support from the Philip Leverhulme Prize, the Royal Society Wolfson Fellowship, the EPSRC grants EP/S026045/1 and EP/T003553/1, EP/N014588/1, EP/T017961/1, the Wellcome Innovator Award RG98755 and the Alan Turing Institute.

FundersFunder number
Engineering and Physical Sciences Research CouncilEP/S026045/1, EP/T003553/1 , EP/N014588/1, EP/T017961/1

Keywords

  • Fokker-Planck
  • generative modelling
  • score-based diffusion
  • Wasserstein distance

ASJC Scopus subject areas

  • General Mathematics
  • General Engineering
  • General Physics and Astronomy

Fingerprint

Dive into the research topics of 'Closing the ODE-SDE gap in score-based diffusion models through the Fokker-Planck equation'. Together they form a unique fingerprint.

Cite this