Generate What Matters: Steering Diffusion Models for Targeted Data Generation to Improve Classification

Jeeyung Kim, Erfan Esmaeili, Qiang QiuOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

This paper introduces Class-Contrastive Influence (C2I), a novel metric to identify which synthetic images actually help a classifier learn. By using reinforcement learning to steer diffusion models toward generating these "high-influence" samples—which typically lie near the decision boundary—the authors significantly improve classification accuracy and robustness in low-data medical imaging tasks.

What Problem Does This Paper Address?

In fields like medical imaging, labeled data is notoriously scarce. While we can use generative models (like Stable Diffusion) to create synthetic training data, simply adding "more" images doesn't always lead to a better classifier. Often, synthetic images are visually impressive but redundant or even confusing for the model.

Current methods usually evaluate synthetic data retrospectively: you generate a bunch of images, train a model, and see if it worked. This paper argues that we should instead steer the generation process to produce images that are mathematically guaranteed to be useful for the specific classification task at hand. The challenge lies in defining and optimizing for "usefulness" during the generation phase.

Methods

The authors propose a framework that connects generative modeling with Influence Functions—a technique from classic statistics used to explain how much a specific training point affects a model's prediction.

  1. Class-Contrastive Influence (C2I): The researchers found that the most effective synthetic samples are those where the classifier's loss gradient aligns strongly with same-class validation data but aligns negatively with other-class data. They formalize this "gap" as the C2I score.
  2. Reinforcement Learning (RL) Fine-tuning: They use the C2I score as a reward signal to fine-tune a pre-trained Stable Diffusion model. Using Denoising Diffusion Policy Optimization (DDPO), they steer the generator to produce images that maximize this C2I reward.
  3. Boundary-Proximal Generation: Theoretically and empirically, the authors show that maximizing C2I forces the generator to produce "hard examples"—images that sit right on the edge of the decision boundary between classes. These are the most informative samples for a learning model.

Datasets

The method was evaluated on three benchmarks from the MedMNIST v2 suite, simulating a few-shot regime (only 16–32 real samples per class):

  • BreastMNIST: Ultrasound images for binary classification (benign vs. malignant).
  • DermaMNIST: Skin lesion images (evaluated in both binary and 7-class multi-class settings).
  • PneumoniaMNIST: Chest X-ray images for binary classification.

Key Insights and Ideas

  • Fidelity $\neq$ Utility: High-quality, realistic images aren't always the best for training. The paper shows that images that look "average" or lie near the decision boundary provide a much stronger learning signal than clear, "textbook" examples.
  • The Gradient Alignment Trick: By looking at how a synthetic image's gradient aligns with a small validation set, we can predict its training value without actually running a full training cycle.
  • Feature Averaging: The authors provide a mathematical proof (Theorem 1) showing that maximizing C2I induces a "feature-averaging" effect. In a latent space, this pulls synthetic samples toward the global mean of the validation set, which naturally lands them near the decision boundary where the classifier is most uncertain.

Key Results

  • Superior Performance: Across all datasets, C2I-guided augmentation outperformed standard methods (like Mixup or RandAugment) and other state-of-the-art diffusion baselines (like DataDream). For example, on BreastMNIST, it achieved an AUC of 0.885, compared to 0.828 for the baseline.
  • Robustness to Noise: Models trained with C2I-generated data were significantly more resilient to common image corruptions like Salt & Pepper noise, Gaussian blur, and JPEG compression. This suggests the "hard examples" helped the model learn a more stable decision boundary.
  • Cross-Architecture Transfer: Even though the generator was steered using a Vision Transformer (ViT) classifier, the resulting synthetic images also improved the performance of a ResNet-18 model, proving the generated data is broadly informative.

Limitations and Future Work

  • Computational Cost: The RL fine-tuning process is relatively heavy, requiring about 5 GPU hours on an NVIDIA A100 for 30 epochs. While generation itself is fast afterward, the initial "steering" phase adds overhead.
  • Validation Set Dependency: The method requires a small, high-quality validation set to compute the influence signals. In extremely data-starved environments, even this small requirement might be a hurdle.
  • Scaling to Complex Tasks: While successful on MedMNIST, it remains to be seen how well this scales to high-resolution datasets with hundreds of classes where decision boundaries are much more complex.

Summary updated

BibTeX
@misc{kim2026generate,
  author = {Jeeyung Kim and Erfan Esmaeili and Qiang Qiu},
  title = {{Generate What Matters: Steering Diffusion Models for Targeted Data Generation to Improve Classification}},
  year = {2026},
  url = {https://openreview.net/forum?id=SJVaCEgXku},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure