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.
Figures & tables
Figure 1: Generated images from conditional logits logitcond , CFG-guided logits logitλ , and logitdiff=logitcond−logituncond , shown from left to right in each grid. All images are generated by greedy decoding ( τ=0 ). Prompts: Left: A glass bowl filled with oranges on a table. Right: An orange-reddish rose in a vase filled with water on top of a table. Images generated from logitcond collapse to nearly pure-color outputs, whereas images generated from logitdiff exhibit excessively complex textures.
Figure 2: Texture complexity of images generated from logitcond , logitλ , and logitdiff=logitcond−logituncond across multiple metrics. Pixel Entropy, Total Variation, and Orientation Entropy measure pixel-intensity diversity, local intensity variation, and edge-orientation diversity, respectively. Images generated from logitdiff consistently exhibit the highest texture complexity, whereas those generated from logitcond exhibit the lowest.
Figure 3: Similarity measurements between (logittcond)t=1Tvis and (logittuncond)t=1Tvis in logit space ( Left ) and pixel space ( Right ). Here, αdiff measures the mean absolute discrepancy between high-logit entries, and βdiff measures the root-mean-square difference between images decoded from the two branches’ predictions; superscripts cond and uncond denote the corresponding magnitude baselines. Both measurements show small discrepancies relative to these baselines, indicating that the top-ranked entries of logitcond are largely dominated by logituncond .
Model
logituncond
logitcond
Emu3
0.5168
0.5479
LlamaGen
0.7457
0.7517
Lumina-mGPT
0.6804
0.7333
Table 1: Average repetition ratio rrep : the fraction of generated tokens that match the prescribed prefix token.
Figure 4: Position-wise repetition ratio rtrep of Lumina-mGPT, averaged over samples. The ratio measures how often a generated token matches the prescribed prefix token; numbers beside the heatmaps are averages over horizontal bands. Both logitcond and logituncond exhibit strong repetition of the prescribed prefix token across generated visual-token positions.
Figure 5: Left: Image Ik,j for k= Orange , j= Blue with τk=8 , L=10 , and Tvis=25 . Right: The invalid image generated by only a conditional model, which will simply repeat the background.
Figure 6: Visualization of texture regions in natural images. Left: Texture regions are highlighted in white. Right: Texture and non-texture area ratios averaged over the ImageNet validation set. The results show that texture regions occupy only a small fraction of the whole image.
Figure 7: Overview of the proof. (1) Training WV makes text and background tokens favor background repetition, while feature tokens favor feature repetition. (2) Training WQK makes the conditional branch attend to text when predicting the first feature token. Inside the block, both branches attend to earlier feature tokens. (3) CFG uses the logit difference to generate the first feature token. Repetition then completes the feature block; without CFG, generation repeats the background.
Type
Model
Global
Entity
Attribute
Relation
Other
Overall ↑
Attn. FLOPs ↓
Diffusion
SD3-Medium
87.9
91.0
88.8
80.7
88.7
84.1
100%
+ AttnReuse
90.1
86.5
88.8
86.4
85.7
82.5
87%
AR ( τ=0 )
Emu3
87.5
83.5
84.9
85.0
85.3
76.7
100%
+ AttnReuse
84.3
83.5
83.4
83.5
82.9
74.7
75%
Janus-Pro 7B
79.3
90.2
89.0
89.7
84.5
83.3
100%
+ AttnReuse
79.2
87.5
87.6
89.3
88.6
82.3
75%
Table 2: DPG-Bench results. Comparison of model backbones with and without AttnReuse (gray rows). Attention FLOPs are normalized to the standard CFG baseline ( 100% ), encompassing both conditional and unconditional computations. To balance efficiency and fidelity, AttnReuse is applied to middle layers (e.g., 16/32 for AR models), preserving early layers for low-level representations and late layers for final predictions. For SD3-Medium, reuse is further restricted to the final 90% of denoising timesteps to maintain global layout. This strategy reduces relative attention FLOPs to 75% for AR models and 87% for SD3-Medium while maintaining competitive performance.
Figure 8: Illustration of the proposed AttnReuse method. In selected layers, we reuse conditional attention weights by masking out text-token entries and renormalizing over image tokens. We then apply these weights to the conditional value vectors to approximate the unconditional attention output.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Generated images from logitcond , logitλ , and logitdiff=logitcond−logituncond , shown from left to right in each grid. All images are generated by greedy decoding ( τ=0 ). Prompts: Left: A street at night is lit up by streetlights. Right: An old man is wearing an odd hat. Images generated from logitcond are nearly pure-color, whereas those from logitdiff show richer textures.
Figure 10: Decoded images from logitcond , logituncond , and logitdiff=logitcond−logituncond collected in Section A.3 , shown from left to right in each grid. Prompts: Left: A glass bowl filled with oranges on a table. Right: An orange-reddish rose in a vase filled with water on top of a table. On the same visual prefixes, the two branches give nearly identical images, while their logit difference emphasizes textures.
Figure 11: Decoded images from logitcond , logituncond , and logitdiff=logitcond−logituncond collected in Section A.3 , shown from left to right in each grid. Prompts: Left: A street at night is lit up by streetlights. Right: An old man is wearing an odd hat. On the same visual prefixes, the two branches give nearly identical images, while their logit difference emphasizes textures.
Figure 12: Position-wise repetition ratio rtrep of LlamaGen, averaged over samples. The ratio measures how often a generated token matches the prescribed prefix token; numbers beside the heatmaps are averages over horizontal bands. Both logitcond and logituncond show strong repetition of the prescribed prefix token.
Figure 13: Position-wise repetition ratio rtrep of Emu3, averaged over samples. The ratio measures how often a generated token matches the prescribed prefix token; numbers beside the heatmaps are averages over horizontal bands. Both logitcond and logituncond show strong repetition of the prescribed prefix token.
Mj={0,1,j≤Ttxt,Ttxt<j≤t.
Appendix
Algorithm 1 Attention Weight Reuse (AttnReuse) for ar models
Model
Type
τ
CFG
AttnReuse Layers
Timesteps
Emu3
AR
{0,1}
{14.0,7.0}
8–23
–
Janus-Pro 7B
AR
{0,1}
5.0
8–23
–
Lumina-GPT 2.0
AR
{0,1}
{20.0,4.0}
8–23
–
Stable Diffusion 3
Diffusion
–
7.0
9–17
Last 90%
Appendix
Table 3: Evaluation settings across models. For ar models, AttnReuse is applied to a subset of attention layers (Layers 8–23). For diffusion models, it is applied to selected layers (Layers 9–17) and across the last 90% of timesteps.
Figure 14: Qualitative comparison between Base and AttnReuse across different models. AttnReuse preserves structural and semantic fidelity under both greedy ( τ=0 ) and stochastic ( τ=1 ) decoding, while reducing attention computation.
Autoregressive (AR) models based on next-scale prediction have emerged as a powerful tool for image generation, but they face a critical weakness: information inconsistencies between patches across timesteps introduced by progressive resolution scaling. These inconsistencies scatter guidance signals, causing them to drift away from salient regions within the image and leaving behind ambiguous, unfaithful features during sampling. We tackle this challenge with Information-Grounding Guidance (IGG), a novel framework that anchors guidance to semantically important tokens via an attention-based dynamic weighting formulation, consequently ensuring that guidance and semantic contents remain tightly aligned. Across both class-conditioned and text-to-image generation tasks, IGG delivers sharper, more coherent, and semantically grounded images, demonstrating its efficacy for correcting AR-based methods. Our code is available at https://github.com/dnngky/infoground-guidance.
Ky Dan Nguyen, Hoang Lam Tran, Anh-Dung Dinh +4
The University of Sydney, Sydney, New South Wales, Australia · The University of Western Australia, Perth, Western Australia, Australia
Inference-time quality-enhancement methods are an effective and widely adopted means of improving diffusion models without expensive retraining. We study a family of training-free techniques conceptually rooted in Classifier-Free Guidance (CFG), most of which were originally proposed on older U-Net diffusion models and validated using metrics that assess image quality in isolation, without accounting for compositional alignment or semantic correspondence between the generated image and its associated text prompt. We re-evaluate eight such methods on two open-weight rectified-flow transformers under a fixed per-model protocol and three compositional-alignment benchmarks. No method consistently improves on CFG across the measured criteria. APG obtains several nominal best scores, but the corresponding gains often remain within the estimated evaluation uncertainty. Attention-perturbation methods provide isolated gains on SD3.5 Medium and more frequent degradations on FLUX.2 [klein] 4B Base, while CFG remains a competitive lower-cost baseline.
Autoregressive image modeling relies on visual tokenizers to compress images into compact latent representations. We design an end-to-end training pipeline that jointly optimizes reconstruction and generation, enabling direct supervision from generation results to the tokenizer. This contrasts with prior two-stage approaches that train tokenizers and generative models separately. We further investigate leveraging vision foundation models to improve 1D tokenizers for autoregressive modeling. Our autoregressive generative model achieves strong empirical results, including a state-of-the-art FID score of 1.48 without guidance on ImageNet 256x256 generation.
Wenda Chu, Bingliang Zhang, Jiaqi Han +4
ByteDance Seed · California Institute of Technology · Stanford University