Mutual Nearest Neighbor Contrast and Hybrid Prototype Self-Training for Universal Domain Adaptation

Liang Chen, Qianjin Du, Yihang Lou, Jianzhong He, Tao Bai, Minghua DengAAAI 2022 · DOI

Introduction: The Challenge of Universal Domain Adaptation

Domain Adaptation (DA) is a critical field in machine learning focused on transferring knowledge from a labeled source domain to an unlabeled target domain. While traditional Closed-set DA assumes identical label spaces between domains, real-world applications often encounter mismatched categories.

Comparison of different Domain Adaptation (DA) scenarios, highlighting the complexity of Universal DA.

Universal Domain Adaptation (UniDA) represents the most flexible and challenging setting, where the relationship between source and target label sets is unknown a priori. It encompasses scenarios like Partial DA (target is a subset of source), Open-set DA (source is a subset of target), and Open-Partial DA (overlapping but distinct sets). The primary hurdles in UniDA are twofold: effectively aligning common categories across domains while simultaneously identifying and separating "private" categories to prevent negative transfer.

The MATHS Framework

To address these challenges, the authors propose MATHS (Mutual neArest neighbor conTrast and Hybrid prototype diScrimnation), a two-stage framework designed to move beyond the inherent bias of source-only classifiers.

Overview of the MATHS two-stage framework, featuring feature alignment and hybrid prototype self-training.

Stage 1: Feature Alignment and Private Sample Detection

In the first stage, the model focuses on uncovering the intrinsic manifold structure of both domains without forcing a global distribution alignment, which can be risky in open scenarios.

  • Mutual Nearest Neighbor (MNN) Contrast: MATHS identifies "anchor pairs" between domains. A pair $(A, B)$ is considered a mutual nearest neighbor if sample $A$ (source) is among the top-$k$ neighbors of sample $B$ (target), and vice versa. By applying a contrastive loss to these pairs, the model pulls together samples likely to share the same semantic class, bridging the domain gap at a local, instance-level.
  • Bimodality Hypothesis for Detection: Identifying "unknown" target samples is often done via manual thresholds. MATHS instead analyzes the distribution of maximum prediction probabilities. Using Hartigan’s dip test, the model statistically detects if this distribution is bimodal. If a bimodal structure is confirmed, a Gaussian Mixture Model (GMM) is used to calculate a data-driven threshold, automatically separating common classes from private ones.

Stage 2: Hybrid Prototype Self-Training

Once potential private target samples are identified, the framework transitions to a refinement phase.

  • Hybrid Prototypes: The detected private target samples are clustered to form "private prototypes." These are integrated with existing source class prototypes to form a comprehensive hybrid pseudo-classifier.
  • Self-Training: The model undergoes self-training using a confidence-guided prototype contrastive loss. This process refines the feature space, ensuring target samples are pulled toward their respective prototypes (common or private), which results in sharper decision boundaries and improved classification accuracy.

Experimental Evaluation

The MATHS framework was evaluated on three major benchmarks: Office-31, OfficeHome, and VisDA-2017. The model demonstrated significant improvements, particularly in the most complex Open-Partial DA (OPDA) settings.

  • VisDA-2017 (OPDA): MATHS achieved an average accuracy of 74.8%, outperforming previous state-of-the-art (SOTA) methods like DANCE (73.7%) and DCC (72.4%).
  • OfficeHome (OPDA): The model reached 84.6% average accuracy, marking a substantial jump over the 80.4% achieved by DANCE.
  • Ablation Insights: Studies confirmed that MNN contrastive learning is the most vital component, providing the necessary foundational alignment that allows the subsequent self-training stage to succeed.

Conclusion

MATHS advances Universal Domain Adaptation by treating the target domain as a structured entity rather than a noisy reflection of the source. By replacing manual heuristics with statistical tests like Hartigan’s dip test and utilizing local affinity through MNN, the framework achieves superior robustness across diverse domain shift scenarios. Future work may involve reducing the computational overhead of the two-stage process and exploring its application in fully unsupervised transfer learning tasks.

Summary updated

BibTeX
@inproceedings{chen2022mutual,
  author = {Liang Chen and Qianjin Du and Yihang Lou and Jianzhong He and Tao Bai and Minghua Deng},
  title = {{Mutual Nearest Neighbor Contrast and Hybrid Prototype Self-Training for Universal Domain Adaptation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i6.20574},
}
Figure