NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Demystifying Classifier-Free Guidance for Auto-Regressive Image Generation

Zhiling Zhou, Jiachun Pan, Fengzhuo Zhang, Dirk Bergemann, Zhuoran Yang

NeurIPS page · OpenReview · Open on the map

Category: Diffusion & Image Generation › Diffusion and Flow Generation Optimization · Type: new method · Keywords: classifier-free guidance, autoregressive image generation, repetition bias, texture sparsity, attention weight reuse

Areas: Model Architectures & Sequence Modeling › Vision and Generative Architectures › Discrete Image Tokenization; Generative Models (Diffusion & Flows) › Pixel-Space Diffusion › Visual Content Generation

Summary

The paper demystifies classifier-free guidance in autoregressive image generation, revealing that texture information resides in the logit difference and that a repetition bias arises from image texture sparsity, and proposes a technique to reuse attention computations to accelerate unconditional-logit inference.

Explained to a 5-year-old

Computers draw pictures by guessing one piece at a time. A trick called classifier-free guidance helps them guess better. The trick compares two guesses: one that knows what the picture should look like and one that does not. When the computer looks at both guesses, it sees the picture often repeats the same part because real pictures have very little texture. This repetition makes the picture look like solid colors if you only use the guess that knows the picture.

Explained to a 5-year-old, longer

Computers draw pictures by guessing one piece at a time. A trick called classifier-free guidance helps them guess better. The trick works by comparing two guesses: one that knows what the picture should look like and one that does not. When the computer looks at the two guesses, it sees that the picture often repeats the same part because real pictures have very little texture. This repetition makes the picture look like solid colors if you only use the guess that knows the picture. The researchers studied why this happens by looking at how the computer learns. They proved that the repetition comes from the fact that pictures have few texture details, not from a mistake in learning. They also found that using both guesses together fixes the repetition problem and makes pictures nicer. To make the drawing faster, they reuse some of the work the computer already did when it made the guess that knows the picture. This saves about a quarter of the computer’s effort while keeping the picture quality almost the same. The new method helps draw better pictures more quickly, which is useful for anyone who wants to generate images.

For a technical reader

The paper analyzes why classifier-free guidance works in autoregressive image models, showing that texture information is encoded in the difference between conditional and unconditional logits while both share a strong repetition semantics that causes pure-color outputs when using only conditional logits. A training-dynamics study proves this repetition bias stems from image texture sparsity. To speed up inference, the authors reuse attention computations from the conditional-logit pass, cutting about 25% of the work with minimal quality loss.

Problem

The mechanism of classifier-free guidance in autoregressive image generation remains unclear, and the cause of repetition bias that leads to poor texture generation is not understood.

Method

The authors conduct empirical and theoretical analyses of classifier-free guidance, examining semantic components of conditional and unconditional logits and performing a training-dynamics study of shallow transformers to show that repetition semantics stem from texture sparsity. They then propose reusing intermediate attention computations from the conditional-logit forward pass to reduce the cost of the unconditional-logit computation.

Results

The study shows that texture information is encoded in the difference between conditional and unconditional logits, that greedy decoding from conditional logits alone yields nearly pure-color images, and that classifier-free guidance corrects the repetition bias, improving generation quality. The technique that reuses attention computations cuts about 25% of the attention work while keeping performance largely unchanged.

Contributions

The paper provides an empirical and theoretical demystification of classifier-free guidance in autoregressive image generation, uncovering the source of repetition bias and demonstrating how CFG improves quality. It also introduces a technique to reuse attention computations to accelerate inference.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction