SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.01214 · 2019

Better Rewards Yield Better Summaries: Learning to Summarise Without References

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 2 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/1909.01214.json · badge: /api/ran/1909.01214.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
yg211/summary-reward-no-reference canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
UKPLab/emnlp2019-summary-reward canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
bleu Ran
ran on a synthesized input
yg211/summary-reward-no-reference/scorer/auto_metrics/metrics.py
code served (permissive licence) · get_code("b8a6998c443cf95c")
How it ran

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

import torch
import numpy as np
from nltk.translate.bleu_score import SmoothingFunction

torch.manual_seed(0)

chencherry = SmoothingFunction()

def bleu(hyp, refs, n=2, smooth=True):
    from nltk.translate import bleu as _bleu
    smoothing_function = chencherry.method3 if smooth else chencherry.method0
    return _bleu(refs, hyp, [1.0 / n for _ in range(n)], smoothing_function=smoothing_function)

# hyp should be a list of tokens (hypothesis)
hyp = ['the', 'cat', 'sat', 'on', 'the', 'mat']

# refs should be a list of reference translations, each being a list of tokens
refs = [
    ['the', 'cat', 'is', 'sitting', 'on', 'the', 'mat'],
    ['a', 'cat', 'sat', 'on', 'the', 'mat']
]

ARGS = {
    'hyp': hyp,
    'refs': refs,
    'n': 2,
    'smooth': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_model Ran
ran; our contract draft was wrong, not the code
UKPLab/emnlp2019-summary-reward/rewarder.py
pointer only (licence: NONE) · get_code("7b6ce349a42f2945")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UKPLab/emnlp2019-summary-reward 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.

countAppearance Ran
ran on a synthesized input
yg211/summary-reward-no-reference/scorer/data_helper/generate_samples.py
code served (permissive licence) · get_code("7c4d342f8afe60b2")
How it ran

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

import torch

torch.manual_seed(0)

# Construct arguments for countAppearance(history, sub_seq)
# The function iterates through history entries and checks if sub_seq elements
# are a subset of each entry. Both should be iterable collections.

history = [
    [1, 2, 3, 4],
    [2, 5, 6],
    [1, 2, 7, 8],
    [3, 4, 5, 9]
]

sub_seq = [1, 2]

ARGS = {
    "history": history,
    "sub_seq": sub_seq
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getPossibleSwaps Ran
ran on a synthesized input
yg211/summary-reward-no-reference/scorer/data_helper/generate_samples.py
code served (permissive licence) · get_code("b1505c96d52fa4ce")
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 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 math

def inHistory(history, swap):
    for entry in history:
        if set(swap) == set(entry):
            return True
    return False

def countAppearance(history, sub_seq):
    cnt = 0
    for entry in history:
        if set(sub_seq).issubset(set(entry)):
            cnt += 1
    return cnt

def getPossibleSwaps(pair_swaps, history, meta_history, n, article_sent_num):
    used_sent_in_ref = [ss[0] for ss in history]
    swaps = [pair for pair in pair_swaps if pair[0] not in used_sent_in_ref]
    poss_swaps = []
    if len(history) < n - 1:
        for ss in swaps:
            cnt = countAppearance(meta_history, history + [ss])
            if cnt < math.pow(article_sent_num, n - 1 - len(history)):
                poss_swaps.append(ss)
    else:
        for ss in swaps:
            if not inHistory(meta_history, history + [ss]):
                poss_swaps.append(ss)
    if len(poss_swaps) == 0:
        print('error')
    return poss_swaps

pair_swaps = [
    (0, 1),
    (1, 2),
    (2, 3),
    (3, 4),
]

history = [
    (0, 5),
]

meta_history = [
    (0, 1),
    (0, 5),
    (1, 2),
    (2, 3),
    (3, 4),
]

n = 3

article_sent_num = 2

ARGS = {
    "pair_swaps": pair_swaps,
    "history": history,
    "meta_history": meta_history,
    "n": n,
    "article_sent_num": article_sent_num,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family 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
inHistory Ran
ran on a synthesized input
yg211/summary-reward-no-reference/scorer/data_helper/generate_samples.py
code served (permissive licence) · get_code("08a56c9270b8138e")
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 torch

torch.manual_seed(0)

# The function inHistory checks if a swap (which is iterable and convertible to a set)
# exists in a history (which is iterable and contains entries that are also iterable/convertible to sets)

# Create a simple history: a list of lists where each entry is a swap representation
history = [
    [1, 2],
    [3, 4],
    [5, 6]
]

# Create a swap that matches one of the entries in history
swap = [1, 2]

ARGS = {
    "history": history,
    "swap": swap
}
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
parse_split_data Ran
ran; our contract draft was wrong, not the code
UKPLab/emnlp2019-summary-reward/step2_train_rewarder.py
pointer only (licence: NONE) · get_code("ceee2c8bc03cc5b0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UKPLab/emnlp2019-summary-reward 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.

raw_bert_encoder Ran
ran, honoured the contract we drafted
UKPLab/emnlp2019-summary-reward/rewarder.py
pointer only (licence: NONE) · get_code("d193c2053b5ce0cb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UKPLab/emnlp2019-summary-reward 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.

raw_bert_encoder Ran
ran, honoured the contract we drafted
UKPLab/emnlp2019-summary-reward/step1_encode_doc_summ.py
pointer only (licence: NONE) · get_code("2cbfa7df6a518aa2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UKPLab/emnlp2019-summary-reward 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.

remove_spaces_lines Ran
ran on a synthesized input
yg211/summary-reward-no-reference/helpers/data_helpers.py
code served (permissive licence) · get_code("b76aabfbdd5cd7dd")
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 string
import re

def remove_spaces_lines(text):
    """
    Normalize text
    Remove & Replace unnessary characters
    Parameter argument:
    text: a string (e.g. '....

                        New York N.Y is a city...')

    Return:
    text: a string (New York N.Y is a city.)
    """
    text = re.sub('[\n\\s\t_]+', ' ', str(text))
    return text


# Setup arguments for the function
ARGS = {
    'text': '....    \n\n                        New York N.Y is a city...\t_extra'
}
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
sts_bert_encoder Ran
ran on a synthesized input
yg211/summary-reward-no-reference/compare_reward.py
code served (permissive licence) · get_code("ba627e31aa948470")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 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 torch.nn as nn
import numpy as np
from nltk import sent_tokenize

torch.manual_seed(0)

class MockBertModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding_dim = 4
    
    def encode(self, sent_list):
        # Mock encode method that returns embeddings for each sentence
        # Returns shape (num_sentences, embedding_dim)
        num_sentences = len(sent_list) if isinstance(sent_list, list) else 1
        return np.random.randn(num_sentences, self.embedding_dim)

model = MockBertModel()

sent_list = [
    "This is the first sentence.",
    "This is the second sentence."
]

ARGS = {
    "model": model,
    "sent_list": sent_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 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
text_normalization Ran
ran on a synthesized input
yg211/summary-reward-no-reference/helpers/data_helpers.py
code served (permissive licence) · get_code("ff0f39e164572c49")
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 string
import re

# The function text_normalization takes a single parameter: text (a string)
# It performs various regex substitutions and character replacements on the input text

ARGS = {
    "text": ".... *** New York N.Y is a city... â à é #example-LRB-test-RRB-\n\t with • multiple  spaces"
}
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
deep_pair_train Not yet run
unverified (harvested, no recorded run)
UKPLab/emnlp2019-summary-reward/step2_train_rewarder.py
pointer only (licence: NONE) · get_code("c6edfba6734d0282")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UKPLab/emnlp2019-summary-reward 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. No invocation recorded.

sent2tokens Not yet run
unverified (harvested, no recorded run)
yg211/summary-reward-no-reference/helpers/data_helpers.py
code served (permissive licence) · get_code("59b18c5647389fbf")
How it ran

no invocation recorded.

sts_bert_rewarder Not yet run
unverified (harvested, no recorded run)
yg211/summary-reward-no-reference/compare_reward.py
code served (permissive licence) · get_code("6abe2a89945836f0")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Reinforcement Learning (RL) based document summarisation systems yield state-of-the-art performance in terms of ROUGE scores, because they directly use ROUGE as the rewards during training. However, summaries with high ROUGE scores often receive low human judgement. To find a better reward function that can guide RL to generate human-appealing summaries, we learn a reward function from human ratings on 2,500 summaries. Our reward function only takes the document and system summary as input. Hence, once trained, it can be used to train RL-based summarisation systems without using any reference summaries. We show that our learned rewards have significantly higher correlation with human ratings than previous approaches. Human evaluation experiments show that, compared to the state-of-the-art supervised-learning systems and ROUGE-as-rewards RL summarisation systems, the RL systems using our learned rewards during training generate summarieswith higher human ratings. The learned reward function and our source code are available at https://github.com/yg211/summary-reward-no-reference.

For agents

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

get_harvested_code_for_paper("1909.01214")
get_code_for_paper("1909.01214")
have("1909.01214")

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

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

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

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

Connect an agent — have() is free.