SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.03326 · 2019

Knowledge-Embedded Routing Network for Scene Graph Generation

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 (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 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/1903.03326.json · badge: /api/ran/1903.03326.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
yuweihao/KERN canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
HCPLab-SYSU/KERN community (classifier label)
classifier basis: plan_row
1 ran · 2 no recorded run
FunctionStatusWhere it lives
filter_dets Ran
ran; our contract draft was wrong, not the code
HCPLab-SYSU/KERN/lib/surgery.py
code served (permissive licence) · get_code("6c8dc09d0a783306")
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. 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

torch.manual_seed(0)

# num_box = 2
# num_rel = 3
# num_predicates = 5

boxes = torch.tensor([
    [10.0, 20.0, 30.0, 40.0],
    [50.0, 60.0, 70.0, 80.0]
], dtype=torch.float32)

obj_scores = torch.tensor([0.9, 0.8], dtype=torch.float32)

obj_classes = torch.tensor([1, 2], dtype=torch.long)

rel_inds = torch.tensor([
    [0, 1],
    [1, 0],
    [0, 0]
], dtype=torch.long)

pred_scores = torch.rand(3, 5, dtype=torch.float32)

ARGS = {
    'boxes': boxes,
    'obj_scores': obj_scores,
    'obj_classes': obj_classes,
    'rel_inds': rel_inds,
    'pred_scores': pred_scores
}
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 — a tuple 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_ranking Ran
ran; our contract draft was wrong, not the code
yuweihao/KERN/lib/pytorch_misc.py
pointer only (licence: MIT); the stored copy get_code serves, from declare-lab/lg-vqa, is pointer only (licence: NONE) · get_code("a1e587129dd2dfaf")
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 declare-lab/lg-vqa, 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.

optimistic_restore Ran
ran on a synthesized input
yuweihao/KERN/lib/pytorch_misc.py
code served (permissive licence) · get_code("6d0daf87a6ec7e39")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple neural network
class SimpleNetwork(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create network instance
network = SimpleNetwork()

# Create a state dict that will be partially compatible
# Include some matching keys, one unexpected key, and one missing key
state_dict = {
    'linear1.weight': torch.randn(3, 4),  # matches network's linear1.weight size
    'linear1.bias': torch.randn(3),       # matches network's linear1.bias size
    'linear2.weight': torch.randn(2, 3),  # matches network's linear2.weight size
    'linear2.bias': torch.randn(2),       # matches network's linear2.bias size
    'unexpected_key': torch.randn(5, 5),  # unexpected key not in network
}

# The network has: linear1.weight, linear1.bias, linear2.weight, linear2.bias
# The state_dict has all of those plus 'unexpected_key'
# This means linear2.weight and linear2.bias will be missing from the "missing" set
# and 'unexpected_key' will trigger the mismatch

ARGS = {
    'network': network,
    'state_dict': state_dict
}
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 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
pairwise Ran
ran; our contract draft was wrong, not the code
yuweihao/KERN/lib/pytorch_misc.py
code served (permissive licence) · get_code("fef49730c9e9a2b8")
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 zip. 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
from itertools import tee

torch.manual_seed(0)

# The pairwise function takes an iterable and returns consecutive pairs
# It uses: tee() to create independent iterators, next() to advance one, and zip() to pair them
# The iterable parameter just needs to be any iterable object

# Create a simple iterable - a list of distinct values
iterable_input = [1, 2, 3, 4, 5]

ARGS = {
    "iterable": iterable_input
}
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 zip — a zip output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a zip 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
path Ran
ran; our contract draft was wrong, not the code
yuweihao/KERN/config.py
code served (permissive licence) · get_code("5d64438de6614360")
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 str. 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 os
import tempfile

# Create a temporary directory to simulate the module structure
temp_dir = tempfile.mkdtemp()
ROOT_PATH = temp_dir
DATA_PATH = os.path.join(ROOT_PATH, 'data')

# Ensure the data directory exists
os.makedirs(DATA_PATH, exist_ok=True)

# The function takes one parameter: fn (a filename string)
ARGS = {
    'fn': 'test_file.txt'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
stanford_path Ran
ran on a synthesized input
yuweihao/KERN/config.py
code served (permissive licence) · get_code("081b0b43ff7d9810")
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 str. 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 os
import tempfile

# Create a temporary directory structure to simulate the expected paths
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
stanford_dir = os.path.join(data_dir, 'stanford_filtered')
os.makedirs(stanford_dir, exist_ok=True)

# Mock the ROOT_PATH and DATA_PATH by patching the module
ROOT_PATH = temp_dir
DATA_PATH = os.path.join(ROOT_PATH, 'data')

ARGS = {
    'fn': 'example_file.txt'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gather_res Not yet run
unverified (harvested, no recorded run)
HCPLab-SYSU/KERN/lib/object_detector.py
code served (permissive licence) · get_code("013f03d1624b019d")
How it ran

no invocation recorded.

vgg_fc Not yet run
unverified (harvested, no recorded run)
HCPLab-SYSU/KERN/lib/resnet.py
code served (permissive licence) · get_code("16d7f949c9b0c390")
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, 8 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 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
pairwise 9 other papers
1 dated earlier, 8 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2003.12962 (2020-03)
GPS-Net: Graph Property Sensing Network for Scene Graph Generation
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
and 6 more not named here
get_ranking 5 other papers
1 dated earlier, 4 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2003.12962 (2020-03)
GPS-Net: Graph Property Sensing Network for Scene Graph Generation
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
and 2 more not named here
optimistic_restore 4 other papers
1 dated earlier, 3 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2003.12962 (2020-03)
GPS-Net: Graph Property Sensing Network for Scene Graph Generation
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
and 1 more not named here
gather_res 3 other papers
1 dated earlier, 2 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
2403.12033 (2024-03)
HiKER-SGG: Hierarchical Knowledge Enhanced Robust Scene Graph Generation
vgg_fc 3 other papers
1 dated earlier, 2 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
2403.12033 (2024-03)
HiKER-SGG: Hierarchical Knowledge Enhanced Robust Scene Graph Generation
filter_dets 2 other papers
2 later
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
2403.12033 (2024-03)
HiKER-SGG: Hierarchical Knowledge Enhanced Robust Scene Graph Generation
path 2 other papers
1 dated earlier, 1 later
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2006.09623 (2020-06)
Learning Visual Commonsense for Robust Scene Graph Generation
stanford_path 1 other paper
1 dated earlier
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts

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

To understand a scene in depth not only involves locating/recognizing individual objects, but also requires to infer the relationships and interactions among them. However, since the distribution of real-world relationships is seriously unbalanced, existing methods perform quite poorly for the less frequent relationships. In this work, we find that the statistical correlations between object pairs and their relationships can effectively regularize semantic space and make prediction less ambiguous, and thus well address the unbalanced distribution issue. To achieve this, we incorporate these statistical correlations into deep neural networks to facilitate scene graph generation by developing a Knowledge-Embedded Routing Network. More specifically, we show that the statistical correlations between objects appearing in images and their relationships, can be explicitly represented by a structured knowledge graph, and a routing mechanism is learned to propagate messages through the graph to explore their interactions. Extensive experiments on the large-scale Visual Genome dataset demonstrate the superiority of the proposed method over current state-of-the-art competitors.

For agents

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

get_harvested_code_for_paper("1903.03326")
get_code_for_paper("1903.03326")
have("1903.03326")

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

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

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

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

Connect an agent — have() is free.