Improving Conditional Modeling via Inter-Class Likelihood-Ratio Maximization and Unifying Classifier-Free Guidance with Alignment Objectives

Xiang Li, Yixuan Jia, Xiao Li, Jeffrey A Fessler, Rongrong Wang, Qing QuNeurIPS 2026

TL;DR

Why do diffusion models—which are theoretically guaranteed to learn exact data distributions—produce blurry, generic mush unless we rescue them at inference time with Classifier-Free Guidance (CFG)? This paper uncovers a specific culprit: standard training leaves conditional distributions bleeding into one another, failing to separate different classes. By introducing a training objective that explicitly pushes classes apart, the authors bake CFG-like crispness directly into the model weights—cutting inference compute in half while demystifying why CFG actually works.

What Problem Does This Paper Address?

On paper, diffusion models trained with standard Denoising Score Matching (DSM) should generate crisp, prompt-faithful images right out of the box. In reality, unguided conditional sampling is surprisingly lackluster. If you take the exact same starting noise and ask a standard diffusion model to generate two completely different classes—say, a cheeseburger and a warthog—you often get images with eerily similar layouts and muted class features. The learned probability distributions for different classes overlap far more than they do in real life.

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 inter-class separation, resulting in generations with more distinct class-specific features.

To fix this in practice, almost every modern image generator leans on Classifier-Free Guidance (CFG), an inference-time patch that artificially exaggerates the difference between a conditional prediction ("draw a warthog") and an unconditional one ("draw anything"). CFG works wonders, slashing error metrics by up to 75%, but it comes with baggage: it doubles the number of neural network evaluations per step and breaks the underlying math of the diffusion process. The authors ask: What specific training deficiency is CFG compensating for, and can we fix it during training instead?

Methods

Instead of relying on an inference-time band-aid, the authors fix class bleed during fine-tuning with MCLR (Maximizing inter-Class log-Likelihood Ratio).

Standard training merely shows the model an image alongside its true label $c$ and hopes the network figures out what makes class $c$ unique. MCLR adds a contrastive regularizer: it actively rewards the model for assigning higher likelihood to a true-class sample relative to a sample drawn from a randomly mismatched class $\tilde{c}$ when evaluated under condition $c$.

Because computing exact likelihoods in diffusion models is prohibitively expensive, the authors approximate this objective using the diffusion Evidence Lower Bound (ELBO). Viewed through the lens of denoising, the intuition becomes crystal clear: MCLR trains the denoiser for class $c$ to be better at reconstructing noisy images of class $c$, and worse at reconstructing noisy images from other classes. Alongside MCLR, the authors formulate a conditional adaptation of Direct Preference Optimization (CC-DPO) to systematically compare how different contrastive objectives behave.

Datasets

The authors evaluate their fine-tuning methods across established class-conditional generation benchmarks—specifically ImageNet at $64\times64$, $256\times256$, and $512\times512$ resolutions. No new datasets are introduced.

Key Insights and Ideas

  • CFG is Secretly Contrastive Alignment: The paper’s headline theoretical insight is that the CFG-guided score is the exact mathematical minimizer of a sample-adaptively weighted MCLR objective. In other words, CFG isn't just an ad-hoc heuristic; it is an implicit, inference-time contrastive alignment algorithm that performs "hard-negative mining" on ambiguous samples that look like they could belong to multiple classes.
  • Additive vs. Multiplicative Reshaping: Why does MCLR beat DPO-style alternatives like CC-DPO and Conditional Contrastive Alignment (CCA)? First, the authors prove that CC-DPO and CCA actually share the exact same theoretical optimum. Second, they show these methods reshape distributions multiplicatively via density ratios $\left(\frac{p(x|c)}{p(x)}\right)^{1/\beta}$, which can blow up and become unstable in low-density regions (like minority classes). MCLR reshapes the distribution additively via density differences $p(x|c) - p(x)$, keeping optimization smooth and stable.
  • Identical Visual Trajectories: Increasing MCLR fine-tuning iterations produces a visual progression nearly indistinguishable from cranking up the CFG scale—gradually transforming muddled, shared layouts into sharp, class-specific subjects.
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.

Key Results

Across diffusion models (EDM2, SiT-XL/2+REPA) and visual autoregressive models (VAR-d24), MCLR consistently outperforms training-time contrastive baselines (CCA, CC-DPO, DDO, and Contrastive Flow Matching), measured primarily via Fréchet Distance in DINOv2 feature space ($\text{FD}_{\text{DINOv2}}$, chosen because standard Inception-based FID can be blind to perceptual improvements in top-tier models):

  • Halving Compute, Closing the Gap: On ImageNet-$512\times512$ (EDM2-L), MCLR slashes unguided $\text{FD}_{\text{DINOv2}}$ from 67.70 to 42.50, beating CCA (51.45) and CC-DPO (51.92), and coming remarkably close to inference-time CFG (39.86) while requiring half the function evaluations (63 vs. 126 NFE).
  • Beating CFG Outright: On ImageNet-$256\times256$, unguided MCLR actually surpasses CFG's best $\text{FD}_{\text{DINOv2}}$ on both VAR-d24 (44.31 vs. CFG's 45.08 at half the NFE) and SiT-XL/2+REPA (45.96 vs. CFG's 50.23).
  • Stackable Gains: MCLR and CFG aren't mutually exclusive—applying light CFG on top of an MCLR-tuned EDM2 model pushes Precision and Inception Scores higher than either method achieves alone.

Limitations and Future Work

Because MCLR bakes class separation into the weights during training, the resulting model is static: unlike CFG, you cannot dynamically slide a knob at inference time to trade diversity for fidelity on the fly. Furthermore, on some architectures like EDM2, inference-time CFG still holds a slight edge in peak $\text{FD}_{\text{DINOv2}}$ and Inception Score. Bridging this remaining gap—and uncovering what other hidden flaws in standard score matching CFG might be quietly fixing—remains wide open for future work.

Summary updated

Abstract

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.
BibTeX
@inproceedings{li2026improving,
  author = {Xiang Li and Yixuan Jia and Xiao Li and Jeffrey A Fessler and Rongrong Wang and Qing Qu},
  title = {{Improving Conditional Modeling via Inter-Class Likelihood-Ratio Maximization and Unifying Classifier-Free Guidance with Alignment Objectives}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=tDqT2QD3Da},
}
Figure