SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.08814 · 2020

Graph-Structured Referring Expression Reasoning in The Wild

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 4 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2004.08814.json · badge: /api/ran/2004.08814.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
sibeiyang/sgmn canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_IoU Ran
ran on a synthesized input
sibeiyang/sgmn/lib/datasets/refdataset.py
code served (permissive licence) · get_code("0f6b888b1d5314ed")
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 float, 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - compute_IoU takes two arguments: b1 and b2
# - Both are indexed with [0], [1], [2], [3] (like tuples/lists with 4 elements)
# - Elements are treated as numeric values (used in min, max, arithmetic operations)
# - b1 and b2 represent bounding boxes with format [x_min, y_min, x_max, y_max]

# Create two sample bounding boxes
# Format: [x_min, y_min, x_max, y_max]
b1 = [10, 20, 30, 40]  # box 1: x from 10-30, y from 20-40
b2 = [25, 35, 45, 55]  # box 2: x from 25-45, y from 35-55 (overlapping with b1)

ARGS = {
    'b1': b1,
    'b2': b2
}
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 float, 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
get_split_projection Ran
ran on a synthesized input
sibeiyang/sgmn/lib/datasets/refdataset_sg_online.py
code served (permissive licence) · get_code("328805c34aaae128")
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

torch.manual_seed(0)

# Analyzing the function:
# - get_split_projection takes words_info parameter
# - It iterates over words_info with enumerate
# - Each word is indexed by [1] and [2], so it's a sequence-like object
# - word[1] is compared to the string 'head'
# - word[2] is used as a dictionary key
# - The function builds dictionaries mapping split values to indices

# words_info should be a list of tuples/lists where:
# - Each element has at least 3 items (indices 0, 1, 2)
# - Index 1 contains either 'head' or something else
# - Index 2 contains a split identifier (string or hashable value)

words_info = [
    (0, 'head', 'split_a'),
    (1, 'tail', 'split_a'),
    (2, 'head', 'split_b'),
    (3, 'tail', 'split_b'),
    (4, 'head', 'split_a'),
]

ARGS = {
    'words_info': words_info
}
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
max_overlap Ran
ran on a synthesized input
sibeiyang/sgmn/lib/datasets/refdataset.py
code served (permissive licence) · get_code("8389e17b0d4fe924")
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
import numpy as np

torch.manual_seed(0)

# b1 is a bounding box in format [x1, y1, x2, y2]
b1 = np.array([10, 20, 50, 60], dtype=np.float32)

# boxes is a 2D array where each row is a bounding box [x1, y1, x2, y2]
boxes = np.array([
    [15, 25, 55, 65],
    [100, 100, 200, 200]
], dtype=np.float32)

ARGS = {
    "b1": b1,
    "boxes": boxes
}
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 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
random_hard_negative Ran
ran on a synthesized input
sibeiyang/sgmn/lib/crits/criterion.py
code served (permissive licence) · get_code("0ac073870d1f949d")
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 int64, ndim 0, dtype family int, 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 numpy as np

# Analyze the function:
# - random_hard_negative takes loss_values
# - Uses np.where(loss_values > 0)[0] to find indices where loss > 0
# - Uses np.random.choice on those indices
# - loss_values should be a numpy array of numeric values

# Create a loss_values array with mixed positive and negative values
# This ensures hard_negatives will have at least one element
loss_values = np.array([0.5, -0.2, 1.3, -0.1, 0.8, 0.0])

ARGS = {
    "loss_values": loss_values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int64, ndim 0, dtype family int, 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
get_db Not yet run
unverified (harvested, no recorded run)
sibeiyang/sgmn/lib/datasets/factory.py
code served (permissive licence) · get_code("cb6005952bd7770e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Grounding referring expressions aims to locate in an image an object referred to by a natural language expression. The linguistic structure of a referring expression provides a layout of reasoning over the visual contents, and it is often crucial to align and jointly understand the image and the referring expression. In this paper, we propose a scene graph guided modular network (SGMN), which performs reasoning over a semantic graph and a scene graph with neural modules under the guidance of the linguistic structure of the expression. In particular, we model the image as a structured semantic graph, and parse the expression into a language scene graph. The language scene graph not only decodes the linguistic structure of the expression, but also has a consistent representation with the image semantic graph. In addition to exploring structured solutions to grounding referring expressions, we also propose Ref-Reasoning, a large-scale real-world dataset for structured referring expression reasoning. We automatically generate referring expressions over the scene graphs of images using diverse expression templates and functional programs. This dataset is equipped with real-world visual contents as well as semantically rich expressions with different reasoning layouts. Experimental results show that our SGMN not only significantly outperforms existing state-of-the-art algorithms on the new Ref-Reasoning dataset, but also surpasses state-of-the-art structured methods on commonly used benchmark datasets. It can also provide interpretable visual evidences of reasoning. Data and code are available at https://github.com/sibeiyang/sgmn

For agents

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

get_harvested_code_for_paper("2004.08814")
get_code_for_paper("2004.08814")
have("2004.08814")

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

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

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

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

Connect an agent — have() is free.