跳到正文
arXiv (AI + Vision + Imaging)· Zhiling Zhou, Jiachun Pan, Fengzhuo Zhang, Dirk Bergemann, Zhuoran Yang·· 1 天前AI 评分28

解析自回归图像生成中的无分类器引导(CFG)机制

Demystifying Classifier-Free Guidance for Auto-Regressive Image Generation

AI 导读

研究通过实证与理论分析揭示,自回归图像生成中CFG的条件与无条件logits差异主要编码纹理信息,而两者共享的前序token重复语义会掩盖纹理,导致仅用条件logits贪心解码生成近乎纯色图像。

正文 · 原文

arXiv:2611.29002v1 Announce Type: new Abstract: Classifier-free guidance (CFG) has been widely adopted in autoregressive (AR) models for high-quality image generation. Despite its strong empirical performance, its mechanism in AR models remains unclear. This paper demystifies the mechanism of CFG through both empirical and theoretical studies. By examining the top-ranked semantics of different components in CFG, we show that texture information is primarily encoded in the difference between the conditional and unconditional logits, whereas both logits share previous-token repetition as their leading semantics. This strong repetition semantics obscures the desired texture information, causing greedy decoding from the conditional logits alone to produce nearly pure-color images. Through a training-dynamics analysis of shallow transformers, we prove that this shared repetition semantics does not arise from limitations or failures of pretraining, but instead originates from the texture sparsity of images. We further show that CFG improves generation quality by rectifying this repetition bias during inference. Motivated by the shared semantics between conditional and unconditional logits, we propose Attention Weight Reuse (AttnReuse), which reuses intermediate attention computations from the conditional-logit forward pass to accelerate the unconditional-logit computation. AttnReuse reduces about $25\%$ of attention computation with little performance degradation across different models.

来源:arXiv (AI + Vision + Imaging) · arxiv.org