Introduction
Unsupervised Domain Adaptation (UDA) aims to transfer knowledge from a labeled source domain (e.g., synthetic images) to an unlabeled target domain (e.g., real-world photos). Traditional methods typically focus on learning domain-invariant features—finding a "common denominator" between datasets—and using a single shared classifier. However, this approach often creates a dilemma: forcing features to be identical across domains can strip away useful domain-specific nuances, and a shared classifier often remains biased toward the source domain.
The WinTR Framework
The Win-Win TRansformer (WinTR) framework rethinks UDA by moving away from the "one-size-fits-all" approach. By leveraging the flexibility of Vision Transformers (ViTs), WinTR simultaneously preserves domain-specific information and learns shared, transferable features.
As illustrated in Figure 3, WinTR introduces three primary innovations:
- Dual Classification Tokens: Instead of a single
[CLS]token, the model uses two:[src]and[tgt]. These tokens learn distinct mappings for the source and target domains. A domain-wise token mask in the self-attention layers prevents interference between them. - Domain-Specific Classifiers: The model trains two separate classifiers ($g^s$ and $g^t$) on top of these tokens. This allows the model to fit the unique characteristics of each domain rather than forcing a compromise.
- Bi-directional Knowledge Transfer: To ensure the domains remain aligned, the model uses source-guided label refinement and single-sided feature alignment. Contrastive learning with a stop-gradient operation pulls target features toward source features to transfer knowledge without collapsing the distinct identities of the two tokens.
Key Insights: Transformers as Natural Adapters
A core finding of this work is that Transformers are inherently better suited for UDA than CNNs. Qualitative visualizations of attention maps show that while CNNs (like ResNet-50) often get distracted by domain-specific backgrounds, Transformers (like DeiT-Small) maintain a much tighter focus on the primary object across different styles.
Furthermore, the authors discovered that source-oriented representations are actually better at refining target pseudo-labels than target-oriented ones. Because the source features are trained on clean, ground-truth labels, they preserve finer structural relationships that help "clean up" noisy target predictions during the label refining phase.
Experimental Results
WinTR was evaluated on three standard UDA benchmarks: Office-Home (65 categories), VisDA-2017 (synthetic-to-real shift), and DomainNet (0.6 million images across 345 categories). The model consistently outperformed previous state-of-the-art (SOTA) methods:
- VisDA-2017: Achieved 90.1% average accuracy, surpassing the previous best (FixBi) by 2.9%.
- Office-Home: Reached 77.2% average accuracy, a significant jump over the 72.2% achieved by ATDOC.
- DomainNet: On this massive dataset, WinTR-S achieved a 13.4% lead over the popular CDAN method and a 9.6% lead over the Transformer-based CDTrans.
Conclusion
WinTR demonstrates that exploiting both domain-specific and invariant knowledge is a "win-win" strategy for domain adaptation. By embracing the architectural advantages of Transformers and utilizing a dual-token approach, WinTR sets a new performance standard across diverse and challenging UDA benchmarks.
Summary updated