Diffusion or score-based models recently showed high performance in image generation. They rely on a forward and a backward stochastic differential equations (SDE). The sampling of a data distribution is achieved by solving numerically the backward SDE or its associated flow ODE. Studying the convergence of these models necessitates to control four different types of error: the initialization error, the truncation error, the discretization and the score approximation. In this paper, we study theoretically the behavior of diffusion models and their numerical implementation when the data distribution is Gaussian. In this restricted framework where the score function is a linear operator, we can derive the analytical solutions of the forward and backward SDEs as well as the associated flow ODE. This provides exact expressions for various Wasserstein errors which enable us to compare the influence of each error type for any sampling scheme, thus allowing to monitor convergence directly in the data space instead of relying on Inception features. Our experiments show that the recommended numerical schemes from the diffusion models literature are also the best sampling schemes for Gaussian distributions.
翻译:扩散模型或基于分数的模型近期在图像生成中展现出卓越性能。其理论基础依赖于前向与后向随机微分方程。数据分布的采样通过数值求解后向随机微分方程或其对应的流常微分方程实现。研究此类模型的收敛性需控制四类误差:初始化误差、截断误差、离散化误差与分数近似误差。本文从理论上研究了当数据分布为高斯分布时扩散模型及其数值实现的行为。在此分数函数为线性算子的受限框架下,我们推导了前向与后向随机微分方程以及对应流常微分方程的解析解。这为各类Wasserstein误差提供了精确表达式,使我们能够比较任意采样方案中各类误差的影响,从而直接在数据空间中监控收敛性,而无需依赖Inception特征。实验表明,扩散模型文献中推荐的数值方案同样是高斯分布下的最优采样方案。