基于扰动注意力引导的自校正扩散采样
Self-Rectifying Diffusion Sampling with Perturbed-Attention Guidance
AI总结:
本文提出扰动注意力引导(PAG),通过扰动自注意力图引导去噪过程远离结构退化样本,无需额外训练即可在无条件和有条件生成及多种下游任务中提升扩散模型样本质量。
摘要:
近期研究表明,扩散模型能够生成高质量样本,但其质量在很大程度上依赖于采样引导技术,例如分类器引导(CG)和无分类器引导(CFG)。这些技术通常无法应用于无条件生成或诸如图像复原等多种下游任务。本文提出了一种新颖的采样引导方法,称为扰动注意力引导(PAG),该方法能够在无条件和有条件两种设置下提升扩散样本质量,且无需额外训练或引入外部模块。PAG 旨在整个去噪过程中逐步增强样本的结构。其具体做法是:利用自注意力机制捕捉结构信息的能力,将扩散 U-Net 中选定的自注意力图替换为单位矩阵,从而生成结构退化的中间样本,并引导去噪过程远离这些退化样本。在 ADM 和 Stable Diffusion 上,PAG 令人惊讶地在有条件甚至无条件场景下均提升了样本质量。此外,在 CG 或 CFG 等现有引导方法无法充分发挥作用的各种下游任务中,PAG 显著提升了基线性能,这些任务包括使用空提示的 ControlNet 以及图像复原任务,如图像修复(inpainting)和去模糊(deblurring)。
英文摘要:
Recent studies have demonstrated that diffusion models are capable of generating high-quality samples, but their quality heavily depends on sampling guidance techniques, such as classifier guidance (CG) and classifier-free guidance (CFG). These techniques are often not applicable in unconditional generation or in various downstream tasks such as image restoration. In this paper, we propose a novel sampling guidance, called Perturbed-Attention Guidance (PAG), which improves diffusion sample quality across both unconditional and conditional settings, achieving this without requiring additional training or the integration of external modules. PAG is designed to progressively enhance the structure of samples throughout the denoising process. It involves generating intermediate samples with degraded structure by substituting selected self-attention maps in diffusion U-Net with an identity matrix, by considering the self-attention mechanisms' ability to capture structural information, and guiding the denoising process away from these degraded samples. In both ADM and Stable Diffusion, PAG surprisingly improves sample quality in conditional and even unconditional scenarios. Moreover, PAG significantly improves the baseline performance in various downstream tasks where existing guidances such as CG or CFG cannot be fully utilized, including ControlNet with empty prompts and image restoration such as inpainting and deblurring.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。