SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.09461 · 2018

Deep Reinforcement Learning For Sequence to Sequence Models

arXiv · PDF · Open in the Atlas

Code that ran

16 of 17 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; 4 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 3 failures of our instrument; 1 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/1805.09461.json · badge: /api/ran/1805.09461.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
yaserkl/RLSeq2Seq canonical (classifier label)
classifier basis: census
12 ran · 1 no recorded run
IlyaGusev/summarus community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
abstract2ids Ran
ran, honoured the contract we drafted
yaserkl/RLSeq2Seq/src/data.py
code served (permissive licence) · get_code("fe1c05743cd67af2")
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 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.

class Vocabulary:
    def __init__(self):
        self._word2id = {
            '[UNK]': 0,
            'the': 1,
            'quick': 2,
            'brown': 3,
            'fox': 4,
            'jumps': 5,
            'over': 6,
            'lazy': 7,
            'dog': 8,
        }
        self._id2word = {v: k for k, v in self._word2id.items()}
    
    def word2id(self, word):
        return self._word2id.get(word, self._word2id['[UNK]'])
    
    def size(self):
        return len(self._word2id)

vocab = Vocabulary()

abstract_words = ['the', 'quick', 'brown', 'oov1', 'fox', 'oov2', 'jumps']

article_oovs = ['oov1', 'oov2', 'oov3']

ARGS = {
    'abstract_words': abstract_words,
    'vocab': vocab,
    'article_oovs': article_oovs,
}
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 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
article2ids Ran
ran; our contract draft was wrong, not the code
yaserkl/RLSeq2Seq/src/data.py
code served (permissive licence) · get_code("ecb10763ebbfe0bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

class Vocabulary:
    def __init__(self, word_to_id_dict):
        self.word_to_id_dict = word_to_id_dict
        self._size = len(word_to_id_dict)
    
    def word2id(self, word):
        return self.word_to_id_dict.get(word, self.word_to_id_dict['[UNK]'])
    
    def size(self):
        return self._size


vocab = Vocabulary({
    '[UNK]': 0,
    'the': 1,
    'quick': 2,
    'brown': 3,
    'fox': 4,
    'jumps': 5,
    'over': 6,
    'lazy': 7,
})

article_words = ['the', 'quick', 'brown', 'fox', 'unseen_word', 'another_oov', 'jumps']

ARGS = {
    'article_words': article_words,
    'vocab': vocab,
}
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 tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_acs Ran
ran on a synthesized input
IlyaGusev/summarus/summarus/util/extraction_score.py
code served (permissive licence) · get_code("67be1a4ec1456244")
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 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
import numpy as np

class Intervals:
    def __init__(self):
        self.intervals = []

    def try_add(self, interval):
        for i in self.intervals:
            if interval[1] >= i[0] and interval[0] <= i[0]:
                return False
            elif interval[0] >= i[0] and interval[1] <= i[1]:
                return False
            elif interval[0] <= i[1] and interval[1] >= i[1]:
                return False
        self.intervals.append(interval)
        return True

def find_acs(s1, s2, threshold=2):
    hashed_seqs = set()
    for i in range(len(s1)):
        for j in range(i + 1, i + 1 + len(s2)):
            seq = tuple(s1[i:j])
            if len(seq) >= threshold:
                hashed_seqs.add(tuple(s1[i:j]))
    cs = []
    for i in range(len(s2)):
        for j in range(i + 1, len(s2) + 1):
            seq = tuple(s2[i:j])
            if len(seq) < threshold:
                continue
            if seq in hashed_seqs:
                cs.append((len(seq), seq, i, j))
    cs.sort(key=lambda x: -x[0])
    answer = []
    intervals = Intervals()
    for a, seq, i, j in cs:
        if intervals.try_add((i, j)):
            answer.append(a)
    return answer

s1 = [1, 2, 3, 4, 5, 6]
s2 = [2, 3, 4, 7, 8]
threshold = 2

ARGS = {
    "s1": s1,
    "s2": s2,
    "threshold": threshold
}
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 list, ndim 1, 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
fix_missing_period Ran
ran on a synthesized input
IlyaGusev/summarus/summarus/readers/cnn_dailymail_reader.py
code served (permissive licence) · get_code("d99eeb1146fb3504")
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 str. 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.

# Analyze the function fix_missing_period
# Parameters: line (a string)
# The function checks if line contains '@highlight', is empty, or ends with certain tokens
# It returns the line as-is or appends ' .' to it

ARGS = {
    'line': 'This is a test sentence'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_article_and_abstract Ran
ran on a synthesized input
IlyaGusev/summarus/summarus/readers/cnn_dailymail_reader.py
code served (permissive licence) · get_code("99ff57fcf802c668")
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 tempfile
import os

# Create a temporary story file with article and highlight sections
temp_dir = tempfile.mkdtemp()
story_file = os.path.join(temp_dir, "test_story.txt")

# Write a test story file with article content and highlights
story_content = """this is the first line of the article
this is the second line of the article
this is the third line without period
@highlight
this is the first highlight
@highlight
this is the second highlight
"""

with open(story_file, 'w', encoding='utf-8') as f:
    f.write(story_content)

ARGS = {
    'story_file': story_file,
    'encoding': 'utf-8',
    'fix_period': True
}
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 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
hashhex Ran
ran on a synthesized input
IlyaGusev/summarus/summarus/readers/cnn_dailymail_reader.py
code served (permissive licence) · get_code("7d38d9759f7037fa")
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 str. 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 hashlib

def hashhex(s):
    h = hashlib.sha1()
    h.update(s.encode('utf-8'))
    return h.hexdigest()

ARGS = {
    's': 'hello world'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
make_html_safe Ran
ran; our contract draft was wrong, not the code
yaserkl/RLSeq2Seq/src/decode.py
code served (permissive licence) · get_code("84fcb74e05d73aff")
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) and returned str. 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

ARGS = {
    's': '<div>Hello</div>'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
outputids2words Ran
ran on a synthesized input
yaserkl/RLSeq2Seq/src/data.py
code served (permissive licence) · get_code("eca0776bc82826da")
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.

class MockVocab:
    def __init__(self):
        self._word_map = {
            0: "the",
            1: "cat",
            2: "sat",
            3: "on",
            4: "mat",
            5: "end"
        }
        self._vocab_size = len(self._word_map)
    
    def id2word(self, idx):
        if idx not in self._word_map:
            raise ValueError(f"ID {idx} not in vocabulary")
        return self._word_map[idx]
    
    def size(self):
        return self._vocab_size


ARGS = {
    "id_list": [0, 1, 2, 3, 4, 5, 6, 7],
    "vocab": MockVocab(),
    "article_oovs": ["rare_word_1", "rare_word_2"]
}
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
rouge_l_sentence_level Ran
ran, honoured the contract we drafted
yaserkl/RLSeq2Seq/src/rouge.py
pointer only (licence: MIT); the stored copy get_code serves, from WangXFng/RDRec, is pointer only (licence: NONE) · get_code("815c9f02431395eb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from WangXFng/RDRec, and GitHub detected no licence in that repository when it was checked. 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.

rouge_l_sentence_level Ran
ran on a synthesized input
yaserkl/RLSeq2Seq/src/rouge_tensor.py
code served (permissive licence) · get_code("77afbbd9f4048865")
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

# The function expects two parameters:
# 1. eval_sentences: list of sequences (each sequence is a list of words)
# 2. ref_sentences: list of sequences (each sequence is a list of words)

# Create sample word sequences
# Using simple string tokens as "words"
eval_sentences = [
    ['the', 'cat', 'sat', 'on', 'the', 'mat'],
    ['a', 'quick', 'brown', 'fox']
]

ref_sentences = [
    ['the', 'cat', 'is', 'sitting', 'on', 'the', 'mat'],
    ['the', 'quick', 'brown', 'fox', 'jumps']
]

ARGS = {
    'eval_sentences': eval_sentences,
    'ref_sentences': ref_sentences
}
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
rouge_l_summary_level Ran
ran, honoured the contract we drafted
yaserkl/RLSeq2Seq/src/rouge.py
code served (permissive licence) · get_code("86e27006cb76b7f8")
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 itertools

# Build small test data for rouge_l_summary_level
evaluated_sentences = [
    "the cat sat on the mat",
    "the dog ran in the park"
]

reference_sentences = [
    "the cat sat on a mat",
    "a dog ran in the park"
]

ARGS = {
    "evaluated_sentences": evaluated_sentences,
    "reference_sentences": reference_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 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
rouge_n Ran
ran, honoured the contract we drafted
yaserkl/RLSeq2Seq/src/rouge.py
pointer only (licence: MIT); the stored copy get_code serves, from WangXFng/RDRec, is pointer only (licence: NONE) · get_code("eb37c01f4067f842")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from WangXFng/RDRec, and GitHub detected no licence in that repository when it was checked. 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.

rouge_n Ran
ran on a synthesized input
yaserkl/RLSeq2Seq/src/rouge_tensor.py
code served (permissive licence) · get_code("eb5c66f55e72516a")
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

# Setup for rouge_n function
# The function expects:
# - eval_sentences: a list of token sequences (each sequence is a list of tokens)
# - ref_sentences: a list of token sequences (each sequence is a list of tokens)
# - n: an integer for the n-gram size

# Create simple token sequences as lists of strings/tokens
eval_sentences = [
    ['the', 'quick', 'brown', 'fox'],
    ['hello', 'world', 'foo', 'bar']
]

ref_sentences = [
    ['the', 'quick', 'brown', 'dog'],
    ['hello', 'world', 'baz', 'qux']
]

n = 2

ARGS = {
    'eval_sentences': eval_sentences,
    'ref_sentences': ref_sentences,
    'n': n
}
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
scheduled_sampling Ran
ran on a synthesized input
yaserkl/RLSeq2Seq/src/attention_decoder.py
code served (permissive licence) · get_code("85555d564514df13")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a minimal HPS (hyperparameter) config class
class HPS:
    def __init__(self):
        self.batch_size = 2
        self.greedy_scheduled_sampling = False
        self.E2EBackProp = False
        self.hard_argmax = False
        self.k = 3

# Create tensors with distinct dimensions
batch_size = 2
vocab_size = 5
embedding_dim = 4
output_dim = 8  # vocab_size + some OOV scores

# Initialize HPS
hps = HPS()

# Create embedding tensor (vocab_size x embedding_dim)
embedding = tf.constant(
    np.random.randn(vocab_size, embedding_dim).astype(np.float32)
)

# Create output logits (batch_size x output_dim)
output = tf.constant(
    np.random.randn(batch_size, output_dim).astype(np.float32)
)

# Create input embeddings (batch_size x embedding_dim)
inp = tf.constant(
    np.random.randn(batch_size, embedding_dim).astype(np.float32)
)

# Create sampling probability (scalar between 0 and 1)
sampling_probability = tf.constant(0.5, dtype=tf.float32)

# Alpha parameter for soft argmax
alpha = 1.0

ARGS = {
    "hps": hps,
    "sampling_probability": sampling_probability,
    "output": output,
    "embedding": embedding,
    "inp": inp,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
scheduled_sampling_vocab_dist Ran
ran on a synthesized input
yaserkl/RLSeq2Seq/src/attention_decoder.py
code served (permissive licence) · get_code("ef954b98b08bfa56")
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 EagerTensor, 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 tensorflow as tf
import numpy as np

# Create a small stand-in class for hps (hyperparameters)
class HPS:
    def __init__(self):
        self.batch_size = 2
        self.greedy_scheduled_sampling = False
        self.E2EBackProp = False
        self.hard_argmax = False
        self.k = 3

# Create tiny tensors
batch_size = 2
vocab_size = 4
embedding_dim = 3
input_dim = 3

# Create hps object
hps = HPS()

# sampling_probability: float between 0 and 1
sampling_probability = 0.5

# output: logits tensor [batch_size, vocab_size]
output = tf.constant([[1.0, 2.0, 0.5, 1.5], [0.8, 1.2, 2.1, 0.3]], dtype=tf.float32)

# embedding: [vocab_size, embedding_dim]
embedding = tf.constant(
    np.random.randn(vocab_size, embedding_dim).astype(np.float32)
)

# inp: [batch_size, input_dim]
inp = tf.constant(
    np.random.randn(batch_size, input_dim).astype(np.float32)
)

# alpha: scalar
alpha = 1.0

ARGS = {
    "hps": hps,
    "sampling_probability": sampling_probability,
    "output": output,
    "embedding": embedding,
    "inp": inp,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
sort_hyps Ran
ran; our contract draft was wrong, not the code
yaserkl/RLSeq2Seq/src/beam_search.py
code served (permissive licence) · get_code("8891bb52fbe37510")
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 torch

class Hypothesis:
    def __init__(self, avg_log_prob):
        self.avg_log_prob = avg_log_prob

hyp1 = Hypothesis(avg_log_prob=-0.5)
hyp2 = Hypothesis(avg_log_prob=-1.2)
hyp3 = Hypothesis(avg_log_prob=-0.8)

ARGS = {
    "hyps": [hyp1, hyp2, hyp3]
}
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 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
rouge_l_fscore Not yet run
unverified (harvested, no recorded run)
yaserkl/RLSeq2Seq/src/rouge_tensor.py
code served (permissive licence) · get_code("5c25a03c38e34377")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 7 later) and 9 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
rouge_n 5 other papers
5 later
1905.10033 (2019-05)
Personalizing Dialogue Agents via Meta-Learning
1908.07687 (2019-08)
MoEL: Mixture of Empathetic Listeners
2020.findings-emnlp.289 (2020 (year only))
Towards Zero-Shot Conditional Summarization with Adaptive Multi-Task Fine-Tuning
and 2 more not named here
make_html_safe 4 other papers
1 dated earlier, 1 the same month, 2 later
1804.05685 (2018-04)
A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents
1805.06266 (2018-05)
A Unified Model for Extractive and Abstractive Summarization using Inconsistency Loss
1908.10835 (2019-08)
An Empirical Comparison on Imitation Learning and Reinforcement Learning for Paraphrase Generation
and 1 more not named here
rouge_l_sentence_level 3 other papers
3 later
2020.findings-emnlp.289 (2020 (year only))
Towards Zero-Shot Conditional Summarization with Adaptive Multi-Task Fine-Tuning
2308.12241 (2023-08)
LLMRec: Benchmarking Large Language Models on Recommendation Task
2405.10587 (2024-05)
RDRec: Rationale Distillation for LLM-based Recommendation
rouge_l_summary_level 3 other papers
3 later
2020.findings-emnlp.289 (2020 (year only))
Towards Zero-Shot Conditional Summarization with Adaptive Multi-Task Fine-Tuning
2308.12241 (2023-08)
LLMRec: Benchmarking Large Language Models on Recommendation Task
2405.10587 (2024-05)
RDRec: Rationale Distillation for LLM-based Recommendation
sort_hyps 3 other papers
1 dated earlier, 1 the same month, 1 later
1804.05685 (2018-04)
A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents
1805.06266 (2018-05)
A Unified Model for Extractive and Abstractive Summarization using Inconsistency Loss
1808.10122 (2018-08)
Learning Neural Templates for Text Generation
abstract2ids 2 other papers
1 dated earlier, 1 later
1804.05685 (2018-04)
A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents
1908.10835 (2019-08)
An Empirical Comparison on Imitation Learning and Reinforcement Learning for Paraphrase Generation
article2ids 2 other papers
1 dated earlier, 1 later
1804.05685 (2018-04)
A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents
1908.10835 (2019-08)
An Empirical Comparison on Imitation Learning and Reinforcement Learning for Paraphrase Generation
outputids2words 1 other paper
1 dated earlier
1804.05685 (2018-04)
A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents

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

In recent times, sequence-to-sequence (seq2seq) models have gained a lot of popularity and provide state-of-the-art performance in a wide variety of tasks such as machine translation, headline generation, text summarization, speech to text conversion, and image caption generation. The underlying framework for all these models is usually a deep neural network comprising an encoder and a decoder. Although simple encoder-decoder models produce competitive results, many researchers have proposed additional improvements over these sequence-to-sequence models, e.g., using an attention-based model over the input, pointer-generation models, and self-attention models. However, such seq2seq models suffer from two common problems: 1) exposure bias and 2) inconsistency between train/test measurement. Recently, a completely novel point of view has emerged in addressing these two problems in seq2seq models, leveraging methods from reinforcement learning (RL). In this survey, we consider seq2seq problems from the RL point of view and provide a formulation combining the power of RL methods in decision-making with sequence-to-sequence models that enable remembering long-term memories. We present some of the most recent frameworks that combine concepts from RL and deep neural networks and explain how these two areas could benefit from each other in solving complex seq2seq tasks. Our work aims to provide insights into some of the problems that inherently arise with current approaches and how we can address them with better RL models. We also provide the source code for implementing most of the RL models discussed in this paper to support the complex task of abstractive text summarization.

For agents

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

get_harvested_code_for_paper("1805.09461")
get_code_for_paper("1805.09461")
have("1805.09461")

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

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

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

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

Connect an agent — have() is free.