学习阅读扩散Transformer中的上下文词元

·

研究论文 · 2026/10/07

多模态扩散Transformer(MM-DiT)在生成过程中联合处理视觉和文本表示,并通过多模态注意力反复更新文本token,形成动态上下文token,其功能尚不明确。本文提出一个通过自然语言询问来解读该上下文空间的框架。我们训练一个轻量级瓶颈网络,将中间上下文token映射到冻结的大语言模型(LLM)的输入空间,使LLM能够直接从这些隐藏表示中回答关于正在生成的图像的问题。我们的解读器揭示,上下文token编码了正在生成的场景的丰富全局表示:生成特定的语义(包括提示中未充分指定的属性)在去噪早期就令人惊讶地可访问,而越来越细粒度的细节随时间变得可读。值得注意的是,即使MM-DiT接收空提示,这些信息仍可解码,表明上下文token从演变的视觉表示本身积累了大量的图像特定信息。我们进一步发现,具有更可读上下文表示的生成往往获得更高的人类偏好分数。基于这些观察,我们引入上下文对齐(Contextual Alignment),一种显式强化上下文token中编码的视觉语义信息的训练技术,提高了生成质量和分布覆盖。总之,我们的结果确立了上下文token既是MM-DiT内部动态的可解释视图,也是改进生成模型的有效目标。

该研究首次系统解读了多模态扩散Transformer中上下文token的语义内容,揭示了其编码丰富场景信息的能力,并提出了基于此的改进生成模型的方法,对理解扩散模型内部机制和提升生成质量具有重要价值。

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.

阅读原文

参与讨论