SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.05572 · ACL · 2020

AMR Parsing via Graph Sequence Iterative Inference *

Deng Cai, Wai Lam

arXiv · PDF · Open in the Atlas

Code that ran

21 of 31 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (11 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 14 have no contract verdict; 5 failures of our instrument; 10 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/2004.05572.json · badge: /api/ran/2004.05572.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
jcyk/AMR-gs canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
bjascob/amrlib community
Papers with Code archive
16 ran · 8 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AMREmbedding Ran
ran; our contract draft was wrong, not the code
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("9c17ed9b8e45ed75")
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 Embedding. 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 numpy as np
import tempfile

torch.manual_seed(0)

# Create a minimal Vocab class that the function expects
class Vocab:
    def __init__(self, size, padding_idx, tokens=None):
        self.size = size
        self.padding_idx = padding_idx
        if tokens is None:
            self.tokens = [f"token_{i}" for i in range(size)]
        else:
            self.tokens = tokens
    
    def idx2token(self, idx):
        return self.tokens[idx]

# Create a vocab with 10 tokens, padding_idx=0
vocab = Vocab(
    size=10,
    padding_idx=0,
    tokens=["<pad>", "word1", "word2", "word3", "word4", "word5", "concept-00", "concept-01", "rare", "unk"]
)

# Create a minimal pretrained embeddings file
pretrained_content = """word1 0.1 0.2 0.3 0.4
word2 0.5 0.6 0.7 0.8
word3 0.9 1.0 1.1 1.2
concept-00 0.2 0.3 0.4 0.5
concept 0.3 0.4 0.5 0.6
"""

with tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False, encoding='utf8') as f:
    f.write(pretrained_content)
    pretrained_file = f.name

with tempfile.NamedTemporaryFile(mode='w', suffix='.txt', delete=False, encoding='utf8') as f:
    dump_file = f.name

ARGS = {
    'vocab': vocab,
    'embedding_dim': 4,
    'pretrained_file': pretrained_file,
    'amr': True,
    'dump_file': dump_file
}
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 Embedding — a Embedding output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Embedding 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
Beam Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("9422195a9817c9f0")
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 an instance of its own class, Beam: the run constructed the object and did not call it, so no result was computed. 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 re

torch.manual_seed(0)

# Define constants used in the code
END = '<END>'
UNK = '<UNK>'

# Define global variables used in the code
attr_value_set = set(['-', '+', 'interrogative', 'imperative', 'expressive'])
number_regexp = re.compile('^-?(\\d)+(\\.\\d+)?$')

# Create initial hypotheses for the beam
initial_state = {
    'hidden': torch.randn(2, 4),
    'cell': torch.randn(2, 4)
}
initial_seq = ['<START>']
initial_score = 0.0
initial_hyp = type('Hypothesis', (), {
    'state_dict': initial_state,
    'seq': initial_seq,
    'score': initial_score,
    'is_completed': lambda self: self.seq[-1] == END,
    '__len__': lambda self: len(self.seq)
})()

hypotheses = [initial_hyp]

# Arguments for Beam.__init__
ARGS = {
    'beam_size': 3,
    'min_time_step': 2,
    'max_time_step': 5,
    'hypotheses': hypotheses
}
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 Beam — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Beam 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
CNNEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("2aca3b9ec1e90acc")
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 an instance of its own class, CNNEncoder: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

# Parameters for CNNEncoder
input_dim = 4
output_dim = 3
batch_size = 2
seq_length = 5

# filters: list of (kernel_width, output_channels) tuples
filters = [(3, 2), (4, 2)]

# highway_layers: number of highway network layers
highway_layers = 1

ARGS = {
    "filters": filters,
    "input_dim": input_dim,
    "output_dim": output_dim,
    "highway_layers": highway_layers,
}
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 CNNEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CNNEncoder 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
ConceptEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("9685d1d7338d51b0")
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 an instance of its own class, ConceptEncoder: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)

class MockVocab:
    def __init__(self, size, padding_idx=0):
        self.size = size
        self.padding_idx = padding_idx
        self.token_list = [f"token_{i}" for i in range(size)]
    
    def idx2token(self, idx):
        return self.token_list[idx]

vocabs = {
    'concept_char': MockVocab(size=50, padding_idx=0),
    'concept': MockVocab(size=100, padding_idx=0)
}

char_dim = 4
concept_dim = 5
embed_dim = 6
char2concept_dim = 7
filters = [(3, 8), (4, 8)]
dropout = 0.5
pretrained_file = None

ARGS = {
    'vocabs': vocabs,
    'char_dim': char_dim,
    'concept_dim': concept_dim,
    'embed_dim': embed_dim,
    'filters': filters,
    'char2concept_dim': char2concept_dim,
    'dropout': dropout,
    'pretrained_file': pretrained_file
}
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 ConceptEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConceptEncoder 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
Embedding Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
this paper's copy was not recorded; identical code first harvested from shibing624/textgen
pointer only · get_code("1485dd769dd9cb51")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

Highway Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("9a03fd1280e48fe1")
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 an instance of its own class, Highway: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 4,
    "layers": 2,
}
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 Highway — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Highway 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
Hypothesis Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("578aaecb450604aa")
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 an instance of its own class, Hypothesis: the run constructed the object and did not call it, so no result was computed. 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

# Define END token constant
END = 2

# Construct arguments for Hypothesis.__init__
torch.manual_seed(0)

# state_dict: a dictionary (commonly used for neural network state)
state_dict = {
    'layer1.weight': torch.randn(4, 3),
    'layer1.bias': torch.randn(4)
}

# seq: a sequence (list) that should contain token IDs, with END token at the end for testing is_completed()
seq = [1, 0, 1, END]

# score: a numerical score (float or tensor)
score = 0.95

ARGS = {
    'state_dict': state_dict,
    'seq': seq,
    'score': score
}
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 Hypothesis — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Hypothesis 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
ListsToTensor Ran
ran, honoured the contract we drafted
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("61216bb6394461a5")
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 int, shape (3, 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
import random

class SimpleVocab:
    def __init__(self):
        self.padding_idx = 0
        self.unk_idx = 1
        self.token2idx_dict = {
            "hello": 2,
            "world": 3,
            "foo": 4,
            "bar": 5,
        }
    
    def token2idx(self, w):
        return self.token2idx_dict.get(w, self.unk_idx)

# Create vocab
vocab = SimpleVocab()

# Create local vocabs (optional per-sample vocabularies)
local_vocabs = [
    {"hello": 10, "world": 11},
    {"foo": 20, "bar": 21}
]

# Create input data - list of lists of tokens
xs = [
    ["hello", "world"],
    ["foo", "bar", "hello"]
]

# Set seed for reproducibility
random.seed(0)

ARGS = {
    "xs": xs,
    "vocab": vocab,
    "local_vocabs": local_vocabs,
    "unk_rate": 0.1
}
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 int, shape (3, 2) — shape (3, 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
ListsToTensor Ran
ran on a synthesized input
jcyk/AMR-gs/parser/data.py
code served (permissive licence) · get_code("12eb240a8ae9ed12")
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 int, shape (3, 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 random
import numpy as np

class SimpleVocab:
    def __init__(self):
        self.padding_idx = 0
        self.unk_idx = 1
        self.word_to_idx = {
            "hello": 2,
            "world": 3,
            "test": 4,
            "data": 5,
        }
    
    def token2idx(self, word):
        return self.word_to_idx.get(word, self.unk_idx)

vocab = SimpleVocab()

local_vocabs = [
    {"hello": 10, "world": 11},
    {"test": 12, "data": 13},
]

xs = [
    ["hello", "world"],
    ["test", "data", "hello"],
]

ARGS = {
    "xs": xs,
    "vocab": vocab,
    "local_vocabs": local_vocabs,
    "unk_rate": 0.0,
}
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 int, shape (3, 2) — shape (3, 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
RelationGenerator Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("d575ce59062e5687")
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 an instance of its own class, RelationGenerator: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

# Stand-in vocab class with token2idx method
class Vocab:
    def __init__(self, size):
        self.size = size
    
    def token2idx(self, token):
        # Return indices for special tokens
        token_map = {'NIL': 0, 'PAD': 1}
        return token_map.get(token, 0)

# Create vocabs dict
vocabs = {
    'rel': Vocab(size=5)
}

# Parameters for RelationGenerator
embed_dim = 4
rel_size = 3
dropout = 0.1

ARGS = {
    'vocabs': vocabs,
    'embed_dim': embed_dim,
    'rel_size': rel_size,
    'dropout': dropout
}
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 RelationGenerator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RelationGenerator 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
SelfAttentionMask Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("2eacf55a75ce3b77")
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 an instance of its own class, SelfAttentionMask: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'init_size': 100,
    'device': 0
}
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 SelfAttentionMask — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SelfAttentionMask 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
SinusoidalPositionalEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("940651e6bf8dc1b0")
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 an instance of its own class, SinusoidalPositionalEmbedding: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn
import math

torch.manual_seed(0)

# Set up arguments for SinusoidalPositionalEmbedding.__init__
ARGS = {
    'embedding_dim': 8,
    'init_size': 16,
    'device': 0
}
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 SinusoidalPositionalEmbedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SinusoidalPositionalEmbedding 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
TransformerLayer Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("8e5d31580fcebd5a")
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 an instance of its own class, TransformerLayer: the run constructed the object and did not call it, so no result was computed. 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'embed_dim': 4,
    'ff_embed_dim': 8,
    'num_heads': 2,
    'dropout': 0.1,
    'with_external': False,
    'weights_dropout': True
}
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 TransformerLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TransformerLayer 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
WordEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("490e608e2f392b83")
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 an instance of its own class, WordEncoder: the run constructed the object and did not call it, so no result was computed. 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 numpy as np

torch.manual_seed(0)

class MockVocab:
    def __init__(self, size, padding_idx=0):
        self.size = size
        self.padding_idx = padding_idx
        self.token_list = [f"token_{i}" for i in range(size)]
    
    def idx2token(self, idx):
        if idx < len(self.token_list):
            return self.token_list[idx]
        return f"token_{idx}"

vocabs = {
    'word_char': MockVocab(size=32, padding_idx=0),
    'lem': MockVocab(size=64, padding_idx=0),
    'pos': MockVocab(size=16, padding_idx=0),
    'ner': MockVocab(size=8, padding_idx=0),
}

char_dim = 4
word_dim = 5
pos_dim = 3
ner_dim = 2
embed_dim = 6
char2word_dim = 7
dropout = 0.1
pretrained_file = None

filters = [(3, 8), (4, 8), (5, 8)]

ARGS = {
    'vocabs': vocabs,
    'char_dim': char_dim,
    'word_dim': word_dim,
    'pos_dim': pos_dim,
    'ner_dim': ner_dim,
    'embed_dim': embed_dim,
    'filters': filters,
    'char2word_dim': char2word_dim,
    'dropout': dropout,
    'pretrained_file': pretrained_file,
}
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 WordEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WordEncoder 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
_is_attr_form Ran
ran, violated the contract we drafted
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("5fe4e042a974cf92")
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 re

attr_value_set = set(['-', '+', 'interrogative', 'imperative', 'expressive'])

number_regexp = re.compile('^-?(\\d)+(\\.\\d+)?$')

def _is_attr_form(x):
    return x in attr_value_set or x.endswith('_') or number_regexp.match(x) is not None

# Test cases that cover all branches of the function
test_cases = [
    '-',                           # in attr_value_set
    '+',                           # in attr_value_set
    'interrogative',              # in attr_value_set
    'imperative',                 # in attr_value_set
    'expressive',                 # in attr_value_set
    'test_',                      # endswith('_')
    'hello_',                     # endswith('_')
    '123',                        # matches number_regexp (integer)
    '-456',                       # matches number_regexp (negative integer)
    '3.14',                       # matches number_regexp (decimal)
    '-2.71',                      # matches number_regexp (negative decimal)
]

# Use the first test case as the argument
ARGS = {
    'x': '-'
}
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 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
compute_f_by_tensor Ran
ran; our contract draft was wrong, not the code
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("4166e883cf4ae5a9")
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)

# Create small tensors for input, target, and mask
# The function treats them as binary classifications (0 or 1)
# and uses mask to filter out certain elements (mask==1 means skip)

input_tensor = torch.tensor([[1, 0, 1, 0], [1, 1, 0, 1]], dtype=torch.float32)
target_tensor = torch.tensor([[1, 0, 0, 1], [1, 0, 1, 1]], dtype=torch.float32)
mask_tensor = torch.tensor([[0, 0, 1, 0], [0, 1, 0, 0]], dtype=torch.float32)

ARGS = {
    "input": input_tensor,
    "target": target_tensor,
    "mask": mask_tensor,
}
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
is_attr_or_abs_form Ran
ran on a synthesized input
jcyk/AMR-gs/parser/AMRGraph.py
code served (permissive licence) · get_code("5846e0e199be3a49")
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 re

number_regexp = re.compile('^-?(\\d)+(\\.\\d+)?$')

abstract_regexp0 = re.compile('^([A-Z]+_)+\\d+$')

abstract_regexp1 = re.compile('^\\d0*$')

attr_value_set = set(['-', '+', 'interrogative', 'imperative', 'expressive'])

def _is_attr_form(x):
    return x in attr_value_set or x.endswith('_') or number_regexp.match(x) is not None

def _is_abs_form(x):
    return abstract_regexp0.match(x) is not None or abstract_regexp1.match(x) is not None

def is_attr_or_abs_form(x):
    return _is_attr_form(x) or _is_abs_form(x)

# Test cases that should return True or False
ARGS = {
    'x': 'ABC_123'  # matches abstract_regexp0: ([A-Z]+_)+\d+
}
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 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
label_smoothed_nll_loss Ran
ran; our contract draft was wrong, not the code
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("2746494f3bbf25b3")
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 Tensor, 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 torch

torch.manual_seed(0)

# Construct valid arguments for label_smoothed_nll_loss
batch_size = 2
num_classes = 4

# log_probs: should be log probabilities with shape (batch_size, num_classes)
log_probs = torch.log(torch.softmax(torch.randn(batch_size, num_classes), dim=-1))

# target: class indices with shape (batch_size,), values in range [0, num_classes)
target = torch.tensor([0, 2], dtype=torch.long)

# eps: label smoothing parameter (float between 0 and 1)
eps = 0.1

ARGS = {
    "log_probs": log_probs,
    "target": target,
    "eps": eps,
}
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 Tensor, 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
make_vocab Ran
ran on a synthesized input
jcyk/AMR-gs/parser/extract.py
code served (permissive licence) · get_code("5d147ec91127fd39")
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 Counter. 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
from collections import Counter

# Test case 1: word-level vocabulary
batch_seq_1 = [
    ['hello', 'world', 'hello'],
    ['foo', 'bar', 'world']
]

# Test case 2: character-level vocabulary
batch_seq_2 = [
    ['cat', 'dog', 'cat'],
    ['bird', 'dog']
]

ARGS = {
    'batch_seq': batch_seq_1,
    'char_level': False
}
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 Counter — a Counter output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Counter 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
move_to_device Ran
ran; our contract draft was wrong, not the code
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("9d1d752263773f70")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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)

# Test with various input types
test_tensor = torch.randn(2, 4)
test_numpy = np.random.randn(2, 4).astype(np.float32)
test_dict = {
    "tensor": torch.randn(2, 4),
    "numpy": np.random.randn(2, 4).astype(np.float32),
    "scalar": 42
}
test_list = [
    torch.randn(2, 4),
    np.random.randn(2, 4).astype(np.float32),
    "string"
]
test_tuple = (
    torch.randn(2, 4),
    np.random.randn(2, 4).astype(np.float32)
)
test_device = "cpu"

ARGS = {
    "maybe_tensor": test_tensor,
    "device": test_device
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
need_an_instance Ran
ran on a synthesized input
jcyk/AMR-gs/parser/AMRGraph.py
code served (permissive licence) · get_code("53445cbd60ba3b37")
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 re
import torch

number_regexp = re.compile('^-?(\\d)+(\\.\\d+)?$')
abstract_regexp0 = re.compile('^([A-Z]+_)+\\d+$')
attr_value_set = set(['-', '+', 'interrogative', 'imperative', 'expressive'])

def _is_attr_form(x):
    return x in attr_value_set or x.endswith('_') or number_regexp.match(x) is not None

def need_an_instance(x):
    return not _is_attr_form(x) or abstract_regexp0.match(x) is not None

# Test cases for the function
test_cases = [
    # attr_value_set members - should return False
    '-',
    '+',
    'interrogative',
    'imperative',
    'expressive',
    # strings ending with underscore - should return False
    'hello_',
    'test_',
    # numbers (matching number_regexp) - should return False
    '42',
    '-42',
    '3.14',
    '-2.5',
    '0',
    '-0.001',
    # abstract_regexp0 matches (e.g., "ABC_123") - should return True (not attr_form)
    'ABC_123',
    'XYZ_456',
    'A_B_1',
    # regular strings that don't match any pattern - should return True
    'hello',
    'world',
    'some_instance',
    'MyClass',
]

ARGS = {
    'x': 'hello'
}
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
ArcGenerator Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("ff00df88d53cbc0d")
How it ran

no invocation recorded.

ArraysToTensor Not yet run
unverified (harvested, no recorded run)
jcyk/AMR-gs/parser/data.py
code served (permissive licence) · get_code("664642471ed447d0")
How it ran

no invocation recorded.

ConceptGenerator Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("08e5532ebc24827d")
How it ran

no invocation recorded.

DecodeLayer Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("408d38484408687b")
How it ran

no invocation recorded.

ListsofStringToTensor Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("ab457d4ca63f1a01")
How it ran

no invocation recorded.

ListsofStringToTensor Not yet run
unverified (harvested, no recorded run)
jcyk/AMR-gs/parser/data.py
code served (permissive licence) · get_code("b34a3f249614ba45")
How it ran

no invocation recorded.

MultiheadAttention Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("4b0bd99292baeaff")
How it ran

no invocation recorded.

Parser Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("e56d2ab78d40acb7")
How it ran

no invocation recorded.

Transformer Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("f0af88a62479f8da")
How it ran

no invocation recorded.

search_by_batch Not yet run
unverified (harvested, no recorded run)
bjascob/amrlib/amrlib/models/parse_gsii/modules/parser.py
code served (permissive licence) · get_code("009b8f7e0b6e1c7a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 31 samples lifted from this paper's linked repositories, 31 carry a function identity and 0 do not. Of the 31 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 1 later) and 26 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
Embedding
brick of this paper's assembly: helper
1 other paper
1 the same month
2004.08022 (2020-04)
Rigid Formats Controlled Text Generation
Transformer
brick of this paper's assembly: helper
1 other paper
1 later
2105.11269 (2021-05)
Neural Machine Translation with Monolingual Translation Memory *
is_attr_or_abs_form 1 other paper
1 dated earlier
1911.07470 (2019-11)
Graph Transformer for Graph-to-Sequence Learning
make_vocab 1 other paper
1 dated earlier
1911.07470 (2019-11)
Graph Transformer for Graph-to-Sequence Learning
need_an_instance 1 other paper
1 dated earlier
1911.07470 (2019-11)
Graph Transformer for Graph-to-Sequence Learning

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

We propose a new end-to-end model that treats AMR parsing as a series of dual decisions on the input sequence and the incrementally constructed graph. At each time step, our model performs multiple rounds of attention, reasoning, and composition that aim to answer two critical questions: (1) which part of the input sequence to abstract; and (2) where in the output graph to construct the new concept. We show that the answers to these two questions are mutually causalities. We design a model based on iterative inference that helps achieve better answers in both perspectives, leading to greatly improved parsing accuracy. Our experimental results significantly outperform all previously reported SMATCH scores by large margins. Remarkably, without the help of any large-scale pre-trained language model (e.g., BERT), our model already surpasses previous state-of-the-art using BERT. With the help of BERT, we can push the state-of-the-art results to 80.2% on LDC2017T10 (AMR 2.0) and 75.4% on LDC2014T12 (AMR 1.0).

For agents

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

get_harvested_code_for_paper("2004.05572")
get_code_for_paper("2004.05572")
have("2004.05572")

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

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

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

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

Connect an agent — have() is free.