Diffusion models achieve strong performance in generative modeling, but their success often relies heavily on classifier-free guidance (CFG), an inference-time heuristic that modifies the sampling trajectory. In theory, diffusion models trained with standard denoising score matching (DSM) should recover the target data distribution, raising two fundamental questions: (i) why is inference-time guidance necessary in practice, and (ii) can its underlying effect be internalized into a principled training objective? In this work, we argue that a key limitation of standard DSM is insufficient inter-class separation. To address this issue, we propose MCLR, an alignment objective that explicitly maximizes inter-class likelihood-ratios during training. Fine-tuning diffusion models with MCLR induces CFG-like improvements under standard sampling, substantially improving guidance-free conditional generation and narrowing the gap to inference-time CFG. Beyond these empirical benefits, we show theoretically that the CFG-guided score is exactly the optimal solution to a sample-adaptive weighted MCLR objective. This result connects CFG to alignment-based objectives, providing a mechanistic interpretation of CFG as an implicit inference-time contrastive alignment procedure.
Figures & tables
Figure 1: Conceptual Illustration of MCLR. (a) Samples generated from two classes using the same initial noises exhibit high visual similarity despite different conditioning labels, indicating insufficient separation of the learned conditional distributions. (b) MCLR mitigates this issue by encouraging class separation, resulting in generations with more distinct class-specific features.
Figure 2: Effects of MCLR vs. CFG. We visualize the progressive emergence of class-specific structure under MCLR training and CFG. MCLR training induces effects analogous to increasing guidance strength in CFG, both substantially improving class-specific patterns. For each image block, samples from different classes are generated from the same initial noises.
Figure 3: A Unified Framework Connecting CFG Variants with Contrastive Alignment. CFG-based methods can be interpreted as implicitly optimizing a contrastive alignment objective between two distributions p+(x) and p−(x) at inference time.
Figure 4: Quantitative Results for EDM2-L and VAR-d24. (a), (b), (d), and (e) show the evolution of FD, Inception Score, Precision, and Recall, respectively, as functions of training iterations. (c), (g), and (h) illustrate the FD–IS trade-offs, while (f), (i), and (j) depict the Precision–Recall trade-offs. For EDM2 models, we evaluate classifier-free guidance (CFG) scales γ∈{0.1,0.2,0.3,0.4,0.5,0.7,0.9,1,1.5,2.0,3.0} . For Var-d24 model, γ∈{0.5,0.8,1.1,1.5,1.7,2.0,2.5,3.0,4.0,5.0,7.0,10.0,15.0} . Start denotes the performance of the base model, while End denotes the model obtained after a fixed finetuning duration.
Method
NFE
FD DINOv2↓
Prec. ↑
Rec. ↑
IS ↑
ImageNet (64 × 64)
EDM2-S
63
95.20
0.705
0.614
60.43
+CFG
126
43.75
0.800
0.565
127.40
+DDO
63
72.97
0.689
0.642
65.84
+CCA
63
62.36
0.762
0.557
76.13
+CC-DPO
63
60.98
0.784
0.536
86.11
Table 1: Quantitative results for MCLR, CFG and training-time baselines. For each algorithm, the metrics are reported at the model checkpoint achieving the best case FD DINOv2 . Precision and Recall are computed using Inception features. The best and second-best results are highlighted in bold and underline , respectively.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Quantitative Results for EDM2-S trained on ImageNet-64 × 64. (a), (b), (d), (e), (g), (h) show the evolution of FD, Inception Score, Precision (calculated with Inception features), and Recall (calculated with Inception features), Precision (calculated with DINOv2 features), and Recall (calculated with DINOv2 features), respectively, as functions of training iterations. (c) shows the FD–IS trade-offs, while (f), (i) depict the Precision–Recall trade-offs calculated with Inception and DINOv2 features respectively. We evaluate classifier-free guidance (CFG) scales γ∈{0.1,0.2,0.3,0.4,0.5,0.7,0.9,1,1.5,2.0,3.0} .
Figure 6: Quantitative Results for EDM2-L trained on ImageNet-512 × 512. (a), (b), (d), (e), (g), (h) show the evolution of FD, Inception Score, Precision (calculated with Inception features), and Recall (calculated with Inception features), Precision (calculated with DINOv2 features), and Recall (calculated with DINOv2 features), respectively, as functions of training iterations. (c) shows the FD–IS trade-offs, while (f), (i) depict the Precision–Recall trade-offs calculated with Incpetion and DINOv2 features respectively. We evaluate classifier-free guidance (CFG) scales γ∈{0.1,0.2,0.3,0.4,0.5,0.7,0.9,1,1.5,2.0,3.0} .
Figure 7: Quantitative Results for VAR-d24 trained on ImageNet-64 × 64. (a), (b), (c), (f), (g), (i), (j) show the evolution of FD DINOv2 , FID, Inception Score, Precision (calculated with Inception features), and Recall (calculated with Inception features), Precision (calculated with DINOv2 features), and Recall (calculated with DINOv2 features), respectively, as functions of training iterations. (d), (e) shows the FD–IS trade-offs, while (h), (k) depict the Precision–Recall trade-offs calculated with Inception and DINOv2 features respectively. We evaluate classifier-free guidance (CFG) scales γ∈{0.5,0.8,1.1,1.5,1.7,2.0,2.5,3.0,4.0,5.0,7.0,10.0,15.0} .
Figure 8: Comparison between CFG and MCLR for Golden Retriever (Class 207). (a,b) demonstrate the progressive evolution of generated samples on ImageNet-64×64 and ImageNet-512×512, respectively. Increasing the CFG scale γ (top rows) and progressive MCLR training (bottom rows) produce similar effects, both enhancing class-specific structures in the generated images.
Figure 9: Comparison between CFG and MCLR for Warthog (Class 343). (a,b) demonstrate the progressive evolution of generated samples on ImageNet-64×64 and ImageNet-512×512, respectively. Increasing the CFG scale γ (top rows) and progressive MCLR training (bottom rows) produce similar effects, both enhancing class-specific structures in the generated images.
Figure 10: Comparison between CFG and MCLR for Trumpet (Class 513). (a,b) demonstrate the progressive evolution of generated samples on ImageNet-64×64 and ImageNet-512×512, respectively. Increasing the CFG scale γ (top rows) and progressive MCLR training (bottom rows) produce similar effects, both enhancing class-specific structures in the generated images.
Figure 11: Comparison between CFG and MCLR for Cowboy Hat (Class 515). (a,b) demonstrate the progressive evolution of generated samples on ImageNet-64×64 and ImageNet-512×512, respectively. Increasing the CFG scale γ (top rows) and progressive MCLR training (bottom rows) produce similar effects, both enhancing class-specific structures in the generated images.
Figure 12: Comparison between CFG and MCLR for Lab Coat (Class 617). (a,b) demonstrate the progressive evolution of generated samples on ImageNet-64×64 and ImageNet-512×512, respectively. Increasing the CFG scale γ (top rows) and progressive MCLR training (bottom rows) produce similar effects, both enhancing class-specific structures in the generated images.
Figure 13: Comparison between CFG and MCLR. Left and right figures demonstrate the progressive evolution of generated samples for MCLR and CFG on ImageNet-64×64, respectively, with all images initialized from the same random noise. Increasing the CFG scale γ and progressive MCLR training produce similar effects, both enhancing class-specific structures in the generated images.
Figure 14: Comparison between CFG and MCLR. Same as Figure 13 , but with a different initial random noise.
Figure 15: Comparison between CFG and MCLR. Same as Figure 13 , but with a different initial random noise.
Figure 16: Comparison between CFG and MCLR. Same as Figure 13 , but for ImageNet-512x512 with a different initial random noise.
Figure 17: Comparison between CFG and MCLR. Same as Figure 13 , but for ImageNet-512x512 with a different initial random noise.
Figure 18: Comparison between CFG and MCLR. Same as Figure 13 , but for ImageNet-512x512 with a different initial random noise.
Figure 19: Comparison between CFG and MCLR. Same as Figure 13 , but for ImageNet-512x512 with a different initial random noise.
Figure 20: Quantitative Results for SiT-XL/2 trained on ImageNet-256 × 256. (a), (b), (c), (d) show the evolution of the FD–IS trade-offs and the Precision–Recall trade-offs calculated with Inception and DINOv2 features respectively. We evaluate classifier-free guidance (CFG) scales γ∈{0.1,0.2,0.3,0.4,0.5,0.7,0.9,1,1.5,2.0,3.0} .
Figure 21: Effects of β in CC-DPO. (a,b) compare fine-tuning diffusion models using CC-DPO with different β evaluated on the EDM2-S model trained on ImageNet- 64×64 . Performance is reported in terms of FD DINOv2 and Inception Score. CC-DPO achieves stable performance under different β , with a smaller β leads to marginally better performance on selected metrics.
Figure 22: Effects of λ in CCA. (a,b) compare fine-tuning diffusion models using CCA with different λ evaluated on the EDM2-S model trained on ImageNet- 64×64 . Performance is reported in terms of FD DINOv2 and Inception Score. Note with the same β , CC-DPO achieves comparable performance as CCA while at the same time has fewer hyperparameters.
Shanghai Jiao Tong University, Shanghai, China · vivo BlueImage Lab, vivo Mobile Communication Co., Ltd., China · Stanford University, California, USA +1