Domain-guided conditional diffusion model for unsupervised domain adaptation

Yulong Zhang, Shuhao Chen, Weisen Jiang, Jiangang Lu, James T. KwokNeural Networks 2023

TL;DR

This paper introduces DACDM, a novel approach that leverages diffusion models to generate high-quality, class-controlled synthetic data for the target domain in Unsupervised Domain Adaptation (UDA). By augmenting the source domain with these generated samples, DACDM significantly improves the performance of existing UDA methods, especially in scenarios with large domain shifts and limited target data.

What Problem Does This Paper Address?

Deep learning models often struggle when applied to new datasets or environments due to "domain shift" – differences in data distribution between the training (source) and testing (target) domains. Unsupervised Domain Adaptation (UDA) aims to bridge this gap by learning from labeled source data and unlabeled target data. However, existing UDA methods face challenges when the domain shift is large or when the target domain has very few samples, leading to suboptimal performance. The core problem is how to effectively adapt models to a target domain with limited, unlabeled data, especially when the target domain's characteristics are significantly different from the source.

Methods

The proposed Domain-Guided Conditional Diffusion Model (DACDM) tackles this by generating synthetic target domain samples. It operates in two main stages:

  1. Label-Conditioned Training: A diffusion model is trained to generate samples whose class labels can be controlled. For unlabeled target data, pseudo-labels are first predicted by a pre-trained UDA model. This stage ensures that the generated samples cover all relevant classes.
  2. Domain-Guided Generation: A domain classifier is trained to distinguish between source and target domain data. This classifier then guides the diffusion sampling process to generate samples that are more aligned with the target domain's distribution. This is achieved by incorporating the domain classifier's gradient into the diffusion model's denoising process.

The generated target domain samples are then combined with the original source domain samples to create an "augmented source domain." This augmented dataset is used to train a standard UDA model, which is then evaluated on the original target domain. The authors utilize DPM-Solver++ for efficient sampling.

Datasets

The proposed DACDM framework was evaluated on four standard UDA benchmark datasets:

  • Office-31: Contains 4,110 images across 31 classes and 3 domains (Amazon, DSLR, Webcam).
  • Office-Home: A larger dataset with 15,500 images across 65 classes and 4 domains (Art, Clipart, Product, Real-World).
  • VisDA-2017: A synthetic-to-real dataset with 207,785 images across 12 classes.
  • miniDomainNet: A subset of DomainNet, featuring 140,006 images across 126 classes and 4 domains (Clipart, Painting, Real, Sketch).

Key Insights and Ideas

  • Diffusion Models for UDA Data Augmentation: This is presented as the first application of diffusion models for UDA, moving beyond GAN-based generation methods. Diffusion models are noted for their ability to cover distribution modes better than GANs.
  • Controllable Generation: DACDM offers fine-grained control over both the class and domain of generated samples, which is crucial for effective UDA.
  • Domain Guidance is Key: Explicitly guiding the generation process towards the target domain using a domain classifier significantly improves the quality and relevance of synthetic data, leading to better adaptation.
  • Augmented Source Domain: Combining original source data with generated target data creates a more effective training set that bridges the domain gap more smoothly than using source data alone.
  • Plug-and-Play Module: DACDM is designed to be easily integrated with existing UDA methods, enhancing their performance without requiring fundamental changes to their architecture.

Key Results

  • Significant Performance Gains: DACDM consistently improves the performance of baseline UDA methods like MCC and ELS across all tested datasets. For instance, ELS+DACDM achieved an average accuracy of 91.80% on Office-31, a 1.59% improvement over ELS.
  • Improved Transferability: The generated samples are shown to be similar in style and distribution to the target domain samples, as evidenced by t-SNE visualizations and A-distance metrics. The augmented source domain (Ds U Dg) is demonstrably closer to the target domain (Dt) than the original source domain (Ds).
  • Effective Class and Domain Control: Ablation studies confirm that controlling both class and domain is superior to controlling only one or using less effective guidance mechanisms.
  • Efficiency: The use of DPM-Solver++ allows for faster sampling compared to traditional diffusion model inference.

Limitations and Future Work

  • Limitations: The paper acknowledges that when domain guidance is not used, the generated samples might not cover the full diversity of the target domain (e.g., only black backpacks generated in one example). The performance gains are also shown to plateau or slightly decrease with an excessive number of generated samples.
  • Future Work: The authors express interest in applying DACDM to other transfer learning settings, such as multi-source domain adaptation. They also suggest further exploration of the optimal number of generated samples for different datasets.

Summary updated

BibTeX
@inproceedings{zhang2023domain,
  author = {Yulong Zhang and Shuhao Chen and Weisen Jiang and Yu Zhang and Jiangang Lu and James T. Kwok},
  title = {{Domain-guided conditional diffusion model for unsupervised domain adaptation}},
  booktitle = {Neural Networks},
  year = {2023},
  url = {https://openreview.net/forum?id=3UgXZRE56Q},
}
Figure