arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.06381cs.CV

增强文本到图像合成中的语义保真度:扩散模型中的注意力调控

Enhancing Semantic Fidelity in Text-to-Image Synthesis: Attention Regulation in Diffusion Models

National University of Singapore(新加坡国立大学)

Yang Zhang, Teoh Tze Tzun, Lim Wei Hern, Tiviatis Sim, Kenji Kawaguchi

AI总结:

针对扩散模型交叉注意力过度集中于少数 token 导致语义失真的问题,提出无需训练、可即插即用的推理期注意力调控方法,在多数据集和模型上以更低开销提升文本-图像语义一致性。

摘要:

扩散模型的最新进展显著提升了文本到图像合成任务中生成图像的感知质量。然而,扩散模型往往难以生成能够准确反映相关文本提示预期语义的图像。我们考察了扩散模型中的交叉注意力层,并观察到这些层在生成过程中倾向于不成比例地关注某些 token,从而损害语义保真度。为解决主导注意力问题,我们提出了 attention regulation(注意力调控),这是一种在推理时进行的计算高效的即时优化方法,用于使注意力图与输入文本提示对齐。值得注意的是,我们的方法不需要额外训练或微调,并且可作为模型上的即插即用模块。因此,原始模型的生成能力得到完整保留。我们在多个数据集、评估指标和扩散模型上将该方法与替代方法进行了比较。实验结果表明,我们的方法始终优于其他基线,生成的图像能更忠实地反映所需概念,同时降低计算开销。代码可在 https://github.com/YaNgZhAnG-V5/attention_regulation 获取。

英文摘要:

Recent advancements in diffusion models have notably improved the perceptual quality of generated images in text-to-image synthesis tasks. However, diffusion models often struggle to produce images that accurately reflect the intended semantics of the associated text prompts. We examine cross-attention layers in diffusion models and observe a propensity for these layers to disproportionately focus on certain tokens during the generation process, thereby undermining semantic fidelity. To address the issue of dominant attention, we introduce attention regulation, a computation-efficient on-the-fly optimization approach at inference time to align attention maps with the input text prompt. Notably, our method requires no additional training or fine-tuning and serves as a plug-in module on a model. Hence, the generation capacity of the original model is fully preserved. We compare our approach with alternative approaches across various datasets, evaluation metrics, and diffusion models. Experiment results show that our method consistently outperforms other baselines, yielding images that more faithfully reflect the desired concepts with reduced computation overhead. Code is available at https://github.com/YaNgZhAnG-V5/attention_regulation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑