SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.14382 · CVPR · 2023

Active Finetuning: Exploiting Annotation Budget in the Pretraining-Finetuning Paradigm

Masayoshi Tomizuka, Junchi Yan, Xiaokang Yang, Wei Zhan, Yichen Xie, Han Lu

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 0 have no contract verdict; 3 failures of our instrument; 1 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/2303.14382.json · badge: /api/ran/2303.14382.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
yichen928/ActiveFT community
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
farthest_distance_sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yichen928/ActiveFT/data_selection/sample_tools/ActiveFT_ImageNet.py
code served (permissive licence) · get_code("0e81af882edb7daa")
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 1, dtype family int; no output shape is stated. 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 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 random

torch.manual_seed(0)
random.seed(0)

# Define a simple distance function that takes two tensors and returns distances
def euclidean_distance(features, query_feature):
    """Compute Euclidean distance between features and a query feature."""
    # features: (N, D), query_feature: (D,)
    # Returns: (N,) tensor of distances
    diff = features - query_feature.unsqueeze(0)
    distances = torch.sqrt((diff ** 2).sum(dim=1))
    return distances

# Create sample features tensor (N=6 samples, D=4 dimensions)
all_features = torch.randn(6, 4)

# Number of samples to select
sample_num = 3

# Distance function
dist_func = euclidean_distance

# Optional initial IDs (empty list means start from scratch)
init_ids = []

ARGS = {
    'all_features': all_features,
    'sample_num': sample_num,
    'dist_func': dist_func,
    'init_ids': init_ids
}
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 list, ndim 1, dtype family int — 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
get_distance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yichen928/ActiveFT/data_selection/sample_tools/ActiveFT_ImageNet.py
code served (permissive licence) · get_code("e12a7dcc6d51fd2d")
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 torch.nn.functional as F
import math

torch.manual_seed(0)

# Create test tensors for different scenarios
# Scenario 1: p1 is 2D (batch), p2 is 1D
p1_2d = torch.randn(2, 4)
p2_1d = torch.randn(4)

# Scenario 2: p1 is 2D (batch), p2 is 2D (batch)
p1_2d_batch = torch.randn(2, 4)
p2_2d_batch = torch.randn(3, 4)

# Scenario 3: p1 is 1D, p2 is 1D
p1_1d = torch.randn(4)
p2_1d_single = torch.randn(4)

# Scenario 4: for KLDiv, use probability distributions (non-negative, sum to ~1)
p1_prob = torch.softmax(torch.randn(2, 4), dim=1)
p2_prob = torch.softmax(torch.randn(4), dim=0)
p1_prob_batch = torch.softmax(torch.randn(2, 4), dim=1)
p2_prob_batch = torch.softmax(torch.randn(3, 4), dim=1)

ARGS = {
    "p1": p1_2d,
    "p2": p2_1d,
    "type": "cosine",
    "slice": 1000,
    "temperature": 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 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
update_distance Ran
ran; our contract draft was wrong, not the code
yichen928/ActiveFT/data_selection/sample_tools/ActiveFT_ImageNet.py
code served (permissive licence) · get_code("108c0b957ce6379f")
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
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors
# distances: should be a tensor that will be compared and updated
distances = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                          [5.0, 6.0, 7.0, 8.0]])

# all_features: tensor of features that will be passed to dist_func
all_features = torch.tensor([[0.1, 0.2, 0.3, 0.4],
                             [0.5, 0.6, 0.7, 0.8]])

# cfeature: a single feature vector to compare against
cfeature = torch.tensor([0.15, 0.25, 0.35, 0.45])

# dist_func: a function that takes (all_features, cfeature) and returns distances
def dist_func(features, feature):
    # Simple euclidean distance computation
    return torch.norm(features - feature, dim=1, keepdim=True)

ARGS = {
    "distances": distances,
    "all_features": all_features,
    "cfeature": cfeature,
    "dist_func": dist_func
}
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
SampleModel Not yet run
unverified (harvested, no recorded run)
yichen928/ActiveFT/data_selection/sample_tools/ActiveFT_ImageNet.py
code served (permissive licence) · get_code("b71c13fc166b89c2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
update_distance
brick of this paper's assembly: helper
1 other paper
1 later
2309.17342 (2023-09)
Towards Free Data Selection with General-Purpose Models

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

Given the large-scale data and the high annotation cost, pretraining-finetuning becomes a popular paradigm in multiple computer vision tasks. Previous research has covered both the unsupervised pretraining and supervised finetuning in this paradigm, while little attention is paid to exploiting the annotation budget for finetuning. To fill in this gap, we formally define this new active finetuning task focusing on the selection of samples for annotation in the pretrainingfinetuning paradigm. We propose a novel method called Ac-tiveFT for active finetuning task to select a subset of data distributing similarly with the entire unlabeled pool and maintaining enough diversity by optimizing a parametric model in the continuous space. We prove that the Earth Mover's distance between the distributions of the selected subset and the entire data pool is also reduced in this process. Extensive experiments show the leading performance and high efficiency of ActiveFT superior to baselines on both image classification and semantic segmentation. Our code is released at https://github.com/yichen928/ActiveFT.

For agents

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

get_harvested_code_for_paper("2303.14382")
get_code_for_paper("2303.14382")
have("2303.14382")

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

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

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

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

Connect an agent — have() is free.