[论文解读] Editing Implicit Assumptions in Text-to-Image Diffusion Models
本文提出 TIME(Text-to-Image Model Editing),一种高效方法,通过仅修改模型参数的 2.2%,即可编辑文本到图像扩散模型中的隐式世界假设。该方法通过调整交叉注意力投影矩阵,将源提示(例如 'a pack of roses')与目标提示(例如 'a pack of blue roses')对齐,实现在单张消费级 GPU 上不到一秒内完成快速、无遗忘的编辑,同时保持生成质量并泛化至相关提示。
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.
研究动机与目标
- 解决文本到图像扩散模型因训练数据而学习到错误、过时或有偏见的隐式假设的问题。
- 实现在无需微调、重训练或每生成一次都需显式用户输入的情况下,对这些假设进行编辑。
- 开发一种仅修改极小部分模型参数的方法,同时保持整体生成质量,避免灾难性遗忘。
- 构建一个基准数据集(TIMED),用于在多样化的领域和概念上评估模型编辑性能。
- 确保编辑结果能泛化至相关提示,同时不影响无关生成。
提出的方法
- TIME 修改扩散模型中交叉注意力层的投影矩阵,这些矩阵将文本标记映射到视觉特征。
- 通过计算一个参数更新,使源提示在交叉注意力空间中的嵌入与目标提示的嵌入距离最小化。
- 该方法使用单步优化,并引入一个可学习的超参数 λp,以平衡编辑强度与原始权重保真度。
- 编辑并行应用于所有交叉注意力层,无需微调或数据重新收集。
- 文本编码器保持不变,确保语言理解能力不受影响。
- 该方法计算效率高,仅修改扩散模型 2.2% 的参数,且在消费级 GPU 上可在一秒内完成。
实验结果
研究问题
- RQ1能否在不重训练或微调的情况下,高效编辑文本到图像扩散模型中的隐式假设?
- RQ2该编辑在未在编辑过程中出现过的相关提示上泛化效果如何?
- RQ3该编辑过程是否保持了模型的整体生成质量以及在无关提示上的性能?
- RQ4该方法在缓解社会偏见(如职业描述中的性别刻板印象)方面能有多大程度的改善?
- RQ5该方法在改变特定属性(如玫瑰颜色)时,其行为改变效果如何,同时保持高保真度?
主要发现
- TIME 在 Stable Diffusion 上成功编辑了隐式假设,将刻板印象中男性职业中女性形象的比例从基线的 1.6% 平均降低至 11.2%,且大多数职业的 Δp ≤ 0.15。
- 对于 'nurse' 这一职业,基线中女性占比为 100%,编辑后降至 92.0%,Δp = 0.83 ± 0.05。
- 该方法泛化良好:将 'roses' 编辑为蓝色后,相关提示如 'a field of roses' 现在生成蓝色玫瑰,而无关提示如 'a poppy field' 保持不变。
- 编辑过程极为高效,仅修改模型 2.2% 的参数,且在单张消费级 GPU 上耗时不足一秒。
- FID 分数在编辑后保持稳定,表明图像质量与生成能力未下降。
- 在 TIMED 数据集的 147 组提示对中,该方法实现了显著的偏见缓解,同时对无关生成的影响极小。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。