SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.03344 · ICCV · 2021

OVANet: One-vs-All Network for Universal Domain Adaptation

Kate Saenko, Kuniaki Saito

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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, 1 violated it and 1 has no contract verdict; 7 failures of our instrument; 3 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.03344.json · badge: /api/ran/2104.03344.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
VisionLearningGroup/OVANet canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
VisionLearningGroup/visda21-dev community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VisionLearningGroup/OVANet/utils/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from albert0147/aad_sfda, is pointer only (licence: NONE) · get_code("1b0bf9bd060bf1a1")
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 albert0147/aad_sfda, 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.

find_classes Ran
ran; our contract draft was wrong, not the code
VisionLearningGroup/OVANet/data_loader/mydataset.py
code served (permissive licence) · get_code("52d10a10fb72fb9f")
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. 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
import shutil

# Create a temporary directory with some subdirectories to simulate a class directory structure
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "class_a"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_b"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_c"), exist_ok=True)

ARGS = {
    "dir": temp_dir
}
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 tuple — a tuple output has no array shape of its own; none is 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
inv_lr_scheduler Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
VisionLearningGroup/OVANet/utils/lr_schedule.py
code served (permissive licence) · get_code("aa66984f3b0d98e3")
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 float, 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
import torch.nn as nn
from torch.optim import SGD

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer with multiple param groups to test the loop
optimizer = SGD([
    {'params': model.weight, 'lr': 0.001},
    {'params': model.bias, 'lr': 0.001}
], lr=0.001, weight_decay=0.0005)

# param_lr is used to scale learning rates for different param groups
param_lr = [1.0, 0.5]

# Define all arguments
ARGS = {
    'param_lr': param_lr,
    'optimizer': optimizer,
    'iter_num': 5000,
    'gamma': 10,
    'power': 0.75,
    'init_lr': 0.001,
    'weight_decay': 0.0005,
    'max_iter': 10000
}
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 float, 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
is_image_file Ran
ran, violated the contract we drafted
VisionLearningGroup/OVANet/data_loader/mydataset.py
pointer only (licence: MIT); the stored copy get_code serves, from sgoldyaev/DeepFashion.ADGAN, is pointer only (licence: NONE) · get_code("ab4109634b75ef8b")
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 sgoldyaev/DeepFashion.ADGAN, 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.

load_model Ran
ran; our contract draft was wrong, not the code
VisionLearningGroup/OVANet/utils/utils.py
code served (permissive licence) · get_code("e5fe84875f47cd9b")
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 torch.nn as nn
import tempfile
import os

torch.manual_seed(0)

# Create minimal models that have load_state_dict method
class SimpleGeneratorModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SimpleCriticModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

# Create model instances
model_g = SimpleGeneratorModel()
model_c = SimpleCriticModel()

# Create a checkpoint file with state dicts
checkpoint = {
    'g_state_dict': model_g.state_dict(),
    'c_state_dict': model_c.state_dict()
}

# Write checkpoint to a temporary file
temp_dir = tempfile.mkdtemp()
load_path = os.path.join(temp_dir, 'checkpoint.pt')
torch.save(checkpoint, load_path)

ARGS = {
    'model_g': model_g,
    'model_c': model_c,
    'load_path': load_path
}
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 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
log_set Ran
ran; our contract draft was wrong, not the code
VisionLearningGroup/OVANet/utils/utils.py
code served (permissive licence) · get_code("3ef6fcb67669d5c8")
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 for the record output
temp_dir = tempfile.mkdtemp()

ARGS = {
    'kwargs': {
        'source_data': 'dataset_source_mnist',
        'target_data': '/path/to/dataset_target_cifar.csv',
        'network': 'resnet50',
        'config_file': '/path/to/config_params.yaml',
        'script_name': 'train_model.py',
        'multi': 0.001,
        'exp_name': 'experiment_001'
    }
}

# Ensure the temp directory exists for record output
record_dir = os.path.join(temp_dir, 'record', ARGS['kwargs']['exp_name'], 'config_params')
os.makedirs(record_dir, exist_ok=True)

# Patch os.path.join to use our temp directory for the record path
original_join = os.path.join
def patched_join(*args):
    result = original_join(*args)
    if result.startswith('record'):
        return original_join(temp_dir, result)
    return result

os.path.join = patched_join
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
make_dataset Ran
ran on a synthesized input
VisionLearningGroup/OVANet/data_loader/mydataset.py
code served (permissive licence) · get_code("d90e54cc28eb9dba")
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 list, ndim 2, 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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create subdirectories for classes
class1_dir = os.path.join(temp_dir, "class1")
class2_dir = os.path.join(temp_dir, "class2")
os.makedirs(class1_dir)
os.makedirs(class2_dir)

# Create dummy image files
with open(os.path.join(class1_dir, "image1.jpg"), "w") as f:
    f.write("dummy")
with open(os.path.join(class1_dir, "image2.png"), "w") as f:
    f.write("dummy")
with open(os.path.join(class2_dir, "image3.jpeg"), "w") as f:
    f.write("dummy")
with open(os.path.join(class2_dir, "notimage.txt"), "w") as f:
    f.write("dummy")

# Create class_to_idx mapping
class_to_idx = {
    "class1": 0,
    "class2": 1
}

ARGS = {
    "dir": temp_dir,
    "class_to_idx": class_to_idx
}
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 list, ndim 2, dtype family float — a list 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
open_entropy Ran
ran; our contract draft was wrong, not the code
VisionLearningGroup/OVANet/utils/loss.py
code served (permissive licence) · get_code("62e430d298d27ab3")
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
import torch.nn.functional as F

torch.manual_seed(0)

# The function expects:
# - out_open: a 3D tensor with shape (batch, 2, dim)
# The function checks:
#   - len(out_open.size()) == 3 (3D tensor)
#   - out_open.size(1) == 2 (second dimension must be 2)
# Then it applies softmax on dimension 1 and computes entropy

# Create a 3D tensor with shape (batch_size, 2, feature_dim)
batch_size = 2
num_classes = 2
feature_dim = 4

out_open = torch.randn(batch_size, num_classes, feature_dim)

ARGS = {
    "out_open": out_open
}
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
ova_loss Ran
ran; our contract draft was wrong, not the code
VisionLearningGroup/visda21-dev/utils/loss.py
code served (permissive licence) · get_code("e94975ec6929c1c0")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn.functional as F

torch.manual_seed(0)

# The function expects:
# - out_open: tensor of shape (batch_size, 2, num_classes)
# - label: tensor of shape (batch_size,) with class indices

batch_size = 2
num_classes = 4

# Create out_open with shape (batch_size, 2, num_classes)
# This will be passed through softmax along dimension 1
out_open = torch.randn(batch_size, 2, num_classes)

# Create label with shape (batch_size,) containing class indices
# Values should be in range [0, num_classes)
label = torch.tensor([0, 2])

ARGS = {
    "out_open": out_open,
    "label": label,
}
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 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
get_loader Not yet run
unverified (harvested, no recorded run)
VisionLearningGroup/OVANet/data_loader/get_loader.py
code served (permissive licence) · get_code("8ff18904c899705c")
How it ran

no invocation recorded.

get_loader_label Not yet run
unverified (harvested, no recorded run)
VisionLearningGroup/OVANet/data_loader/get_loader.py
code served (permissive licence) · get_code("9f5714078503b766")
How it ran

no invocation recorded.

get_model_mme Not yet run
unverified (harvested, no recorded run)
VisionLearningGroup/OVANet/utils/utils.py
code served (permissive licence) · get_code("c34f764aa367c56c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 5 later) and 7 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
is_image_file 62 other papers
18 dated earlier, 1 the same month, 43 later
1609.04802 (2016-09)
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
1703.07511 (2017-03)
Deep Photo Style Transfer
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 59 more not named here
find_classes 30 other papers
14 dated earlier, 16 later
1406.2661 (2014-06)
Generative Adversarial Networks
1612.06321 (2016-12)
Large-Scale Image Retrieval with Attentive Deep Local Features
1809.04729 (2018-09)
A Less Biased Evaluation of Out-of-distribution Sample Detectors
and 27 more not named here
make_dataset 2 other papers
2 later
2105.14148 (2021-05)
OpenMatch: Open-set Consistency Regularization for Semi-supervised Learning with Outliers
2207.13048 (2022-07)
Domain Adaptation under Open Set Label Shift
entropy 1 other paper
1 later
2205.04183 (2022-05)
Attracting and Dispersing: A Simple Approach for Source-free Domain Adaptation
open_entropy 1 other paper
1 later
2302.03133 (2023-02)
Domain Adaptation for Time Series Under Feature and Label Shifts

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

Universal Domain Adaptation (UNDA) aims to handle both domain-shift and category-shift between two datasets, where the main challenge is to transfer knowledge while rejecting "unknown" classes which are absent in the labeled source data but present in the unlabeled target data. Existing methods manually set a threshold to reject "unknown" samples based on validation or a pre-defined ratio of "unknown" samples, but this strategy is not practical. In this paper, we propose a method to learn the threshold using source samples and to adapt it to the target domain. Our idea is that a minimum inter-class distance in the source domain should be a good threshold to decide between "known" or "unknown" in the target. To learn the inter-and intra-class distance, we propose to train a onevs-all classifier for each class using labeled source data. Then, we adapt the open-set classifier to the target domain by minimizing class entropy. The resulting framework is the simplest of all baselines of UNDA and is insensitive to the value of a hyper-parameter, yet outperforms baselines with a large margin. Implementation is available at https:// github.com/VisionLearningGroup/OVANet.

For agents

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

get_harvested_code_for_paper("2104.03344")
get_code_for_paper("2104.03344")
have("2104.03344")

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

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

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

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

Connect an agent — have() is free.