SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.08056 · ACL · 2020

Dialogue-Based Relation Extraction

Dong Yu, Dian Yu, Claire Cardie, Kai Sun

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 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.08056.json · badge: /api/ran/2004.08056.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
nlpdata/dialogre canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
scofield7419/DiaRE-D2G extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
frankdarkluo/sols reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
GetEntityId Ran
ran, honoured the contract we drafted
scofield7419/DiaRE-D2G/data/gen_data.py
code served (permissive licence) · get_code("5b487fad244ccba0")
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 int, 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 torch

torch.manual_seed(0)

# Analyze the function:
# - entity: a string that is checked against ver[0]['name']
# - vertex: an iterable of items where each item has ver[0] as a dict with 'name' key
# The function loops through vertex, checks if entity is in ver[0]['name'] 
# and if their lengths are equal, then returns the index

# Construct valid arguments:
entity = "apple"

# vertex should be a list of items, where each item has ver[0] as a dict with 'name' key
# Based on the code: ver[0]['name'] must be a string that can contain entity
vertex = [
    [{'name': 'banana'}, 'other_data'],
    [{'name': 'apple'}, 'other_data'],
    [{'name': 'apricot'}, 'other_data'],
]

ARGS = {
    'entity': entity,
    'vertex': vertex,
}
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 int, 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
GetNodePosition Ran
ran; our contract draft was wrong, not the code
scofield7419/DiaRE-D2G/data/gen_data.py
code served (permissive licence) · get_code("d477c30eb97260f1")
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 int, 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 torch
import numpy as np

torch.manual_seed(0)

MAX_NODE_NUM = 200
MAX_NODE_PER_SENT = 40

# Construct data structure: [list of sentences, list of entities with mentions]
# data[0] is a list of sentence strings (or tokens), we use its length
# data[1] is a list of entities, each entity is a list of mentions
# Each mention has 'sent_id' (sentence index) and 'pos' (start, end position in sentence)

sentences = ["token0 token1 token2", "token3 token4", "token5 token6 token7 token8"]
num_sentences = len(sentences)

# Create entity structure with mentions
entity_1_mentions = [
    {'sent_id': '0', 'pos': [0, 2]},   # mention in sentence 0, positions 0-2
    {'sent_id': '1', 'pos': [1, 2]},   # mention in sentence 1, positions 1-2
]
entity_2_mentions = [
    {'sent_id': '2', 'pos': [0, 1]},   # mention in sentence 2, positions 0-1
]

data = [
    sentences,
    [entity_1_mentions, entity_2_mentions]
]

# Ls: start position of each sentence in flattened document
# sentence 0: positions 0-2 (3 tokens)
# sentence 1: positions 3-4 (2 tokens)
# sentence 2: positions 5-8 (4 tokens)
Ls = [0, 3, 5, 9]

# node_position: shape [MAX_NODE_NUM, total_doc_length]
# Tracks which document positions correspond to each node mention
total_doc_length = Ls[-1]
node_position = torch.zeros(MAX_NODE_NUM, total_doc_length, dtype=torch.long)

# node_position_sent: shape [num_sentences, MAX_NODE_PER_SENT, max_sent_length]
# Tracks which positions in each sentence correspond to each node
max_sent_length = max(len(sent.split()) for sent in sentences)
node_position_sent = torch.zeros(num_sentences, MAX_NODE_PER_SENT, max_sent_length, dtype=torch.long)

# node_sent_num: number of nodes in each sentence
node_sent_num = torch.zeros(num_sentences, dtype=torch.long)

# entity_position: shape [num_entities, total_doc_length]
# Tracks which document positions correspond to each entity
num_entities = len(data[1])
entity_position = torch.zeros(num_entities, total_doc_length, dtype=torch.long)

ARGS = {
    'data': data,
    'node_position': node_position,
    'node_position_sent': node_position_sent,
    'node_sent_num': node_sent_num,
    'entity_position': entity_position,
    'Ls': Ls,
}
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 int, 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
GetVertexSet Ran
ran; our contract draft was wrong, not the code
scofield7419/DiaRE-D2G/data/gen_data.py
code served (permissive licence) · get_code("68a5d94d6d86784d")
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 2, 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 copy

# Construct valid arguments for GetVertexSet function
# The function takes:
# - sents: a list of sentences, where each sentence is a list of word tokens
# - entities: a list of tuples, each containing (entity_name, entity_type)

# Create sample sentences (list of lists of word tokens)
sents = [
    ["The", "quick", "brown", "fox", "jumps"],
    ["over", "the", "lazy", "dog", "today"],
    ["John", "Smith", "is", "a", "director"],
    ["The", "manager", "works", "here", "now"]
]

# Create sample entities (list of tuples: (entity_name, entity_type))
entities = [
    ("John Smith", "PERSON"),
    ("director", "ROLE"),
    ("manager", "ROLE"),
    ("quick brown", "ADJECTIVE")
]

ARGS = {
    "sents": sents,
    "entities": entities
}
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 2, dtype family float — 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
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
nlpdata/dialogre/bert/run_classifier.py
pointer only (licence: NOASSERTION) · get_code("60df39eb36936e8d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nlpdata/dialogre (NOASSERTION). 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.

getpredict Ran
ran; our contract draft was wrong, not the code
nlpdata/dialogre/bert/evaluate.py
pointer only (licence: NOASSERTION) · get_code("89590c28ea45a292")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nlpdata/dialogre (NOASSERTION). 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.

getresult Ran
ran, honoured the contract we drafted
nlpdata/dialogre/bert/evaluate.py
pointer only (licence: NOASSERTION) · get_code("47d4d6050a2a0f45")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nlpdata/dialogre (NOASSERTION). 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.

softmax Ran
ran, honoured the contract we drafted
nlpdata/dialogre/bert/evaluate.py
pointer only (licence: NOASSERTION) · get_code("cb5cbea0e8219ff5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nlpdata/dialogre (NOASSERTION). 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.

tok_list Ran
ran; our contract draft was wrong, not the code
frankdarkluo/sols/DialogRE/SOLS/run_cn.py
code served (permissive licence) · get_code("16cddd8313b87121")
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 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.

# Analyze the function tok_list
# It takes one parameter: word
# The function iterates through characters in word
# It checks if each character is Chinese (in range '一' to '鿿')
# If Chinese, it converts to a list and extends tok
# If not Chinese and not space, it appends to tok
# So word should be a string

ARGS = {
    "word": "Hello世界test"
}
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 1, dtype family float — 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
tokenize Ran
ran; our contract draft was wrong, not the code
nlpdata/dialogre/bert/run_classifier.py
pointer only (licence: NOASSERTION) · get_code("1af3bee20f833832")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, nlpdata/dialogre (NOASSERTION). 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.

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, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 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.

FunctionAlso present inEarliest-datedOthers named
softmax 5 other papers
2 dated earlier, 3 later
1301.3781 (2013-01)
Efficient Estimation of Word Representations in Vector Space
1503.02531 (2015-03)
Distilling the Knowledge in a Neural Network
2007.05233 (2020-07)
Continual Adaptation for Deep Stereo
and 2 more not named here
accuracy 1 other paper
1 later
2109.04008 (2021-09)
Graph Based Network with Contextualized Representations of Turns in Dialogue
getpredict 1 other paper
1 later
2109.04008 (2021-09)
Graph Based Network with Contextualized Representations of Turns in Dialogue
getresult 1 other paper
1 later
2109.04008 (2021-09)
Graph Based Network with Contextualized Representations of Turns in Dialogue

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

We present the first human-annotated dialoguebased relation extraction (RE) dataset Dialo-gRE, aiming to support the prediction of relation(s) between two arguments that appear in a dialogue. We further offer DialogRE as a platform for studying cross-sentence RE as most facts span multiple sentences. We argue that speaker-related information plays a critical role in the proposed task, based on an analysis of similarities and differences between dialogue-based and traditional RE tasks. Considering the timeliness of communication in a dialogue, we design a new metric to evaluate the performance of RE methods in a conversational setting and investigate the performance of several representative RE methods on DialogRE. Experimental results demonstrate that a speaker-aware extension on the best-performing model leads to gains in both the standard and conversational evaluation settings. DialogRE is available at https:// dataset.org/dialogre/.

For agents

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

get_harvested_code_for_paper("2004.08056")
get_code_for_paper("2004.08056")
have("2004.08056")

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

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

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

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

Connect an agent — have() is free.