SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.08901 · ICCV · 2021

S$^3$VAADA: Submodular Subset Selection for Virtual Adversarial Active Domain Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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 6 have no contract verdict; 0 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/2109.08901.json · badge: /api/ran/2109.08901.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
val-iisc/s3vaada canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
H Ran
ran on a synthesized input
val-iisc/s3vaada/active_learning.py
code served (permissive licence) · get_code("089f4c16f893e1e5")
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

torch.manual_seed(0)

# The function H takes a tensor x and computes -1 * sum(exp(x) * x, dim=1)
# It expects x to be a 2D tensor (batch_size, features)
# The function will:
# 1. Compute torch.exp(x) - element-wise exponential
# 2. Multiply by x element-wise
# 3. Sum along dimension 1 (across features)
# 4. Multiply by -1

# Create a small 2D tensor: batch_size=2, num_features=4
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
aada Ran
ran on a synthesized input
val-iisc/s3vaada/active_learning.py
code served (permissive licence) · get_code("d3f6836b47dbc865")
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 int, 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 torch.nn as nn

torch.manual_seed(0)

# Define a small model that matches the expected interface
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc1 = nn.Linear(3, 4)
        self.fc2 = nn.Linear(4, 2)  # domain_scores output
        self.fc3 = nn.Linear(4, 5)  # scores output
    
    def forward(self, x, mode, lamda):
        # x: (batch, 3)
        # Returns: scores, domain_scores, _
        feat = self.fc1(x)
        scores = self.fc3(feat)  # (batch, 5)
        domain_scores = self.fc2(feat)  # (batch, 2)
        return scores, domain_scores, None

# Create model
models = SimpleModel()

# Create a simple data loader (list of batches with inputs and dummy labels)
unlabeled_loader = [
    (torch.randn(2, 3), torch.zeros(2, dtype=torch.long)),
    (torch.randn(2, 3), torch.zeros(2, dtype=torch.long)),
]

# Set device to CPU
device = torch.device('cpu')

# Create args object with budget parameter
class Args:
    def __init__(self):
        self.budget = 2

args = Args()

ARGS = {
    'models': models,
    'unlabeled_loader': unlabeled_loader,
    'device': device,
    'args': args,
}
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 1, dtype family int, 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_dataset_visda Ran
ran on a synthesized input
val-iisc/s3vaada/datasets/datasets.py
code served (permissive licence) · get_code("3152e429d3c8aaaa")
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 ImageFolder. 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 os
import tempfile
import shutil
from torchvision import datasets, transforms
from PIL import Image
import numpy as np

# Create a temporary directory structure for VisDA-18 dataset
temp_dir = tempfile.mkdtemp()
datasets_path = os.path.join(temp_dir, 'datasets', 'data', 'VisDA-18')
source_path = os.path.join(datasets_path, 'source')
target_path = os.path.join(datasets_path, 'target')

os.makedirs(source_path, exist_ok=True)
os.makedirs(target_path, exist_ok=True)

# Create dummy image files for source domain
source_class_0 = os.path.join(source_path, 'class0')
source_class_1 = os.path.join(source_path, 'class1')
os.makedirs(source_class_0, exist_ok=True)
os.makedirs(source_class_1, exist_ok=True)

for i in range(2):
    img = Image.fromarray(np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8))
    img.save(os.path.join(source_class_0, f'img_{i}.jpg'))
    img.save(os.path.join(source_class_1, f'img_{i}.jpg'))

# Create dummy image files for target domain
target_class_0 = os.path.join(target_path, 'class0')
target_class_1 = os.path.join(target_path, 'class1')
os.makedirs(target_class_0, exist_ok=True)
os.makedirs(target_class_1, exist_ok=True)

for i in range(2):
    img = Image.fromarray(np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8))
    img.save(os.path.join(target_class_0, f'img_{i}.jpg'))
    img.save(os.path.join(target_class_1, f'img_{i}.jpg'))

# Change working directory to temp_dir
original_cwd = os.getcwd()
os.chdir(temp_dir)

class Args:
    def __init__(self):
        self.source = 'source'
        self.target = 'target'

ARGS = {
    'args': Args(),
    'domain': 'source',
    'train': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ImageFolder — a ImageFolder 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
optimizer_scheduler Ran
ran on a synthesized input
val-iisc/s3vaada/utils/utils.py
code served (permissive licence) · get_code("22c19cc5c4450c3a")
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 SGD. 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
from torch.optim import SGD

torch.manual_seed(0)

# Create a minimal model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Create the arguments dict
ARGS = {
    'optimizer': optimizer,
    'p': 0.5
}
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 SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
process_image Ran
ran on a synthesized input
val-iisc/s3vaada/datasets/preprocess_office-home.py
code served (permissive licence) · get_code("6d9202848251517d")
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 float, shape (256, 256, 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
from skimage import io, transform
import tempfile
import os

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

# Create a small test image and save it
test_image = np.random.randint(0, 256, (128, 128, 3), dtype=np.uint8)
io.imsave(temp_image_path, test_image)

# Define arguments dictionary
ARGS = {
    'image': temp_image_path,
    'weight': 256,
    'hight': 256
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — 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 float, shape (256, 256, 3) — shape (256, 256, 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
sigmoid Ran
ran on a synthesized input
val-iisc/s3vaada/utils/utils.py
code served (permissive licence) · get_code("77b3b56a636e480e")
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, 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 torch

torch.manual_seed(0)

# The sigmoid function takes two parameters:
# - parameter: used in arithmetic operations, needs to be a tensor or numeric value
# - plasticity: used in arithmetic operations, needs to be a tensor or numeric value

parameter = torch.randn(2, 4)
plasticity = torch.tensor(0.5)

ARGS = {
    "parameter": parameter,
    "plasticity": plasticity,
}
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, 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
get_active_learning_method Not yet run
unverified (harvested, no recorded run)
val-iisc/s3vaada/active_learning.py
code served (permissive licence) · get_code("d4f0afeba12947e8")
How it ran

no invocation recorded.

get_source_domain Not yet run
unverified (harvested, no recorded run)
val-iisc/s3vaada/datasets/datasets.py
code served (permissive licence) · get_code("4348af4ec893c2f2")
How it ran

no invocation recorded.

get_target_domain Not yet run
unverified (harvested, no recorded run)
val-iisc/s3vaada/datasets/datasets.py
code served (permissive licence) · get_code("6aa5f45548a3a13a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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 (DA) methods have focused on achieving maximal performance through aligning features from source and target domains without using labeled data in the target domain. Whereas, in the real-world scenario's it might be feasible to get labels for a small proportion of target data. In these scenarios, it is important to select maximally-informative samples to label and find an effective way to combine them with the existing knowledge from source data. Towards achieving this, we propose S$^3$VAADA which i) introduces a novel submodular criterion to select a maximally informative subset to label and ii) enhances a cluster-based DA procedure through novel improvements to effectively utilize all the available data for improving generalization on target. Our approach consistently outperforms the competing state-of-the-art approaches on datasets with varying degrees of domain shifts.

For agents

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

get_harvested_code_for_paper("2109.08901")
get_code_for_paper("2109.08901")
have("2109.08901")

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

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

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

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

Connect an agent — have() is free.