ProS: Prompting-to-Simulate Generalized Knowledge for Universal Cross-Domain Retrieval

Kaipeng Fang, Jingkuan Song, Lianli Gao, Pengpeng Zeng, Zhi-Qi Cheng, Xiyao Li, Heng Tao Shen

Introduction

Cross-Domain Retrieval (CDR) has long been a cornerstone of computer vision, enabling systems to bridge the gap between different visual representations—such as using a hand-drawn sketch to find a photographic image of the same object. However, traditional CDR typically operates in a "closed-set" environment where all domains and categories are known during the training phase.

In real-world applications, systems encounter Universal Cross-Domain Retrieval (UCDR), a significantly more challenging "open-set" scenario. UCDR requires models to generalize across two dimensions of shift simultaneously: Domain Shift (encountering entirely new styles like Infographs or Quickdraws) and Semantic Shift (encountering categories never seen during training, such as a "Unicorn" when only "Horses" were available).

Comparison of CDR vs UCDR and performance of ProS against baselines.

The Limitations of Current Approaches

Existing solutions for UCDR often rely on full fine-tuning of heavy backbones like ResNet or Vision Transformers (ViT). While effective to a degree, this approach is computationally expensive and prone to "catastrophic forgetting," where the model loses the broad, generalized knowledge acquired during large-scale pre-training. Furthermore, standard prompt-tuning methods like Visual Prompt Tuning (VPT) or CoOp utilize "static" prompts. These fixed prompts struggle to adapt to the specific nuances of a brand-new domain or an unseen class at test time.

Methodology: The ProS Framework

The authors propose ProS (Prompting-to-Simulate), a novel framework that leverages the pre-trained power of CLIP (Contrastive Language-Image Pre-training) while keeping its millions of parameters frozen. Instead of modifying the backbone, ProS learns to generate dynamic, content-aware prompts through a two-stage "mask-and-simulate" strategy.

The two-stage training pipeline of ProS: Prompt Units Learning and Context-aware Simulator Learning.

Stage 1: Prompt Unit Learning (PUL)

In the first stage, the model learns two distinct sets of prompt components: Domain Prompt Units (DP) and Semantic Prompt Units (SP). To ensure these units capture specialized knowledge, ProS employs a "mask-and-align" strategy. For any given training image, the model masks out all irrelevant units, utilizing only those that correspond to the specific domain and class of the sample. This forces individual units to become highly specialized experts in their respective domains or categories.

Stage 2: Context-aware Simulator Learning (CSL)

To handle unseen data during inference, the model must be able to synthesize prompts without knowing the ground-truth domain or class. The authors introduce the Content-aware Prompt Simulator (CaPS), a lightweight 2-layer ViT module.

During this stage, the model simulates an unknown scenario by masking the ground-truth units learned in Stage 1. The CaPS is then trained to look at the image's visual features and synthesize a Content-aware Dynamic Prompt (CaDP). By forcing the simulator to generate effective prompts based solely on visual context—without access to the specialized units—the model learns to bridge the gap to unseen domains and classes.

Experimental Results

The ProS method was evaluated on three major benchmarks: DomainNet (345 categories across 6 domains), Sketchy, and TU-Berlin.

Performance and Efficiency

  • State-of-the-Art Accuracy: On the DomainNet benchmark, ProS achieved an average mAP@200 of 60.52%. This significantly outperforms full CLIP fine-tuning (52.29%) and other prompt-tuning methods like VPT (57.20%).
  • Parameter Efficiency: Remarkably, ProS achieves these results while training only 12.84% of the total model parameters, making it far more efficient than full fine-tuning approaches.
  • Robust Generalization: Qualitative analysis using t-SNE visualizations confirmed that ProS produces tighter clusters for unseen classes and superior alignment across domains compared to competing methods.

Conclusion

ProS represents a significant step forward in Universal Cross-Domain Retrieval. By combining the generalized knowledge of a frozen CLIP backbone with a dynamic, two-stage prompt simulation strategy, it effectively addresses the challenges of both domain and semantic shifts. While performance remains a challenge in extremely sparse domains like Quickdraw, ProS demonstrates that dynamic, content-aware prompting is a powerful alternative to traditional fine-tuning for open-set retrieval tasks.

Summary updated

BibTeX
@inproceedings{fang2023pros,
  author = {Kaipeng Fang and Jingkuan Song and Lianli Gao and Pengpeng Zeng and Zhi-Qi Cheng and Xiyao Li and Heng Tao Shen},
  title = {{ProS: Prompting-to-Simulate Generalized Knowledge for Universal Cross-Domain Retrieval}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure