Distance-based Hyperspherical Classification for Multi-source Open-Set Domain Adaptation

Silvia Bucci, Francesco Cappio Borlino, Barbara Caputo, Tatiana Tommasi

Abstract

Multi-source Open-Set Domain Adaptation (MS-OSDA) addresses the challenge of adapting models to target domains characterized by both domain shift (varying visual styles) and category shift (unseen classes). We introduce HyMOS (Hyperspherical Multi-source Open-Set), a streamlined framework that leverages supervised contrastive learning on a unit hypersphere. HyMOS employs style transfer as a data augmentation technique and introduces a self-paced, dynamic thresholding mechanism to distinguish between known and unknown categories. Our approach achieves state-of-the-art performance across major benchmarks, including a significant 10.8% HOS improvement on DomainNet.

Introduction

In real-world applications, AI vision systems frequently encounter data that deviates from their training distributions. This manifests as two primary challenges: Domain Shift, where data comes from diverse sources like sketches or photos, and Category Shift, where "unknown" classes appear during deployment. Standard adaptation methods often suffer from negative transfer in open-set scenarios, erroneously forcing unknown samples into known categories. HyMOS addresses these issues through a unified contrastive objective that promotes robust feature alignment without complex adversarial architectures.

Methodology

HyMOS is built upon four core components designed to create a discriminative and domain-invariant feature space:

  1. Supervised Contrastive Learning (SupCon): Instead of traditional cross-entropy, HyMOS optimizes a contrastive loss on a unit hypersphere, pulling same-class samples together and pushing different classes apart.
  2. Style Transfer as Augmentation: Using an AdaIN module, the framework randomly swaps source image styles with target styles during training, forcing the model to focus on semantic content rather than texture.
  3. Self-Paced Dynamic Thresholding: A distance threshold ($\alpha$) is calculated online based on class sparsity and compactness, allowing the model to adaptively identify unknown samples.
  4. Progressive Self-Training: The model initially learns from source domains and gradually incorporates high-confidence target samples into the training loop.
The HyMOS training pipeline, illustrating the transition from source-only training to the progressive inclusion of target samples via self-training.

The Geometry of the "Unknown"

A key insight of HyMOS is the geometric behavior of features on the hypersphere. By enforcing tight clusters for known classes, "unknown" samples naturally gravitate toward low-density, "empty" regions between these clusters. This eliminates the need for explicit training on synthetic unknown classes. The contrastive objective ensures that known categories attract their respective samples while repealing samples from other categories and unknown instances.

Conceptual overview of the HyMOS mechanism, showing how style transfer and contrastive alignment create distinct clusters on a hypersphere while isolating unknown samples.

Evaluation and Results

The framework was evaluated on Office31, Office-Home, and the large-scale DomainNet benchmark. Performance was measured using the HOS (Harmonic mean of Open-Set) metric, which balances accuracy on known classes with the ability to reject unknowns.

  • DomainNet: HyMOS achieved an HOS of 59.3%, outperforming the previous state-of-the-art (ROS) by 10.8%.
  • Office-Home: The model reached 67.2% HOS, compared to 65.3% for ROS.

Ablation studies confirmed that style transfer and balanced sampling are crucial, contributing 3.6% and 2.6% to the overall performance, respectively. Furthermore, HyMOS demonstrated versatility by achieving state-of-the-art results on Closed-Set and Universal domain adaptation tasks.

Conclusion

HyMOS demonstrates that a simple, contrastive-based approach can outperform complex adversarial methods in MS-OSDA. By focusing on the geometric properties of the feature space and utilizing style-invariant augmentations, it provides a robust solution for real-world domain adaptation. Future work will explore extending this hyperspherical approach to continual learning settings where new classes and domains are added over time.

Summary updated

BibTeX
@inproceedings{bucci2022distance,
  author = {Silvia Bucci and Francesco Cappio Borlino and Barbara Caputo and Tatiana Tommasi},
  title = {{Distance-based Hyperspherical Classification for Multi-source Open-Set Domain Adaptation}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=KVwVMY6dbP},
}
Figure