Lune

ICLR2024Top-tier venue

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

Samyadeep Basu, Nanxuan Zhao, Vlad I. Morariu, Soheil Feizi, Varun Manjunatha

Abstract

Text-to-Image Diffusion Models such as Stable-Diffusion and Imagen have achieved unprecedented quality of photorealism with state-of-the-art FID scores on MS-COCO and other generation benchmarks. Given a caption, image generation requires fine-grained knowledge about attributes such as object structure, style, and viewpoint amongst others. Where does this information reside in textto-image generative models? In our paper, we tackle this question and understand how knowledge corresponding to distinct visual attributes is stored in large-scale text-to-image diffusion models. We adapt Causal Mediation Analysis for textto-image models and trace knowledge about distinct visual attributes to various (causal) components in the (i) UNet and (ii) text-encoder of the diffusion model. In particular, we show that unlike generative large-language models, knowledge about different attributes is not localized in isolated components, but is instead distributed amongst a set of components in the conditional UNet. These sets of components are often distinct for different visual attributes (e.g., style / objects). Remarkably, we find that the CLIP text-encoder in public text-to-image models such as Stable-Diffusion contains only one causal state across different visual attributes, and this is the first self-attention layer corresponding to the last subject token of the attribute in the caption. This is in stark contrast to the causal states in other language models which are often the mid-MLP layers. Based on this observation of only one causal state in the text-encoder, we introduce a fast, data-free model editing method DIFF-QUICKFIX which can effectively edit concepts (remove or update knowledge) in text-to-image models. DIFF-QUICKFIX can edit (ablate) concepts in under a second with a closed-form update, providing a significant 1000x speedup and comparable editing performance to existing fine-tuning based editing methods.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

23 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TRCE: Towards Reliable Malicious Concept Erasure in Text-to-Image Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • TRCE: Towards Reliable Malicious Concept Erasure in Text-to-Image Diffusion Models cites Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models
  • TRCE: Towards Reliable Malicious Concept Erasure in Text-to-Image Diffusion Models cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Zero-Shot Text-to-Image Generation
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Implicit Models
  • On Mechanistic Knowledge Localization in Text-to-Image Generative Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • On Mechanistic Knowledge Localization in Text-to-Image Generative Models cites Zero-Shot Text-to-Image Generation
  • On Mechanistic Knowledge Localization in Text-to-Image Generative Models cites Denoising Diffusion Implicit Models
  • Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • MACE: Mass Concept Erasure in Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • MACE: Mass Concept Erasure in Diffusion Models cites Denoising Diffusion Implicit Models
  • MACE: Mass Concept Erasure in Diffusion Models cites Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
  • Understanding Information Storage and Transfer in Multi-Modal Large Language Models cites Locating and Editing Factual Associations in GPT
  • Understanding Information Storage and Transfer in Multi-Modal Large Language Models cites On Mechanistic Knowledge Localization in Text-to-Image Generative Models
  • Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Zero-Shot Text-to-Image Generation
  • Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding cites Denoising Diffusion Implicit Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers23

  1. Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion ModelsYimeng Zhang, Xin Chen, Jinghan Jia, Yihua Zhang et al.NeurIPS 2024 · 200 citations
  2. Understanding Information Storage and Transfer in Multi-Modal Large Language ModelsSamyadeep Basu, Martin Grayson, Cecily Morrison, Besmira Nushi et al.NeurIPS 2024 · 57 citations
  3. MACE: Mass Concept Erasure in Diffusion ModelsShilin Lu, Zilan Wang, Leyang Li, Yanzhu Liu et al.CVPR 2024 · 40 citations
  4. On Mechanistic Knowledge Localization in Text-to-Image Generative ModelsSamyadeep Basu, Keivan Rezaei, Priyatham Kattakinda, Vlad I. Morariu et al.ICML 2024 · 30 citations
  5. TRCE: Towards Reliable Malicious Concept Erasure in Text-to-Image Diffusion ModelsRuidong Chen, Honglin Guo, Lanjun Wang, Chenyu Zhang et al.ICCV 2025 · 17 citations

Builds on16

  1. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  2. Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
  3. Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li et al.NeurIPS 2022 · 8,965 citations
  4. Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
  5. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations

Related papers

  1. Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image EditingKai Wang, Fei Yang, Shiqi Yang, Muhammad Atif Butt et al.NeurIPS 2023 · 108 citations
  2. Pioneering Reliable Assessment in Text-to-Image Knowledge Editing: Leveraging a Fine-Grained Dataset and an Innovative CriterionHengrui Gu, Kaixiong Zhou, Yili Wang, Ruobing Wang et al.EMNLP Findings 2024
  3. Prompt Tuning Inversion for Text-Driven Image Editing Using Diffusion ModelsWenkai Dong, Song Xue, Xiaoyue Duan, Shumin HanICCV 2023 · 104 citations
  4. Text-to-Image Diffusion Models are Zero Shot ClassifiersKevin Clark, Priyank JainiNeurIPS 2023 · 192 citations
  5. Training-Free Structured Diffusion Guidance for Compositional Text-to-Image SynthesisWeixi Feng, Xuehai He, Tsu-Jui Fu, Varun Jampani et al.ICLR 2023 · 70 citations
Dusk over the sea between two cliffs drawn in fine vertical lines