SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.09044 · CVPR · 2021

Distilling Knowledge via Knowledge Review

Hengshuang Zhao, Jiaya Jia, Shu Liu, Pengguang Chen

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure 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/2104.09044.json · badge: /api/ran/2104.09044.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
ruipingl/skr_pea community
Papers with Code archive
2 ran · 0 no recorded run
yoshitomo-matsubara/torchdistill community
Papers with Code archive
2 ran · 0 no recorded run
DevPranjal/reproduction-review-kd community
Papers with Code archive
1 ran · 0 no recorded run
ZJCV/KnowledgeReview community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
Jia-Research-Lab/ReviewKD marked official in Papers with Code
Papers with Code archive
0 ran · 2 no recorded run
FunctionStatusWhere it lives
ABF Ran
ran on a synthesized input
ruipingl/skr_pea/train/ReviewKD.py
pointer only (licence: NONE) · get_code("6613345022d326fc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ruipingl/skr_pea 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.

HierarchicalContextLoss Ran
ran on a synthesized input · constructed an object; no result was computed
yoshitomo-matsubara/torchdistill/torchdistill/losses/mid_level.py
code served (permissive licence) · get_code("407f14bd274a60dd")
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, HierarchicalContextLoss: 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 a minimal stand-in for the io_dict structures
# The forward method expects student_io_dict and teacher_io_dict with nested structure:
# student_io_dict[module_path][io_type] = (tensor, something)
# teacher_io_dict[module_path][io_type] = tensor

student_io_dict = {
    'abf_modules.4': {
        'output': (torch.randn(2, 4, 8, 8), None)  # batch=2, channels=4, h=8, w=8
    }
}

teacher_io_dict = {
    'layer1.-1.relu': {
        'input': torch.randn(2, 4, 8, 8)  # same shape as student output
    }
}

ARGS = {
    'student_module_path': 'abf_modules.4',
    'student_module_io': 'output',
    'teacher_module_path': 'layer1.-1.relu',
    'teacher_module_io': 'input',
    'reduction': 'mean',
    'output_sizes': [4, 2, 1]
}
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 HierarchicalContextLoss — 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 HierarchicalContextLoss 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
RLF_for_Resnet Ran
ran on a synthesized input · constructed an object; no result was computed
DevPranjal/reproduction-review-kd/framework.py
pointer only (licence: NONE) · get_code("3bb723e9c090a1d0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, DevPranjal/reproduction-review-kd 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.

ReviewKD Ran
ran on a synthesized input
ruipingl/skr_pea/train/ReviewKD.py
pointer only (licence: NONE) · get_code("65da0d1fda7c81fe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ruipingl/skr_pea 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.

hcl Ran
ran on a synthesized input
ZJCV/KnowledgeReview/rfd/criterion/rfd_loss.py
code served (permissive licence) · get_code("7919e3e477475e60")
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 tensors with distinct dimensions
# Shape: (batch=2, channels=4, height=8, width=8)
t_feat = torch.randn(2, 4, 8, 8)
s_feat = torch.randn(2, 4, 8, 8)

ARGS = {
    't_feat': t_feat,
    's_feat': s_feat,
}
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
register_mid_level_loss Ran
ran; our contract draft was wrong, not the code
yoshitomo-matsubara/torchdistill/torchdistill/losses/mid_level.py
code served (permissive licence) · get_code("3daf804e7ed5c814")
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 type. 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
from typing import Callable

torch.manual_seed(0)

# Define MIDDLE_LEVEL_LOSS_DICT as a module-level dict
MIDDLE_LEVEL_LOSS_DICT = dict()

def register_mid_level_loss(arg=None, **kwargs):
    """
    Registers a middle-level loss class or function to instantiate it.
    """
    def _register_mid_level_loss(cls_or_func):
        key = kwargs.get('key')
        if key is None:
            key = cls_or_func.__name__
        MIDDLE_LEVEL_LOSS_DICT[key] = cls_or_func
        return cls_or_func
    if callable(arg):
        return _register_mid_level_loss(arg)
    return _register_mid_level_loss


# Create test classes and functions to register

class CustomMidLevelLoss(nn.Module):
    """A simple custom middle-level loss class"""
    def __init__(self, **kwargs):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)


def custom_loss_function(x, y):
    """A simple custom loss function"""
    return torch.mean((x - y) ** 2)


# Setup ARGS - test both cases: with arg as callable and without arg

ARGS = {
    'arg': CustomMidLevelLoss,
    'kwargs': {'key': 'my_custom_loss'}
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
ABF Not yet run
unverified (harvested, no recorded run)
Jia-Research-Lab/ReviewKD/CIFAR-100/model/reviewkd.py
pointer only (licence: NONE) · get_code("8db7e32366ae454d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jia-Research-Lab/ReviewKD 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. No invocation recorded.

ReviewKD Not yet run
unverified (harvested, no recorded run)
Jia-Research-Lab/ReviewKD/CIFAR-100/model/reviewkd.py
pointer only (licence: NONE) · get_code("cc67bd1bd51e7d3b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jia-Research-Lab/ReviewKD 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. 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, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
register_mid_level_loss
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2205.10536 (2022-05)
Knowledge Distillation from A Stronger Teacher

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

Knowledge distillation transfers knowledge from the teacher network to the student one, with the goal of greatly improving the performance of the student network. Previous methods mostly focus on proposing feature transformation and loss functions between the same level's features to improve the effectiveness. We differently study the factor of connection path cross levels between teacher and student networks, and reveal its great importance. For the first time in knowledge distillation, cross-stage connection paths are proposed. Our new review mechanism is effective and structurally simple. Our finally designed nested and compact framework requires negligible computation overhead, and outperforms other methods on a variety of tasks. We apply our method to classification, object detection, and instance segmentation tasks. All of them witness significant student network performance improvement.

For agents

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

get_harvested_code_for_paper("2104.09044")
get_code_for_paper("2104.09044")
have("2104.09044")

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

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

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

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

Connect an agent — have() is free.