SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.00166 · 2021

TALISMAN: Targeted Active Learning for Object Detection with Rare Classes and Slices using Submodular Mutual Information

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 7 have no contract verdict; 1 failure of our instrument; 4 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/2112.00166.json · badge: /api/ran/2112.00166.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
surajkothawade/talisman canonical (classifier label)
classifier basis not recorded on the link
8 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_queryImage_kernel Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/compute_kernel.py
code served (permissive licence) · get_code("85ed5296deff1e84")
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 4, dtype family float, shape (2, 5, 3, 5) 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

# Construct small numpy arrays for the function parameters
# query_dataset_feat: should be iterable, each element is a feature array
# The function does: np.expand_dims(query_dataset_feat[i], axis=0) 
# and then l2_normalize(query_feat) which expects an array
# Then tensordot with axes=([2], [2]) - so needs at least 3 dimensions

# Let's create query_dataset_feat as a list of 2 samples
# Each sample should have shape (height, width, channels) for the tensordot to work with axes=([2], [2])
# After expand_dims at axis=0, it becomes (1, height, width, channels)

query_dataset_feat = [
    np.random.randn(3, 4, 5),  # shape (3, 4, 5) - height=3, width=4, channels=5
    np.random.randn(3, 4, 5),  # shape (3, 4, 5)
]

# unlabeled_dataset_feat: should be an array that works with tensordot axes=([2], [2])
# After l2_normalize, it's still the same shape
# tensordot(query_feat_norm, unlabeled_feat_norm, axes=([2], [2]))
# query_feat_norm shape: (1, 3, 4, 5)
# unlabeled_feat_norm shape: should be (num_unlabeled, height, width, channels)
# So (num_unlabeled, 3, 4, 5)

unlabeled_dataset_feat = np.random.randn(6, 3, 4, 5)  # 6 unlabeled samples

ARGS = {
    'query_dataset_feat': query_dataset_feat,
    'unlabeled_dataset_feat': unlabeled_dataset_feat,
}
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 4, dtype family float, shape (2, 5, 3, 5) — shape (2, 5, 3, 5) 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
compute_queryQuery_kernel Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/compute_kernel.py
code served (permissive licence) · get_code("84039b965f3086e4")
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, 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

# The function processes a dataset of query features
# Each element should be a 2D array (num_samples, feature_dim)
# We'll create 2 query feature sets, each with shape (2, 4)
# where 2 is number of samples and 4 is feature dimension

query_dataset_feat = [
    np.random.randn(2, 4).astype(np.float32),
    np.random.randn(2, 4).astype(np.float32)
]

ARGS = {
    "query_dataset_feat": query_dataset_feat
}
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, 2) — shape (2, 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
create_custom_dataset Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/custom_dataset.py
code served (permissive licence) · get_code("6e50f9ceb4249e69")
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
import torch
from collections import Counter

class MockDataset:
    def __init__(self, num_samples=10, num_classes=4):
        self.num_samples = num_samples
        self.num_classes = num_classes
        self.CLASSES = [f'class_{i}' for i in range(num_classes)]
        # Generate random data with labels
        self.data = []
        for i in range(num_samples):
            # Each sample has 1-3 labels
            num_labels = np.random.randint(1, 3)
            gt_labels = np.random.randint(0, num_classes, size=num_labels)
            img_data = {
                'gt_labels': MockTensor(gt_labels)
            }
            self.data.append((img_data, i))
    
    def __getitem__(self, idx):
        return self.data[idx]
    
    def __len__(self):
        return self.num_samples

class MockTensor:
    def __init__(self, array):
        self.array = np.array(array)
    
    @property
    def data(self):
        return self
    
    def numpy(self):
        return self.array

# Create mock dataset
fullSet = MockDataset(num_samples=20, num_classes=4)

# Create indices for all samples
all_indices = np.arange(20)

# Set budgets
rare_class_budget = 5
unrare_class_budget = 10

# Define imbalanced classes (classes 0 and 1 are rare)
imbalanced_classes = {0, 1}

# Define all classes initially
all_classes = {0, 1, 2, 3}

ARGS = {
    'fullSet': fullSet,
    'all_indices': all_indices,
    'rare_class_budget': rare_class_budget,
    'unrare_class_budget': unrare_class_budget,
    'imbalanced_classes': imbalanced_classes,
    'all_classes': all_classes
}
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
extract_proposal_features Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/extract_features.py
code served (permissive licence) · get_code("8f021d473ea660b6")
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 3, 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 torch.nn as nn

torch.manual_seed(0)

class RPNHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 2)
    
    def simple_test_rpn(self, features, img_metas):
        # Return a proposal list (list of tensors)
        batch_size = len(img_metas)
        proposals = []
        for i in range(batch_size):
            # Each proposal is a tensor of shape (num_proposals, 4) for bboxes
            proposals.append(torch.randn(5, 4))
        return proposals

class BBoxHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.fc(x)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.rpn_head = RPNHead()
        self.bbox_head = BBoxHead()
        self.with_bbox = True
    
    def forward(self, x):
        return x

# Create model
model = MockModel()

# Create features (dict mapping names to tensors)
features = {
    'feat0': torch.randn(2, 4, 8, 8),
    'feat1': torch.randn(2, 4, 4, 4),
}

# Create img_metas (list of dicts with image metadata)
img_metas = [
    {'img_shape': (32, 32), 'ori_shape': (32, 32)},
    {'img_shape': (32, 32), 'ori_shape': (32, 32)},
]

ARGS = {
    'model': model,
    'features': features,
    'img_metas': img_metas,
}
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 3, 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
furthest_first Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/furthest_first_coreset.py
code served (permissive licence) · get_code("391d1d55a2451546")
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. 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 torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters so we can extract device
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

# Create small embeddings: unlabeled has 5 samples, labeled has 2 samples, embedding dim is 4
unlabeled_embeddings = torch.randn(5, 4).numpy()
labeled_embeddings = torch.randn(2, 4).numpy()

# Number of samples to select
n = 3

ARGS = {
    "model": model,
    "unlabeled_embeddings": unlabeled_embeddings,
    "labeled_embeddings": labeled_embeddings,
    "n": n
}
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
l2_normalize Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/compute_kernel.py
code served (permissive licence) · get_code("1e706ca592829e24")
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, 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 numpy as np

# Create a simple test array with shape (2, 4)
# Using distinct dimensions to allow shape probing
a = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
])

ARGS = {
    "a": a,
    "axis": -1,
    "order": 2
}
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, 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
prepare_val_file Ran
ran on a synthesized input
surajkothawade/talisman/talisman/strategies/active_learning_utils/custom_dataset.py
code served (permissive licence) · get_code("bcc3b99e8d9ea31d")
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 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 os
import tempfile
from unittest.mock import MagicMock

# Create a temporary directory for file operations
temp_dir = tempfile.mkdtemp()

# Create mock dataset items with the required structure
# The function accesses: trn_dataset[index][0]['img_metas'].data['filename']
def create_mock_item(filename):
    img_metas = MagicMock()
    img_metas.data = {'filename': filename}
    return [{
        'img_metas': img_metas
    }]

# Build trn_dataset as a list of mock items
trn_dataset = [
    create_mock_item('/path/to/VOC2007/images/image_001.jpg'),
    create_mock_item('/path/to/VOC2012/images/image_002.jpg'),
    create_mock_item('/path/to/VOC2007/images/image_003.jpg'),
]

# Create indices to select items from the dataset
indices = [0, 1, 2]

# Create filenames for the output files
filename_07 = 'trainval_07.txt'
filename_12 = 'trainval_12.txt'

# Set the strategy directory to the temporary directory
strat_dir = temp_dir

ARGS = {
    'trn_dataset': trn_dataset,
    'indices': indices,
    'filename_07': filename_07,
    'filename_12': filename_12,
    'strat_dir': strat_dir
}
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 1, 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
process_checkpoint Ran
ran; our contract draft was wrong, not the code
surajkothawade/talisman/.dev_scripts/gather_models.py
code served (permissive licence) · get_code("138e112e22b0314e")
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 str. 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 tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for test files
tmpdir = tempfile.mkdtemp()

# Create a valid checkpoint file
in_file = os.path.join(tmpdir, 'checkpoint.pth')
out_file = os.path.join(tmpdir, 'processed.pth')

# Build a checkpoint with state_dict, optimizer, and ema_ keys
checkpoint = {
    'state_dict': {
        'layer1.weight': torch.randn(4, 3),
        'layer1.bias': torch.randn(4),
        'ema_layer1.weight': torch.randn(4, 3),
        'ema_layer1.bias': torch.randn(4),
    },
    'optimizer': {
        'state': {},
        'param_groups': []
    },
    'epoch': 10
}

# Save the checkpoint to disk
torch.save(checkpoint, in_file)

ARGS = {
    'in_file': in_file,
    'out_file': out_file
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_class_statistics Not yet run
unverified (harvested, no recorded run)
surajkothawade/talisman/talisman/strategies/active_learning_utils/custom_dataset.py
code served (permissive licence) · get_code("9dc8eb192c8a42dd")
How it ran

no invocation recorded.

init_centers Not yet run
unverified (harvested, no recorded run)
surajkothawade/talisman/talisman/strategies/active_learning_utils/clustering.py
code served (permissive licence) · get_code("a60fc8e6d28f3903")
How it ran

no invocation recorded.

ordered_yaml_dump Not yet run
unverified (harvested, no recorded run)
surajkothawade/talisman/.dev_scripts/gather_models.py
code served (permissive licence) · get_code("8ff99a6bd2ebf598")
How it ran

no invocation recorded.

select_top_k_proposals Not yet run
unverified (harvested, no recorded run)
surajkothawade/talisman/talisman/strategies/active_learning_utils/extract_features.py
code served (permissive licence) · get_code("6466cc7ecba5e5d0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 10 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
ordered_yaml_dump 31 other papers
7 dated earlier, 24 later
1611.02644 (2016-11)
Multispectral Deep Neural Networks for Pedestrian Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
2105.01928 (2021-05)
Instances as Queries
and 28 more not named here
process_checkpoint 22 other papers
5 dated earlier, 17 later
1611.02644 (2016-11)
Multispectral Deep Neural Networks for Pedestrian Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
2105.01928 (2021-05)
Instances as Queries
and 19 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

Deep neural networks based object detectors have shown great success in a variety of domains like autonomous vehicles, biomedical imaging, etc. It is known that their success depends on a large amount of data from the domain of interest. While deep models often perform well in terms of overall accuracy, they often struggle in performance on rare yet critical data slices. For example, data slices like "motorcycle at night" or "bicycle at night" are often rare but very critical slices for self-driving applications and false negatives on such rare slices could result in ill-fated failures and accidents. Active learning (AL) is a well-known paradigm to incrementally and adaptively build training datasets with a human in the loop. However, current AL based acquisition functions are not well-equipped to tackle real-world datasets with rare slices, since they are based on uncertainty scores or global descriptors of the image. We propose TALISMAN, a novel framework for Targeted Active Learning or object detectIon with rare slices using Submodular MutuAl iNformation. Our method uses the submodular mutual information functions instantiated using features of the region of interest (RoI) to efficiently target and acquire data points with rare slices. We evaluate our framework on the standard PASCAL VOC07+12 and BDD100K, a real-world self-driving dataset. We observe that TALISMAN outperforms other methods by in terms of average precision on rare slices, and in terms of mAP.

For agents

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

get_harvested_code_for_paper("2112.00166")
get_code_for_paper("2112.00166")
have("2112.00166")

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

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

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

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

Connect an agent — have() is free.