SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.12658 · EMNLP · 2022

Extending Phrase Grounding with Pronouns in Visual Dialogues

Min Zhang, Xin Zhang, Meishan Zhang, Panzhong Lu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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 5 have no contract verdict; 1 failure 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/2210.12658.json · badge: /api/ran/2210.12658.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
izhx/Phrase-Grounding-with-Pronoun canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
box_area Ran
ran on a synthesized input
izhx/Phrase-Grounding-with-Pronoun/code/src/metrics.py
code served (permissive licence) · get_code("58b3179dfda21236")
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 ndarray, ndim 1, dtype family float, 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 numpy as np

# Create a simple numpy array of bounding boxes in (x1, y1, x2, y2) format
# Using 2 boxes as a small batch size
boxes = np.array([
    [10.0, 20.0, 30.0, 50.0],  # box 1: width=20, height=30, area=600
    [5.0, 15.0, 25.0, 45.0]    # box 2: width=20, height=30, area=600
], dtype=np.float32)

ARGS = {
    "boxes": boxes
}
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 ndarray, ndim 1, dtype family float, 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
box_iou Ran
ran on a synthesized input
izhx/Phrase-Grounding-with-Pronoun/code/src/metrics.py
code served (permissive licence) · get_code("ac3d20339465e1a7")
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 ndarray, ndim 2, dtype family float, shape (2, 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 numpy as np

# Create two sets of bounding boxes in (x1, y1, x2, y2) format
# boxes1: N=2 boxes
boxes1 = np.array([
    [0.0, 0.0, 10.0, 10.0],
    [5.0, 5.0, 15.0, 15.0]
], dtype=np.float32)

# boxes2: M=3 boxes
boxes2 = np.array([
    [0.0, 0.0, 5.0, 5.0],
    [7.0, 7.0, 12.0, 12.0],
    [20.0, 20.0, 25.0, 25.0]
], dtype=np.float32)

ARGS = {
    "boxes1": boxes1,
    "boxes2": boxes2,
}
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 ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 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
build_position_encoding Ran
ran; our contract draft was wrong, not the code
izhx/Phrase-Grounding-with-Pronoun/code/src/mdetr/position_encoding.py
code served (permissive licence) · get_code("1b6e04ba3ceda006")
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 PositionEmbeddingSine. 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
import math

torch.manual_seed(0)

class TensorListMock:
    """Mock object to hold tensors and mask for position embedding"""
    def __init__(self, tensors, mask):
        self.tensors = tensors
        self.mask = mask

class ArgsConfig:
    """Stand-in config class for build_position_encoding"""
    def __init__(self, hidden_dim, position_embedding):
        self.hidden_dim = hidden_dim
        self.position_embedding = position_embedding

# Create tiny test tensors
batch_size = 2
height = 4
width = 3
hidden_dim = 128

# Create a tensor with shape (batch, height, width, channels)
tensors = torch.randn(batch_size, height, width, 64)

# Create a mask with shape (batch, height, width) - False means valid, True means masked
mask = torch.zeros(batch_size, height, width, dtype=torch.bool)

# Create tensor_list mock
tensor_list = TensorListMock(tensors=tensors, mask=mask)

# Create args config for sine position embedding
args = ArgsConfig(hidden_dim=hidden_dim, position_embedding='sine')

ARGS = {
    'args': args
}
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 PositionEmbeddingSine — a PositionEmbeddingSine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PositionEmbeddingSine 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
safe_recall Ran
ran on a synthesized input
izhx/Phrase-Grounding-with-Pronoun/code/src/metrics.py
code served (permissive licence) · get_code("d160fa9a2fd27d2e")
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:
# - pred: float - a prediction value
# - gold: int - a gold/ground truth count
# - Returns: float - the recall calculation (pred / gold if gold != 0, else 0.0)

ARGS = {
    "pred": 5.0,
    "gold": 10
}
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
span_clusters Ran
ran on a synthesized input
izhx/Phrase-Grounding-with-Pronoun/code/src/coref_reader.py
code served (permissive licence) · get_code("3aecd2a717339545")
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 3, dtype family int; 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.

# Analyzing the function to understand what it needs:
# - clusters: list of lists/sequences of indices
# - text_ref: indexable by integer, returns dict with keys 'sentence_id', 'start', 'end'
# - sentences: list of strings (len() is called on each)

# Building the arguments:

# text_ref needs to be indexable and return dicts with 'sentence_id', 'start', 'end'
text_ref = [
    {'sentence_id': 0, 'start': 0, 'end': 5},    # "Hello"
    {'sentence_id': 0, 'start': 6, 'end': 11},   # "world"
    {'sentence_id': 1, 'start': 0, 'end': 3},    # "The"
    {'sentence_id': 1, 'start': 4, 'end': 7},    # "dog"
]

# sentences is a list of strings (we call len() on each)
sentences = [
    "Hello world",  # sentence_id 0, length 11
    "The dog",      # sentence_id 1, length 7
]

# clusters is a list of clusters, where each cluster is a list of indices into text_ref
clusters = [
    [0, 1],      # cluster 1: references text_ref[0] and text_ref[1]
    [2, 3],      # cluster 2: references text_ref[2] and text_ref[3]
]

ARGS = {
    'clusters': clusters,
    'text_ref': text_ref,
    'sentences': sentences,
}
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 3, dtype family int — 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
valid_crop_box Ran
ran on a synthesized input
izhx/Phrase-Grounding-with-Pronoun/code/src/readers.py
code served (permissive licence) · get_code("1b75c920b73202c3")
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 int; 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)

# The function takes:
# - box: a dict-like object with keys 'x', 'y', 'w', 'h' (accessed via box[k])
# - size: a sequence with at least 2 elements (size[0] and size[1])

# Create a box as a dict with the required keys
box = {
    'x': 10,
    'y': 20,
    'w': 30,
    'h': 40
}

# Create a size tuple representing image/canvas dimensions
size = (100, 150)

ARGS = {
    'box': box,
    'size': size
}
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 int — 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
build_backbone Not yet run
unverified (harvested, no recorded run)
izhx/Phrase-Grounding-with-Pronoun/code/src/mdetr/backbone.py
code served (permissive licence) · get_code("ca02dee1629c9dbd")
How it ran

no invocation recorded.

build_matcher Not yet run
unverified (harvested, no recorded run)
izhx/Phrase-Grounding-with-Pronoun/code/src/mdetr/matcher.py
code served (permissive licence) · get_code("3189378f2936393a")
How it ran

no invocation recorded.

evaulate Not yet run
unverified (harvested, no recorded run)
izhx/Phrase-Grounding-with-Pronoun/code/hf_neuralcoref.py
code served (permissive licence) · get_code("84d8f1cad596b621")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 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
build_position_encoding 8 other papers
4 dated earlier, 4 later
2104.12763 (2021-04)
MDETR -Modulated Detection for End-to-End Multi-Modal Understanding
2108.11084 (2021-08)
Transformer for Single Image Super-Resolution
2111.12085 (2021-11)
UniTAB: Unifying Text and Box Outputs for Grounded Vision-Language Modeling
and 5 more not named here
build_matcher 3 other papers
3 later
2409.17531 (2024-09)
SimVG: A Simple Framework for Visual Grounding with Decoupled Multi-modal Fusion
2501.06710 (2025-01)
Multi-task Visual Grounding with Coarse-to-Fine Consistency Constraints
2509.04833 (2025-09)
PropVG: End-to-End Proposal-Driven Visual Grounding with Multi-Granularity Discrimination

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

Conventional phrase grounding aims to localize noun phrases mentioned in a given caption to their corresponding image regions, which has achieved great success recently. Apparently, sole noun phrase grounding is not enough for cross-modal visual language understanding. Here we extend the task by considering pronouns as well. First, we construct a dataset of phrase grounding with both noun phrases and pronouns to image regions. Based on the dataset, we test the performance of phrase grounding by using a state-of-the-art literature model of this line. Then, we enhance the baseline grounding model with coreference information which should help our task potentially, modeling the coreference structures with graph convolutional networks. Experiments on our dataset, interestingly, show that pronouns are easier to ground than noun phrases, where the possible reason might be that these pronouns are much less ambiguous. Additionally, our final model with coreference information can significantly boost the grounding performance of both noun phrases and pronouns.

For agents

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

get_harvested_code_for_paper("2210.12658")
get_code_for_paper("2210.12658")
have("2210.12658")

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

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

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

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

Connect an agent — have() is free.