SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.00233 · 2021

Unsupervised Domain Expansion for Visual Categorization

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 3 failures of our instrument; 1 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/2104.00233.json · badge: /api/ran/2104.00233.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
theeighthday/co-teaching community (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
CORAL Ran
ran on a synthesized input
theeighthday/co-teaching/model/DDC.py
code served (permissive licence) · get_code("59bc5237665af821")
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 0, dtype family float, shape () 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 small tensors for source and target domains
# source and target must be 2D tensors with shape (batch_size, feature_dim)
source = torch.randn(2, 4)  # 2 samples, 4 features
target = torch.randn(3, 4)  # 3 samples, 4 features

ARGS = {
    "source": source,
    "target": target,
}
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 0, dtype family float, shape () — shape () 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
SRDC Ran
ran on a synthesized input
theeighthday/co-teaching/model/SRDC.py
code served (permissive licence) · get_code("84d9315e5fe9fa0a")
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 ResNet. 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 torch
import torch.nn as nn
import math

torch.manual_seed(0)

ARGS = {
    'num_classeses': 10,
    'num_neurons': 128,
    'pretrained': False,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
theeighthday/co-teaching/model/ResNet.py
code served (permissive licence) · get_code("d9def42110729a85")
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) and returned Conv2d. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
theeighthday/co-teaching/model/ResNet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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) and returned Conv2d. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
theeighthday/co-teaching/model/SRDC.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, 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.

get_anno_path Ran
ran on a synthesized input
theeighthday/co-teaching/common.py
code served (permissive licence) · get_code("7e095a7e34683c5f")
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 str. 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 os
import tempfile

# Create a temporary directory structure to simulate the VisualSearch directory
with tempfile.TemporaryDirectory() as tmpdir:
    ROOT_PATH = tmpdir
    
    # Create the directory structure that get_anno_path expects
    collection_name = "test_collection"
    domain_name = "test_domain"
    annotation_name = "test_annotation"
    concept_name = "test_concept"
    
    anno_dir = os.path.join(
        ROOT_PATH,
        collection_name,
        'Annotations',
        'Image',
        annotation_name,
        domain_name
    )
    os.makedirs(anno_dir, exist_ok=True)
    
    # Create a dummy annotation file
    anno_file = os.path.join(anno_dir, f'{concept_name}.txt')
    with open(anno_file, 'w') as f:
        f.write("dummy annotation content\n")
    
    # Define the arguments dictionary
    ARGS = {
        'collection': collection_name,
        'domain': domain_name,
        'annotation_name': annotation_name,
        'concept': concept_name,
        'rootpath': ROOT_PATH
    }
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float 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
get_pred_path Ran
ran on a synthesized input
theeighthday/co-teaching/common.py
code served (permissive licence) · get_code("6eec777f50217f62")
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 str. 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 os

# Mock the ROOT_PATH since we can't actually use __file__ in this context
ROOT_PATH = '/mock/VisualSearch'

ARGS = {
    'test_collection': 'officehome_train',
    'domain': 'Art',
    'model_name': 'resnet50',
    'run': 1,
    'rootpath': ROOT_PATH
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float 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
load_data Ran
ran on a synthesized input
theeighthday/co-teaching/dataloader.py
code served (permissive licence) · get_code("90ea246d6c96c6f7")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import os
import tempfile
from PIL import Image
import shutil

torch.manual_seed(0)

# Create a temporary directory structure for the mock dataset
temp_dir = tempfile.mkdtemp()

# Create the necessary directory structure for domainnet dataset
dataset_name = 'domainnet'
mode_train = 'train'
mode_test = 'test'
source_domain = 'sketch'
target_domain = 'photo'

# Create train directory structure
train_dir = os.path.join(temp_dir, f'{dataset_name}_{mode_train}')
os.makedirs(os.path.join(train_dir, 'ImageSets'), exist_ok=True)
os.makedirs(os.path.join(train_dir, 'Annotations', 'Image', 'concepts345.txt', source_domain), exist_ok=True)
os.makedirs(os.path.join(train_dir, 'Annotations', 'Image', 'concepts345.txt', target_domain), exist_ok=True)

# Create test directory structure
test_dir = os.path.join(temp_dir, f'{dataset_name}_{mode_test}')
os.makedirs(os.path.join(test_dir, 'ImageSets'), exist_ok=True)
os.makedirs(os.path.join(test_dir, 'Annotations', 'Image', 'concepts345.txt', source_domain), exist_ok=True)
os.makedirs(os.path.join(test_dir, 'Annotations', 'Image', 'concepts345.txt', target_domain), exist_ok=True)

# Create dummy image files
dummy_img = Image.new('RGB', (256, 256), color='red')
img_path_train = os.path.join(train_dir, 'image1.jpg')
img_path_test = os.path.join(test_dir, 'image1.jpg')
dummy_img.save(img_path_train)
dummy_img.save(img_path_test)

# Create image list files for train
with open(os.path.join(train_dir, 'ImageSets', f'{source_domain}.txt'), 'w') as f:
    f.write('image1.jpg\n')

with open(os.path.join(train_dir, 'ImageSets', f'{target_domain}.txt'), 'w') as f:
    f.write('image1.jpg\n')

# Create image list files for test
with open(os.path.join(test_dir, 'ImageSets', f'{source_domain}.txt'), 'w') as f:
    f.write('image1.jpg\n')

with open(os.path.join(test_dir, 'ImageSets', f'{target_domain}.txt'), 'w') as f:
    f.write('image1.jpg\n')

# Create annotation files for train
with open(os.path.join(train_dir, 'Annotations', 'Image', 'concepts345.txt', source_domain, 'anno1.txt'), 'w') as f:
    f.write('image1.jpg 2\n')

with open(os.path.join(train_dir, 'Annotations', 'Image', 'concepts345.txt', target_domain, 'anno1.txt'), 'w') as f:
    f.write('image1.jpg 1\n')

# Create annotation files for test
with open(os.path.join(test_dir, 'Annotations', 'Image', 'concepts345.txt', source_domain, 'anno1.txt'), 'w') as f:
    f.write('image1.jpg 2\n')

with open(os.path.join(test_dir, 'Annotations', 'Image', 'concepts345.txt', target_domain, 'anno1.txt'), 'w') as f:
    f.write('image1.jpg 1\n')

# Create path object
class PathConfig:
    def __init__(self, collection_root, dataset_root):
        self.collectionroot = collection_root
        self.datasetroot = dataset_root

# Create train config object
class TrainConfig:
    def __init__(self):
        self.batch_size = 2
        self.num_workers = 0

# Create test config object
class TestConfig:
    def __init__(self):
        self.batch_size = 2
        self.num_workers = 0

# Create main config object
class Config:
    def __init__(self):
        self.path = PathConfig(temp_dir, temp_dir)
        self.dataset = 'domainnet'
        self.source = 'sketch'
        self.target = 'photo'
        self.train = TrainConfig()
        self.test = TestConfig()

ARGS = {
    'config': Config()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
parse_args Ran
ran on a synthesized input
theeighthday/co-teaching/common.py
code served (permissive licence) · get_code("4755a7e60ba83ce0")
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 EasyDict. 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 yaml
import tempfile
import os
from easydict import EasyDict

# Create a temporary YAML config file
config_content = """
run: 1
mode: train
source: A
target: B
dataset: dataset_name
data:
  annotation: annotation_type
path:
  datasetroot: /path/to/dataset
network:
  num_class: 10
  da_model: da_model_name
  model: model_name
"""

# Write config to a temporary file
temp_config = tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', delete=False)
temp_config.write(config_content)
temp_config.close()
config_path = temp_config.name

# Create args object with all required attributes
class Args:
    def __init__(self):
        self.run = 1
        self.mode = 'train'
        self.source = 'A'
        self.target = 'B'
        self.dataset = 'dataset_name'
        self.annotation = 'annotation_type'
        self.datasetroot = '/path/to/dataset'
        self.num_class = 10

args = Args()

ARGS = {
    'config_path': config_path,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
easydict, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EasyDict — a EasyDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EasyDict output the recorded ndim 0 and dtype family float 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
resnet50 Ran
ran on a synthesized input
theeighthday/co-teaching/model/SRDC.py
code served (permissive licence) · get_code("b5a2b5ee46d974cb")
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 ResNet. 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 torch
import torch.nn as nn

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.num_classes = 10
        self.num_neurons = 128
        self.pretrained = False

ARGS = {
    'args': Args()
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float 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
resnet18 Not yet run
unverified (harvested, no recorded run)
theeighthday/co-teaching/model/ResNet.py
code served (permissive licence) · get_code("a9f2f32fb138574c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 4 the same month, 4 later) and 6 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
conv3x3 686 other papers
285 dated earlier, 19 the same month, 376 later, 6 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
114 dated earlier, 13 the same month, 298 later, 5 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
66 dated earlier, 10 the same month, 232 later, 3 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
resnet18 95 other papers
23 dated earlier, 3 the same month, 66 later, 2 same year, order not determinable, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
resnet50 1 other paper
1 dated earlier
2003.08607 (2020-03)
Unsupervised Domain Adaptation via Structurally Regularized Deep Clustering

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

Expanding visual categorization into a novel domain without the need of extra annotation has been a long-term interest for multimedia intelligence. Previously, this challenge has been approached by unsupervised domain adaptation (UDA). Given labeled data from a source domain and unlabeled data from a target domain, UDA seeks for a deep representation that is both discriminative and domain-invariant. While UDA focuses on the target domain, we argue that the performance on both source and target domains matters, as in practice which domain a test example comes from is unknown. In this paper we extend UDA by proposing a new task called unsupervised domain expansion (UDE), which aims to adapt a deep model for the target domain with its unlabeled data, meanwhile maintaining the model's performance on the source domain. We propose Knowledge Distillation Domain Expansion (KDDE) as a general method for the UDE task. Its domain-adaptation module can be instantiated with any existing model. We develop a knowledge distillation based learning mechanism, enabling KDDE to optimize a single objective wherein the source and target domains are equally treated. Extensive experiments on two major benchmarks, i.e., Office-Home and DomainNet, show that KDDE compares favorably against four competitive baselines, i.e., DDC, DANN, DAAN, and CDAN, for both UDA and UDE tasks. Our study also reveals that the current UDA models improve their performance on the target domain at the cost of noticeable performance loss on the source domain.

For agents

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

get_harvested_code_for_paper("2104.00233")
get_code_for_paper("2104.00233")
have("2104.00233")

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

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

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

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

Connect an agent — have() is free.