Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Contrastive Test-Time Adaptation

About

Test-time adaptation is a special setting of unsupervised domain adaptation where a trained model on the source domain has to adapt to the target domain without accessing source data. We propose a novel way to leverage self-supervised contrastive learning to facilitate target feature learning, along with an online pseudo labeling scheme with refinement that significantly denoises pseudo labels. The contrastive learning task is applied jointly with pseudo labeling, contrasting positive and negative pairs constructed similarly as MoCo but with source-initialized encoder, and excluding same-class negative pairs indicated by pseudo labels. Meanwhile, we produce pseudo labels online and refine them via soft voting among their nearest neighbors in the target feature space, enabled by maintaining a memory queue. Our method, AdaContrast, achieves state-of-the-art performance on major benchmarks while having several desirable properties compared to existing works, including memory efficiency, insensitivity to hyper-parameters, and better model calibration. Project page: sites.google.com/view/adacontrast.

Dian Chen, Dequan Wang, Trevor Darrell, Sayna Ebrahimi• 2022

Related benchmarks

TaskDatasetResultRank
Unsupervised Domain AdaptationOffice-Home
Average Accuracy65
250
Image ClassificationPACS
Overall Average Accuracy75.4
241
Image ClassificationDomainNet (test)
Average Accuracy65.4
219
Domain AdaptationOffice-31
Accuracy (A -> W)83.1
172
Image ClassificationCIFAR-10C Severity Level 5 (test)
Average Error Rate (Severity 5)18.5
127
Image ClassificationImageNet-R (test)--
118
Image ClassificationImageNet-C level 5
Avg Top-1 Acc (ImageNet-C L5)65.5
110
Image ClassificationImageNet-C Severity 5 (test)
Mean Error Rate (Severity 5)59.9
104
Unsupervised Domain AdaptationOffice-31
A->W Accuracy83.1
83
Image ClassificationVisDA-C (test)
Mean Accuracy86.8
76
Showing 10 of 35 rows

Other info

Code

Follow for update