Diffusion models have made significant advances recently in high-quality image synthesis and related tasks. However, diffusion models trained on real-world datasets, which often follow long-tailed distributions, yield inferior fidelity for tail classes. Deep generative models, including diffusion models, are biased towards classes with abundant training images. To address the observed appearance overlap between synthesized images of rare classes and tail classes, we propose a method based on contrastive learning to minimize the overlap between distributions of synthetic images for different classes. We show variants of our probabilistic contrastive learning method can be applied to any class conditional diffusion model. We show significant improvement in image synthesis using our loss for multiple datasets with long-tailed distribution. Extensive experimental results demonstrate that the proposed method can effectively handle imbalanced data for diffusion-based generation and classification models. Our code and datasets will be publicly available at https://github.com/yanliang3612/DiffROP.
翻译:扩散模型近期在高品质图像合成及相关任务中取得了显著进展。然而,在遵循长尾分布的真实世界数据集上训练的扩散模型,其尾部类别的合成保真度较低。包括扩散模型在内的深度生成模型会偏向于训练样本丰富的类别。针对合成图像中稀有类别与尾部类别之间存在视觉重叠的问题,我们提出了一种基于对比学习的方法,通过最小化不同类别合成图像分布之间的重叠来优化模型。研究表明,概率对比学习方法的变体可应用于任意类别条件扩散模型。我们证明,在多个长尾分布数据集上使用该损失函数能够显著提升图像合成质量。大量实验结果表明,所提方法能有效处理扩散生成模型和分类模型中的不平衡数据问题。我们的代码和数据集将开源发布于 https://github.com/yanliang3612/DiffROP。