Zero-shot domain adaptation based on dual-level mix and contrast

Yu Zhe, Jun Sakuma

Introduction

Zero-shot domain adaptation (ZSDA) represents a significant challenge in machine learning where a model must execute a specific "task of interest" (ToI) within a target domain, despite having never observed ToI samples in that domain during training. This scenario is common in fields like medical imaging, where data for specific conditions may be abundant in one clinical setting (source domain) but entirely absent in another (target domain) due to equipment differences or rare occurrences.

The primary challenge in ZSDA is the dual shift: the discrepancy between the source and target domains, and the absence of task-specific labels in the target. Traditional approaches often utilize Generative Adversarial Networks (GANs) to synthesize missing data. However, GANs are computationally intensive and prone to training instability. This paper proposes Dual Mixup Contrastive Learning (DMCL), a framework that leverages data interpolation and contrastive objectives to bridge these gaps without the need for generative modeling.

Methodology

The DMCL framework is built upon three integrated components designed to align distributions and disentangle feature representations.

1. Dual-Level Mixup

While standard Mixup techniques interpolate between samples to improve generalization, DMCL employs a dual-level strategy to populate the "void" in the data distribution. It performs linear interpolation across two dimensions:

  • Domain Level: Between source and target domain samples.
  • Task Level: Between the Task of Interest (ToI) and an Irrelevant Task (IrT) for which data exists in both domains.

By creating these synthetic intermediate samples, the model learns a continuous transition path, effectively simulating the missing target-domain ToI data and providing a structural bridge between known and unknown distributions.

2. Domain Adversarial Training (DAT)

To ensure that the learned features are robust to domain shifts, the authors implement a Domain Adversarial Training module. This involves a feature extractor and a domain classifier connected via a Gradient Reversal Layer (GRL). The objective is to minimize the task loss while maximizing the domain classifier's uncertainty, forcing the extractor to produce domain-invariant representations.

3. Dual-Level Contrastive Learning

The core innovation of DMCL lies in its approach to feature disentanglement. The architecture utilizes two specialized feature extractors:

  • Task-related Extractor ($G_F$): Optimized to capture category-specific information while remaining invariant to domain-specific noise.
  • Domain-related Extractor ($G_D$): Optimized to identify the domain while ignoring task-specific labels.

A contrastive loss (NT-Xent) is applied to enforce this separation. For instance, the model is encouraged to map images of the same category from different domains to similar points in the task-related latent space, while separating them in the domain-related space.

Experimental Evaluation

The authors evaluated DMCL against two primary benchmarks: X-NIST (a high-complexity composite of MNIST, Fashion-MNIST, EMNIST, and NIST) and Office-Home (a real-world dataset featuring 65 object categories across Artistic, Clip Art, Product, and Real-world domains).

Key Results

DMCL demonstrated significant performance gains over existing baselines. On the X-NIST benchmark, particularly in the "Negative to Gray" domain shift, DMCL achieved an accuracy of 81.1%, a substantial improvement over the 60.8% achieved by the previous state-of-the-art disentanglement method, DF-ZSDA.

On the Office-Home dataset, DMCL remained competitive with, and in several cases outperformed, complex generative models while requiring significantly fewer training resources. Ablation studies further highlighted the necessity of the Dual Mixup component; removing it resulted in a performance degradation of up to 17%, confirming that interpolation is critical for bridging the zero-shot gap.

Discussion and Limitations

DMCL offers a more efficient and stable alternative to GAN-based ZSDA. By focusing on feature disentanglement and structural interpolation, it avoids the pitfalls of high-fidelity image generation.

However, the approach relies on the assumption that domain and task shifts can be effectively modeled through linear interpolation. In scenarios where domain gaps are highly non-linear or the data manifold is exceptionally complex (e.g., transitioning from "Real-world" photography to "Clip Art"), the effectiveness of Mixup may diminish. Future research may explore non-linear manifold alignment to further enhance the robustness of zero-shot adaptation in complex environments.

Summary updated

BibTeX
@inproceedings{zhe2024zero,
  author = {Yu Zhe and Jun Sakuma},
  title = {{Zero-shot domain adaptation based on dual-level mix and contrast}},
  booktitle = {CAI},
  year = {2024},
  url = {https://openreview.net/forum?id=EW8P6f977s},
}
Figure