atlas

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

Precise Parameter Localization for Textual Generation in Diffusion Models

ICLR 2025 · Image generation › Text-to-image diffusion · approach: Compositional text-to-image guidance · 0 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.

Localizes the few cross/joint attention layers (<1% of parameters) that control visual text generation in diffusion models via activation patching, then uses them for LoRA fine-tuning, text editing, and cost-free toxic text prevention.

Problem

Diffusion models render high-quality text in images, but it is unclear which internal components control textual content; this matters for improving text generation, editing text in images, and preventing toxic text generation.

Approach

Activation patching of text keys and values from a target prompt into individual cross/joint attention layers of a source-prompt generation identifies a tiny set of layers (1-3 layers) that determine the rendered text; these layers are then used for targeted LoRA fine-tuning, image text editing, and substituting toxic words on the fly.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Fine-tune LoRA on localized attention layers rather than all cross-attention layersSDXL · Text generation fine-tuningOCR F1Helped
Patch the target prompt into localized layers instead of using P2PSDXL · SimpleBench and CreativeBenchOCR F1: 0.29 -> 0.43; 0.26 -> 0.33Helped
Patch localized layers instead of P2P*SD3 · SimpleBenchOCR F1: 0.90 -> 0.68Hurt
Patch localized layers instead of P2P*SD3 · CreativeBenchOCR F1: 0.66 -> 0.39Hurt
Patch from timestep t_s=48 instead of t_s=50 (ablation)DeepFloyd IF · SimpleBenchOCR F1: 0.70 -> 0.70No clear effect
Increase injected layers from 1 to 2 (ablation)SDXL text editing · SDXL text editingOCR F1 (Text_T): 0.20 -> 0.30Helped
Increase injected layers from 3 to 70 (ablation)SDXL text editing · SDXL text editingSSIM: 0.90 -> 0.72Hurt
Increase injected layers from 3 to 70 (ablation)SDXL text editing · SDXL text editingOCR F1 (Text_T): 0.32 -> 0.34Helped
Fine-tune LoRA on the localized three layers rather than other sets of three layers (ablation)SDXL · Text generation fine-tuningOCR F1Helped
Replace toxic text only in localized layers rather than swapping the prompt for the whole modelSDXL · Toxic text preventionMSE: 79.41 -> 48.20Helped
Replace toxic text only in localized layers rather than swapping the prompt for the whole modelSDXL · Toxic text preventionToxicity score: 0.000 -> 0.003Hurt
Patch the target prompt from a later diffusion timestep (ablation)SDXL, DeepFloyd IF, and SD3 · Text editingImage and text alignmentHelped

Surprising findings

Limitations

Experimental setup

Datasets: MARIO-LAION 10M SimpleBench CreativeBench GlyphDraw prompts Wikipedia keyword pool toxic word list

Benchmarks: SimpleBench CreativeBench

Metrics: OCR F1 CLIP-T Levenshtein distance MSE SSIM PSNR precision recall toxicity score execution time

Baselines: Prompt-to-Prompt (P2P) P2P* LoRA on all cross-attention layers Negative prompt Safe Diffusion Prompt Swap

Builds on: activation patching prompt-to-prompt LoRA Safe Diffusion

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