探究自注意力如何让扩散模型生成更连贯的创意图像。
Origins of Creativity in Attention-Based Diffusion Models
- 用带自注意力的CNN建模扩散过程中的得分函数。
- 实验证明自注意力使生成图像在全局上更一致,而非局部拼贴。
- 适合对生成模型机制感兴趣的科研人员阅读。
随着扩散模型成为图像生成的主流工具且生成质量持续提升,其生成图像中‘创意’的来源问题愈发重要。从得分匹配的角度看,扩散模型能生成与训练样本显著不同但依然合理的新图像。理论上,若得分匹配完美,仅能恢复训练样本;然而,当得分由简单CNN参数化时,其归纳偏置(如平移等变性与局部性)导致生成图像呈现非全局匹配、仅局部一致的‘拼贴’特征。但该理论尚未涵盖自注意力的作用。本文首次探索自注意力在扩散模型中的影响,研究对象为末尾含自注意力层的CNN。理论表明,自注意力将促进生成图像在全局层面整合局部特征,实现更高的一致性。我们通过精心设计的数据集进行了实证验证。
原文摘要 · Abstract (English)
As diffusion models have become the tool of choice for image generation and as the quality of the images continues to improve, the question of how `creativity' originates in diffusion has become increasingly important. The score matching perspective on diffusion has proven particularly fruitful for understanding how and why diffusion models generate images that remain plausible while differing significantly from their training images. In particular, as explained in (Kamb \& Ganguli, 2024) and others, e.g., (Ambrogioni, 2023), theory suggests that if our score matching were optimal, we would only be able to recover training samples through our diffusion process. However, as shown by Kamb \& Ganguli, (2024), in diffusion models where the score is parametrized by a simple CNN, the inductive biases of the CNN itself (translation equivariance and locality) allow the model to generate samples that globally do not match any training samples, but are rather patch-wise `mosaics'. Notably, however, this theory does not extend to describe the role of self-attention in this process. In this work, we take a preliminary step in this direction to extend this theory to the case of diffusion models whose score is parametrized by a CNN with a final self-attention layer. We show that our theory suggests that self-attention will induce a globally image-consistent arrangement of local features beyond the patch-level in generated samples, and we verify this behavior empirically on a carefully crafted dataset.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。