SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.01281 · ICLR · 2023

Addressing Parameter Choice Issues in Unsupervised Domain Adaptation by Aggregation

Werner Zellinger, Bernhard Moser, Andrea Huber, Hamid Eghbal-Zadeh, Sepp Hochreiter, Markus Holzleitner, Marius-Constantin Dinu, Maximilian Beck, Duc Nguyen, Sergei Pereverzyev

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 7 have no contract verdict; 2 failures of our instrument; 3 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/2305.01281.json · badge: /api/ran/2305.01281.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
xpitfire/iwa canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
EntropyLoss Ran
ran; our contract draft was wrong, not the code
xpitfire/iwa/misc/loss.py
code served (permissive licence) · get_code("0cb7cfb326eed8be")
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)

# The function expects a tensor input_ with:
# - .ge() method (comparison operation)
# - .masked_select() function compatibility
# - torch.log() compatibility
# - .sum() method
# - .size(0) method (batch dimension)
# Create a small probability-like tensor (values between 0 and 1)
# with shape (2, 4) - batch size 2, feature dim 4
input_tensor = torch.rand(2, 4)

ARGS = {
    "input_": input_tensor
}
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
MMD Ran
ran on a synthesized input
xpitfire/iwa/misc/loss.py
code served (permissive licence) · get_code("1f70402f7b8a5e2a")
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 small sample tensors
# source and target should have shape [batch_size, feature_dim]
source = torch.randn(2, 4)  # batch_size=2, feature_dim=4
target = torch.randn(2, 4)  # batch_size=2, feature_dim=4

ARGS = {
    "source": source,
    "target": target,
    "kernel_mul": 2.0,
    "kernel_num": 5,
    "fix_sigma": 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 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
gaussian_kernel_torch Ran
ran on a synthesized input
xpitfire/iwa/misc/aux_da_losses.py
code served (permissive licence) · get_code("0c81f8155dbaa303")
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, 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 small sample tensors
# x: [Nx, features] where Nx=2, features=4
x = torch.randn(2, 4, dtype=torch.double)

# y: [Ny, features] where Ny=3, features=4
y = torch.randn(3, 4, dtype=torch.double)

# sigma: array of kernel width values
sigma = np.array([0.5, 1.0, 2.0])

ARGS = {
    "x": x,
    "y": y,
    "sigma": sigma,
}
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 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
guassian_kernel Ran
ran; our contract draft was wrong, not the code
xpitfire/iwa/misc/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from jwu4sml/l2e, is pointer only (licence: NONE) · get_code("f4a8968b88a150d1")
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 jwu4sml/l2e, 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.

norm Ran
ran on a synthesized input
xpitfire/iwa/misc/aux_da_losses.py
code served (permissive licence) · get_code("2e9eda214371da15")
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
import numpy as np

torch.manual_seed(0)

# Create a batch of instances with shape [N, features]
# N=2 (batch size), features=4 (feature dimension)
x = torch.randn(2, 4)

# Power of the norm
p = 2

ARGS = {
    "x": x,
    "p": p
}
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 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
pairwise_distance_torch Ran
ran on a synthesized input
xpitfire/iwa/misc/aux_da_losses.py
code served (permissive licence) · get_code("fd11328b6d9f8a37")
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, 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 small sample tensors
# x: [Nx, features] - shape [2, 4]
# y: [Ny, features] - shape [3, 4]
x = torch.randn(2, 4)
y = torch.randn(3, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 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
register_alexnet_features_extraction Ran
ran on a synthesized input
xpitfire/iwa/models/backbone.py
code served (permissive licence) · get_code("4fa007fe525637b0")
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 function. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal config object with the required attributes
class Config:
    def __init__(self):
        self.backbone = BackboneConfig()

class BackboneConfig:
    def __init__(self):
        self.feature_layer = 'features'
        self.feature_layer_idx = 0
        self.trainable = False

# Create a minimal AlexNet-like model
# The function expects:
# - model to be callable (has __call__)
# - model to have an attribute named config.backbone.feature_layer ('features')
# - that attribute to be indexable with config.backbone.feature_layer_idx (0)
# - that indexed element to have register_forward_hook method

class MinimalAlexNet(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a sequential container named 'features' with at least one layer
        self.features = nn.Sequential(
            nn.Conv2d(3, 8, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=2, stride=2),
        )
        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.classifier = nn.Sequential(
            nn.Linear(8, 4),
        )
    
    def forward(self, x):
        x = self.features(x)
        x = self.avgpool(x)
        x = torch.flatten(x, 1)
        x = self.classifier(x)
        return x

config = Config()
model = MinimalAlexNet()

ARGS = {
    'config': config,
    'model': model,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
register_domain_adaptation_features_extraction Ran
ran on a synthesized input
xpitfire/iwa/models/backbone.py
code served (permissive licence) · get_code("ee32961979c55ad6")
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 function. 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple model with a named layer that will be used for feature extraction
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.relu = nn.ReLU()
        self.fc = nn.Linear(16 * 4 * 4, 10)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.relu(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

# Create a config class with the required attributes
class BackboneConfig:
    def __init__(self):
        self.feature_layer = 'relu'  # The layer name to hook into
        self.trainable = False  # Whether the backbone is trainable

class Config:
    def __init__(self):
        self.backbone = BackboneConfig()

# Instantiate the model and config
model = SimpleModel()
config = Config()

ARGS = {
    'config': config,
    'model': model,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
register_resnet_features_extraction Ran
ran on a synthesized input
xpitfire/iwa/models/backbone.py
code served (permissive licence) · get_code("87715dc23ceed107")
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 function. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal config object with required attributes
class Config:
    def __init__(self):
        self.backbone = BackboneConfig()

class BackboneConfig:
    def __init__(self):
        self.feature_layer = 'layer1'
        self.trainable = False

# Create a minimal ResNet-like model
class MinimalResNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer0 = nn.Linear(4, 8)
        self.layer1 = nn.Linear(8, 6)
        self.layer2 = nn.Linear(6, 3)
    
    def forward(self, x):
        x = self.layer0(x)
        x = self.layer1(x)
        x = self.layer2(x)
        return x

# Instantiate config and model
config = Config()
model = MinimalResNet()

ARGS = {
    'config': config,
    'model': model
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_algorithm_class Not yet run
unverified (harvested, no recorded run)
xpitfire/iwa/algorithms/algorithms.py
code served (permissive licence) · get_code("b0bc80b1655a6802")
How it ran

no invocation recorded.

get_backbone_class Not yet run
unverified (harvested, no recorded run)
xpitfire/iwa/models/models.py
code served (permissive licence) · get_code("f8ac075efb28ded9")
How it ran

no invocation recorded.

get_dataset_class Not yet run
unverified (harvested, no recorded run)
xpitfire/iwa/configs/data_model_configs.py
code served (permissive licence) · get_code("8dadd34c7426858e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 5 later) and 7 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
get_algorithm_class 39 other papers
24 dated earlier, 1 the same month, 14 later
1907.02893 (2019-07)
Invariant Risk Minimization
2007.01434 (2020-07)
In Search of Lost Domain Generalization
2007.02931 (2020-07)
Adaptive Risk Minimization: Learning to Adapt to Domain Shift
and 36 more not named here
get_dataset_class 21 other papers
13 dated earlier, 1 the same month, 7 later
1907.02893 (2019-07)
Invariant Risk Minimization
2007.01434 (2020-07)
In Search of Lost Domain Generalization
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
and 18 more not named here
guassian_kernel 5 other papers
2 dated earlier, 2 later, 1 same year, order not determinable
2201.01003 (2022-01)
Aligning Domain-specific Distribution and Classifier for Cross-domain Classification from Multiple Sources
2207.01784 (2022-07)
A Unified Meta-Learning Framework for Dynamic Transfer Learning
Gao_AsyFOD_An_Asymmetric_Adaptation_Paradigm_for_Few-Shot_Domain_Adaptive_Object_CVPR_2023_paper (2023 (year only))
AsyFOD: An Asymmetric Adaptation Paradigm for Few-Shot Domain Adaptive Object Detection
and 2 more not named here
EntropyLoss 2 other papers
1 dated earlier, 1 later
2302.03133 (2023-02)
Domain Adaptation for Time Series Under Feature and Label Shifts
2307.07542 (2023-07)
Source-Free Domain Adaptation with Temporal Imputation for Time Series Data
get_backbone_class 2 other papers
1 dated earlier, 1 later
2302.03133 (2023-02)
Domain Adaptation for Time Series Under Feature and Label Shifts
2307.07542 (2023-07)
Source-Free Domain Adaptation with Temporal Imputation for Time Series Data

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 study the problem of choosing algorithm hyper-parameters in unsupervised domain adaptation, i.e., with labeled data in a source domain and unlabeled data in a target domain, drawn from a different input distribution. We follow the strategy to compute several models using different hyper-parameters, and, to subsequently compute a linear aggregation of the models. While several heuristics exist that follow this strategy, methods are still missing that rely on thorough theories for bounding the target error. In this turn, we propose a method that extends weighted least squares to vector-valued functions, e.g., deep neural networks. We show that the target error of the proposed algorithm is asymptotically not worse than twice the error of the unknown optimal aggregation. We also perform a large scale empirical comparative study on several datasets, including text, images, electroencephalogram, body sensor signals and signals from mobile phones. Our method 1 outperforms deep embedded validation (DEV) and importance weighted validation (IWV) on all datasets, setting a new state-of-the-art performance for solving parameter choice issues in unsupervised domain adaptation with theoretical error guarantees. We further study several competitive heuristics, all outperforming IWV and DEV on at least five datasets. However, our method outperforms each heuristic on at least five of seven datasets.

For agents

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

get_harvested_code_for_paper("2305.01281")
get_code_for_paper("2305.01281")
have("2305.01281")

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

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

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

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

Connect an agent — have() is free.