COSMo: CLIP Talks on Open-Set Multi-Target Domain Adaptation

Munish Monga, Sachin Kumar Giroh, Ankit Jha, Mainak Singha, Biplab Banerjee, Jocelyn Chanussot

In the field of machine learning, the ability to generalize knowledge from a labeled Source dataset to unlabeled Target environments is a fundamental challenge known as Domain Adaptation (DA). While traditional DA assumes that the source and target share the same set of classes, real-world deployments are rarely so tidy. This paper introduces and addresses a more complex and realistic scenario: Open-Set Multi-Target Domain Adaptation (OSMTDA).

The Challenge of OSMTDA

Deploying a model in the wild often involves two simultaneous hurdles. First, the model must handle Multi-Target scenarios, where it is deployed across several distinct environments (e.g., different lighting conditions or artistic styles) at once. Second, it must navigate Open-Set conditions, where target environments contain "unknown" objects that were never seen during training.

Existing research typically addresses these problems in isolation. OSMTDA combines them, requiring a model to correctly classify known objects across multiple domains while robustly identifying and flagging unknown objects to avoid misclassification.

Comparison of Domain Adaptation settings: Open-Set DA, Multi-Target DA, and the combined Open-Set Multi-Target DA (OSMTDA).

The COSMo Framework

To tackle this, the authors propose COSMo (CLIP Talks on Open-Set Multi-Target Domain Adaptation). Rather than training a massive vision model from scratch, COSMo leverages the pre-trained power of CLIP, a vision-language model, and adapts it through a novel "prompt-talking" mechanism.

Instead of fine-tuning the heavy visual encoders, which is computationally expensive and can lead to the loss of general knowledge, COSMo focuses on the prompt space. It adapts how the model describes what it sees through three primary components:

  1. Source Domain-Guided Prompt Learning (SDGPL): The model learns mathematical vectors (prompts) that represent classes. A key innovation here is the use of separate prompts for known classes versus the unknown class. This separation prevents the model from overfitting and helps maintain a clear decision boundary between familiar and unfamiliar objects.
  2. Domain-Specific Bias Network (DSBN): To bridge the gap between different target domains, a small network analyzes input images to generate a "bias" token ($\beta$). This token is injected into the text prompts, effectively tuning the linguistic description to match the specific visual style of the domain.
  3. Confidence-Based Pseudo-Labeling: Since target data lacks labels, the model generates its own using high-confidence predictions. It employs dual thresholds ($\kappa_{lower}$ and $\kappa_{upper}$) to determine if an image belongs to a known category or should be labeled as "unknown."
The COSMo architecture, illustrating how the Domain-Specific Bias Network (DSBN) generates tokens to adapt CLIP's text prompts for diverse target domains.

Experimental Results

COSMo was evaluated on three major benchmarks: Office-31, Office-Home, and Mini-DomainNet. These datasets were modified to simulate the OSMTDA setting by splitting classes into "known" and "unknown" groups across multiple target domains.

  • Performance Boost: COSMo achieved a 5.1% average performance increase over state-of-the-art baselines like DANCE and AD-CLIP.
  • Superior Open-Set Recognition: The model excelled in the Harmonic Mean Score (HOS), which measures the balance between known-class accuracy and unknown-class detection. On the Office-31 dataset, COSMo reached an HOS of 90.01%.
  • Feature Separation: t-SNE visualizations confirmed that COSMo produces tighter, more distinct clusters, effectively separating known classes from the "unknown" noise across diverse environments.

Insights and Future Directions

A major takeaway from this work is that the prompt space is a highly effective lever for domain adaptation. By treating the domain shift as a linguistic adjustment—literally changing how the model "talks" about the images—COSMo achieves high efficiency and accuracy.

However, limitations remain. The current framework assumes the set of target classes is consistent across all target domains, which may not always hold true. Future work could explore disentangling individual target domain characteristics more explicitly or extending this prompt-learning approach to complex tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@inproceedings{monga2024cosmo,
  author = {Munish Monga and Sachin Kumar Giroh and Ankit Jha and Mainak Singha and Biplab Banerjee and Jocelyn Chanussot},
  title = {{COSMo: CLIP Talks on Open-Set Multi-Target Domain Adaptation}},
  booktitle = {BMVC},
  year = {2024},
}
Figure