2025-02-17 · 专家 · 计算机视觉

Precise Parameter Localization for Textual Generation in Diffusion Models

该论文提出了一种精确的文本参数定位方法,用于改进扩散模型中的文本生成效率和性能,并展示了其在文本编辑和毒性文本预防方面的应用。

更新于 2025-02-18。作者:Łukasz Staniszewski、Bartosz Cywiński、Franziska Boenisch、Kamil Deja、Adam Dziedzic。

中文摘要

新颖的扩散模型可以合成包含高质量文本的逼真图像。令人惊讶的是,我们通过注意力激活块证明,扩散模型参数中只有不到1%(全部包含在注意力层中)会影响图像中文本内容的生成。基于这一观察结果,我们通过针对扩散模型的交叉注意力层和联合注意力层来提高文本生成效率和性能。我们介绍了几种受益于将负责文本内容生成的层局部化的应用。首先,我们展示了仅对局部化层进行基于LoRA的微调,即使在更大程度上也能增强大型扩散模型的文本生成能力,同时保留扩散模型生成的质量和多样性。然后,我们演示了如何使用局部化层来编辑生成的图像中的文本内容。最后,我们将这一思想扩展到以免费方式防止生成有害文本的实际用例。与之前的工作相比,我们的局部化方法广泛适用于各种扩散模型架构,包括U-Net(例如,LDM和SDXL)和基于Transformer的模型(例如,DeepFloyd IF和Stable Diffusion 3),并利用多种文本编码器(例如,从CLIP到T5等大型语言模型)。项目页面:[https://t2i-text-loc.github.io/](https://t2i-text-loc.github.io/)

英文摘要

Novel diffusion models can synthesize photo-realistic images with integrated high-quality text. Surprisingly, we demonstrate through attention activation patching that only less than 1% of diffusion models' parameters, all contained in attention layers, influence the generation of textual content within the images. Building on this observation, we improve textual generation efficiency and performance by targeting cross and joint attention layers of diffusion models. We introduce several applications that benefit from localizing the layers responsible for textual content generation. We first show that a LoRA-based fine-tuning solely of the localized layers enhances, even more, the general text-generation capabilities of large diffusion models while preserving the quality and diversity of the diffusion models' generations. Then, we demonstrate how we can use the localized layers to edit textual content in generated images. Finally, we extend this idea to the practical use case of preventing the generation of toxic text in a cost-free manner. In contrast to prior work, our localization approach is broadly applicable across various diffusion model architectures, including U-Net (e.g., LDM and SDXL) and transformer-based (e.g., DeepFloyd IF and Stable Diffusion 3), utilizing diverse text encoders (e.g., from CLIP to the large language models like T5). Project page available at https://t2i-text-loc.github.io/.

解读

一句话总结

该论文提出了一种精确的文本参数定位方法,用于改进扩散模型中的文本生成效率和性能,并展示了其在文本编辑和毒性文本预防方面的应用。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源