SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.06165 · 2021

CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2109.06165.json · badge: /api/ran/2109.06165.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
cdtrans/cdtrans canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
cosine_dist Ran
ran; our contract draft was wrong, not the code
cdtrans/cdtrans/loss/triplet_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from stone96123/MDReID, is pointer only (licence: NONE) · get_code("71b4e1d375d8fd78")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from stone96123/MDReID, and GitHub detected no licence in that repository 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.

euclidean_dist Ran
ran; our contract draft was wrong, not the code
cdtrans/cdtrans/loss/triplet_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from stone96123/MDReID, is pointer only (licence: NONE) · get_code("5315f75bf5367f0a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from stone96123/MDReID, and GitHub detected no licence in that repository 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.

normalize Ran
ran; our contract draft was wrong, not the code
cdtrans/cdtrans/loss/triplet_loss.py
code served (permissive licence) · get_code("e3b2a83f52101f2d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4)

ARGS = {
    "x": x,
    "axis": -1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_image Ran
ran, honoured the contract we drafted
cdtrans/cdtrans/datasets/bases.py
code served (permissive licence) · get_code("5f1101145f896208")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os
from PIL import Image

# Create a temporary directory and a valid test image
temp_dir = tempfile.mkdtemp()
img_path = os.path.join(temp_dir, "test_image.jpg")

# Create a small valid RGB image and save it
test_img = Image.new('RGB', (4, 3), color=(255, 0, 0))
test_img.save(img_path)

ARGS = {
    'img_path': img_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
shear_x Ran
ran; our contract draft was wrong, not the code
cdtrans/cdtrans/datasets/autoaugment.py
code served (permissive licence) · get_code("ec44d1cea891fdb3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
import PIL
from PIL import Image, ImageOps, ImageEnhance

# Create a small PIL Image object
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dictionary with all parameters for shear_x
ARGS = {
    'img': img,
    'factor': 0.3,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
translate_x_rel Ran
ran; our contract draft was wrong, not the code
cdtrans/cdtrans/datasets/autoaugment.py
code served (permissive licence) · get_code("aa897f695e05da40")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Image. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
import PIL
from PIL import Image

# Create a small test image
test_image = Image.new('RGB', (100, 80), color='red')

ARGS = {
    'img': test_image,
    'pct': 0.1,
    'resample': Image.BILINEAR,
    'fillcolor': 'white'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_loss Not yet run
unverified (harvested, no recorded run)
cdtrans/cdtrans/loss/make_loss.py
code served (permissive licence) · get_code("2b5e77e0deb72f1b")
How it ran

no invocation recorded.

shear_y Not yet run
unverified (harvested, no recorded run)
cdtrans/cdtrans/datasets/autoaugment.py
code served (permissive licence) · get_code("368f32c4172985b4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 7 later) and 1 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
normalize 29 other papers
13 dated earlier, 16 later
1609.01775 (2016-09)
Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
1811.07130 (2018-11)
Batch DropBlock Network for Person Re-identification and Beyond
and 26 more not named here
shear_x 27 other papers
1 dated earlier, 1 the same month, 25 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 24 more not named here
shear_y 27 other papers
1 dated earlier, 1 the same month, 25 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 24 more not named here
translate_x_rel 26 other papers
1 dated earlier, 1 the same month, 24 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
and 23 more not named here
cosine_dist 15 other papers
3 dated earlier, 12 later
1609.01775 (2016-09)
Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
2105.09701 (2021-05)
An Empirical Study of Vehicle Re-Identification on the AI City Challenge
and 12 more not named here
euclidean_dist 15 other papers
3 dated earlier, 12 later
1609.01775 (2016-09)
Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking
1804.01438 (2018-04)
Learning Discriminative Features with Multiple Granularities for Person Re-Identification
2105.09701 (2021-05)
An Empirical Study of Vehicle Re-Identification on the AI City Challenge
and 12 more not named here
read_image 10 other papers
4 dated earlier, 6 later
1903.07071 (2019-03)
Bag of Tricks and A Strong Baseline for Deep Person Re-identification
1904.07223 (2019-04)
Joint Discriminative and Generative Learning for Person Re-identification
1905.13143 (2019-05)
Semantics-Aligned Representation Learning for Person Re-identification
and 7 more not named here

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-22.

Repositories linked to this paper

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

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. 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.

For agents

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

get_harvested_code_for_paper("2109.06165")
get_code_for_paper("2109.06165")
have("2109.06165")

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

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

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

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

Connect an agent — have() is free.