The year/Independent research

Paper 2607.19139

Text Template Tokens Are Implicit Semantic Registers in Diffusion Transformers

Published
Jul 2026
Research lab
Independent
Citations
0
GitHub
9 stars

01 In brief

Summary

The paper investigates how text-to-image diffusion transformers (DiTs) incorporate text semantics, focusing on chat-template tokens introduced by LLM-based text encoders.

Using a causal interpretability framework on Qwen-Image models, the authors find that template tokens, despite carrying little prompt-specific information, become dominant attention sinks and act as implicit semantic registers that maintain object identity.

Semantics are transferred indirectly: the first block injects prompt semantics into image latents, and the second block allows template tokens to read this information from the image stream.

The analysis reveals a division of labor across heads and depth: register heads preserve identity, rendering heads handle visual structure, and identity is committed early, carried in middle blocks, and refined late.

This understanding leads to a training-free pruning rule that removes causally inert prompt-reading heads, cutting 20% of joint-attention FLOPs with only a 1.4-point drop in GenEval accuracy.

The findings challenge the direct-injection view of text conditioning in DiTs.

02 From the paper

Abstract

Modern text-to-image diffusion transformers (DiTs) generate images through joint attention, in which text and image tokens interact directly within a single sequence. In large-scale DiTs, the conditioning input contains not only the user prompt but also chat-template tokens introduced by LLM-based text encoders. Yet how these tokens participate in the denoising computation remains poorly understood. To probe this, we introduce a causal interpretability framework. Using it to separate prompt-content tokens from chat-template tokens, we find that the template 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. Rather than reading the prompt tokens, they draw the identity from the image latents into which the prompt semantics have already been injected at the very first layer. We further reveal a division of labor across heads and depth in DiTs, where distinct heads route semantics or render visual structure, and identity is committed in early blocks, carried by middle blocks, and refined in late ones. As a practical payoff, this analysis yields a training-free pruning rule that removes the causally inert prompt-reading heads and cuts $20\%$ of joint-attention FLOPs at a $1.4$-point cost in GenEval accuracy. Overall, our work not only reveals that the tokens encoding semantics at the input need not be those that maintain them during generation, but also provides a causal view of internal mechanisms in diffusion transformers.