Domain Adaptation via Prompt Learning

Chunjiang Ge, Rui Huang, Mixue Xie, Zihang Lai, Shiji Song +2 more
2/14/2022
cs.CV

Official code: LeapLabTHU/DAPrompt (99 stars, Python, MIT, last commit 2023-02-12).

Abstract

Unsupervised domain adaption (UDA) aims to adapt models learned from a well-annotated source domain to a target domain, where only unlabeled samples are given. Current UDA approaches learn domain-invariant features by aligning source and target feature spaces.

Show full abstract

Such alignments are imposed by constraints such as statistical discrepancy minimization or adversarial training. However, these constraints could lead to the distortion of semantic feature structures and loss of class discriminability. In this paper, we introduce a novel prompt learning paradigm for UDA, named Domain Adaptation via Prompt Learning (DAPL). In contrast to prior works, our approach makes use of pre-trained vision-language models and optimizes only very few parameters. The main idea is to embed domain information into prompts, a form of representations generated from natural language, which is then used to perform classification. This domain information is shared only by images from the same domain, thereby dynamically adapting the classifier according to each domain. By adopting this paradigm, we show that our model not only outperforms previous methods on several cross-domain benchmarks but also is very efficient to train and easy to implement.

View on arXivView PDF

Code Implementations(1)

MIT

Pytorch implementation of DAPrompt: https://arxiv.org/abs/2202.06687

9912Python, ShellSep 29, 20223 years agoMIT
clipdomain-adaptation

Similar Papers

Cite this paper

@article{ge2022domain,
  title  = {Domain Adaptation via Prompt Learning},
  author = {Chunjiang Ge and Rui Huang and Mixue Xie and Zihang Lai and Shiji Song and Shuang Li and Gao Huang},
  year   = {2022},
  eprint = {2202.06687},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.06687}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.06687.svg)](https://codeofpaper.com/paper/2202.06687)

Discussion