NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Demystifying Classifier-Free Guidance for Auto-Regressive Image Generation

Zhiling Zhou, Jiachun Pan, Fengzhuo Zhang, Dirk Bergemann, Zhuoran YangNeurIPS 2026

TL;DR

Why do next-token-predicting image generators need Classifier-Free Guidance (CFG) when text models get along just fine without it? This paper discovers that because most of an image is flat, smooth background, autoregressive models naturally learn an overwhelming urge to simply repeat the previous visual token—and CFG saves the day by subtracting out this repetition bias to surface hidden textures. Better yet, because the conditional and unconditional passes share so much of this repetitive behavior, we can recycle attention computations between them to cut attention costs by 25% practically for free.

What Problem Does This Paper Address?

Autoregressive (AR) models—the same "predict-the-next-token" architecture behind modern LLMs—have become fierce competitors to diffusion models in generating images. Instead of words, they predict discrete visual tokens one by one.

However, there is a catch. While LLMs generate coherent essays straight from their learned probabilities, AR image generators lean heavily on Classifier-Free Guidance (CFG) during inference. Originally invented for diffusion models, CFG runs the model twice per token: once with your text prompt (conditional) and once without it (unconditional), extrapolating away from the unconditional prediction to sharpen the result.

This raises three nagging questions: Why does CFG work here when there is no diffusion process to guide? Why do AR models fail at images without CFG when they succeed at text? And do we really have to pay double the compute at inference time?

Methods

The authors tackle this mystery from three angles:

  1. Empirical Dissection & Causal Interventions: Using models ranging from 0.7B to 8B parameters (LlamaGen, Lumina-mGPT 2.0, and Emu3), they isolate the components of CFG using greedy (zero-temperature) decoding. They also feed prescribed, single-token prefixes into the models to test if pure-color outputs come from favoring specific tokens or simply copying previous ones.
  2. Theoretical Training-Dynamics Analysis: To see why training creates this behavior, they mathematically analyze a single-layer Transformer trained on a simplified data model where localized "feature" blocks sit inside sparse "background" tokens.
  3. Attention Weight Reuse (AttnReuse): Noticing that the attention output mathematically splits into a shared visual trajectory and a prompt-driven textual deviation, the authors design AttnReuse. Instead of computing a full, separate unconditional pass, AttnReuse takes the conditional attention weights from middle network layers, masks out the text tokens, and renormalizes the remaining weights over the visual tokens to approximate the unconditional pass.

Datasets

  • ImageNet Validation Set: Used alongside a 2D wavelet decomposition to empirically verify that natural images are predominantly composed of smooth, non-texture regions (~65% non-texture vs. ~35% high-frequency texture).
  • DPG-Bench: A benchmark of over 1,000 dense, structurally complex prompts used to evaluate fine-grained semantic alignment with and without AttnReuse. No new benchmarks were introduced.

Key Insights and Ideas

  • Conditional decoding alone gives you blank canvases: If you greedily decode from the conditional logits ($\text{logit}^{\text{cond}}$) without CFG, the model outputs nearly pure-color blocks! Conversely, decoding purely from the difference ($\text{logit}^{\text{cond}} - \text{logit}^{\text{uncond}}$) yields hyper-detailed, overly complex textures.
Comparison of images generated from conditional logits alone, standard CFG, and logit differences across Emu3, LlamaGen, and Lumina.
  • The culprit is a massive repetition bias: The unconditional logits dominate the conditional logits in both token and pixel space. Causal interventions reveal that both branches share the exact same top-ranked habit: repeating previous tokens (repeating a prefix token over 50% to 75% of the time across entire sequences).
  • It’s not a training failure—it’s geometry: Unlike text, natural images exhibit texture sparsity (lots of sky, walls, and smooth surfaces). A well-trained model minimizes loss by learning that "copy the neighbor" is almost always the safest bet. Desired textures get buried under this repetition signal, and CFG acts as a magnifying glass by subtracting the shared repetition away.

Key Results

  • Quantifying Texture: Across 500 generated images, $\text{logit}^{\text{cond}} - \text{logit}^{\text{uncond}}$ consistently produced the highest Pixel Entropy, Total Variation, and Orientation Entropy, while $\text{logit}^{\text{cond}}$ bottomed out near zero variation.
Figure 2: Texture complexity of images generated from logitcond, logitλ, and logitcond −logituncond
  • Free Efficiency with AttnReuse: Applying AttnReuse to the middle half of layers in AR models (Emu3, Janus-Pro 7B, Lumina-mGPT 2.0) cuts attention FLOPs by 25% (down to 75% of standard CFG) with negligible drops in DPG-Bench scores. For example, under standard stochastic sampling ($\tau = 1$), Emu3’s overall score shifts from 80.6 to 80.4, and Lumina-mGPT 2.0 moves from 84.3 to 83.7.
  • Cross-Paradigm Bonus: Testing AttnReuse on a diffusion model (Stable Diffusion 3 Medium) over the final 90% of denoising steps reduced attention FLOPs to 87% while keeping overall DPG-Bench performance competitive (84.1 vs. 82.5).

Limitations and Future Work

The authors note that their scope is strictly focused on static image generation. Because audio and video also exhibit strong temporal and spatial redundancies (silent stretches in audio, static backgrounds across video frames), extending both this theoretical framework and AttnReuse to audio and video generation is a natural next step.

Summary updated

BibTeX
@inproceedings{zhou2026demystifying,
  author = {Zhiling Zhou and Jiachun Pan and Fengzhuo Zhang and Dirk Bergemann and Zhuoran Yang},
  title = {{Demystifying Classifier-Free Guidance for Auto-Regressive Image Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=SSyBnCPk9V},
}
Figure