arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.13337cs.CVcs.CL

探索扩散模型与自回归模型中文到图像Transformer的注意力汇

Exploring Attention Sinks in Text-to-Image Transformers from Diffusion and Autoregressive Models

Fudan University(复旦大学);Shanghai Innovation Institute(上海创新研究院);Shanghai Academy of AI for Science(上海人工智能科学研究院)

Binglei Li, Mengping Yang, Zhiyu Tan, Wenxu Qian, Junping Zhang, Hao Li

AI总结:

该研究探索了扩散与自回归T2I Transformer的注意力汇,明确其存在、模式与功能,引入寄存器标记可优化生成性能,为相关机制分析与注意力设计提供依据。

摘要:

注意力汇是指那些持续接收不成比例注意力权重的标记或位置,其程度往往超出它们语义内容所能解释的范围。尽管在大型语言模型中已对注意力汇进行了广泛研究,但它们在文本到图像(T2I)Transformer中的行为和功能相关性仍未得到充分探索。为填补这一空白并更好地理解文本到图像Transformer如何分配和路由注意力,我们在双向扩散模型和因果自回归模型中探索了这一文本到图像Transformer的注意力汇现象。具体而言,我们研究了注意力汇是否存在、出现在何处以及如何在功能上影响生成。通过系统的注意力分析和针对性干预,我们发现注意力汇在双向扩散模型和自回归模型中均会出现,但表现出不同的模式:自回归模型将注意力集中在第一个标记和全局尺度标记上,而双向模型则在模态边界附近、文本区域内以及空间角落处形成注意力汇。此外,这些模式会随生成阶段变化,且仅局限于稀疏的层和头子集。为评估其功能相关性,我们对与注意力汇相关的头和标记位置进行了扰动,结果显示,对注意力汇排名靠前的头进行扰动产生的平均变化大于非注意力汇的对比,而部分注意力汇位置的扰动对双向模型的得分影响有限。我们进一步引入寄存器标记来重新分配注意力汇,发现多种配置可保持或适度提升生成性能。总体而言,注意力汇是一种依赖于架构、推理阶段和组件的现象,为文本到图像Transformer的机制分析和合理注意力设计提供了基础。

英文摘要:

Attention sinks are tokens or positions that consistently receive disproportionate attention mass, often beyond what their semantic content would suggest. Despite extensive study in large language models, their behavior and functional relevance in text-to-image (T2I) Transformers remain largely unexplored. To fill this gap and better understand how text-to-image Transformers allocate and route attention, we explore this phenomenon of text-to-image transformers across bidirectional diffusion models and causal autoregressive models. Specifically, we explore whether attention sinks exist, where they emerge, and how they functionally influence generation. Through systematic attention analysis and targeted interventions, we identify that attention sinks emerge in both bidirectional diffusion and autoregressive models but exhibit distinct patterns. The autoregressive model concentrates attention on the first and global-scale tokens, whereas the bidirectional models develop sinks near modality boundaries, within text regions, and at spatial corners. Moreover, these patterns vary across generation stages and are localized to a sparse subset of layers and heads. To assess their functional relevance, we perturb sink-related heads and token positions. It turns out that perturbing sink-ranked heads produces larger average changes than non-sink comparisons, while some sink-position perturbations have limited effects on bidirectional model scores. We further introduce register tokens to redistribute attention sinks and find that several configurations preserve or modestly improve generation performance. Overall, attention sinks are architecture-, inference-stage-, and component-dependent phenomena, providing a basis for mechanistic analysis and principled attention design in text-to-image transformers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑