SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.04826 · 2017

Encoding Sentences with Graph Convolutional Networks for Semantic Role Labeling

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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; 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/1703.04826.json · badge: /api/ran/1703.04826.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
diegma/neural-dep-srl canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
constrained_decoder Ran
ran on a synthesized input
diegma/neural-dep-srl/nnet/run/srl/decoder.py
code served (permissive licence) · get_code("1dc26906d3c51f7c")
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.

import heapq
import math
import sys
from collections import namedtuple

# Define the State namedtuple to match the function
State = namedtuple('State', ['score', 'label', 'prev', 'roles'])

# Create a small vocabulary
voc = ['O', 'B-PER', 'I-PER', 'B-LOC']

# Create predictions: a list of probability distributions
# Each prediction is a list of probabilities (one per label in voc)
predictions = [
    [0.7, 0.15, 0.1, 0.05],  # First token: high prob for 'O'
    [0.6, 0.2, 0.1, 0.1],    # Second token: high prob for 'O'
]

# Set beam size
beam = 2

# Create constraint functions
# A constraint is a callable that takes a State and returns True if valid
def constraint_no_invalid_transitions(state):
    """Example constraint: prevent certain invalid label transitions"""
    if state.prev is None:
        return True
    # Allow all transitions for this simple example
    return True

def constraint_role_limit(state):
    """Example constraint: limit the number of roles"""
    return len(state.roles) <= 10

constraints = [constraint_no_invalid_transitions, constraint_role_limit]

# Assemble arguments
ARGS = {
    'voc': voc,
    'predictions': predictions,
    'beam': beam,
    'constraints': constraints,
}
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
evaluate Ran
ran on a synthesized input
diegma/neural-dep-srl/nnet/run/srl/util.py
code served (permissive licence) · get_code("4c479ebba02233aa")
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 sys

# The evaluate function expects:
# - predicted_labels: a list of lists of BIO-tagged label strings
# - true_labels: a list of lists of BIO-tagged label strings

# Create sample BIO-tagged sequences
predicted_labels = [
    ['B-PER', 'I-PER', 'O', 'B-LOC'],
    ['B-ORG', 'O', 'B-PER', 'I-PER'],
]

true_labels = [
    ['B-PER', 'I-PER', 'O', 'B-LOC'],
    ['B-ORG', 'O', 'B-PER', 'O'],
]

ARGS = {
    'predicted_labels': predicted_labels,
    'true_labels': true_labels,
}
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 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_spans Ran
ran on a synthesized input
diegma/neural-dep-srl/nnet/run/srl/util.py
code served (permissive licence) · get_code("e0065abcdfbffc27")
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 torch

torch.manual_seed(0)

# The function get_spans takes a single parameter: labels
# It expects labels to be an iterable of strings where each string is a label
# The function checks if labels start with 'B-', 'I-', or neither
# It extracts the entity type after the prefix (e.g., 'B-PER' -> 'PER')
# It checks if the first character of the entity type is 'V' to filter spans

# Construct valid test labels using BIO tagging scheme
labels = [
    'B-PER',      # Begin person
    'I-PER',      # Inside person
    'B-LOC',      # Begin location
    'I-LOC',      # Inside location
    'O',          # Outside (neutral)
    'B-ORG',      # Begin organization
    'V-TYPE',     # Entity starting with V (should be filtered)
    'I-V-TYPE',   # Inside V-TYPE
    'O',          # Outside
]

ARGS = {
    'labels': labels
}
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 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
process_frame_2009 Ran
ran on a synthesized input
diegma/neural-dep-srl/nnet/run/srl/conll.py
code served (permissive licence) · get_code("8f7be7fe47c15745")
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 defaultdict. 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.

from collections import defaultdict

# Analyze the function:
# - frame_ids: a list/sequence of frame identifiers (strings)
# - arguments: a list of lists (gets transposed with zip(*arguments))
# - frames: a list of lists of labels
# The function zips these three together and processes them

# After zip(*arguments), we get tuples where each tuple represents one frame's arguments
# So if arguments has N inner lists, after zip(*arguments) we get N tuples
# len(arguments) after the zip should equal len(frame_ids)

# Looking at the loop:
# - frame_id comes from frame_ids (string)
# - arg comes from arguments (list of labels)
# - targ comes from frames (list of labels)
# - roles are processed from arg (replace '_' with 'O')
# - frm are processed from targ (replace '_' with 'O')
# - finds last non-'O' index in frm
# - creates a dict with 'roles', 'frames', and 'target' keys

# Let's construct valid inputs:
# Say we have 3 frames, so frame_ids should have 3 elements
# arguments should be structured so that after zip(*arguments), we get 3 tuples
# This means arguments should be a list of 3 lists (each inner list has 3 elements)
# frames should be a list of 3 lists

frame_ids = ['frame_1', 'frame_2', 'frame_3']

# arguments structure: list of lists that will be transposed
# After zip(*arguments), we want 3 tuples (one per frame)
# So arguments needs to be a list of N lists, each with 3 elements
arguments = [
    ['ARG0', 'ARG1', 'ARG2'],  # first element of each frame's arguments
    ['ARG3', '_', 'ARG4'],      # second element of each frame's arguments
    ['_', 'ARG5', '_']          # third element of each frame's arguments
]

# frames: list of 3 lists with frame labels
frames = [
    ['_', 'FRAME_A', '_'],
    ['FRAME_B', '_', '_'],
    ['_', '_', 'FRAME_C']
]

ARGS = {
    'frame_ids': frame_ids,
    'arguments': arguments,
    'frames': frames
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
create_optimizer Not yet run
unverified (harvested, no recorded run)
diegma/neural-dep-srl/nnet/optimization.py
code served (permissive licence) · get_code("03ec976fc275f65e")
How it ran

no invocation recorded.

from_2009 Not yet run
unverified (harvested, no recorded run)
diegma/neural-dep-srl/nnet/run/srl/conll.py
code served (permissive licence) · get_code("d4f5b750462926e0")
How it ran

no invocation recorded.

make_bio_sample Not yet run
unverified (harvested, no recorded run)
diegma/neural-dep-srl/nnet/run/srl/training_sample.py
code served (permissive licence) · get_code("48705fe3d2dffd5e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 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.

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

Semantic role labeling (SRL) is the task of identifying the predicate-argument structure of a sentence. It is typically regarded as an important step in the standard NLP pipeline. As the semantic representations are closely related to syntactic ones, we exploit syntactic information in our model. We propose a version of graph convolutional networks (GCNs), a recent class of neural networks operating on graphs, suited to model syntactic dependency graphs. GCNs over syntactic dependency trees are used as sentence encoders, producing latent feature representations of words in a sentence. We observe that GCN layers are complementary to LSTM ones: when we stack both GCN and LSTM layers, we obtain a substantial improvement over an already state-of-the-art LSTM SRL model, resulting in the best reported scores on the standard benchmark (CoNLL-2009) both for Chinese and English.

For agents

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

get_harvested_code_for_paper("1703.04826")
get_code_for_paper("1703.04826")
have("1703.04826")

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

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

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

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

Connect an agent — have() is free.