SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper · ICCV · 2021

Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings

Kate Saenko, Georgia Tech, Judy Hoffman, Viraj Prabhu, Arjun Chandrasekaran

Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper.json · badge: /api/ran/Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper.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
virajprabhu/CLUE canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
kmeans_plus_plus_opt Ran
ran on a synthesized input
virajprabhu/CLUE/utils.py
code served (permissive licence) · get_code("887ef76a0f0b84bd")
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. 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 numpy as np

# Set random seed for reproducibility
np.random.seed(42)

# Create small sample data with distinct dimensions
n_samples = 5
n_feat1 = 4
n_feat2 = 3

X1 = np.random.randn(n_samples, n_feat1).astype(np.float64)
X2 = np.random.randn(n_samples, n_feat2).astype(np.float64)

n_clusters = 2
init = [0]
random_state = np.random.RandomState(1234)
n_local_trials = None

ARGS = {
    'X1': X1,
    'X2': X2,
    'n_clusters': n_clusters,
    'init': init,
    'random_state': random_state,
    'n_local_trials': n_local_trials
}
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 tuple — a tuple output has no array shape of its own; none is 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
outer_product_opt Ran
ran, honoured the contract we drafted
virajprabhu/CLUE/utils.py
code served (permissive licence) · get_code("e331f59f46d29459")
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 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 numpy as np

# Create small numpy arrays for the function arguments
# c1: shape (B1, D) - batch of B1 vectors of dimension D
# d1: shape (B1, D) - batch of B1 vectors of dimension D
# c2: shape (B2, D) - batch of B2 vectors of dimension D
# d2: shape (B2, D) - batch of B2 vectors of dimension D

np.random.seed(0)

B1 = 2
B2 = 3
D = 4

c1 = np.random.randn(B1, D).astype(np.float32)
d1 = np.random.randn(B1, D).astype(np.float32)
c2 = np.random.randn(B2, D).astype(np.float32)
d2 = np.random.randn(B2, D).astype(np.float32)

ARGS = {
    "c1": c1,
    "d1": d1,
    "c2": c2,
    "d2": d2
}
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 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
process_txt Ran
ran on a synthesized input
virajprabhu/CLUE/preprocess_domainnet.py
code served (permissive licence) · get_code("6962ebebbe6f9056")
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 tempfile
import os

# Create a temporary text file with the expected format
temp_dir = tempfile.mkdtemp()
txt_file = os.path.join(temp_dir, "test_data.txt")

with open(txt_file, 'w') as f:
    f.write("apple 5\n")
    f.write("banana 3\n")
    f.write("cherry 7\n")

ARGS = {
    "txt_file": txt_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
register_model Ran
ran; our contract draft was wrong, not the code
virajprabhu/CLUE/adapt/models/models.py
code served (permissive licence) · get_code("8fadf1baab2bb38b")
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

torch.manual_seed(0)

# The register_model function is a decorator factory that takes a name parameter
# and returns a decorator that registers a class in the models dict.
# 
# Looking at the function body:
# - It takes one parameter: name (a string)
# - The decorator takes a cls parameter (a class)
# - It stores cls in models[name]
# - It returns cls
#
# To construct valid arguments, we need to provide a name to register_model.

name = "test_model"

ARGS = {
    "name": name
}
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_solver Ran
ran on a synthesized input
virajprabhu/CLUE/adapt/solvers/solver.py
code served (permissive licence) · get_code("b6020de74b4ef8f6")
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)

# The function register_solver is a decorator factory that takes a name parameter
# and returns a decorator that registers a class in the solvers dict.
# 
# The decorator is called with a class as argument, so we need to provide:
# - name: a string identifier for the solver

# Create a simple test class to use as the decorated class
class SimpleSolver:
    """A minimal solver class for testing the decorator."""
    def __init__(self):
        self.value = 42

# The name parameter should be a string
name = "test_solver"

ARGS = {
    "name": name
}
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_strategy Ran
ran on a synthesized input
virajprabhu/CLUE/sample.py
code served (permissive licence) · get_code("37dd93cc2f3a2f57")
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

al_dict = {}

def register_strategy(name):
    def decorator(cls):
        al_dict[name] = cls
        return cls
    return decorator

# Create a simple test class to register
class SimpleStrategy:
    pass

# Define ARGS with the parameter 'name'
ARGS = {
    'name': 'test_strategy'
}
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
row_norms Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
virajprabhu/CLUE/utils.py
code served (permissive licence) · get_code("dfb55f13a69a3302")
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 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 numpy as np

# Create a small 2D array (2 rows, 4 columns)
X = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float64)

# Test with squared=False (default behavior)
ARGS = {
    "X": X,
    "squared": False
}
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 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
get_model Not yet run
unverified (harvested, no recorded run)
virajprabhu/CLUE/adapt/models/models.py
code served (permissive licence) · get_code("2efe87863253f8ba")
How it ran

no invocation recorded.

get_solver Not yet run
unverified (harvested, no recorded run)
virajprabhu/CLUE/adapt/solvers/solver.py
code served (permissive licence) · get_code("6a049409bc8f279e")
How it ran

no invocation recorded.

get_strategy Not yet run
unverified (harvested, no recorded run)
virajprabhu/CLUE/sample.py
code served (permissive licence) · get_code("dbcd7c2c6017db5f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 6 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
get_model 4 other papers
3 dated earlier, 1 later
1711.03213 (2017-11)
CyCADA: Cycle-Consistent Adversarial Domain Adaptation
2003.00820 (2020-03)
MADAN: Multi-source Adversarial Domain Aggregation Network for Domain Adaptation
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
and 1 more not named here
register_model 3 other papers
2 dated earlier, 1 later
1711.03213 (2017-11)
CyCADA: Cycle-Consistent Adversarial Domain Adaptation
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
row_norms 3 other papers
1 dated earlier, 2 later
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
2202.06484 (2022-02)
D2ADA: Dynamic Density-aware Active Domain Adaptation for Semantic Segmentation
get_strategy 2 other papers
1 dated earlier, 1 later
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
outer_product_opt 2 other papers
1 dated earlier, 1 later
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
register_strategy 2 other papers
1 dated earlier, 1 later
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
get_solver 1 other paper
1 dated earlier
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
kmeans_plus_plus_opt 1 other paper
1 dated earlier
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
process_txt 1 other paper
1 dated earlier
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings
register_solver 1 other paper
1 dated earlier
2010.08666 (2020-10)
Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Generalizing deep neural networks to new target domains is critical to their real-world utility. In practice, it may be feasible to get some target data labeled, but to be cost-effective it is desirable to select a maximally-informative subset via active learning (AL). We study the problem of AL under a domain shift, called Active Domain Adaptation (Active DA). We demonstrate how existing AL approaches based solely on model uncertainty or diversity sampling are less effective for Active DA. We propose Clustering Uncertainty-weighted Embeddings (CLUE), a novel label acquisition strategy for Active DA that performs uncertainty-weighted clustering to identify target instances for labeling that are both uncertain under the model and diverse in feature space. CLUE consistently outperforms competing label acquisition strategies for Active DA and AL across learning settings on 6 diverse domain shifts for image classification. Our code is available at https://github.com/virajprabhu/CLUE.

For agents

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

get_harvested_code_for_paper("Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper")
get_code_for_paper("Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper")
have("Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper")

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

curl https://syntology.ai/api/ran/Prabhu_Active_Domain_Adaptation_via_Clustering_Uncertainty-Weighted_Embeddings_ICCV_2021_paper.json

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

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

Connect an agent — have() is free.