Follow the Flow: On Information Flow Across Textual Tokens in Text-to-Image Models

Guy Kaplan, Michael Toker, Yuval Reif, Yonatan Belinkov, Roy Schwartz
4/1/2025
cs.CL

No official code found. Best implementation: tokeron/lens (2 stars, last commit 2026-04-08).

Abstract

Text-to-image (T2I) models generate images by encoding text prompts into token representations, which then guide the diffusion process. While prior work has largely focused on improving alignment by refining the diffusion process, we focus on the textual encoding stage. Specifically, we investigate how semantic information is distributed across token representations within and between lexical items (i.e., words or expressions conveying a single concept) in the prompt. We analyze information flow at two levels: (1) in-item representation-whether individual tokens represent their lexical item, and (2) cross-item interaction-whether information flows across the tokens of different lexical items. We use patching techniques to uncover surprising encoding patterns. We find information is usually concentrated in only one or two of the item's tokens-For example, in the item "San Francisco's Golden Gate Bridge", the token "Gate" sufficiently captures the entire expression while the other tokens could effectively be discarded. Lexical items also tend to remain isolated; for instance, the token "dog" encodes no visual information about "green" in the prompt "a green dog". However, in some cases, items do influence each other's representation, often leading to misinterpretations-e.g., in the prompt "a pool by a table", the token pool represents a pool table after contextualization. Our findings highlight the critical role of token-level encoding in image generation, suggesting that misalignment issues may originate already during the textual encoding.

View on arXivView PDF

Code Implementations(1)

tokeron/lensCommunity100%
20Python, Jupyter NotebookOct 22, 20246 months ago

Similar Papers

Cite this paper

@article{kaplan2025follow,
  title  = {Follow the Flow: On Information Flow Across Textual Tokens in Text-to-Image Models},
  author = {Guy Kaplan and Michael Toker and Yuval Reif and Yonatan Belinkov and Roy Schwartz},
  year   = {2025},
  eprint = {2504.01137},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.01137v2}
}

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/2504.01137.svg)](https://codeofpaper.com/paper/2504.01137)

Discussion