Abstract
This paper introduces Denoising Likelihood Score Matching (DLSM), a novel training objective that fixes the "score mismatch" issue in conditional score-based generative models. By training the classifier to specifically match the gradients of the true log-likelihood density, the authors significantly improve the quality and diversity of class-conditional image generation on benchmarks like CIFAR-10 and CIFAR-100.
The Problem: Score Mismatch in Conditional Generation
Score-based generative models (a subset of diffusion models) generate data by following the "score"—the gradient of the log-density of the data distribution. To generate data belonging to a specific class (conditional generation), researchers often use Bayes’ theorem to decompose the conditional score into two parts:
- The Prior Score: The gradient of the data distribution (unconditional).
- The Likelihood Score: The gradient of a classifier’s output with respect to the input image.
The standard approach is to train a score model for the prior and a standard classifier (using Cross-Entropy loss) for the likelihood. However, the authors identify a critical score mismatch issue: a classifier trained to maximize classification accuracy doesn't necessarily produce accurate gradients (scores). During the sampling process, these inaccurate gradients mislead the diffusion process, leading to poor image quality. While previous works used a "scaling factor" ($\alpha$) to amplify the classifier's influence, this often destroys the diversity of the generated samples.
Methods: Denoising Likelihood Score Matching
To resolve this, the authors propose a new loss function, Denoising Likelihood Score Matching (DLSM), to train the classifier.
- The DLSM Loss: Instead of just training the classifier to predict the right label, DLSM forces the classifier’s input gradients to match the true likelihood scores.
- Tractability: Since the "true" likelihood score is usually unknown, the authors derive a tractable version ($L_{DLSM'}$) using a mathematical derivation similar to Denoising Score Matching (DSM). It leverages the relationship between the noisy sample, the clean sample, and the prior score model.
- Joint Objective: The final training objective for the classifier is a combination of the new DLSM loss and the traditional Cross-Entropy (CE) loss: $L_{Total} = L_{DLSM'} + \lambda L_{CE}$. The CE loss provides stability, while the DLSM loss ensures gradient accuracy.
- Two-Stage Training: First, a standard unconditional score model is trained. Second, the classifier is trained using the joint objective while keeping the score model's weights frozen.
Key Insights and Ideas
- Accuracy $\neq$ Gradient Quality: A classifier can be 99% accurate at labeling images but still have "noisy" or incorrect gradients. In diffusion models, the direction of the gradient is what moves the pixels; if that direction is wrong, the image becomes distorted.
- The Scaling Trap: The common practice of using a high scaling factor ($\alpha > 1$) to "guide" the model is a double-edged sword. It forces the model toward the most "prototypical" examples of a class (increasing fidelity) but collapses the variety of images the model can produce (decreasing diversity).
- Vector Field Alignment: Through an "inter-twining moon" experiment, the authors show that DLSM-trained classifiers produce vector fields that much more closely resemble the "Oracle" (true) scores compared to those trained with standard Cross-Entropy.
Key Results
The authors evaluated their method on three primary benchmarks: the 2D Inter-twining Moon dataset, CIFAR-10, and CIFAR-100. The proposed DLSM method outperformed the "Base" (standard classifier guidance) and "Scaling" methods across several metrics:
- FID (Fréchet Inception Distance): On CIFAR-10, DLSM achieved an FID of 2.25, a significant improvement over the Base method's 4.10. On CIFAR-100, it improved from 4.52 to 3.86.
- IS (Inception Score): DLSM consistently yielded higher IS values (e.g., 9.90 vs 9.08 on CIFAR-10), indicating better clarity and diversity.
- CAS (Classification Accuracy Score): This metric measures how "recognizable" the generated images are to a separate, pre-trained classifier. DLSM improved CAS from 0.38 to 0.58 on CIFAR-10, suggesting the generated images contain much more representative class features.
- Diversity Preservation: Unlike the scaling method, which improved fidelity at the cost of diversity (Recall/Coverage), DLSM improved fidelity while maintaining high diversity.
Limitations and Future Work
- Two-Stage Dependency: The classifier training requires a pre-trained score model. If the initial score model is poor, the DLSM loss (which relies on it) may be less effective.
- Computational Cost: Computing gradients of the classifier with respect to the input during every training step adds computational overhead compared to simple Cross-Entropy training.
- Label Noise: The derivation assumes labels are relatively "clean." The authors suggest that exploring how DLSM handles noisy or soft labels could be a fruitful direction.
- Scaling to High-Res: While successful on 32x32 images, the paper does not demonstrate results on high-resolution datasets like ImageNet, where the score mismatch issue might be even more pronounced.
Summary updated