SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.12742 · NeurIPS · 2023

Make the U in UDA Matter: Invariant Consistency Learning for Unsupervised Domain Adaptation

Hanwang Zhang, Qianru Sun, Zhongqi Yue

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 4 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2309.12742.json · badge: /api/ran/2309.12742.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
yue-zhongqi/ICON canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
yue-zhongqi/icon canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
EqInv Ran
ran on a synthesized input · constructed an object; no result was computed
yue-zhongqi/icon/icon/eqinv.py
code served (permissive licence) · get_code("05d5fa3202581544")
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 an instance of its own class, EqInv: the run constructed the object and did not call it, so no result was computed. 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 as nn
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create minimal setup for EqInv
num_classes = 3
memory_length_per_class = 5
temperature = 0.07

ARGS = {
    'num_classes': num_classes,
    'memory_length_per_class': memory_length_per_class,
    'temperature': temperature
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EqInv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EqInv 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
SupConLoss Ran
ran on a synthesized input
yue-zhongqi/icon/icon/eqinv.py
code served (permissive licence) · get_code("9e503ad659734ce5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 0, 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 as nn

# INIT_ARGS for SupConLoss.__init__
INIT_ARGS = {
    'temperature': 0.07,
    'contrast_mode': 'all',
    'base_temperature': 0.07
}

# ARGS for SupConLoss.forward
# features: [bsz, n_views, feature_dim]
# labels: [bsz]
batch_size = 3
n_views = 2
feature_dim = 5

features = torch.randn(batch_size, n_views, feature_dim)
# Normalize features (common in contrastive learning)
features = nn.functional.normalize(features, dim=2)

labels = torch.tensor([0, 1, 0])  # Two samples from class 0, one from class 1

ARGS = {
    'features': features,
    'labels': labels,
    'mask': None
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
entropy Ran
ran; our contract draft was wrong, not the code
yue-zhongqi/ICON/icon/entropy.py
code served (permissive licence) · get_code("410274324074f68f")
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 1, dtype family float, shape (2,) 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 tiny batch of probability-like predictions
# Shape: (batch_size=2, num_classes=4)
# Values should be valid probabilities (sum to 1, between 0 and 1)
predictions = torch.tensor([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

ARGS = {
    'predictions': predictions,
    'reduction': 'none'
}
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 1, dtype family float, shape (2,) — shape (2,) 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
reduce_dimension Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yue-zhongqi/ICON/icon/cluster.py
code served (permissive licence) · get_code("24d03f510ae465bf")
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 torch
import numpy as np

torch.manual_seed(0)

# The function expects:
# - features: array-like data that can be passed to PCA.fit_transform() and umap.UMAP.fit_transform()
# - mode: string, either 'pca' or 'umap'
# - dim: integer for n_components

# Create a small feature matrix (2 samples, 4 features)
features = np.random.randn(2, 4).astype(np.float32)

# Test with 'pca' mode
mode = 'pca'

# Reduce to 2 dimensions
dim = 2

ARGS = {
    'features': features,
    'mode': mode,
    'dim': dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, umap — 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
shift_log Ran
ran; our contract draft was wrong, not the code
yue-zhongqi/ICON/icon/uda_backbone.py
code served (permissive licence) · get_code("e1deb74aab00d687")
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)

# Construct a small tensor for the input
x = torch.tensor([[0.1, 0.5, 0.9, 0.3],
                   [0.2, 0.8, 0.4, 0.7]], dtype=torch.float32)

# Define offset parameter
offset = 1e-06

ARGS = {
    "x": x,
    "offset": offset,
}
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
translate_x_rel Ran
ran; our contract draft was wrong, not the code
yue-zhongqi/ICON/icon/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from tongzixin716716/Inverse-Loss-Reweighting, is pointer only (licence: NONE) · get_code("a4b471197204b414")
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 tongzixin716716/Inverse-Loss-Reweighting, 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.

PairEnum Not yet run
unverified (harvested, no recorded run)
yue-zhongqi/ICON/icon/cluster.py
pointer only (licence: MIT); the stored copy get_code serves, from OatmealLiu/class-iNCD, is pointer only (licence: NONE) · get_code("b7a6bc2d6ab2911e")
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 OatmealLiu/class-iNCD, 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. No invocation recorded.

shear_x Not yet run
unverified (harvested, no recorded run)
yue-zhongqi/ICON/icon/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from tongzixin716716/Inverse-Loss-Reweighting, is pointer only (licence: NONE) · get_code("7b4e3d0bd192b677")
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 tongzixin716716/Inverse-Loss-Reweighting, 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. No invocation recorded.

shear_y Not yet run
unverified (harvested, no recorded run)
yue-zhongqi/ICON/icon/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from tongzixin716716/Inverse-Loss-Reweighting, is pointer only (licence: NONE) · get_code("e31c4b500a240e69")
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 tongzixin716716/Inverse-Loss-Reweighting, 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. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
shear_x 27 other papers
14 dated earlier, 13 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
shear_y 27 other papers
14 dated earlier, 13 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
translate_x_rel 26 other papers
14 dated earlier, 12 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 23 more not named here
PairEnum 2 other papers
2 dated earlier
1901.00544 (2019-01)
Multi-class Classification without Multi-class Labels
2207.08605 (2022-07)
Class-incremental Novel Class Discovery
shift_log 1 other paper
1 dated earlier
1904.05801 (2019-04)
Bridging Theory and Algorithm for 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-24.

Repositories linked to this paper

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

Abstract

Domain Adaptation (DA) is always challenged by the spurious correlation between domain-invariant features (e.g., class identity) and domain-specific features (e.g., environment) that does not generalize to the target domain. Unfortunately, even enriched with additional unsupervised target domains, existing Unsupervised DA (UDA) methods still suffer from it. This is because the source domain supervision only considers the target domain samples as auxiliary data (e.g., by pseudo-labeling), yet the inherent distribution in the target domain-where the valuable de-correlation clues hide-is disregarded. We propose to make the U in UDA matter by giving equal status to the two domains. Specifically, we learn an invariant classifier whose prediction is simultaneously consistent with the labels in the source domain and clusters in the target domain, hence the spurious correlation inconsistent in the target domain is removed. We dub our approach "Invariant CONsistency learning" (ICON). Extensive experiments show that ICON achieves the state-ofthe-art performance on the classic UDA benchmarks: OFFICE-HOME and VISDA-2017, and outperforms all the conventional methods on the challenging WILDS 2.0 benchmark. Codes are in https://github.com/yue-zhongqi/ICON.

For agents

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

get_harvested_code_for_paper("2309.12742")
get_code_for_paper("2309.12742")
have("2309.12742")

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

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

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

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

Connect an agent — have() is free.