Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Soft Prompt Generation for Domain Generalization

About

Large pre-trained vision language models (VLMs) have shown impressive zero-shot ability on downstream tasks with manually designed prompt. To further adapt VLMs to downstream tasks, soft prompt is proposed to replace manually designed prompt, which undergoes fine-tuning based on specific domain data. Prior prompt learning methods primarily learn a fixed prompt or residuled prompt from training samples. However, the learned prompts lack diversity and ignore information about unseen domains. In this paper, we reframe the prompt learning framework from a generative perspective and propose a simple yet efficient method for the Domain Generalization (DG) task, namely Soft Prompt Generation (SPG). Specifically, SPG consists of a two-stage training phase and an inference phase. During the training phase, we introduce soft prompt label for each domain, aiming to incorporate the generative model domain knowledge. During the inference phase, the generator of the generative model is employed to obtain instance-specific soft prompts for the unseen target domain. Extensive experiments on five domain generalization benchmarks of three DG tasks demonstrate that SPG achieves state-of-the-art performance. The code is available at https://github.com/renytek13/Soft-Prompt-Generation-with-CGAN.

Shuanghao Bai, Yuedi Zhang, Wanqi Zhou, Zhirong Luan, Badong Chen• 2024

Related benchmarks

TaskDatasetResultRank
Domain GeneralizationVLCS
Accuracy84
238
Domain GeneralizationOfficeHome
Accuracy83.6
182
Domain GeneralizationDomainNet
Accuracy60.1
113
Domain GeneralizationTerraIncognita
Accuracy50.2
81
Image ClassificationPACS, VLCS, OfficeHome, TerraIncognita, DomainNet out-of-domain
PACS Accuracy96.7
31
Multi-source Domain GeneralizationPACS
Accuracy97
19
Image ClassificationOF A 2.0
Accuracy51.2
12
Image ClassificationTQ-DIGIT
Accuracy60.1
12
Tactile RecognitionTactile Cross-Domain OF Real to X Unseen target domains
TAG ACC54.7
12
Domain GeneralizationTQ-DuraGel → X (unseen target domains)
TAG Accuracy56.8
12
Showing 10 of 26 rows

Other info

Follow for update