SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1809.09478 · 2018

Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 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; 4 honoured the contract we drafted, 1 violated it and 5 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/1809.09478.json · badge: /api/ran/1809.09478.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
RoyalVane/CLAN canonical (classifier label)
classifier basis: census
13 ran · 1 no recorded run
FunctionStatusWhere it lives
channel_1toN Ran
ran on a synthesized input
RoyalVane/CLAN/utils/loss.py
code served (permissive licence) · get_code("f6bba73be87e302f")
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 3, dtype family float, shape (3, 4, 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
import numpy as np

torch.manual_seed(0)

# Create a small single-channel image tensor
# img should have shape (1, height, width)
img = torch.randint(0, 3, (1, 4, 3))

# Number of channels to expand to
num_channel = 3

ARGS = {
    "img": img,
    "num_channel": num_channel
}
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 Tensor, ndim 3, dtype family float, shape (3, 4, 3) — shape (3, 4, 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
colorize_mask Ran
ran, honoured the contract we drafted
RoyalVane/CLAN/CLAN_evaluate.py
pointer only (licence: MIT); the stored copy get_code serves, from lym29/DASeg, is pointer only (licence: NONE) · get_code("21ac171a17099011")
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 lym29/DASeg, 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
RoyalVane/CLAN/model/CLAN_G.py
pointer only (licence: MIT); 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 (MIT), 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.

create_map Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
RoyalVane/CLAN/CLAN_evaluate_bulk.py
code served (permissive licence) · get_code("844cbbd42f58aa56")
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 Tensor, ndim 4, dtype family float, shape (1, 1, 3, 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)

ARGS = {
    'input_size': (4, 3),
    'mode': 'h'
}
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 Tensor, ndim 4, dtype family float, shape (1, 1, 3, 4) — shape (1, 1, 3, 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
fast_hist Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
RoyalVane/CLAN/CLAN_iou.py
code served (permissive licence) · get_code("d86fb168246b16a4")
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 ndarray, ndim 2, dtype family int, shape (4, 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 numpy as np

# Analyze the function:
# - a: array-like, used with >= 0, < n comparisons, and .astype(int)
# - b: array-like, same shape as a, used in indexing
# - n: int, used as upper bound and for bincount minlength

# Create small numpy arrays for a and b
a = np.array([0, 1, 2, 3, 1, 2], dtype=np.int32)
b = np.array([0, 1, 2, 0, 1, 2], dtype=np.int32)
n = 4

ARGS = {
    "a": a,
    "b": b,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 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
label_mapping Ran
ran on a synthesized input
RoyalVane/CLAN/CLAN_iou.py
code served (permissive licence) · get_code("bcfd47261d90f53e")
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 ndarray, ndim 1, dtype family int, shape (7,) 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 numpy as np

# Create a small input array with integer labels
input_array = np.array([0, 1, 2, 0, 1, 2, 0], dtype=np.int64)

# Create a mapping list where each element is [old_label, new_label]
# This maps: 0->10, 1->20, 2->30
mapping = [[0, 10], [1, 20], [2, 30]]

ARGS = {
    "input": input_array,
    "mapping": mapping
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (7,) — shape (7,) 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
lr_poly Ran
ran, honoured the contract we drafted
RoyalVane/CLAN/CLAN_train.py
pointer only (licence: MIT); the stored copy get_code serves, from lym29/DASeg, is pointer only (licence: NONE) · get_code("b3b7c1c716f4ca66")
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 lym29/DASeg, 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.

lr_warmup Ran
ran, honoured the contract we drafted
RoyalVane/CLAN/CLAN_train.py
code served (permissive licence) · get_code("668bc14a07c5d7ac")
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 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# lr_warmup(base_lr, iter, warmup_iter)
# - base_lr: a learning rate (float)
# - iter: current iteration number (int or float-convertible)
# - warmup_iter: total warmup iterations (int or float-convertible)
# The function computes: base_lr * (float(iter) / warmup_iter)
# All parameters are numeric scalars

ARGS = {
    "base_lr": 0.001,
    "iter": 500,
    "warmup_iter": 1000,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
onedim_superpixel2im Ran
ran on a synthesized input
RoyalVane/CLAN/utils/visual.py
code served (permissive licence) · get_code("839955eed0744a55")
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 ndarray, ndim 3, dtype family int, shape (4, 3, 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
import numpy as np

torch.manual_seed(0)

# Create a small image tensor with shape (1, 4, 3)
# The function accesses image_tensor.size(1) and image_tensor.size(2)
# and iterates over dimensions 1 and 2
# Values are divided by 100 and compared to thresholds, so we use values in range [0, 100]
image_tensor = torch.randint(0, 100, (1, 4, 3), dtype=torch.float32)

ARGS = {
    'image_tensor': image_tensor,
    'imtype': np.uint8,
    'dataset': 'Pascal'
}
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 ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
onedim_tensor2im Ran
ran on a synthesized input
RoyalVane/CLAN/utils/visual.py
code served (permissive licence) · get_code("c393ac985b152f6b")
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 ndarray, ndim 3, dtype family int, shape (4, 3, 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
import numpy as np

torch.manual_seed(0)

# Create a small 4D tensor: (batch=1, channels=1, height=4, width=3)
# Values between 0 and 1 to trigger different branches in the conditional logic
image_tensor = torch.tensor([[[[0.9, 0.75, 0.55],
                              [0.45, 0.25, 0.1],
                              [0.85, 0.7, 0.6],
                              [0.4, 0.3, 0.05]]]])

ARGS = {
    'image_tensor': image_tensor,
    'imtype': np.uint8,
    'dataset': 'Pascal'
}
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 ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
outS Ran
ran, honoured the contract we drafted
RoyalVane/CLAN/model/CLAN_G.py
pointer only (licence: MIT); the stored copy get_code serves, from stu92054/Domain-adaptation-on-segmentation, is pointer only (licence: NONE) · get_code("27504cbeb5811ea6")
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 stu92054/Domain-adaptation-on-segmentation, 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.

per_class_iu Ran
ran, violated the contract we drafted
RoyalVane/CLAN/CLAN_iou.py
pointer only (licence: MIT); the stored copy get_code serves, from YanchaoYang/FDA, is pointer only (licence: NONE) · get_code("b1c59751f8968e99")
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 YanchaoYang/FDA, 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.

tensor2im Ran
ran on a synthesized input
RoyalVane/CLAN/utils/visual.py
code served (permissive licence) · get_code("1cc896f07ee44bf0")
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 ndarray, ndim 3, dtype family int, shape (4, 3, 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
import numpy as np

torch.manual_seed(0)

# Create a small tensor that mimics a batch of images
# The function expects:
# - image_tensor[0] to work (batch dimension)
# - .cpu() to work
# - .float() to work
# - .numpy() to work
# - shape[0] to be the channel dimension (should be 1 or 3)
# - transposable from (C, H, W) to (H, W, C)

# Create a tensor with shape (batch=2, channels=1, height=4, width=3)
# This tests the case where channels == 1 (which triggers np.tile)
image_tensor = torch.randn(2, 1, 4, 3, dtype=torch.float32)

# Also test with 3 channels to verify both paths work
# Using shape (batch=2, channels=3, height=4, width=5)
image_tensor_3ch = torch.randn(2, 3, 4, 5, dtype=torch.float32)

ARGS = {
    "image_tensor": image_tensor,
    "imtype": np.uint8
}
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 ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 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
Res_Deeplab Not yet run
unverified (harvested, no recorded run)
RoyalVane/CLAN/model/CLAN_G.py
code served (permissive licence) · get_code("b76ad4293318958f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 11 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 11 later) and 3 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
65 dated earlier, 1 the same month, 620 later · 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
lr_poly 21 other papers
5 dated earlier, 16 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
1703.01780 (2017-03)
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
and 18 more not named here
colorize_mask 15 other papers
3 dated earlier, 12 later
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
1704.08509 (2017-04)
No More Discrimination: Cross City Adaptation of Road Scene Segmenters
1802.10349 (2018-02)
Learning to Adapt Structured Output Space for Semantic Segmentation
and 12 more not named here
fast_hist 12 other papers
4 dated earlier, 8 later
1511.00561 (2015-11)
SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
1806.07373 (2018-06)
Few-Shot Segmentation Propagation with Guided Networks
and 9 more not named here
outS 11 other papers
2 dated earlier, 9 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1802.10349 (2018-02)
Learning to Adapt Structured Output Space for Semantic Segmentation
1811.11721 (2018-11)
CCNet: Criss-Cross Attention for Semantic Segmentation
and 8 more not named here
per_class_iu 6 other papers
1 dated earlier, 5 later
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
2003.14032 (2020-03)
PolarNet: An Improved Grid Representation for Online LiDAR Point Clouds Semantic Segmentation
2004.05498 (2020-04)
FDA: Fourier Domain Adaptation for Semantic Segmentation
and 3 more not named here
Res_Deeplab 2 other papers
1 dated earlier, 1 later
1802.10349 (2018-02)
Learning to Adapt Structured Output Space for Semantic Segmentation
2308.03003 (2023-08)
Cal-SFDA: Source-Free Domain-adaptive Semantic Segmentation with Differentiable Expected Calibration Error
label_mapping 2 other papers
2 later
2106.02885 (2021-06)
Category Contrast for Unsupervised Domain Adaptation in Visual Tasks
2202.06484 (2022-02)
D2ADA: Dynamic Density-aware Active Domain Adaptation for Semantic Segmentation
channel_1toN 1 other paper
1 later
2110.08733 (2021-10)
LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation
create_map 1 other paper
1 later
2004.06042 (2020-04)
Adversarial Style Mining for One-Shot Unsupervised Domain Adaptation
lr_warmup 1 other paper
1 later
2004.06042 (2020-04)
Adversarial Style Mining for One-Shot 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

We consider the problem of unsupervised domain adaptation in semantic segmentation. The key in this campaign consists in reducing the domain shift, i.e., enforcing the data distributions of the two domains to be similar. A popular strategy is to align the marginal distribution in the feature space through adversarial learning. However, this global alignment strategy does not consider the local category-level feature distribution. A possible consequence of the global movement is that some categories which are originally well aligned between the source and target may be incorrectly mapped. To address this problem, this paper introduces a category-level adversarial network, aiming to enforce local semantic consistency during the trend of global alignment. Our idea is to take a close look at the category-level data distribution and align each class with an adaptive adversarial loss. Specifically, we reduce the weight of the adversarial loss for category-level aligned features while increasing the adversarial force for those poorly aligned. In this process, we decide how well a feature is category-level aligned between source and target by a co-training approach. In two domain adaptation tasks, i.e., GTA5 -&gt; Cityscapes and SYNTHIA -&gt; Cityscapes, we validate that the proposed method matches the state of the art in segmentation accuracy.

For agents

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

get_harvested_code_for_paper("1809.09478")
get_code_for_paper("1809.09478")
have("1809.09478")

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

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

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

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

Connect an agent — have() is free.