SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.12033 · 2021

A Simple Baseline for Low-Budget Active Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 of 16 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 5 have no contract verdict; 0 failures of our instrument; 10 no recorded run), measured 2026-11-23; 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/2110.12033.json · badge: /api/ran/2110.12033.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
ucdvision/low-budget-al canonical (classifier label)
classifier basis: plan_row
6 ran · 10 no recorded run
FunctionStatusWhere it lives
get_channels Ran
ran, honoured the contract we drafted
ucdvision/low-budget-al/sampler.py
code served (permissive licence) · get_code("4b168fddd9c6f72d")
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 int, ndim 0, dtype family int, 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 as nn

torch.manual_seed(0)

# The function get_channels takes a single parameter 'arch' which is a string
# It checks the arch against various known architecture names and returns
# the number of channels for that architecture
# No actual model is used, just the string parameter

ARGS = {
    'arch': 'resnet50'
}
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 int, ndim 0, dtype family int, 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_model Ran
ran on a synthesized input
ucdvision/low-budget-al/finetune.py
code served (permissive licence) · get_code("2b1cd6fb4b47aba1")
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 ResNet. 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
import torchvision.models as models
import tempfile
import os

torch.manual_seed(0)

# Create a temporary weights file with a valid checkpoint
temp_dir = tempfile.mkdtemp()
wts_path = os.path.join(temp_dir, "checkpoint.pth")

# Create a mock checkpoint with resnet18 weights
mock_model = models.resnet18()
checkpoint = {
    'state_dict': mock_model.state_dict()
}
torch.save(checkpoint, wts_path)

# Create args class with required attributes
class Args:
    def __init__(self):
        self.arch = 'resnet18'
        self.num_classes = 128

args = Args()

ARGS = {
    'arch': 'resnet18',
    'wts_path': wts_path,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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_model Ran
ran on a synthesized input
ucdvision/low-budget-al/active_sampler.py
code served (permissive licence) · get_code("ff4ed7bd1ee3e302")
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 ResNet. 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
import torchvision.models as models
import os
import tempfile

torch.manual_seed(0)

# Create a minimal args object
class Args:
    def __init__(self, backbone='compress'):
        self.backbone = backbone
        self.start_epoch = 0

# Create a temporary directory for weights
tmpdir = tempfile.gettempdir()

# Create a minimal checkpoint file for 'compress' backbone
compress_checkpoint = {
    'state_dict': {
        'conv1.weight': torch.randn(64, 3, 7, 7),
        'layer1.0.conv1.weight': torch.randn(64, 64, 3, 3),
    }
}
compress_wts_path = os.path.join(tmpdir, 'compress_ckpt.pt')
torch.save(compress_checkpoint, compress_wts_path)

# Create a minimal checkpoint file for 'moco' backbone
moco_checkpoint = {
    'state_dict': {
        'module.encoder_q.conv1.weight': torch.randn(64, 3, 7, 7),
        'module.encoder_q.layer1.0.conv1.weight': torch.randn(64, 64, 3, 3),
        'module.encoder_q.fc.weight': torch.randn(128, 2048),
        'module.encoder_q.fc.bias': torch.randn(128),
    }
}
moco_wts_path = os.path.join(tmpdir, 'moco_ckpt.pt')
torch.save(moco_checkpoint, moco_wts_path)

# Test with compress backbone
ARGS = {
    'arch': 'resnet18',
    'wts_path': compress_wts_path,
    'args': Args(backbone='compress')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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_model Ran
ran on a synthesized input
ucdvision/low-budget-al/eval_lincls.py
code served (permissive licence) · get_code("5d525ce7dc2702df")
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 ResNet. 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
import torchvision.models as models
import os
import tempfile

torch.manual_seed(0)

# Create a minimal args object
class Args:
    def __init__(self, backbone, start_epoch=0):
        self.backbone = backbone
        self.start_epoch = start_epoch

# Create temporary directory for weights
temp_dir = tempfile.mkdtemp()

# Create a minimal checkpoint file for 'compress' backbone
compress_ckpt_path = os.path.join(temp_dir, 'compress_weights.pth')
compress_state = {
    'state_dict': {
        'conv1.weight': torch.randn(4, 3, 7, 7),
        'layer1.0.conv1.weight': torch.randn(4, 4, 3, 3),
        'fc.weight': torch.randn(128, 512),
        'fc.bias': torch.randn(128),
    }
}
torch.save(compress_state, compress_ckpt_path)

# Create a minimal checkpoint file for 'moco' backbone
moco_ckpt_path = os.path.join(temp_dir, 'moco_weights.pth')
moco_state = {
    'state_dict': {
        'module.encoder_q.conv1.weight': torch.randn(4, 3, 7, 7),
        'module.encoder_q.layer1.0.conv1.weight': torch.randn(4, 4, 3, 3),
    }
}
torch.save(moco_state, moco_ckpt_path)

# Define arguments for different test cases
# Test with 'compress' backbone
args_compress = Args(backbone='compress', start_epoch=0)

# Test with 'moco' backbone
args_moco = Args(backbone='moco', start_epoch=0)

ARGS = {
    'arch': 'resnet18',
    'wts_path': compress_ckpt_path,
    'args': args_compress,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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_val_loader Ran
ran on a synthesized input
ucdvision/low-budget-al/finetune.py
code served (permissive licence) · get_code("27110b2fee3f7db1")
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 DataLoader. 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.utils.data
import tempfile
import os
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create a temporary directory structure for ImageNet validation
temp_dir = tempfile.mkdtemp()
val_dir = os.path.join(temp_dir, 'val')
os.makedirs(val_dir, exist_ok=True)

# Create a few dummy class directories with dummy images
for class_idx in range(2):
    class_dir = os.path.join(val_dir, f'class_{class_idx}')
    os.makedirs(class_dir, exist_ok=True)
    
    # Create 2 dummy images per class
    for img_idx in range(2):
        # Create a small RGB image (256x256 to match resize expectation)
        img_array = np.random.randint(0, 256, (256, 256, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img_path = os.path.join(class_dir, f'image_{img_idx}.jpg')
        img.save(img_path)

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.data = temp_dir
        self.batch_size = 2
        self.workers = 0

ARGS = {
    'dataset': 'imagenet',
    'args': Args()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
validate Ran
ran on a synthesized input
ucdvision/low-budget-al/trainer_DP.py
code served (permissive licence) · get_code("f3e86360420c3918")
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. 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)

# Create a minimal task model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 10)  # 10 classes for top5 accuracy
    
    def forward(self, x):
        return self.fc(x)

task_model = MinimalModel()

# Create a minimal validation loader
# Each batch is (images, target)
val_loader = [
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
]

# Create args object with required attributes
class Args:
    def __init__(self):
        self.print_freq = 2

args = Args()

ARGS = {
    'task_model': task_model,
    'val_loader': val_loader,
    '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 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
accu_kmeans Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/strategies.py
code served (permissive licence) · get_code("f492c504dc7b04a3")
How it ran

no invocation recorded.

core_set Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/strategies.py
code served (permissive licence) · get_code("699fd70c1a03d08c")
How it ran

no invocation recorded.

fast_kmeans Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/strategies.py
code served (permissive licence) · get_code("58c44731fdf7049f")
How it ran

no invocation recorded.

get_inference_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/active_sampler.py
code served (permissive licence) · get_code("a35784f7dd9b3d4b")
How it ran

no invocation recorded.

get_inference_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/eval_knn.py
code served (permissive licence) · get_code("e3ae5af66cd61bb0")
How it ran

no invocation recorded.

get_inference_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/eval_lincls.py
code served (permissive licence) · get_code("fb7f31c4f1519e8f")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/eval_knn.py
code served (permissive licence) · get_code("fe318f86dbbade77")
How it ran

no invocation recorded.

get_train_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/finetune.py
code served (permissive licence) · get_code("2d99dc82b2c56aad")
How it ran

no invocation recorded.

get_train_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/active_sampler.py
code served (permissive licence) · get_code("10b4a8cb35b97aaa")
How it ran

no invocation recorded.

get_val_loader Not yet run
unverified (harvested, no recorded run)
ucdvision/low-budget-al/eval_knn.py
code served (permissive licence) · get_code("1f16dd751b8e4097")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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_channels 1 other paper
1 dated earlier
2010.14713 (2020-10)
CompRess: Self-Supervised Learning by Compressing Representations

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

Repositories linked to this paper

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

Abstract

Active learning focuses on choosing a subset of unlabeled data to be labeled. However, most such methods assume that a large subset of the data can be annotated. We are interested in low-budget active learning where only a small subset (e.g., 0.2% of ImageNet) can be annotated. Instead of proposing a new query strategy to iteratively sample batches of unlabeled data given an initial pool, we learn rich features by an off-the-shelf self-supervised learning method only once, and then study the effectiveness of different sampling strategies given a low labeling budget on a variety of datasets including ImageNet. We show that although the state-of-the-art active learning methods work well given a large labeling budget, a simple K-means clustering algorithm can outperform them on low budgets. We believe this method can be used as a simple baseline for low-budget active learning on image classification. Code is available at: https://github.com/UCDvision/low-budget-al

For agents

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

get_harvested_code_for_paper("2110.12033")
get_code_for_paper("2110.12033")
have("2110.12033")

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

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

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

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

Connect an agent — have() is free.