Diffusion models have impressive image generation capability, but low-quality generations still exist, and their identification remains challenging due to the lack of a proper sample-wise metric. To address this, we propose BayesDiff, a pixel-wise uncertainty estimator for generations from diffusion models based on Bayesian inference. In particular, we derive a novel uncertainty iteration principle to characterize the uncertainty dynamics in diffusion, and leverage the last-layer Laplace approximation for efficient Bayesian inference. The estimated pixel-wise uncertainty can not only be aggregated into a sample-wise metric to filter out low-fidelity images but also aids in augmenting successful generations and rectifying artifacts in failed generations in text-to-image tasks. Extensive experiments demonstrate the efficacy of BayesDiff and its promise for practical applications.
翻译:摘要:扩散模型具有强大的图像生成能力,但低质量生成样本仍然存在,且由于缺乏合适的逐样本评估指标,其识别仍具有挑战性。为解决这一问题,我们提出贝叶斯扩散——一种基于贝叶斯推断的扩散模型生成样本逐像素不确定性估计器。具体而言,我们推导出新的不确定性迭代原理以刻画扩散过程中的不确定性动态,并利用最后一层拉普拉斯近似实现高效贝叶斯推断。所估计的逐像素不确定性不仅可聚合为逐样本指标以过滤低保真图像,还能在文生图任务中辅助增强成功生成的图像、修复失败生成的伪影。大量实验验证了贝叶斯扩散的有效性及其在实际应用中的潜力。