Soft Prompt Generation for Domain Generalization

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Bai, Shuanghao, Zhang, Yuedi, Zhou, Wanqi, Luan, Zhirong, Chen, Badong
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929418755112960
author Bai, Shuanghao
Zhang, Yuedi
Zhou, Wanqi
Luan, Zhirong
Chen, Badong
author_facet Bai, Shuanghao
Zhang, Yuedi
Zhou, Wanqi
Luan, Zhirong
Chen, Badong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_19286
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Soft Prompt Generation for Domain Generalization
Bai, Shuanghao
Zhang, Yuedi
Zhou, Wanqi
Luan, Zhirong
Chen, Badong
Computer Vision and Pattern Recognition
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.
title Soft Prompt Generation for Domain Generalization
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2404.19286