arXiv:2410.21273cs.CV2024-10被引 8

发现扩散Transformer的泛化依赖局部注意力,强化它能提升小数据下的生成效果。

On Inductive Biases That Enable Generalization of Diffusion Transformers

  • 通过分析注意力机制,发现局部性是DiT模型的关键归纳偏置。
  • 在少样本条件下,引入局部注意力窗口可提升泛化与生成质量。
  • 适合研究扩散模型泛化机制或小数据生成的开发者参考。

近期研究揭示基于UNet的去噪器在扩散模型中存在可通过几何自适应谐波基表达的归纳偏置。然而,当前更先进的去噪网络多采用Transformer结构,如扩散Transformer(DiT)。这引发疑问:Transformer-based去噪器是否也具备类似偏置?令人意外的是,答案是否定的。这一差异促使我们探索支撑DiT良好泛化的归纳偏置。通过分析DiT的核心注意力模块,我们发现注意力图的局部性与泛化能力密切相关。为验证该发现,我们限制了注意力窗口范围,向DiT注入局部注意力,并观察到泛化性能提升。进一步实验表明,局部注意力窗口的位置与有效大小均是关键因素。在CelebA、ImageNet和LSUN数据集上的结果表明,增强DiT的归纳偏置可在训练数据较少时同时提升泛化能力与生成质量。代码将在论文发表后公开。项目页面:dit-generalization.github.io/。

原文摘要 · Abstract (English)

Recent work studying the generalization of diffusion models with UNet-based denoisers reveals inductive biases that can be expressed via geometry-adaptive harmonic bases. However, in practice, more recent denoising networks are often based on transformers, e.g., the diffusion transformer (DiT). This raises the question: do transformer-based denoising networks exhibit inductive biases that can also be expressed via geometry-adaptive harmonic bases? To our surprise, we find that this is not the case. This discrepancy motivates our search for the inductive bias that can lead to good generalization in DiT models. Investigating the pivotal attention modules of a DiT, we find that locality of attention maps are closely associated with generalization. To verify this finding, we modify the generalization of a DiT by restricting its attention windows. We inject local attention windows to a DiT and observe an improvement in generalization. Furthermore, we empirically find that both the placement and the effective attention size of these local attention windows are crucial factors. Experimental results on the CelebA, ImageNet, and LSUN datasets show that strengthening the inductive bias of a DiT can improve both generalization and generation quality when less training data is available. Source code will be released publicly upon paper publication. Project page: dit-generalization.github.io/.

扩散模型Transformer归纳偏置小样本生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。