CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

Tongkun Xu, Weihua Chen, Pichao Wang, Fan Wang, Hao Li +1 more
9/13/2021
314 citations
cs.CVcs.LG
transformer-attention

Official code: CDTrans/CDTrans (341 stars, Python, MIT, last commit 2022-05-31).

Abstract

Unsupervised domain adaptation (UDA) aims to transfer knowledge learned from a labeled source domain to a different unlabeled target domain. Most existing UDA methods focus on learning domain-invariant feature representation, either from the domain level or category level, using convolution neural networks (CNNs)-based frameworks.

Show full abstract

One fundamental problem for the category level based UDA is the production of pseudo labels for samples in target domain, which are usually too noisy for accurate domain alignment, inevitably compromising the UDA performance. With the success of Transformer in various tasks, we find that the cross-attention in Transformer is robust to the noisy input pairs for better feature alignment, thus in this paper Transformer is adopted for the challenging UDA task. Specifically, to generate accurate input pairs, we design a two-way center-aware labeling algorithm to produce pseudo labels for target samples. Along with the pseudo labels, a weight-sharing triple-branch transformer framework is proposed to apply self-attention and cross-attention for source/target feature learning and source-target domain alignment, respectively. Such design explicitly enforces the framework to learn discriminative domain-specific and domain-invariant representations simultaneously. The proposed method is dubbed CDTrans (cross-domain transformer), and it provides one of the first attempts to solve UDA tasks with a pure transformer solution. Experiments show that our proposed method achieves the best performance on public UDA datasets, e.g. VisDA-2017 and DomainNet. Code and models are available at https://github.com/CDTrans/CDTrans.

View on arXivView PDF

Code Implementations(1)

CDTrans/CDTransOfficial100%
MIT

[ICLR2022] CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

34142Python, ShellDec 12, 20214 years agoMIT

Similar Papers

Cite this paper

@article{xu2021cdtrans,
  title  = {CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation},
  author = {Tongkun Xu and Weihua Chen and Pichao Wang and Fan Wang and Hao Li and Rong Jin},
  year   = {2021},
  eprint = {2109.06165},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.06165}
}

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/2109.06165.svg)](https://codeofpaper.com/paper/2109.06165)

Discussion