Text Template Tokens Are Implicit Semantic Registers in Diffusion Transformers

Maohua Li, Qirui Li, Yanke Zhou, Yiduo Li, Zhaosheng Chi +8 more
7/21/2026
cs.CV

No official code found. Best implementation: Met4physics/DiT-Interpretability (9 stars, last commit 2026-07-22).

Abstract

Text-to-image diffusion transformers (DiTs) jointly process text and image tokens, yet their internal computation during denoising remains poorly understood. We introduce a causal interpretability framework for modern large-scale DiTs that combines attention decomposition with targeted interventions across token spans, heads, and layers. Using it to separate prompt-content tokens from structural template tokens, we find that the structural tokens carry little prompt-specific information at the encoder output. Yet surprisingly, they emerge as dominant image-to-text attention sinks and causally maintain object identity inside the DiT, acting as implicit semantic registers. We show that they acquire this identity indirectly, with prompt semantics first injected into the image latents and then read back into the template tokens rather than transferred directly from the prompt tokens. Inspired by the above findings, we design a training-free pruning rule for DiTs. Heads that attend most strongly to prompt tokens are dispensable, and pruning them removes $20\%$ of attention FLOPs with only a $1.4$-point drop on GenEval. We further reveal how generative computation in DiTs is organized across heads and depth, separating semantic routing from visual synthesis and progressing from identity formation to propagation and refinement. Our work not only reveals that the tokens encoding semantics at input need not be those that maintain it during generation, but also provides a causal view of internal mechanisms in DiTs.

View on arXivView PDF

Code Implementations(1)

Official code for "Text Template Tokens are Implicit Semantic Registers in Diffusion Transformers"

91Jul 6, 20263 months ago

Similar Papers

Cite this paper

@article{li2026text,
  title  = {Text Template Tokens Are Implicit Semantic Registers in Diffusion Transformers},
  author = {Maohua Li and Qirui Li and Yanke Zhou and Yiduo Li and Zhaosheng Chi and Chao Xu and Cuifeng Shen and Yixuan Xu and Hanlin Tang and Kan Liu and Tao Lan and Lin Qu and Shao-Qun Zhang},
  year   = {2026},
  eprint = {2607.19139},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.19139v1}
}

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

Discussion