Diffusion Lens: Interpreting Text Encoders in Text-to-Image Pipelines

Michael Toker, Hadas Orgad, Mor Ventura, Dana Arad, Yonatan Belinkov
3/9/2024
cs.CVcs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Text-to-image diffusion models (T2I) use a latent representation of a text prompt to guide the image generation process. However, the process by which the encoder produces the text representation is unknown. We propose the Diffusion Lens, a method for analyzing the text encoder of T2I models by generating images from its intermediate representations. Using the Diffusion Lens, we perform an extensive analysis of two recent T2I models. Exploring compound prompts, we find that complex scenes describing multiple objects are composed progressively and more slowly compared to simple scenes; Exploring knowledge retrieval, we find that representation of uncommon concepts requires further computation compared to common concepts, and that knowledge retrieval is gradual across layers. Overall, our findings provide valuable insights into the text encoder component in T2I pipelines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{toker2024diffusion,
  title  = {Diffusion Lens: Interpreting Text Encoders in Text-to-Image Pipelines},
  author = {Michael Toker and Hadas Orgad and Mor Ventura and Dana Arad and Yonatan Belinkov},
  year   = {2024},
  eprint = {2403.05846},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.05846v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.05846.svg)](https://codeofpaper.com/paper/2403.05846)

Discussion