SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.02665 · ECCV · 2024

SMILe: Leveraging Submodular Mutual Information For Robust Few-Shot Object Detection

Rishabh Iyer, Anay Majee, Ryan Sharp

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 4 failures of our instrument; 3 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/2407.02665.json · badge: /api/ran/2407.02665.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
amajee11us/smile-fsod canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
amajee11us/SMILe-FSOD community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
FLMI Ran
ran on a synthesized input · constructed an object; no result was computed
amajee11us/SMILe-FSOD/fsdet/modeling/contrastive_loss.py
code served (permissive licence) · get_code("13c31e3b2a95933d")
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 an instance of its own class, FLMI: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create small tensors for the forward pass
# features: [M, K] where M=8 samples, K=4 feature dimensions
features = torch.randn(8, 4)

# labels: [M] with values in range [0, 24] (20 base + 5 novel classes)
# We want some labels >= 15 (num_classes - num_novel = 20 - 5 = 15) to test keep_novel
labels = torch.tensor([10, 12, 15, 16, 18, 19, 11, 17])

# ious: [M] with values in [0, 1] representing IoU scores
ious = torch.rand(8)

ARGS = {
    'temperature': 0.2,
    'iou_threshold': 0.5,
    'reweight_func': 'none',
    'lamda': 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 FLMI — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FLMI 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
batched_nms Ran
ran; our contract draft was wrong, not the code
amajee11us/smile-fsod/fsdet/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
amajee11us/smile-fsod/fsdet/checkpoint/c2_model_loading.py
code served (permissive licence) · get_code("e8526a516b4f9206")
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 copy
import re

# Analyze the function: it takes a list of strings (original_keys) and applies
# various string transformations to them. It doesn't use any complex objects,
# just list operations and string manipulations.

ARGS = {
    'original_keys': [
        'pred_b',
        'pred_w',
        'conv_b',
        'conv_w',
        'bn_s',
        'bn_bias',
        'bn_rm',
        'bn_riv',
        'bn_gamma',
        'bn_beta',
        'gn_s',
        'gn_bias',
        'res_conv1_norm_weight',
        'conv1_weight',
        'layer_branch1_weight',
        'layer_branch2a_bias',
        'layer_branch2b_weight',
        'layer_branch2c_bias',
        'body_conv_fcn_weight',
        'AnnIndex_lowres',
        'Index_UV_lowres',
        'U_lowres',
        'V_lowres',
    ]
}
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
convert_c2_detectron_names Ran
ran; our contract draft was wrong, not the code
amajee11us/smile-fsod/fsdet/checkpoint/c2_model_loading.py
code served (permissive licence) · get_code("52810b504f0d1066")
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, 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 torch
import logging
import copy

torch.manual_seed(0)

# Set up logging to avoid issues
logging.basicConfig(level=logging.INFO)

# Create a minimal weights dict with C2-style naming conventions
# The function processes weight names, so we just need dummy tensors
weights = {
    'res_conv1_bn_s': torch.randn(4),
    'res_conv1_bn_bias': torch.randn(4),
    'pred_w': torch.randn(3, 4),
    'pred_b': torch.randn(3),
    'conv_rpn_fpn2_weight': torch.randn(4, 4),
    'rpn_bbox_pred_weight': torch.randn(4, 4),
    'rpn_cls_logits_weight': torch.randn(4, 4),
    'fc6_weight': torch.randn(4, 4),
    'fc7_bias': torch.randn(4),
    'fpn_inner_res2_2_sum_lateral_weight': torch.randn(4, 4),
    'fpn_res2_2_sum_weight': torch.randn(4, 4),
    'fpn_inner_res3_3_sum_lateral_bias': torch.randn(4),
    'fpn_res3_3_sum_bias': torch.randn(4),
    'bbox_pred_weight': torch.randn(4, 4),
    'cls_score_bias': torch.randn(4),
    'head_conv_weight': torch.randn(4, 4),
}

ARGS = {
    'weights': weights,
}
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 tuple, ndim 1, dtype family float — a tuple 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
soft_max Ran
ran; our contract draft was wrong, not the code
amajee11us/SMILe-FSOD/fsdet/modeling/contrastive_loss.py
code served (permissive licence) · get_code("98281814c679548a")
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

torch.manual_seed(0)

# Create a small similarity matrix (2x3)
similarity_matrix = torch.randn(2, 3)

# Axis parameter
axis = 0

ARGS = {
    "similarity_matrix": similarity_matrix,
    "axis": axis
}
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
batched_nms_rotated Not yet run
unverified (harvested, no recorded run)
amajee11us/smile-fsod/fsdet/layers/nms.py
code served (permissive licence) · get_code("4f2e083714266b7f")
How it ran

no invocation recorded.

get_save_path_seeds Not yet run
unverified (harvested, no recorded run)
amajee11us/smile-fsod/datasets/prepare_coco_few_shot.py
code served (permissive licence) · get_code("55cc9fdee3a4cd0a")
How it ran

no invocation recorded.

nms_rotated Not yet run
unverified (harvested, no recorded run)
amajee11us/smile-fsod/fsdet/layers/nms.py
code served (permissive licence) · get_code("1c319eab8e23735d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
43 dated earlier, 2 later
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
29 dated earlier
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
batched_nms 12 other papers
12 dated earlier
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
12 dated earlier
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
get_save_path_seeds 1 other paper
1 dated earlier
2207.11184 (2022-07)
Multi-Faceted Distillation of Base-Novel Commonality for Few-shot Object Detection
nms_rotated 1 other paper
1 dated earlier
2003.06957 (2020-03)
Frustratingly Simple Few-Shot Object Detection

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

Confusion and forgetting of object classes have been challenges of prime interest in Few-Shot Object Detection (FSOD). To overcome these pitfalls in metric learning based FSOD techniques, we introduce a novel Submodular Mutual Information Learning (SMILe 3 ) framework for loss functions which adopts combinatorial mutual information functions as learning objectives to enforce learning of well-separated feature clusters between the base and novel classes. Additionally, the joint objective in SMILe minimizes the total submodular information contained in a class leading to discriminative feature clusters. The combined effect of this joint objective demonstrates significant improvements in class confusion and forgetting in FSOD. Further we show that SMILe generalizes to several existing approaches in FSOD, improving their performance, agnostic of the backbone architecture. Experiments on popular FSOD benchmarks, PASCAL-VOC and MS-COCO show that our approach generalizes to State-of-the-Art (SoTA) approaches improving their novel class performance by up to 5.7% (3.3 mAP points) and 5.4% (2.6 mAP points) on the 10-shot setting of VOC (split 3) and 30-shot setting of COCO datasets respectively. Our experiments also demonstrate better retention of base class performance and up to 2× faster convergence over existing approaches agnostic of the underlying architecture. Recent advances in Deep Neural networks (DNNs) have enabled models to learn discriminative feature representations from large-scale image benchmarks. Unfortunately, these architectures fail to adapt to few-shot settings tasked to recognize novel objects over existing ones with few examples, closely resembling human-like perception. Although recent research has shown significant promise in few-shot image recognition [10,12,33,35,36], Few-Shot Object Detection (FSOD) remains a challenge with recent works [27,28,37,38] highlighting two ⋆ Work done as a Graduate student at The University of Texas at Dallas.

For agents

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

get_harvested_code_for_paper("2407.02665")
get_code_for_paper("2407.02665")
have("2407.02665")

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

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

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

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

Connect an agent — have() is free.