SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.17067 · 2022

Unified Optimal Transport Framework for Universal Domain Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 2 have no contract verdict; 1 failure of our instrument; 0 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/2210.17067.json · badge: /api/ran/2210.17067.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
changwxx/uniot-for-unida canonical (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
adaptive_filling Ran
ran on a synthesized input
changwxx/uniot-for-unida/utils/lib.py
code served (permissive licence) · get_code("9de3b72aea7c0b1b")
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. 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 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
import numpy as np

torch.manual_seed(0)

# Create tiny tensors matching function usage
# ubot_feature_t: used in matmul with source_prototype.t(), shape (batch, dim)
ubot_feature_t = torch.randn(2, 4)

# source_prototype: used in matmul and indexing, shape (num_classes, dim)
source_prototype = torch.randn(3, 4)

# gamma: scalar threshold for comparison
gamma = 0.5

# beta: passed to ubot_CCD, used in sinkhorn_knopp_unbalanced
# Should be a numpy array or compatible - it's the second positional arg
beta = np.ones(3) / 3

# fill_size: integer parameter
fill_size = 0

# stopThr: threshold parameter
stopThr = 0.0001

ARGS = {
    'ubot_feature_t': ubot_feature_t,
    'source_prototype': source_prototype,
    'gamma': gamma,
    'beta': beta,
    'fill_size': fill_size,
    'stopThr': stopThr,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot, torch — 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
sinkhorn Ran
ran; our contract draft was wrong, not the code
changwxx/uniot-for-unida/utils/lib.py
code served (permissive licence) · get_code("2be40bf60ede15a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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 output tensor
# The function expects 'out' to be a 2D tensor that will be transposed
# Q = torch.exp(out / epsilon).t() means out is (B, K) and Q becomes (K, B)
# where K is number of prototypes/clusters and B is batch size
B = 2  # batch size
K = 3  # number of prototypes/clusters

out = torch.randn(B, K)

# epsilon is a temperature parameter for the softmax
epsilon = 0.05

# sinkhorn_iterations is the number of iterations for the Sinkhorn-Knopp algorithm
sinkhorn_iterations = 3

ARGS = {
    'out': out,
    'epsilon': epsilon,
    'sinkhorn_iterations': sinkhorn_iterations
}
Setup block drafted by
a language model, Claude Sonnet 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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
ubot_CCD Ran
ran on a synthesized input
changwxx/uniot-for-unida/utils/lib.py
code served (permissive licence) · get_code("3bd4635bd4d16ce8")
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. 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 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 numpy as np
import ot

torch.manual_seed(0)

# Create a small similarity matrix
# sim needs to be a 2D tensor where:
# - size(0) is the number of samples
# - size(1) is the number of classes/targets
# The function accesses sim.size(0), sim.size(1), and calls .detach().cpu().numpy()
sim = torch.randn(5, 4).float()

# beta is used in sinkhorn_knopp_unbalanced
# It should be a 1D array/tensor with size equal to sim.size(1)
beta = ot.unif(sim.size(1))

# fake_size and fill_size are used for slicing in minibatch mode
fake_size = 1
fill_size = 1

# mode determines which slicing path is taken
mode = 'minibatch'

# stopThr is passed to the sinkhorn algorithm
stopThr = 0.0001

ARGS = {
    'sim': sim,
    'beta': beta,
    'fake_size': fake_size,
    'fill_size': fill_size,
    'mode': mode,
    'stopThr': stopThr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot, torch — 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 2 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
sinkhorn 1 other paper
1 dated earlier
1706.07522 (2017-06)
Deep Hashing Network for Unsupervised 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-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 (UniDA) aims to transfer knowledge from a source domain to a target domain without any constraints on label sets. Since both domains may hold private classes, identifying target common samples for domain alignment is an essential issue in UniDA. Most existing methods require manually specified or hand-tuned threshold values to detect common samples thus they are hard to extend to more realistic UniDA because of the diverse ratios of common classes. Moreover, they cannot recognize different categories among target-private samples as these private samples are treated as a whole. In this paper, we propose to use Optimal Transport (OT) to handle these issues under a unified framework, namely UniOT. First, an OT-based partial alignment with adaptive filling is designed to detect common classes without any predefined threshold values for realistic UniDA. It can automatically discover the intrinsic difference between common and private classes based on the statistical information of the assignment matrix obtained from OT. Second, we propose an OT-based target representation learning that encourages both global discrimination and local consistency of samples to avoid the over-reliance on the source. Notably, UniOT is the first method with the capability to automatically discover and recognize private categories in the target domain for UniDA. Accordingly, we introduce a new metric H^3-score to evaluate the performance in terms of both accuracy of common samples and clustering performance of private ones. Extensive experiments clearly demonstrate the advantages of UniOT over a wide range of state-of-the-art methods in UniDA.

For agents

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

get_harvested_code_for_paper("2210.17067")
get_code_for_paper("2210.17067")
have("2210.17067")

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

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

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

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

Connect an agent — have() is free.