SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.04531 · 2024

Decomposition-based Unsupervised Domain Adaptation for Remote Sensing Image Semantic Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2404.04531.json · badge: /api/ran/2404.04531.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
sstary/ssrs canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sstary/ssrs/GLGAN/FTUNetFormer.py
code served (permissive licence) · get_code("144d10b49baeb8a6")
How it ran

Ran in Syntology's jail 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 (8, 4, 4, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:38:58Z). 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 tensor with shape (B, H, W, C)
# B=2 (batch), H=8 (height), W=8 (width), C=4 (channels)
# Using distinct sizes: 2, 8, 8, 4
x = torch.randn(2, 8, 8, 4)

# window_size must divide both H and W evenly
# H=8, W=8, so window_size=4 works (8 // 4 = 2)
window_size = 4

ARGS = {
    "x": x,
    "window_size": window_size,
}
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 (8, 4, 4, 4) — shape (8, 4, 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
convert_from_color Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/ASMFNet/utils.py
code served (permissive licence) · get_code("ce712b17116be621")
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 2, dtype family int, 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 numpy as np

# Create a small 4x3 RGB image with colors matching the palette
# Using colors from the palette: white(0), blue(1), cyan(2), green(3)
arr_3d = np.array([
    [(255, 255, 255), (0, 0, 255), (0, 255, 255), (0, 255, 0)],
    [(255, 255, 0), (255, 0, 0), (0, 0, 0), (255, 255, 255)],
], dtype=np.uint8)

palette_dict = {
    (255, 255, 255): 0,
    (0, 0, 255): 1,
    (0, 255, 255): 2,
    (0, 255, 0): 3,
    (255, 255, 0): 4,
    (255, 0, 0): 5,
    (0, 0, 0): 6
}

ARGS = {
    "arr_3d": arr_3d,
    "palette": palette_dict
}
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 2, dtype family int, 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
convert_to_color Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/ASMFNet/utils.py
code served (permissive licence) · get_code("73aafdf3eb69edea")
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 (2, 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 numpy as np

palette = {0: (255, 255, 255), 1: (0, 0, 255), 2: (0, 255, 255), 3: (0, 255, 0), 4: (255, 255, 0), 5: (255, 0, 0), 6: (0, 0, 0)}

# Create a small 2D array with numeric labels (0-6)
arr_2d = np.array([[0, 1, 2, 3],
                    [4, 5, 6, 0]], dtype=np.int64)

ARGS = {
    "arr_2d": arr_2d,
    "palette": palette
}
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 3, dtype family int, shape (2, 4, 3) — shape (2, 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
cross_entropy_2d Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/GLGAN/loss.py
code served (permissive licence) · get_code("87d527440a75bc7a")
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; 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.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Create predict tensor: (n, c, h, w) = (2, 4, 3, 5)
# n=2 (batch size), c=4 (num classes), h=3 (height), w=5 (width)
predict = torch.randn(2, 4, 3, 5, requires_grad=True)

# Create target tensor: (n, h, w) = (2, 3, 5)
# Values should be in range [0, num_classes) or special values like 255 for ignore
# We'll use class indices 0-3 and some 255 values to test masking
target = torch.tensor([
    [[0, 1, 2, 3, 0],
     [1, 2, 3, 0, 1],
     [2, 3, 0, 255, 2]],
    [[3, 0, 1, 2, 3],
     [0, 1, 2, 3, 0],
     [1, 2, 3, 255, 1]]
], dtype=torch.long)

# Ensure target does not require gradients (as asserted in function)
assert not target.requires_grad

ARGS = {
    'predict': predict,
    '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 — no output shape is stated: observe_signature.py could not observe it (fixture:AttributeError)
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
discrepancy Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/GLGAN/FTUNetFormer_11.py
code served (permissive licence) · get_code("24575a9d4767f589")
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 two small attention tensors
# attx and atty should be tensors that can be subtracted and have abs() and mean() applied
attx = torch.randn(2, 4)
atty = torch.randn(2, 4)

ARGS = {
    "attx": attx,
    "atty": atty,
}
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
entropy_loss Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/GLGAN/loss.py
code served (permissive licence) · get_code("360b5a2923d789bd")
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 numpy as np

torch.manual_seed(0)

# Create a probabilistic prediction tensor
# Shape: batch_size=2, channels=4, height=3, width=5
# Values should be probabilities (sum to 1 across channels for each spatial location)
batch_size = 2
channels = 4
height = 3
width = 5

# Create a random tensor and normalize it to be a valid probability distribution
v = torch.rand(batch_size, channels, height, width)
# Normalize along the channel dimension so probabilities sum to 1
v = v / (v.sum(dim=1, keepdim=True) + 1e-30)

ARGS = {
    "v": v
}
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 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
get_random_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sstary/ssrs/ASMFNet/utils.py
code served (permissive licence) · get_code("e736a775995b60c5")
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 int; 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 random

torch.manual_seed(0)

# Create a small image tensor with shape (batch, channels, height, width)
# Using distinct dimensions: batch=2, channels=3, height=8, width=6
img = torch.randn(2, 3, 8, 6)

# Define window shape as (width, height) tuple
# Using smaller values that fit within the image
window_shape = (4, 5)

ARGS = {
    "img": img,
    "window_shape": window_shape,
}
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 int — 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
window_reverse Ran
ran; our contract draft was wrong, not the code
sstary/ssrs/GLGAN/FTUNetFormer.py
code served (permissive licence) · get_code("61bf152e6a42a184")
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 (2, 8, 12, 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)

# Parameters for window_reverse
# windows: (num_windows*B, window_size, window_size, C)
# The function expects windows to be partitioned from an image of size (B, H, W, C)
# where the image is divided into non-overlapping windows of size window_size x window_size

B = 2  # batch size
H = 8  # image height
W = 12  # image width
window_size = 4  # window size
C = 3  # number of channels

# Calculate number of windows
num_windows_h = H // window_size  # 2
num_windows_w = W // window_size  # 3
num_windows = num_windows_h * num_windows_w  # 6

# windows shape: (num_windows*B, window_size, window_size, C)
# = (6*2, 4, 4, 3) = (12, 4, 4, 3)
windows = torch.randn(num_windows * B, window_size, window_size, C)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "H": H,
    "W": W,
}
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 (2, 8, 12, 3) — shape (2, 8, 12, 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 2 later) and 5 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
window_reverse 227 other papers
164 dated earlier, 8 the same month, 46 later, 9 same year, order not determinable · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
160 dated earlier, 8 the same month, 46 later, 9 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
entropy_loss 2 other papers
2 dated earlier
2004.07703 (2020-04)
Unsupervised Intra-domain Adaptation for Semantic Segmentation through Self-Supervision
2207.10667 (2022-07)
Online Domain Adaptation for Semantic Segmentation in Ever-Changing Conditions

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

Unsupervised domain adaptation (UDA) techniques are vital for semantic segmentation in geosciences, effectively utilizing remote sensing imagery across diverse domains. However, most existing UDA methods, which focus on domain alignment at the high-level feature space, struggle to simultaneously retain local spatial details and global contextual semantics. To overcome these challenges, a novel decomposition scheme is proposed to guide domain-invariant representation learning. Specifically, multiscale high/low-frequency decomposition (HLFD) modules are proposed to decompose feature maps into high- and low-frequency components across different subspaces. This decomposition is integrated into a fully global-local generative adversarial network (GLGAN) that incorporates global-local transformer blocks (GLTBs) to enhance the alignment of decomposed features. By integrating the HLFD scheme and the GLGAN, a novel decomposition-based UDA framework called De-GLGAN is developed to improve the cross-domain transferability and generalization capability of semantic segmentation models. Extensive experiments on two UDA benchmarks, namely ISPRS Potsdam and Vaihingen, and LoveDA Rural and Urban, demonstrate the effectiveness and superiority of the proposed approach over existing state-of-the-art UDA methods. The source code for this work is accessible at https://github.com/sstary/SSRS.

For agents

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

get_harvested_code_for_paper("2404.04531")
get_code_for_paper("2404.04531")
have("2404.04531")

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

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

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

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

Connect an agent — have() is free.