SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.07459 · 2023

Instance-level Few-shot Learning with Class Hierarchy Mining

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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 6 failures of our instrument; 2 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/2304.07459.json · badge: /api/ran/2304.07459.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
nvakhoa/superclass-fsis canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
batched_nms Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/layers/nms.py
code served (permissive licence) · get_code("0df9d3b583fbc6cb")
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

torch.manual_seed(0)

# Create sample boxes in (x1, y1, x2, y2) format
# Shape: (num_boxes, 4)
boxes = torch.tensor([
    [10.0, 20.0, 30.0, 40.0],
    [15.0, 25.0, 35.0, 45.0],
], dtype=torch.float32)

# Create sample scores for each box
# Shape: (num_boxes,)
scores = torch.tensor([0.9, 0.7], dtype=torch.float32)

# Create batch indices - which "class" or "batch" each box belongs to
# Shape: (num_boxes,)
idxs = torch.tensor([0, 1], dtype=torch.int64)

# IoU threshold for NMS
iou_threshold = 0.5

ARGS = {
    "boxes": boxes,
    "scores": scores,
    "idxs": idxs,
    "iou_threshold": iou_threshold,
}
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 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
convert_basic_c2_names Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/checkpoint/c2_model_loading.py
pointer only (licence: Apache-2.0) · get_code("e8526a516b4f9206")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_c2_detectron_names Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/checkpoint/c2_model_loading.py
pointer only (licence: Apache-2.0) · get_code("52810b504f0d1066")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_save_path_seeds Ran
ran on a synthesized input
nvakhoa/superclass-fsis/datasets/prepare_coco_few_shot.py
pointer only (licence: Apache-2.0) · get_code("fb6b8ecbce0b82a0")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pad_masks Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/layers/mask_ops.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from thinklab-sjtu/bench2drivezoo, is pointer only (licence: NOASSERTION) · get_code("406f84cf799ed34d")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

paste_mask_in_image_old Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/layers/mask_ops.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from thinklab-sjtu/bench2drivezoo, is pointer only (licence: NOASSERTION) · get_code("d03592674030077f")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

paste_masks_in_image Ran
ran; our contract draft was wrong, not the code
nvakhoa/superclass-fsis/detectron2/layers/mask_ops.py
code served (permissive licence) · get_code("fc1b0400223ff90e")
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 3, dtype family float, shape (2, 100, 120) 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 numpy as np

torch.manual_seed(0)

# Create small test tensors
# masks: (N, H_mask, W_mask) - N detected objects, each with a square mask
N = 2
mask_size = 4
masks = torch.rand(N, mask_size, mask_size)

# boxes: (N, 4) - bounding boxes in format [x0, y0, x1, y1]
# Create boxes that fit within the image
boxes = torch.tensor([
    [10.0, 10.0, 30.0, 35.0],  # box 1
    [50.0, 20.0, 70.0, 40.0],  # box 2
], dtype=torch.float32)

# image_shape: (height, width)
image_shape = (100, 120)

# threshold: float parameter for converting soft masks to binary
threshold = 0.5

ARGS = {
    "masks": masks,
    "boxes": boxes,
    "image_shape": image_shape,
    "threshold": threshold,
}
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 Tensor, ndim 3, dtype family float, shape (2, 100, 120) — shape (2, 100, 120) 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
batched_nms_rotated Not yet run
unverified (harvested, no recorded run)
nvakhoa/superclass-fsis/detectron2/layers/nms.py
pointer only (licence: Apache-2.0) · get_code("4845964b76bba6c5")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

nms_rotated Not yet run
unverified (harvested, no recorded run)
nvakhoa/superclass-fsis/detectron2/layers/nms.py
pointer only (licence: Apache-2.0) · get_code("d3fa37a000ad294d")
How it ran

The body of this sample is withheld: Apache-2.0, as GitHub detects it on this paper's repository, nvakhoa/superclass-fsis, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. 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, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 3 the same month, 8 later) and 0 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
convert_basic_c2_names 45 other papers
28 dated earlier, 1 the same month, 14 later, 2 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1901.08164 (2019-01)
Decoupled Greedy Learning of CNNs
and 42 more not named here
convert_c2_detectron_names 29 other papers
24 dated earlier, 4 later, 1 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1901.08164 (2019-01)
Decoupled Greedy Learning of CNNs
and 26 more not named here
pad_masks 22 other papers
14 dated earlier, 1 the same month, 6 later, 1 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1908.07836 (2019-08)
PubLayNet: largest dataset ever for document layout analysis
and 19 more not named here
paste_mask_in_image_old 22 other papers
14 dated earlier, 1 the same month, 6 later, 1 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1908.07836 (2019-08)
PubLayNet: largest dataset ever for document layout analysis
and 19 more not named here
nms_rotated 14 other papers
12 dated earlier, 1 later, 1 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1908.07836 (2019-08)
PubLayNet: largest dataset ever for document layout analysis
and 11 more not named here
batched_nms 12 other papers
11 dated earlier, 1 later
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1908.07836 (2019-08)
PubLayNet: largest dataset ever for document layout analysis
and 9 more not named here
batched_nms_rotated 12 other papers
11 dated earlier, 1 later
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1908.07836 (2019-08)
PubLayNet: largest dataset ever for document layout analysis
and 9 more not named here
paste_masks_in_image 5 other papers
4 dated earlier, 1 later
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
2003.05176 (2020-03)
Equalization Loss for Long-Tailed Object Recognition
2004.08955 (2020-04)
ResNeSt: Split-Attention Networks
and 2 more not named here
get_save_path_seeds 1 other paper
1 dated earlier
2105.05312 (2021-05)
Incremental Few-Shot Instance Segmentation

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

Few-shot learning is proposed to tackle the problem of scarce training data in novel classes. However, prior works in instance-level few-shot learning have paid less attention to effectively utilizing the relationship between categories. In this paper, we exploit the hierarchical information to leverage discriminative and relevant features of base classes to effectively classify novel objects. These features are extracted from abundant data of base classes, which could be utilized to reasonably describe classes with scarce data. Specifically, we propose a novel superclass approach that automatically creates a hierarchy considering base and novel classes as fine-grained classes for few-shot instance segmentation (FSIS). Based on the hierarchical information, we design a novel framework called Soft Multiple Superclass (SMS) to extract relevant features or characteristics of classes in the same superclass. A new class assigned to the superclass is easier to classify by leveraging these relevant features. Besides, in order to effectively train the hierarchy-based-detector in FSIS, we apply the label refinement to further describe the associations between fine-grained classes. The extensive experiments demonstrate the effectiveness of our method on FSIS benchmarks. Code is available online.

For agents

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

get_harvested_code_for_paper("2304.07459")
get_code_for_paper("2304.07459")
have("2304.07459")

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

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

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

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

Connect an agent — have() is free.