SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.01252 · 2018

Improving a Neural Semantic Parser by Counterfactual Learning from Human Bandit Feedback

arXiv · PDF · Open in the Atlas

Code that ran

2 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1805.01252.json · badge: /api/ran/1805.01252.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
carolinlawrence/nematus canonical (classifier label)
classifier basis: census
2 ran · 3 no recorded run
FunctionStatusWhere it lives
convert_to_nodes_edges_each_v2 Ran
ran on a synthesized input
carolinlawrence/nematus/nematus/alignment_util.py
code served (permissive licence) · get_code("88b24d0c388273cb")
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.

import json

# Construct a minimal valid data object as a JSON string
# The function expects:
# - 'source_sent': a source sentence string
# - 'target_sent': a target sentence string
# - 'matrix': a 2D list where rows correspond to target words and columns to source words

data = json.dumps({
    'source_sent': 'hello world test',
    'target_sent': 'bonjour monde examen',
    'matrix': [
        [0.9, 0.1, 0.05],
        [0.2, 0.85, 0.1],
        [0.05, 0.1, 0.92]
    ]
})

sent_id = 42

ARGS = {
    'data': data,
    'sent_id': sent_id
}
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
fopen Ran
ran on a synthesized input
carolinlawrence/nematus/nematus/cl_log_iterator.py
code served (permissive licence) · get_code("171953963fb4d022")
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 TextIOWrapper. 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 gzip
import tempfile
import os

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a test text file
test_file = os.path.join(temp_dir, "test.txt")
with open(test_file, 'w') as f:
    f.write("test content")

# Create a test gzip file
test_gz_file = os.path.join(temp_dir, "test.txt.gz")
with gzip.open(test_gz_file, 'wt') as f:
    f.write("gzipped content")

# Define arguments for the fopen function
ARGS = {
    'filename': test_file,
    'mode': 'r'
}
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 TextIOWrapper — a TextIOWrapper 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
convert_to_nodes_edges_each_v1 Not yet run
unverified (harvested, no recorded run)
carolinlawrence/nematus/nematus/alignment_util.py
code served (permissive licence) · get_code("db72446ff1c584bc")
How it ran

no invocation recorded.

get_layer_constr Not yet run
unverified (harvested, no recorded run)
carolinlawrence/nematus/nematus/layers.py
code served (permissive licence) · get_code("270ec4a02f9dba49")
How it ran

no invocation recorded.

get_layer_param Not yet run
unverified (harvested, no recorded run)
carolinlawrence/nematus/nematus/layers.py
code served (permissive licence) · get_code("561904d1964e5473")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
fopen 3 other papers
3 dated earlier
1603.06147 (2016-03)
A Character-Level Decoder without Explicit Segmentation for Neural Machine Translation
1610.03017 (2016-10)
Fully Character-Level Neural Machine Translation without Explicit Segmentation
1703.04887 (2017-03)
Improving Neural Machine Translation with Conditional Sequence Generative Adversarial Nets

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

Counterfactual learning from human bandit feedback describes a scenario where user feedback on the quality of outputs of a historic system is logged and used to improve a target system. We show how to apply this learning framework to neural semantic parsing. From a machine learning perspective, the key challenge lies in a proper reweighting of the estimator so as to avoid known degeneracies in counterfactual learning, while still being applicable to stochastic gradient optimization. To conduct experiments with human users, we devise an easy-to-use interface to collect human feedback on semantic parses. Our work is the first to show that semantic parsers can be improved significantly by counterfactual learning from logged human feedback data.

For agents

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

get_harvested_code_for_paper("1805.01252")
get_code_for_paper("1805.01252")
have("1805.01252")

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

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

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

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

Connect an agent — have() is free.