arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2303.08084cs.CV
收藏

编辑文本到图像扩散模型中的隐含假设

Editing Implicit Assumptions in Text-to-Image Diffusion Models

Technion(以色列理工学院)

Hadas Orgad, Bahjat Kawar, Yonatan Belinkov

AI总结:

针对文本到图像扩散模型的隐含假设存在偏差等问题,提出高效编辑方法TIME,通过修改交叉注意力层投影矩阵编辑假设,构建TIMED数据集验证,该方法泛化性好且对无关生成影响小。

摘要:

文本到图像扩散模型在生成图像时通常会对世界做出隐含假设。尽管部分假设是有用的(例如天空是蓝色的),但它们也可能过时、不正确,或是反映了训练数据中存在的社会偏见。因此,需要在无需明确用户输入或昂贵重训练的前提下管控这些假设。在本研究中,我们旨在编辑预训练扩散模型中的给定隐含假设。我们的文本到图像模型编辑方法(简称TIME)接收一对输入:一个模型会对其做出隐含假设的“源”欠指定提示(例如“一包玫瑰”),以及一个描述相同场景但带有指定期望属性的“目标”提示(例如“一包蓝色玫瑰”)。随后TIME会更新模型的交叉注意力层,因为这些层为文本标记赋予视觉含义。我们编辑这些层中的投影矩阵,使源提示的投影位置接近目标提示。我们的方法效率极高,仅修改模型2.2%的参数,耗时不到一秒。为评估模型编辑方法,我们推出了TIMED(TIME数据集),包含来自不同领域的147组源提示与目标提示对。我们(使用Stable Diffusion开展)的实验表明,TIME在模型编辑方面表现出色,对编辑过程中未见过的相关提示具有良好的泛化能力,且对不相关生成的影响极小。

英文摘要:

Text-to-image diffusion models often make implicit assumptions about the world when generating images. While some assumptions are useful (e.g., the sky is blue), they can also be outdated, incorrect, or reflective of social biases present in the training data. Thus, there is a need to control these assumptions without requiring explicit user input or costly re-training. In this work, we aim to edit a given implicit assumption in a pre-trained diffusion model. Our Text-to-Image Model Editing method, TIME for short, receives a pair of inputs: a "source" under-specified prompt for which the model makes an implicit assumption (e.g., "a pack of roses"), and a "destination" prompt that describes the same setting, but with a specified desired attribute (e.g., "a pack of blue roses"). TIME then updates the model's cross-attention layers, as these layers assign visual meaning to textual tokens. We edit the projection matrices in these layers such that the source prompt is projected close to the destination prompt. Our method is highly efficient, as it modifies a mere 2.2% of the model's parameters in under one second. To evaluate model editing approaches, we introduce TIMED (TIME Dataset), containing 147 source and destination prompt pairs from various domains. Our experiments (using Stable Diffusion) show that TIME is successful in model editing, generalizes well for related prompts unseen during editing, and imposes minimal effect on unrelated generations.

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

↑