[论文解读] MDTv2: Masked Diffusion Transformer is a Strong Image Synthesizer
本文提出掩码扩散Transformer(MDT),一种新颖的扩散模型,通过在潜在空间中使用非对称Transformer架构对图像标记进行掩码和重建,从而增强上下文推理能力。MDT在ImageNet上实现了最先进(SoTA)的FID分数,且训练速度比DiT快约3倍,这是通过显式建模语义部分关系实现的。
Despite its success in image synthesis, we observe that diffusion probabilistic models (DPMs) often lack contextual reasoning ability to learn the relations among object parts in an image, leading to a slow learning process. To solve this issue, we propose a Masked Diffusion Transformer (MDT) that introduces a mask latent modeling scheme to explicitly enhance the DPMs' ability to contextual relation learning among object semantic parts in an image. During training, MDT operates in the latent space to mask certain tokens. Then, an asymmetric diffusion transformer is designed to predict masked tokens from unmasked ones while maintaining the diffusion generation process. Our MDT can reconstruct the full information of an image from its incomplete contextual input, thus enabling it to learn the associated relations among image tokens. We further improve MDT with a more efficient macro network structure and training strategy, named MDTv2. Experimental results show that MDTv2 achieves superior image synthesis performance, e.g., a new SOTA FID score of 1.58 on the ImageNet dataset, and has more than 10x faster learning speed than the previous SOTA DiT. The source code is released at https://github.com/sail-sg/MDT.
研究动机与目标
- 为解决扩散模型因图像中语义部分关系学习不足而导致的训练收敛缓慢问题。
- 通过显式建模对象各部分之间的关系,提升扩散概率模型中的上下文推理能力。
- 通过一种新颖的掩码潜在建模方案,在不牺牲生成质量的前提下加速训练速度。
- 设计统一的训练-推理框架,在保持一致性的同时支持掩码重建。
- 证明潜在空间中的掩码重建可同时提升生成样本质量与训练效率。
提出的方法
- MDT在潜在空间中运行,训练时对部分标记进行掩码,强制模型学习上下文依赖关系。
- 设计了一种非对称掩码扩散Transformer(AMDT),包含编码器、侧向插值器和解码器,用于从未掩码标记中预测掩码标记。
- 训练时编码器仅处理未掩码标记,推理时则处理所有标记,确保输出一致性。
- 侧向插值器为轻量化网络,在训练时从编码器输出预测掩码标记,推理时被移除。
- 在侧向插值器和主干模块中引入位置嵌入与相对位置偏置,以增强空间感知能力。
- 模型在掩码和未掩码标记上均计算损失,确保高保真图像生成的补丁级一致性。
实验结果
研究问题
- RQ1掩码潜在建模能否改善扩散模型中语义部分关系的学习?
- RQ2使用掩码重建训练是否能实现更快收敛与更优的样本质量?
- RQ3侧向插值器的放置位置与设计对性能与训练效率有何影响?
- RQ4位置编码与相对偏置对掩码重建性能有何影响?
- RQ5统一的训练与推理方案能否在加速训练的同时保持高质量生成?
主要发现
- MDT在ImageNet上实现了新的最先进FID分数,优于以往的SoTA模型。
- MDT的训练速度比DiT快约3倍,在更少的训练步数内达到更优性能。
- 在所有标记(掩码与未掩码)上计算损失,其FID显著优于仅使用掩码标记的损失。
- 侧向插值器使FID提升1.34分,证明其在保持输入一致性方面的有效性。
- 将侧向插值器置于最后两个模块之前时性能最佳,表明该位置为架构设计的最优选择。
- 在Transformer模块中引入相对位置偏置后,FID从53.56降至50.26,证明其在上下文建模中的关键作用。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。