SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02435 · ICML · 2024

Generative Active Learning for Long-tailed Instance Segmentation

Yang Liu, Chunhua Shen, Hao Chen, Xiaogang Xu, Muzhi Zhu, Chengxiang Fan, Weian Mao, Downstream Model

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2406.02435.json · badge: /api/ran/2406.02435.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
aim-uofa/DiverGen canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
aim-uofa/divergen canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
filter_none Ran
ran; our contract draft was wrong, not the code
aim-uofa/DiverGen/DiverGen/filteration/clean_pool_if.py
code served (permissive licence) · get_code("00ab34f79a0e8521")
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. 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 numpy as np

torch.manual_seed(0)

# The function filter_none takes a single parameter 'x' which should be
# an iterable (list) that may contain None values mixed with other values.
# It returns a filtered list with None values removed.

# Create a list with mixed values including None
x = [1, None, "hello", None, 42, torch.tensor([1.0, 2.0]), None, [1, 2, 3]]

ARGS = {
    "x": x
}
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 list — a list 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
get_clip_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/divergen/BSGAL/bsgal/predictor.py
code served (permissive licence) · get_code("8218770271c01c2c")
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) and returned Tensor, ndim 2, dtype family float, shape (4, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTextEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 4)
    
    def forward(self, texts):
        # texts is a list of strings
        # return a tensor of shape (batch_size, embedding_dim)
        batch_size = len(texts)
        # Create a dummy embedding tensor
        embeddings = torch.randn(batch_size, 4)
        return embeddings
    
    def eval(self):
        return super().eval()

# Mock the build_text_encoder function
import sys
from types import ModuleType

# Create mock modules
bsgal = ModuleType('bsgal')
bsgal_modeling = ModuleType('bsgal.modeling')
bsgal_modeling_text = ModuleType('bsgal.modeling.text')
bsgal_modeling_text_encoder = ModuleType('bsgal.modeling.text.text_encoder')

def mock_build_text_encoder(pretrain=True):
    return MockTextEncoder()

bsgal_modeling_text_encoder.build_text_encoder = mock_build_text_encoder

sys.modules['bsgal'] = bsgal
sys.modules['bsgal.modeling'] = bsgal_modeling
sys.modules['bsgal.modeling.text'] = bsgal_modeling_text
sys.modules['bsgal.modeling.text.text_encoder'] = bsgal_modeling_text_encoder

bsgal.modeling = bsgal_modeling
bsgal_modeling.text = bsgal_modeling_text
bsgal_modeling_text.text_encoder = bsgal_modeling_text_encoder

ARGS = {
    'vocabulary': ['cat', 'dog', 'bird'],
    'prompt': 'a photo of '
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
bsgal, 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 (4, 3) — shape (4, 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
get_clip_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/DiverGen/DiverGen/divergen/predictor.py
code served (permissive licence) · get_code("d2784f2d81aab615")
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 (512, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTextEncoder(nn.Module):
    def __init__(self, output_dim=512):
        super().__init__()
        self.output_dim = output_dim
        self.linear = nn.Linear(10, output_dim)
    
    def forward(self, texts):
        # texts is a list of strings
        # Return a tensor of shape (batch_size, output_dim)
        batch_size = len(texts)
        # Create a dummy tensor and pass through linear layer
        dummy_input = torch.randn(batch_size, 10)
        return self.linear(dummy_input)
    
    def eval(self):
        return super().eval()

# Mock the build_text_encoder function
import sys
from types import ModuleType

divergen_module = ModuleType('divergen')
divergen_modeling = ModuleType('divergen.modeling')
divergen_text = ModuleType('divergen.modeling.text')
divergen_encoder = ModuleType('divergen.modeling.text.text_encoder')

def mock_build_text_encoder(pretrain=True):
    return MockTextEncoder(output_dim=512)

divergen_encoder.build_text_encoder = mock_build_text_encoder
divergen_text.text_encoder = divergen_encoder
divergen_modeling.text = divergen_text
divergen_module.modeling = divergen_modeling

sys.modules['divergen'] = divergen_module
sys.modules['divergen.modeling'] = divergen_modeling
sys.modules['divergen.modeling.text'] = divergen_text
sys.modules['divergen.modeling.text.text_encoder'] = divergen_encoder

ARGS = {
    'vocabulary': ['cat', 'dog', 'bird'],
    'prompt': 'a photo of '
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
divergen, 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 (512, 3) — shape (512, 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
get_fed_loss_inds Ran
ran; our contract draft was wrong, not the code
aim-uofa/DiverGen/DiverGen/divergen/modeling/utils.py
code served (permissive licence) · get_code("bb583e07209fe58b")
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 (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 torch

torch.manual_seed(0)

# gt_classes: a tensor of class indices
gt_classes = torch.tensor([0, 1, 2, 1, 0], dtype=torch.long)

# num_sample_cats: number of categories to sample
num_sample_cats = 5

# C: number of classes (total number of categories)
C = 8

# weight: optional weight tensor for classes, should have length C
weight = torch.ones(C, dtype=torch.float32)

ARGS = {
    "gt_classes": gt_classes,
    "num_sample_cats": num_sample_cats,
    "C": C,
    "weight": weight,
}
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 (5,) — shape (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
get_largest_connect_component Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aim-uofa/DiverGen/DiverGen/filteration/clean_pool_if.py
code served (permissive licence) · get_code("3d29f42a6e854903")
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 int, shape (50, 50) 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 cv2
import numpy as np

# Create a simple binary image with some connected components
# The image should be a 2D numpy array with uint8 dtype for cv2.findContours
img = np.zeros((50, 50), dtype=np.uint8)

# Draw a large rectangle (largest component)
cv2.rectangle(img, (10, 10), (40, 40), 1, -1)

# Draw a small rectangle (smaller component)
cv2.rectangle(img, (2, 2), (6, 6), 1, -1)

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 int, shape (50, 50) — shape (50, 50) 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
load_class_freq Ran
ran, honoured the contract we drafted
aim-uofa/DiverGen/DiverGen/divergen/modeling/utils.py
code served (permissive licence) · get_code("1f6e4c3da7b82979")
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 (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 torch
import json
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory and a mock LVIS metadata file
temp_dir = tempfile.mkdtemp()
metadata_path = os.path.join(temp_dir, 'lvis_v1_train_cat_info.json')

# Create mock category info with id and image_count
cat_info_data = [
    {'id': 1, 'image_count': 100},
    {'id': 2, 'image_count': 250},
    {'id': 3, 'image_count': 50},
]

with open(metadata_path, 'w') as f:
    json.dump(cat_info_data, f)

ARGS = {
    'path': metadata_path,
    'freq_weight': 1.0,
}
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 (3,) — shape (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
match_name_keywords Ran
ran, violated the contract we drafted
aim-uofa/DiverGen/DiverGen/divergen/custom_solver.py
code served (permissive licence) · get_code("c15434906f804d7f")
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) and returned bool, ndim 0, dtype family float, 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

torch.manual_seed(0)

# The function match_name_keywords checks if any string in name_keywords
# is contained in the string n. It takes:
# - n: a string to search in
# - name_keywords: an iterable of strings to search for

n = "layer.weight.bias"
name_keywords = ["weight", "bias", "norm"]

ARGS = {
    "n": n,
    "name_keywords": name_keywords,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
init_distributed Not yet run
unverified (harvested, no recorded run)
aim-uofa/DiverGen/DiverGen/filteration/get_clip_score.py
code served (permissive licence) · get_code("313bd22b056120f7")
How it ran

no invocation recorded.

init_distributed Not yet run
unverified (harvested, no recorded run)
aim-uofa/DiverGen/DiverGen/filteration/clean_pool_if.py
code served (permissive licence) · get_code("6c76a9bfda987c86")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
match_name_keywords 13 other papers
10 dated earlier, 2 later, 1 same year, order not determinable
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
2111.04076 (2021-11)
Direct Multi-view Multi-person 3D Pose Estimation
2206.11134 (2022-06)
Open Vocabulary Object Detection with Proposal Mining and Prediction Equalization
and 10 more not named here
get_fed_loss_inds 10 other papers
6 dated earlier, 3 later, 1 same year, order not determinable
2206.11134 (2022-06)
Open Vocabulary Object Detection with Proposal Mining and Prediction Equalization
2207.03482 (2022-07)
Bridging the Gap between Object and Image-level Representations for Open-Vocabulary Detection
2207.13080 (2022-07)
DETRs with Hybrid Matching
and 7 more not named here
load_class_freq 7 other papers
5 dated earlier, 1 later, 1 same year, order not determinable
2206.11134 (2022-06)
Open Vocabulary Object Detection with Proposal Mining and Prediction Equalization
2207.13080 (2022-07)
DETRs with Hybrid Matching
2211.12914 (2022-11)
Open-vocabulary Attribute Detection
and 4 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-21.

Repositories linked to this paper

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

Abstract

Recently, large-scale language-image generative models have gained widespread attention and many works have utilized generated data from these models to further enhance the performance of perception tasks. However, not all generated data can positively impact downstream models, and these methods do not thoroughly explore how to better select and utilize generated data. On the other hand, there is still a lack of research oriented towards active learning on generated data. In this paper, we explore how to perform active learning specifically for generated data in the longtailed instance segmentation task. Subsequently, we propose BSGAL, a new algorithm that online estimates the contribution of the generated data based on gradient cache. BSGAL can handle unlimited generated data and complex downstream segmentation tasks effectively. Experiments show that BSGAL outperforms the baseline approach and effectually improves the performance of longtailed segmentation. Our code can be found at https://github.com/aim-uofa/DiverGen.

For agents

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

get_harvested_code_for_paper("2406.02435")
get_code_for_paper("2406.02435")
have("2406.02435")

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

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

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

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

Connect an agent — have() is free.