Padding Tone:T2I模型中填充词元的机制分析
Padding Tone: A Mechanistic Analysis of Padding Tokens in T2I Models
AI总结:
本文首次深入分析了T2I模型中填充词元的作用,开发了两种因果技术揭示其影响图像生成的三种场景,并指出这些场景与模型架构及文本编码器训练状态的关键关系。
摘要:
文本到图像(T2I)扩散模型依赖编码后的提示词来引导图像生成过程。通常,这些提示词会通过添加填充词元在文本编码前扩展到固定长度。尽管这是一种默认做法,但填充词元对图像生成过程的影响尚未得到研究。在这项工作中,我们对填充词元在T2I模型中扮演的角色进行了首次深入分析。我们开发了两种因果技术,用于分析信息如何在T2I流水线的不同组件中的词元表示里被编码。利用这些技术,我们研究了填充词元何时以及如何影响图像生成过程。我们的发现揭示了三种不同场景:填充词元可能在文本编码期间、在扩散过程中影响模型输出,或者被有效忽略。此外,我们识别出这些场景与模型架构(交叉注意力或自注意力)及其训练过程(冻结或训练文本编码器)之间的关键关系。这些见解有助于更深入地理解填充词元的机制,可能为T2I系统未来的模型设计和训练实践提供参考。
英文摘要:
Text-to-image (T2I) diffusion models rely on encoded prompts to guide the image generation process. Typically, these prompts are extended to a fixed length by adding padding tokens before text encoding. Despite being a default practice, the influence of padding tokens on the image generation process has not been investigated. In this work, we conduct the first in-depth analysis of the role padding tokens play in T2I models. We develop two causal techniques to analyze how information is encoded in the representation of tokens across different components of the T2I pipeline. Using these techniques, we investigate when and how padding tokens impact the image generation process. Our findings reveal three distinct scenarios: padding tokens may affect the model's output during text encoding, during the diffusion process, or be effectively ignored. Moreover, we identify key relationships between these scenarios and the model's architecture (cross or self-attention) and its training process (frozen or trained text encoder). These insights contribute to a deeper understanding of the mechanisms of padding tokens, potentially informing future model design and training practices in T2I systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。