NTH

Learning to Read the Contextual Tokens in Diffusion Transformers

AuthorsOmer Dahary, Etai Sella, Hadar Averbuch-Elor, Daniel Cohen-Or, Or Patashnik

AffiliationsTel Aviv University · Cornell University

October 10, 2026 2 min read
Watch on YouTube
The one-line take

The paper teaches an LLM to read what image-generation models are thinking mid-generation, revealing hidden visual semantics and using them to improve diffusion outputs.

Key results

10,000
Reader training generations

Generated images used to train the Contextual Reader.

8%
Unconditional activity decoding

The reader identifies skiing at this point in denoising.

20%
Unconditional detail decoding

The reader identifies goggles at this point in denoising.

4.29
Full-training FID with REPA plus Contextual Alignment

Improves on REPA alone, which scores 4.95.

0.407
Full-training recall with REPA plus Contextual Alignment

Improves on REPA alone, which scores 0.338.

16.75
Fine-tuning FID with Contextual Alignment

Improves on vanilla fine-tuning, which scores 17.18.

What the paper found

This paper shows that the text-side contextual tokens in multimodal diffusion transformers can reveal what an image is becoming, even before those details are clear in the image itself. The researchers train a lightweight Q-Former bottleneck to pass information from intermediate tokens to a frozen Qwen2.5-7B-Instruct language model, which answers questions about generations from Stable Diffusion 3.5 and FLUX.2. On a reader-training set of 10,000 generated images, the system decodes seed-specific details and, with an empty prompt, can identify skiing at 8% of denoising and goggles at 20%. The authors then introduce Contextual Alignment, which uses a learned aligner and SigLIP image embeddings to reinforce global visual semantics in the tokens during training. In full model training, adding this method to REPA lowers FID from 4.95 to 4.29 and raises recall from 0.338 to 0.407. When fine-tuning Stable Diffusion 3 Medium, it lowers FID from 17.18 to 16.75. The findings position contextual tokens both as an early, interpretable readout of a model’s developing image and as a useful target for improving generation quality and coverage.

Original abstract

Multimodal Diffusion Transformers (MM-DiTs) jointly process visual and textual representations throughout generation. These models repeatedly update the text tokens through multimodal attention, forming dynamic contextual tokens whose function is not well understood. In this work, we introduce a framework for reading this contextual space through natural-language interrogation. We train a lightweight bottleneck network that maps intermediate contextual tokens into the input space of a frozen Large Language Model (LLM), allowing the LLM to answer questions about the emerging image directly from these hidden representations. Our reader reveals that contextual tokens encode a rich, global representation of the emerging scene: generation-specific semantics, including attributes left underspecified by the prompt, are accessible surprisingly early in denoising, while increasingly fine-grained details become readable over time. Remarkably, this information remains decodable even when the MM-DiT receives an empty prompt, showing that contextual tokens accumulate substantial image-specific information from the evolving visual representation itself. We further find that generations with more readable contextual representations tend to receive higher human-preference scores. Building on these observations, we introduce Contextual Alignment, a training technique that explicitly reinforces the visual-semantic information encoded in the contextual tokens, improving generation quality and distributional coverage. Together, our results establish contextual tokens as both an interpretable view into the internal dynamics of MM-DiTs and an effective target for improving generative models.

Read the original paper

More in Diffusion Models

Browse all 61 papers →
01Diffusion

ALoDLM: Adaptively Looped Diffusion Language Models

Liancheng Fang, Zhuowei Li, Youngeun Kim, Tianchen Zhao, Rajat Koner, Jiaye Wu, Linghan Xu, Xuanbai Chen, Xiang Xu, Zheng Zhang, Jakub Zablocki, Nishant Sankaran, Yifan Xing

ALoDLM makes diffusion language models smarter and faster by spending extra computation only on tokens that are difficult to predict.

Read analysis