SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.10377 · CVPR · 2022

Contrastive Test-Time Adaptation

U Berkeley, Trevor Darrell, Sayna Ebrahimi, Dian Chen

arXiv · PDF · Open in the Atlas

Code that ran

23 of 32 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 2 violated it and 6 have no contract verdict; 11 failures of our instrument; 9 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2204.10377.json · badge: /api/ran/2204.10377.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
DianCh/AdaContrast marked official in Papers with Code
Papers with Code archive
23 ran · 8 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
AdaMoCo Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("9b777416ee4b9661")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AverageMeter Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("52b386c85c15f1f1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

GaussianBlur Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("aea0d8d156ae8f0e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ImageList Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("ac8ac005970ac1fd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

NCropsTransform Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("dfe72857fdcd0631")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ProgressMeter Ran
ran on a synthesized input · constructed an object; no result was computed
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("b4cae627da9d4b40")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

adjust_learning_rate Ran
ran, honoured the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("2944a9ae1c818935")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_acc Ran
ran, honoured the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("e4f0afadad927f4c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

classification_loss Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("4769519334699711")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cross_entropy_loss Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("7f2f33aeb9dd8ed3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

div Ran
ran, honoured the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("2bb0642fa17353c2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

diversification_loss Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("b7348e1772bfba11")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_augmentation Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("3277bef847b54b5d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_augmentation_versions Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("aa067e5e8cb4bee4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_distances Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("9a1f0bd5002fe561")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_target_optimizer Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("b01220197705c453")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

instance_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("1f34a1638da5703f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_master Ran
ran, violated the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("5db12a48f3a9c2a9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_image Ran
ran, honoured the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("d41e65573feeba36")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

per_class_accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("dd980e064cdbfe0e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

refine_predictions Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("d974e249f37878d2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

soft_k_nearest_neighbors Ran
ran; our contract draft was wrong, not the code
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("6651e12b55f05e5d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

use_wandb Ran
ran, violated the contract we drafted
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("412b38636159f8fa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Classifier Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("291ff0547fe08f00")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

CustomDistributedDataParallel Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("f6f503974907329f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

concat_all_gather Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from tntek/source-free-domain-adaptation
pointer only; the stored copy get_code serves, from tntek/source-free-domain-adaptation, is pointer only (licence: NONE) · get_code("a2ae53d34bc13317")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

eval_and_label_dataset Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("1fb8be6b7baba941")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

remove_wrap_arounds Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("ee1a4a51e75b6f4e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

save_checkpoint Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("df95bf057b7a70cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

train_epoch Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("ee293b943ff80976")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

train_target_domain Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("56ce9a1463e90b9f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

update_labels Not yet run
unverified (harvested, no recorded run)
DianCh/AdaContrast/target.py
pointer only (licence: NONE) · get_code("8eb94c91b5bcfa39")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DianCh/AdaContrast when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 32 samples lifted from this paper's linked repositories, 32 carry a function identity and 0 do not. Of the 32 distinct functions with an identity, 10 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 10 later) and 22 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
AverageMeter
brick of this paper's assembly: helper
9 other papers
3 dated earlier, 6 later · 8 only as an assembly brick
2009.14193 (2020-09)
Uncertainty Sets for Image Classifiers using Conformal Prediction
2106.10891 (2021-06)
Open-set Label Noise Can Improve Robustness Against Inherent Label Noise
2203.09343 (2022-03)
CYBORGS: Contrastively Bootstrapping Object Representations by Grounding in Segmentation
and 6 more not named here
concat_all_gather
brick of this paper's assembly: helper
5 other papers
2 dated earlier, 3 later · 2 only as an assembly brick
1904.06487 (2019-04)
Semi-supervised Domain Adaptation via Minimax Entropy
2003.04297 (2020-03)
Improved Baselines with Momentum Contrastive Learning
2206.15369 (2022-06)
No Reason for No Supervision: Improved Generalization in Supervised Models
and 2 more not named here
is_master
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
2203.00131 (2022-03)
A Data-scalable Transformer for Medical Image Segmentation: Architecture, Model Efficiency, and Benchmark
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
load_image
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
1904.06487 (2019-04)
Semi-supervised Domain Adaptation via Minimax Entropy
2505.18514 (2025-05)
Test-Time Adaptation with Binary Feedback
remove_wrap_arounds
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later · 1 only as an assembly brick
1904.06487 (2019-04)
Semi-supervised Domain Adaptation via Minimax Entropy
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
ProgressMeter
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
adjust_learning_rate
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
calculate_acc
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
per_class_accuracy
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation
use_wandb
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2303.17132 (2023-03)
C-SFDA: A Curriculum Learning Aided Self-Training Framework for Efficient Source Free Domain Adaptation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 selfsupervised 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-theart performance on major benchmarks while having several desirable properties compared to existing works, including memory efficiency, insensitivity to hyper-parameters, and better model calibration. Code is released at https: //github.com/DianCh/AdaContrast.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2204.10377")
get_code_for_paper("2204.10377")
have("2204.10377")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2204.10377.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2204.10377.svg)](https://syntology.ai/paper/2204.10377)

Connect an agent — have() is free.