atlas

Research map / Image generation / Text-to-image diffusion

Localizing and Editing Knowledge In Text-to-Image Generative Models

ICLR 2024 · Image generation › Text-to-image diffusion · approach: Compositional text-to-image guidance · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Adapts causal mediation analysis to Stable Diffusion to locate where visual-attribute knowledge is stored, finds a single causal state in the CLIP text-encoder, and uses it for Diff-QuickFix, a data-free closed-form concept-editing method that runs in under a second.

Problem

Where knowledge about visual attributes (style, objects, color, action) is stored inside text-to-image diffusion models, and how this localization can be used for fast concept editing.

Approach

Adapts causal tracing to text-to-image diffusion by corrupting subject token embeddings and restoring single layers from a clean model, measuring CLIP-Score; finds knowledge is distributed across UNet layers but localized to the first text-encoder self-attention layer, and edits that layer's W_out with a closed-form least-squares update.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Diff-QuickFix to update stale knowledgeStable-Diffusion v1.4 · Stale knowledge update (incorrect fact)CLIP-Score: 0.28 to 0.23Helped
Use Diff-QuickFix to update stale knowledgeStable-Diffusion v1.4 · Stale knowledge update (correct fact)CLIP-Score: 0.22 to 0.29Helped
Ablate 50 artistic styles with Diff-QuickFixStable-Diffusion v1.4 · Removing 50 artistic stylesCLIP-Score: 0.29 to 0.21Helped
Edit the sole causal text-encoder layer (self-attn-0) rather than a non-causal layer (ablation)Diff-QuickFix on Stable-Diffusion · Style, object, and fact editsCLIP-Score with the original attributeHelped
Edit non-causal text-encoder layers instead of the causal layer (ablation)Diff-QuickFix on Stable-Diffusion · Style, object, and fact editsCLIP-Score with the original attributeNo clear effect
Restore down-1-resnet-1 in the UNet (ablation)Stable-Diffusion causal tracing · Objectscaption fidelityHelped
Restore mid-block cross-attention in the UNet (ablation)Stable-Diffusion causal tracing · Actioncaption fidelityHelped
Restore down-blocks.1.attentions.0.transformer-blocks.0.ff in the UNet (ablation)Stable-Diffusion causal tracing · Colorcaption fidelityHelped
Restore the first self-attention layer in the UNet (ablation)Stable-Diffusion causal tracing · Stylecaption fidelityHelped
Restore down-blocks.0.attentions.0.transformer-blocks.0.attn2 in the UNet (ablation)Stable-Diffusion causal tracing · Objectscaption fidelityNo clear effect
Restore down-blocks.2.attentions.1.transformer-blocks.0.attn2 in the UNet (ablation)Stable-Diffusion causal tracing · Action and stylecaption fidelityNo clear effect
Restore the first self-attention layer for the last subject token in the text-encoder (ablation)Stable-Diffusion causal tracing · Visual attributescaption fidelityHelped

Surprising findings

Limitations

Experimental setup

Datasets: Probe dataset of captions for objects, style, color, action (constructed by authors) Concept-Ablation prompt dataset

Benchmarks: Authors' probe dataset of attribute captions

Metrics: CLIP-Score

Baselines: Concept-Ablation Concept-Erasure TIME Original Stable-Diffusion

Builds on: Causal Tracing (ROME) Concept Ablation Concept Erasure

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy