SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_25216 · AAAI · 2023

Disentangle and Remerge: Interventional Knowledge Distillation for Few-Shot Object Detection from a Conditional Causal Perspective

Fuchun Sun, Jiangmeng Li, Wenwen Qiang, Changwen Zheng, Yanan Zhang, Chengbo Jiao, Xiaohui Hu, Lingyu Si

Code that ran

7 of 8 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, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/aaai_25216.json · badge: /api/ran/aaai_25216.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
ZYN-1101/DandR canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
cat_mask Ran
ran, honoured the contract we drafted
ZYN-1101/DandR/defrcn/utils/kdloss.py
pointer only (licence: MIT); the stored copy get_code serves, from megvii-research/mdistiller, is pointer only (licence: NONE) · get_code("a05175b39afcdcfe")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from megvii-research/mdistiller, and GitHub detected no licence in that repository when it was checked. 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.

conv1x1 Ran
ran; our contract draft was wrong, not the code
ZYN-1101/DandR/defrcn/evaluation/archs/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
ZYN-1101/DandR/defrcn/evaluation/archs/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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 Conv2d. 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)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
dandr_loss Ran
ran on a synthesized input
ZYN-1101/DandR/defrcn/utils/kdloss.py
code served (permissive licence) · get_code("595c0f05649c5937")
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 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small test tensors
batch_size = 2
num_classes = 4  # Including background class at index 3

# logits_student: shape (batch_size, num_classes)
logits_student = torch.randn(batch_size, num_classes)

# logits_teacher: shape (batch_size, num_classes)
logits_teacher = torch.randn(batch_size, num_classes)

# target: shape (batch_size,) with values in [0, num_classes-1]
# Mix of foreground and background targets
target = torch.tensor([0, 3])  # 0 is foreground, 3 is background (last class)

# Hyperparameters
alpha = 0.5
beta = 0.5
temperature = 4.0
detach_target = True

ARGS = {
    'logits_student': logits_student,
    'logits_teacher': logits_teacher,
    'target': target,
    'alpha': alpha,
    'beta': beta,
    'temperature': temperature,
    'detach_target': detach_target,
}
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 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
filter_images_with_few_keypoints Ran
ran; our contract draft was wrong, not the code
ZYN-1101/DandR/defrcn/dataloader/build.py
pointer only (licence: MIT); the stored copy get_code serves, from jin-s13/UniFS, is pointer only (licence: NONE) · get_code("9517da58a95bac43")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from jin-s13/UniFS, and GitHub detected no licence in that repository when it was checked. 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.

filter_images_with_only_crowd_annotations Ran
ran; our contract draft was wrong, not the code
ZYN-1101/DandR/defrcn/dataloader/build.py
pointer only (licence: MIT); the stored copy get_code serves, from jin-s13/UniFS, is pointer only (licence: NONE) · get_code("4c8a4908e88089ef")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from jin-s13/UniFS, and GitHub detected no licence in that repository when it was checked. 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.

resnet18 Ran
ran; our contract draft was wrong, not the code
ZYN-1101/DandR/defrcn/evaluation/archs/resnet.py
code served (permissive licence) · get_code("f6eff25d41b506dd")
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 ResNet. 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)

# Define a minimal ResNet18 model by understanding the function signature
# resnet18 function typically takes: pretrained, progress, **kwargs
# where kwargs can include num_classes, etc.

def resnet18(pretrained=False, progress=True, **kwargs):
    """
    Constructs a ResNet-18 architecture.
    Args:
        pretrained (bool): If True, returns a model pre-trained on ImageNet
        progress (bool): If True, displays a progress bar for downloading the model
        **kwargs: Additional keyword arguments for ResNet initialization
    """
    # This is a minimal stub that shows what resnet18 signature looks like
    # In reality, it would construct and return a ResNet with BasicBlock, [2,2,2,2]
    pass

# Based on the code provided, we need to understand what resnet18() actually does.
# It likely calls ResNet(BasicBlock, [2, 2, 2, 2], **kwargs)

# The ARGS dict should contain all parameters that resnet18 accepts
ARGS = {
    'pretrained': False,
    'progress': True,
    'num_classes': 1000,
    'zero_init_residual': False,
    'groups': 1,
    'width_per_group': 64,
    'replace_stride_with_dilation': 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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
concat_all_gather Not yet run
unverified (harvested, no recorded run)
ZYN-1101/DandR/defrcn/evaluation/calibration_layer.py
code served (permissive licence) · get_code("73cecca9f3575f09")
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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 1 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
conv1x1 431 other papers
236 dated earlier, 118 later, 76 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
152 dated earlier, 98 later, 61 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
concat_all_gather 138 other papers
67 dated earlier, 37 later, 34 same year, order not determinable · 33 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 135 more not named here
resnet18 95 other papers
47 dated earlier, 36 later, 11 same year, order not determinable, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
filter_images_with_few_keypoints 3 other papers
1 dated earlier, 2 later
2207.11184 (2022-07)
Multi-Faceted Distillation of Base-Novel Commonality for Few-shot Object Detection
2404.19401 (2024-04)
UniFS: Universal Few-shot Instance Perception with Point Representations
2505.14239 (2025-05)
Decoupling Classifier for Boosting Few-shot Object Detection and Instance Segmentation
filter_images_with_only_crowd_annotations 3 other papers
1 dated earlier, 2 later
2207.11184 (2022-07)
Multi-Faceted Distillation of Base-Novel Commonality for Few-shot Object Detection
2404.19401 (2024-04)
UniFS: Universal Few-shot Instance Perception with Point Representations
2505.14239 (2025-05)
Decoupling Classifier for Boosting Few-shot Object Detection and Instance Segmentation
cat_mask 2 other papers
1 dated earlier, 1 later
2203.08679 (2022-03)
Decoupled Knowledge Distillation
Ma_Aligning_Logits_Generatively_for_Principled_Black-Box_Knowledge_Distillation_CVPR_2024_paper (2024 (year only))
Aligning Logits Generatively for Principled Black-Box Knowledge Distillation

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 models learn representations with limited human annotations, and such a learning paradigm demonstrates practicability in various tasks, e.g., image classification, object detection, etc. However, few-shot object detection methods suffer from an intrinsic defect that the limited training data makes the model cannot sufficiently explore semantic information. To tackle this, we introduce knowledge distillation to the few-shot object detection learning paradigm. We further run a motivating experiment, which demonstrates that in the process of knowledge distillation, the empirical error of the teacher model degenerates the prediction performance of the few-shot object detection model as the student. To understand the reasons behind this phenomenon, we revisit the learning paradigm of knowledge distillation on the few-shot object detection task from the causal theoretic standpoint, and accordingly, develop a Structural Causal Model. Following the theoretical guidance, we propose a backdoor adjustmentbased knowledge distillation method for the few-shot object detection task, namely Disentangle and Remerge (D&R), to perform conditional causal intervention toward the corresponding Structural Causal Model. Empirically, the experiments on benchmarks demonstrate that D&R can yield significant performance boosts in few-shot object detection. Code is available at https://github.com/ZYN-1101/DandR.git.

For agents

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

get_harvested_code_for_paper("aaai_25216")
get_code_for_paper("aaai_25216")
have("aaai_25216")

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

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

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

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

Connect an agent — have() is free.