Data Augmentation with Diffusion for Open-Set Semi-Supervised Learning

Seonghyun Ban, Heesan Kong, Kee-Eung KimNeurIPS 2024

Instead of discarding "irrelevant" unlabeled data in open-set semi-supervised learning (SSL), this paper introduces Discriminator-Weighted Diffusion (DWD) to transform that data into useful training samples. By combining a diffusion model with a discriminator trained via Positive-Unlabeled (PU) learning, the authors successfully turn out-of-distribution "noise" into high-quality, diverse synthetic data that significantly boosts model performance.

The Challenge of Open-Set SSL

Semi-supervised learning is the art of training models using a small amount of labeled data and a mountain of unlabeled data. However, real-world unlabeled data is often messy. It frequently contains out-of-distribution (OOD) instances—images from classes that don't exist in your labeled set (e.g., trying to classify "trucks" and "cars" while your unlabeled set is full of "trees" and "mountains").

Most current Open-Set SSL methods follow a detect-and-filter strategy: they try to identify these irrelevant images and throw them away or downweight them. The problem? Throwing data away is wasteful. Even an image of a tree contains valuable information about textures, lighting, and shapes that could help a model generalize better. The authors ask: Can we transform these irrelevant samples into relevant ones instead of just deleting them?

Discriminator-Weighted Diffusion (DWD)

To solve this, the authors propose DWD, a generative data augmentation framework that works in three main stages:

DWD Architecture
  1. The Discriminator (PU Learning): Since we only know what "positive" (labeled) classes look like and have a mix of everything else in the unlabeled set, the authors use Positive-Unlabeled (PU) learning. This trains a discriminator to score how "relevant" an unlabeled image is to the labeled distribution without needing explicit "negative" labels.
  2. Weighted Diffusion Training: They train a conditional diffusion model on both labeled and unlabeled data. Crucially, they use the discriminator's scores as importance weights. This forces the diffusion model to prioritize learning features that align with the labeled classes while still capturing the underlying diversity of the entire dataset.
  3. Image-Seeded Generation: This is the "secret sauce." To generate new data, they don't start from random Gaussian noise. Instead, they take an unlabeled image (even an irrelevant one), add a specific amount of noise to it (the forward process), and then use the diffusion model to "reverse" that noise while conditioning it on a target labeled class.
Image-Seeded Generation Process

This process effectively "paints over" an irrelevant image (like a tree) to turn it into a relevant one (like a truck) while preserving the original's structural "DNA" (composition, lighting, and edges).

Key Insights and Results

The core insight of DWD is that transformation is better than filtering. OOD data isn't trash; it's a source of diversity. By "seeding" the diffusion process with real but irrelevant images, the model generates synthetic data that is far more diverse than what it could produce by simply looking at the tiny labeled set. Furthermore, using the discriminator to weight the loss ensures the generative model stays anchored to the classes we actually care about, preventing mode collapse.

The authors evaluated DWD across several benchmarks designed to test class distribution mismatch, including the SixAnimal Task (a CIFAR-10 subset), CIFAR-10/100, ImageNet-30, and ImageNet-100.

DWD consistently outperformed state-of-the-art SSL baselines, particularly when the mismatch was high:

  • Superior Accuracy: On the ImageNet-30 task, DWD achieved 82.20% accuracy, significantly beating standard SSL methods like FixMatch (70.07%) and other diffusion-based competitors.
  • Robustness to Mismatch: In the SixAnimal task with a 75% mismatch (where 3 out of 4 unlabeled images are irrelevant), DWD maintained high performance while other methods saw their accuracy plummet.
  • Latent Space Alignment: Qualitative analysis showed that DWD successfully moved unlabeled samples closer to the class centroids in the model's latent space, proving that the transformed images were semantically meaningful to the classifier.

Limitations and Future Work

While highly effective, DWD has a few limitations. Diffusion models are notoriously slow and memory-intensive, meaning pre-training and fine-tuning add significant wall-clock time compared to simple filtering methods. Additionally, the "noise level" used for seeding is currently a fixed hyperparameter; finding the "sweet spot" of noise is critical, as too much destroys structural diversity and too little fails to change the class. Future work could involve automatically determining the optimal noise level for each individual image and exploring tighter integration between the generative process and the classifier's training loop.

Summary updated

BibTeX
@inproceedings{ban2024data,
  author = {Seonghyun Ban and Heesan Kong and Kee-Eung Kim},
  title = {{Data Augmentation with Diffusion for Open-Set Semi-Supervised Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=OP3sNTIE1O},
}
Figure