SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.08200 · ICML · 2022

Understanding Gradual Domain Adaptation: Improved Analysis, Optimal Path and Beyond

Bo Li, Han Zhao, Haoxiang Wang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure 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/2204.08200.json · badge: /api/ran/2204.08200.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
uiuctml/goat extension (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_modal_val_accuracy Ran
ran, honoured the contract we drafted
uiuctml/goat/train_model.py
code served (permissive licence) · get_code("87fd30c36abb62d4")
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 0, dtype family float, shape () as a later run recorded it. 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, 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

torch.manual_seed(0)

# Define a simple model that takes images and outputs class logits
class SimpleClassifier(nn.Module):
    def __init__(self, num_classes=5):
        super().__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        # Flatten if needed and pass through linear layer
        x = x.view(x.size(0), -1)
        return self.fc(x)

# Create model
model = SimpleClassifier(num_classes=5)

# Create validation loader with 2-item tuples (images, labels)
# Batch size 2, image dimension 4, 3 batches
valloader = [
    (torch.randn(2, 4), torch.randint(0, 5, (2,))),
    (torch.randn(2, 4), torch.randint(0, 5, (2,))),
    (torch.randn(2, 4), torch.randint(0, 5, (2,))),
]

ARGS = {
    "model": model,
    "valloader": valloader,
}
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 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
loss_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
uiuctml/goat/train_model.py
code served (permissive licence) · get_code("206142c1def9d0e8")
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 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)

# Create small tensors for VAE loss function
batch_size = 2
latent_dim = 4
input_dim = 3

# recon_x: reconstructed output from decoder, should be probabilities [0, 1]
recon_x = torch.sigmoid(torch.randn(batch_size, input_dim))

# x: original input data, should be in [0, 1] for BCE
x = torch.rand(batch_size, input_dim)

# mu: mean of latent distribution
mu = torch.randn(batch_size, latent_dim)

# log_var: log variance of latent distribution
log_var = torch.randn(batch_size, latent_dim)

ARGS = {
    'recon_x': recon_x,
    'x': x,
    'mu': mu,
    'log_var': log_var
}
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 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
test Ran
ran, honoured the contract we drafted
uiuctml/goat/train_model.py
code served (permissive licence) · get_code("0a027f0cb95c0e29")
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. 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, 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

torch.manual_seed(0)

# Build a simple classifier model
class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, num_classes=3):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, 8)
        self.fc2 = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Build a simple VAE model
class SimpleVAE(nn.Module):
    def __init__(self, input_dim=4, latent_dim=2):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, 8)
        self.fc_mu = nn.Linear(8, latent_dim)
        self.fc_log_var = nn.Linear(8, latent_dim)
        self.fc_decode = nn.Linear(latent_dim, 8)
        self.fc_out = nn.Linear(8, input_dim)
    
    def forward(self, x):
        h = torch.relu(self.fc1(x))
        mu = self.fc_mu(h)
        log_var = self.fc_log_var(h)
        z = mu + torch.exp(0.5 * log_var) * torch.randn_like(mu)
        h_decode = torch.relu(self.fc_decode(z))
        recon = torch.sigmoid(self.fc_out(h_decode))
        return recon, mu, log_var

# Create a simple data loader (list of batches)
# Each batch is a tuple of (data, labels) or (data, labels, weight)
batch_size = 2
num_features = 4
num_classes = 3

# Create batches for non-VAE case
data_batch_1 = torch.randn(batch_size, num_features)
labels_batch_1 = torch.randint(0, num_classes, (batch_size,))
data_batch_2 = torch.randn(batch_size, num_features)
labels_batch_2 = torch.randint(0, num_classes, (batch_size,))

val_loader_classifier = [
    (data_batch_1, labels_batch_1),
    (data_batch_2, labels_batch_2)
]

# Create batches for VAE case (data should be in [0, 1] for BCE)
vae_data_batch_1 = torch.sigmoid(torch.randn(batch_size, num_features))
vae_data_batch_2 = torch.sigmoid(torch.randn(batch_size, num_features))

val_loader_vae = [
    (vae_data_batch_1,),
    (vae_data_batch_2,)
]

# Create models
classifier_model = SimpleClassifier(input_dim=num_features, num_classes=num_classes)
vae_model = SimpleVAE(input_dim=num_features, latent_dim=2)

# Add dataset attribute to loader for len(val_loader.dataset)
class SimpleDataset:
    def __init__(self, size):
        self.size = size
    def __len__(self):
        return self.size

class DataLoaderWrapper:
    def __init__(self, batches, dataset_size):
        self.batches = batches
        self.dataset = SimpleDataset(dataset_size)
    
    def __iter__(self):
        return iter(self.batches)

wrapped_val_loader_classifier = DataLoaderWrapper(val_loader_classifier, batch_size * 2)
wrapped_val_loader_vae = DataLoaderWrapper(val_loader_vae, batch_size * 2)

ARGS = {
    'val_loader': wrapped_val_loader_classifier,
    'model': classifier_model,
    'vae': False,
    'verbose': True
}
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 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
get_source_model Not yet run
unverified (harvested, no recorded run)
uiuctml/goat/experiments.py
code served (permissive licence) · get_code("8f756a4179f4b480")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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
calculate_modal_val_accuracy 1 other paper
1 later
2310.13852 (2023-10)
Gradual Domain Adaptation: Theory and Algorithms
get_source_model 1 other paper
1 later
2310.13852 (2023-10)
Gradual Domain Adaptation: Theory and Algorithms
loss_function 1 other paper
1 later
2310.13852 (2023-10)
Gradual Domain Adaptation: Theory and Algorithms
test 1 other paper
1 later
2310.13852 (2023-10)
Gradual Domain Adaptation: Theory and Algorithms

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

The vast majority of existing algorithms for unsupervised domain adaptation (UDA) focus on adapting from a labeled source domain to an unlabeled target domain directly in a one-off way. Gradual domain adaptation (GDA), on the other hand, assumes a path of (T -1) unlabeled intermediate domains bridging the source and target, and aims to provide better generalization in the target domain by leveraging the intermediate ones. Under certain assumptions, Kumar et al. (2020) proposed a simple algorithm, gradual self-training, along with a generalization bound in the order of e O(T ) (ε 0 +O

For agents

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

get_harvested_code_for_paper("2204.08200")
get_code_for_paper("2204.08200")
have("2204.08200")

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

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

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

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

Connect an agent — have() is free.