SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.00796 · ICML · 2023

On Balancing Bias and Variance in Unsupervised Multi-Source-Free Domain Adaptation

Yuheng Bu, Gregory Wornell, Maohao Shen

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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 4 have no contract verdict; 5 failures of our instrument; 0 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/2202.00796.json · badge: /api/ran/2202.00796.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
maohaos2/MSFDA canonical (classifier label)
classifier basis: plan_row
11 ran · 0 no recorded run
FunctionStatusWhere it lives
Entropy Ran
ran; our contract draft was wrong, not the code
maohaos2/MSFDA/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from albert0147/aad_sfda, is pointer only (licence: NONE) · get_code("94b5622f0aa7add1")
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 albert0147/aad_sfda, 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.

image_test Ran
ran; our contract draft was wrong, not the code
maohaos2/MSFDA/adapt.py
pointer only (licence: MIT); the stored copy get_code serves, from Albert0147/AaD_SFDA, is pointer only (licence: NONE) · get_code("6e4265b7f707b718")
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 Albert0147/AaD_SFDA, 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.

image_train Ran
ran; our contract draft was wrong, not the code
maohaos2/MSFDA/train_source.py
pointer only (licence: MIT); the stored copy get_code serves, from Albert0147/AaD_SFDA, is pointer only (licence: NONE) · get_code("35c2d572ebd185f5")
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 Albert0147/AaD_SFDA, 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.

image_train Ran
ran on a synthesized input
maohaos2/MSFDA/adapt.py
code served (permissive licence) · get_code("9c0d2ceeef4fc6b3")
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 Compose. 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
from torchvision import transforms

torch.manual_seed(0)

# The function uses resize_size, crop_size, and alexnet parameters
# resize_size: int for resizing images
# crop_size: int for random cropping
# alexnet: bool to determine which normalization to use

ARGS = {
    "resize_size": 256,
    "crop_size": 224,
    "alexnet": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
l_loader Ran
ran, honoured the contract we drafted
maohaos2/MSFDA/data_list.py
pointer only (licence: MIT); the stored copy get_code serves, from Albert0147/AaD_SFDA, is pointer only (licence: NONE) · get_code("edd7184ac144c4fa")
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 Albert0147/AaD_SFDA, 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_scheduler Ran
ran; our contract draft was wrong, not the code
maohaos2/MSFDA/train_source.py
pointer only (licence: MIT); the stored copy get_code serves, from albert0147/aad_sfda, is pointer only (licence: NONE) · get_code("0b7ffc9f8b77529c")
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 albert0147/aad_sfda, 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.

make_dataset Ran
ran on a synthesized input
maohaos2/MSFDA/data_list.py
code served (permissive licence) · get_code("09ad767f042450a8")
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 list, ndim 2, 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 numpy as np

# Analyze the function:
# - image_list: needs to be a list of strings
#   - Each string is split by whitespace
#   - Can have 2 or more parts
#   - First part is image path/name
#   - If >2 parts, first two parts are joined as the key
#   - If exactly 2 parts, second part is the label (int)
#   - If >2 parts and no labels param, third part is the label (int)
# - labels: can be None or a list of integers

# Test case 1: image_list with 2 parts per entry, labels provided
image_list_case1 = [
    "image1.jpg 0",
    "image2.jpg 1"
]
labels_case1 = [0, 1]

# Test case 2: image_list with >2 parts per entry, labels provided
image_list_case2 = [
    "path/to/image1.jpg extra_info 0",
    "path/to/image2.jpg extra_info 1"
]
labels_case2 = [0, 1]

# Test case 3: image_list with 2 parts, no labels (label in second column)
image_list_case3 = [
    "image1.jpg 0",
    "image2.jpg 1"
]

# Test case 4: image_list with >2 parts, no labels (label in third column)
image_list_case4 = [
    "path/to/image1.jpg metadata 0",
    "path/to/image2.jpg metadata 1"
]

# Use case 1 as default
ARGS = {
    "image_list": image_list_case1,
    "labels": labels_case1
}
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 list, ndim 2, dtype family float — a list 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
mutual_info_loss Ran
ran on a synthesized input
maohaos2/MSFDA/loss.py
code served (permissive licence) · get_code("b3121e5da47857cc")
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 mutual_info_loss expects:
# - prob1: a tensor with shape (batch_size, num_classes)
# The function computes:
# - Entropy of prob1 across classes (dim=1)
# - Mean entropy
# - Mean probability across batch (dim=0)
# - KL divergence using the mean probability
# So prob1 should be a probability distribution (values in [0,1], sum to 1)

# Create a small batch of probability distributions
batch_size = 2
num_classes = 4

# Create valid probability distributions
prob1 = torch.tensor([
    [0.4, 0.3, 0.2, 0.1],
    [0.25, 0.25, 0.25, 0.25]
], dtype=torch.float32)

ARGS = {
    "prob1": prob1
}
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
op_copy Ran
ran; our contract draft was wrong, not the code
maohaos2/MSFDA/adapt.py
pointer only (licence: MIT); the stored copy get_code serves, from albert0147/aad_sfda, is pointer only (licence: NONE) · get_code("93a11f62e4a129f0")
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 albert0147/aad_sfda, 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.

prototype_weights Ran
ran on a synthesized input
maohaos2/MSFDA/loss.py
code served (permissive licence) · get_code("1b78e684c8183c16")
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 torch.nn as nn

torch.manual_seed(0)

# Construct arguments for prototype_weights function
# feature: shape (batch_size, feature_dim) - the data points
# center: shape (num_centers, feature_dim) - the prototype centers
# bandwidth: scalar - controls the softmax temperature

feature = torch.randn(2, 4)  # batch_size=2, feature_dim=4
center = torch.randn(3, 4)   # num_centers=3, feature_dim=4
bandwidth = torch.tensor(1.0)  # scalar bandwidth parameter

ARGS = {
    "feature": feature,
    "center": center,
    "bandwidth": bandwidth
}
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, 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
rgb_loader Ran
ran, honoured the contract we drafted
maohaos2/MSFDA/data_list.py
code served (permissive licence) · get_code("2c5ce24ea2b5d2a4")
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 Image. 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 tempfile
import os
from PIL import Image

# Create a temporary RGB image file
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image and save it
img = Image.new('RGB', (10, 10), color=(255, 0, 0))
img.save(temp_image_path)

ARGS = {
    'path': temp_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 7 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
op_copy 21 other papers
5 dated earlier, 15 later, 1 same year, order not determinable · 5 only as an assembly brick
2002.08546 (2020-02)
Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation
2012.07297 (2020-12)
Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
and 18 more not named here
rgb_loader 19 other papers
7 dated earlier, 11 later, 1 same year, order not determinable · 6 only as an assembly brick
2003.02541 (2020-03)
A Balanced and Uncertainty-aware Approach for Partial Domain Adaptation
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
2104.01845 (2021-04)
Unsupervised Multi-source Domain Adaptation Without Access to Source Data
and 16 more not named here
lr_scheduler 18 other papers
5 dated earlier, 12 later, 1 same year, order not determinable · 3 only as an assembly brick
2002.08546 (2020-02)
Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation
2012.07297 (2020-12)
Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
and 15 more not named here
l_loader 17 other papers
5 dated earlier, 11 later, 1 same year, order not determinable · 5 only as an assembly brick
2003.02541 (2020-03)
A Balanced and Uncertainty-aware Approach for Partial Domain Adaptation
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
2104.01845 (2021-04)
Unsupervised Multi-source Domain Adaptation Without Access to Source Data
and 14 more not named here
Entropy 16 other papers
4 dated earlier, 1 the same month, 10 later, 1 same year, order not determinable · 4 only as an assembly brick
2007.14612 (2020-07)
Clarinet: A One-step Approach Towards Budget-friendly Unsupervised Domain Adaptation
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
2104.01845 (2021-04)
Unsupervised Multi-source Domain Adaptation Without Access to Source Data
and 13 more not named here
image_train 8 other papers
3 dated earlier, 4 later, 1 same year, order not determinable · 2 only as an assembly brick
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
2104.01845 (2021-04)
Unsupervised Multi-source Domain Adaptation Without Access to Source Data
2107.12585 (2021-07)
Nearest Neighborhood-Based Deep Clustering for Source Data-absent Unsupervised Domain Adaptation
and 5 more not named here
image_test 6 other papers
2 dated earlier, 4 later · 4 only as an assembly brick
2104.01539 (2021-04)
DINE: Domain Adaptation from Single and Multiple Black-box Predictors
2104.01845 (2021-04)
Unsupervised Multi-source Domain Adaptation Without Access to Source Data
2205.04183 (2022-05)
Attracting and Dispersing: A Simple Approach for Source-free Domain Adaptation
and 3 more not named here

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

Due to privacy, storage, and other constraints, there is a growing need for unsupervised domain adaptation techniques in machine learning that do not require access to the data used to train a collection of source models. Existing methods for multisource-free domain adaptation (MSFDA) typically train a target model using pseudo-labeled data produced by the source models, which focus on improving the pseudo-labeling techniques or proposing new training objectives. Instead, we aim to analyze the fundamental limits of MSFDA. In particular, we develop an information-theoretic bound on the generalization error of the resulting target model, which illustrates an inherent bias-variance trade-off. We then provide insights on how to balance this trade-off from three perspectives, including domain aggregation, selective pseudo-labeling, and joint feature alignment, which leads to the design of novel algorithms. Experiments on multiple datasets validate our theoretical analysis and demonstrate the state-of-art performance of the proposed algorithm, especially on some of the most challenging datasets, including Office-Home and DomainNet.

For agents

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

get_harvested_code_for_paper("2202.00796")
get_code_for_paper("2202.00796")
have("2202.00796")

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

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

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

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

Connect an agent — have() is free.