Classifier-Free Guidance (CFG) is a cornerstone of modern conditional diffusion models, yet its reliance on the fixed or heuristic dynamic guidance weight is predominantly empirical and overlooks the inherent dynamics of the diffusion process. In this paper, we provide a rigorous theoretical analysis of the Classifier-Free Guidance. Specifically, we establish strict upper bounds on the score discrepancy between conditional and unconditional distributions at different timesteps based on the diffusion process. This finding explains the limitations of fixed-weight strategies and establishes a principled foundation for time-dependent guidance. Motivated by this insight, we introduce \textbf{Control Classifier-Free Guidance (C2FG)}, a novel, training-free, and plug-in method that aligns the guidance strength with the diffusion dynamics via an exponential decay control function. Extensive experiments demonstrate that C2FG is effective and broadly applicable across diverse generative tasks, while also exhibiting orthogonality to existing strategies.
Figures & tables
Figure 1: Following [ 47 ] , (a) and (b) present results for t≥t0>0 . (a) shows that the MSE of conditional score and unconditional score can be bounded by a function which tends to 0 when t→+∞ ; (b) shows that the normalized cosine similarity between the two vectors decreases over reverse time, indicating that their directions gradually diverge in the reasoning process.
Figure 2: Noise to Image Process of C 2 FG : Dynamic guidance weight ω(t) adaptively balances conditional and unconditional outputs at each timestep t during generation, guided by theoretical bounds on the score function. Moreover, we can choose to add the method of [ 25 ] , where we fix the ω(t)=1 at the beginning of generation or when t tends to 0.
Figure 3: A two-dimensional distribution featuring two classes represented by gray and orange regions. Approximately 99% of the probability mass is inside the shown contours. (a) Ground truth samples from the orange class. (b) EDM2 ( ω=1 ) produces some outliers. (c) β -CFG ( α=β=2,ω=1 ) produces more outliers. (d) C 2 FG ( ω0=1,λ=0.6 ) generates fewer outliers and better matches the target distribution.
Table 1: Quantitative Comparison. Comparison of different evaluation metrics on Class-Conditional ImageNet datasets with different diffusion architectures and inference steps.
Latent Space (MS-COCO)
Model
FID ↓
U-ViT( ω=2 )
5.37
U-ViT+Ours ( ω0=2,λ=0.2 )
5.28
Model
CLIP ↑
SD15( ω=5 )
31.8
SD15+Ours ( ω0=5,λ=0.2 )
31.9
Table 2: Evaluation of C 2 FG on MS-COCO (U-ViT) in latent space and ImageNet-64 (EDM2) in pixel space.
Figure 4: Qualitative Comparison. Qualitative comparison on Class-Conditional ImageNet datasets with different architectures and samplers. The sampler used and the number of inference steps are indicated in parentheses.
ImageNet( 256 × 256 )
Model 50 inference timesteps
FID ↓
sFID ↓
Prec ↑
Rec ↑
SiT-XL/2 (REPA)( ω=1.8 , SDE)
3.36
4.5
0.86
0.54
SiT-XL/2 (REPA) + Ours ( ω0=1.7,λ=0.15 , SDE)
3.20
4.6
0.86
0.54
SiT-XL/2 (REPA)( ω=1.8 , ODE)
3.46
4.5
0.86
0.54
SiT-XL/2 (REPA)+Ours ( ω0=1.7,λ=0.15 , ODE)
3.25
4.4
0.86
0.55
Model 20 inference timesteps
Table 3: Ablation Comparison. Comparison of different evaluation metrics on Class-Conditional ImageNet datasets with different architectures and fewer timesteps.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Comparison between reverse diffusion process by CFG and C 2 FG. Our C 2 FG guidance weight ω(t) is a time-decay function.
Figure 6: Heatmaps of the logarithmic ratio ( log2 ) between conditional and unconditional predictions at selected timesteps. White indicates no difference (ratio=1), while red and blue highlight amplification and suppression, respectively. Stronger colors denote larger deviations between the two predictions.
Figure 7: Impact of the initial schedule weight ω0 on IS–FID performance (with fixed λ=1.0 , 250 inference steps).
Figure 8: Comparison of IS–FID performance under different hyperparameter settings on DiT-XL/2 and ImageNet-256.
ImageNet( 256 × 256 )
Model 25 inference timesteps
FID ↓
IS ↑
Prec ↑
Rec ↑
DiT-XL/2 (baseline, ω=1.5 )
11.88
192.13
0.7176
0.6651
DiT-XL/2+ β -CFG ( ω=1.5,a=b=2.0 )
8.42
254.42
0.8038
0.6026
DiT-XL/2 + RAAG ( ωmax=18.0,α=12.0 )
21.57
444.57
0.8360
0.2636
DiT-XL/2 + Ours ( ω0=1.0,λ=1.0 )
7.70
294.03
0.7994
0.6357
Appendix
Table 4: Performance comparison between our method and existing adaptive CFG approaches on ImageNet-256.
Figure 9: (a) demonstrates the impact of initial weight ω0 ; (b) illustrates how different λ values affect the decay profile.
Table 5: Comparison between the different effect of λ , fixing ω0=1.0 .
ImageNet(64 × 64)
Model
FID ↓
FDDINOv2↓
EDM2-S-autoguidance ( ω=1.7 )
1.044
56.3
EDM2-S-autoguidance+Ours ( ω0=0.9,λ=0.7 )
1.028
52.7
ImageNet (512 × 512), 10k samples
EDM2-S-autoguidance ( ω=1.4 )
5.27
121.2
EDM2-S-autoguidance+Ours ( ω0=0.9,λ=0.5 )
5.15
116.7
Appendix
Table 6: We evaluated conditional image generation on ImageNet with EDM2 and Autoguidance.
Figure 10: Comparison between results during the denoising process of C 2 FG and Baseline.
Compare
Fixed SD1.5,MS-COCO
Fixed SiT,ImageNet
Compare T2I models (CLIP ↑ )
Method
CFG
CFG++
β -CFG
C 2 FG (4,1)
FDG
C 2 FG (1.7,0.15)
Models
Flux (1.5,1)
SD3 (5,1)
FID(10k) ↓
19.32
18.87
16.74
16.71
6.15
3.20
CFG
31.4
31.4
CLIP(10k) ↑
32.0
32.0
31.7
32.0
–
–
C 2 FG
31.5
31.5
Appendix
Table 7: Additional Comparisons. Left: Comparisons with dynamic guidance methods on SD1.5 (MS-COCO) and SiT (ImageNet). Right: Results on modern T2I models (Flux, SD3).
Figure 11: Visual Comparison. C 2 FG produces images that better align with the text prompt than standard CFG, yielding more faithful details, consistent with the quantitative gains in Table 7 .
Classifier-free guidance (CFG) is the default mechanism for conditional generation in diffusion models, but the distribution sampled by its deterministic guided dynamics is not captured by the usual product-distribution heuristic p0ωq01−ω. We analyze CFG through the probability flow ODE and derive exact analytic path-integral representations of the induced distributions for both constant and time-dependent guidance. The resulting formulas show that CFG modifies pt0 by an exponential path-integral correction, and that a time-dependent schedule enters this correction through the weight ω(t)−1. This characterization explains how score discrepancies accumulate along sampling trajectories and motivates Distribution-Guided CFG (DG-CFG), a schedule that balances timestep contributions while accounting for signal strength and low-noise score-error amplification. A toy model with analytic scores closely verifies the predicted distributions. Across Stable Diffusion1.5, Stable Diffusion2.1, and Stable DiffusionXL, DG-CFG yields a stronger diversity--fidelity trade-off and robustly mitigates the saturation and quality degradation caused by strong constant or heuristic guidance. Complete NFE experiments on Stable Diffusion1.5 and Stable Diffusion~2.1 confirm that these gains persist across sampling budgets, while fixed-quality experiments on both backbones show that DG-CFG reaches target metrics with fewer sampling steps.
Enze Jiang, Zheng Ma
School of Mathematical Sciences Shanghai Jiao Tong University Shanghai, China
Classifier-free guidance (CFG) is a standard technique for improving conditional generation in diffusion models, yet its activation schedule is usually selected heuristically. In practice, most existing CFG-based methods rely on a pre-defined activation policy throughout inference, while recent dynamic variants often depend on hand-designed schedules without a principled theoretical explanation of when conditional information is most useful. In order to understand how the informational relevance between conditioning inputs and the score function evolves over the course of generation, we explore when guidance should be activated from an information-theoretic perspective. In this work, we formulate the diffusion trajectory as a time-dependent information bottleneck and show that the effectiveness of conditional information is not uniform throughout sampling, but becomes significantly stronger after a critical stage characterized by a Fisher-information balance condition. Motivated by this insight, we propose a training-free dynamic CFG strategy for inference. Rather than prescribing a fixed schedule in advance, our method constructs a stochastic process from conditional and unconditional score statistics and activates guidance when the estimated guidance gain crosses a prescribed threshold. This yields an adaptive activation rule that aligns condition injection with the underlying generation dynamics, while also recovering interval-based guidance as a limiting special case. Extensive experiments across diverse architectures and tasks, demonstrate that our method is effective, robust, and broadly applicable. Beyond empirical improvements, our framework provides an interpretation of dynamic guidance methods and a principled foundation for inference-time control in conditional diffusion models.
Jiayang Gao, Tianyi Zheng, Jiayang Zou +5
Shanghai Jiao Tong University, Shanghai, China · vivo BlueImage Lab, vivo Mobile Communication Co., Ltd., China · Stanford University, California, USA +1
Diffusion models generate samples by learning to reverse a fixed corruption process, and classifier-free guidance (CFG) is the standard mechanism for conditioning this process on a desired class or prompt. CFG can be applied at varying guidance strengths, and while higher strengths improve image quality and conditional alignment, too high a guidance strength can degrade image quality and diversity. Furthermore, CFG violates principled diffusion sampling dynamics, and existing explanations for why it works despite the violation disagree on the underlying theory or do not extend to deterministic samplers used in practice. We address both these issues. We first frame CFG sampling as a continuous-time optimal control problem, treating the sampling trajectory as a sequence of controls chosen to maximise the probability of the desired condition. Solving the resulting Hamilton--Jacobi--Bellman equation shows that CFG is recovered under specific path costs when using an unconstrained control set. We argue this lack of constraint is responsible for CFG's failure at high guidance strengths, since it permits the sampling path to move arbitrarily far from the current image estimate. To fix this, we propose curvature-aware CFG (CACFG), which constrains the control set to a hypersphere informed by the Gaussian regularisation used when training variational autoencoders. We show that the control inputs produced by CFG sampling routinely violate this bound, and that across diffusion models, datasets, and guidance schedules, CACFG achieves superior generative quality at mid-to-high guidance strengths with a less severe quality-diversity tradeoff than regular CFG.
Max Collins, Dasith de Silva Edirimuni, Jordan Vice +2
School of Physics, Maths and Computing The University of Western Australia Perth, WA 6009