SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.06356 · 2019

Addressing Semantic Drift in Question Generation for Semi-Supervised Question Answering

arXiv · PDF · Open in the Atlas

Code that ran

13 of 19 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, 1 violated it and 4 have no contract verdict; 4 failures of our instrument; 6 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/1909.06356.json · badge: /api/ran/1909.06356.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
ZhangShiyue/QGforQA canonical (classifier label)
classifier basis: census
13 ran · 6 no recorded run
FunctionStatusWhere it lives
compute_bleu Ran
ran on a synthesized input
ZhangShiyue/QGforQA/LIB/EVAL/bleu.py
code served (permissive licence) · get_code("9212e9aaf973fc1a")
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 math
from collections import Counter

def _get_ngrams(segment, max_order):
    """Extracts all n-grams upto a given maximum order from an input segment.
    Args:
      segment: text segment from which n-grams will be extracted.
      max_order: maximum length in tokens of the n-grams returned by this
          methods.
    Returns:
      The Counter containing all n-grams upto max_order in segment
      with a count of how many times each n-gram occurred.
    """
    ngram_counts = Counter()
    for order in range(1, max_order + 1):
        for i in range(0, len(segment) - order + 1):
            ngram = tuple(segment[i:i + order])
            ngram_counts[ngram] += 1
    return ngram_counts

def compute_bleu(reference_corpus, translation_corpus, max_order=4, smooth=False):
    """Computes BLEU score of translated segments against one or more references.
    Args:
      reference_corpus: list of lists of references for each translation. Each
          reference should be tokenized into a list of tokens.
      translation_corpus: list of translations to score. Each translation
          should be tokenized into a list of tokens.
      max_order: Maximum n-gram order to use when computing BLEU score.
      smooth: Whether or not to apply Lin et al. 2004 smoothing.
    Returns:
      3-Tuple with the BLEU score, n-gram precisions, geometric mean of n-gram
      precisions and brevity penalty.
    """
    matches_by_order = [0] * max_order
    possible_matches_by_order = [0] * max_order
    reference_length = 0
    translation_length = 0
    for references, translation in zip(reference_corpus, translation_corpus):
        reference_length += min((len(r) for r in references))
        translation_length += len(translation)
        merged_ref_ngram_counts = Counter()
        for reference in references:
            merged_ref_ngram_counts |= _get_ngrams(reference, max_order)
        translation_ngram_counts = _get_ngrams(translation, max_order)
        overlap = translation_ngram_counts & merged_ref_ngram_counts
        for ngram in overlap:
            matches_by_order[len(ngram) - 1] += overlap[ngram]
        for order in range(1, max_order + 1):
            possible_matches = len(translation) - order + 1
            if possible_matches > 0:
                possible_matches_by_order[order - 1] += possible_matches
    precisions = [0] * max_order
    for i in range(0, max_order):
        if smooth and i >= 1:
            precisions[i] = (matches_by_order[i] + 1.0) / (possible_matches_by_order[i] + 1.0)
        elif possible_matches_by_order[i] > 0:
            precisions[i] = float(matches_by_order[i]) / possible_matches_by_order[i]
        else:
            precisions[i] = 0.0
    if min(precisions) > 0:
        p_log_sum = sum((1.0 / max_order * math.log(p) for p in precisions))
        geo_mean = math.exp(p_log_sum)
    else:
        geo_mean = 0
    ratio = float(translation_length) / reference_length
    if ratio > 1.0:
        bp = 1.0
    else:
        bp = math.exp(1 - 1.0 / (ratio + 1e-12))
    bleu = geo_mean * bp
    if not smooth:
        return (bleu, precisions, bp, ratio, translation_length, reference_length)
    else:
        return (bleu, geo_mean)

# Setup test data
reference_corpus = [
    [['the', 'cat', 'is', 'on', 'the', 'mat'], ['a', 'cat', 'on', 'the', 'mat']],
    [['hello', 'world'], ['hi', 'world']]
]

translation_corpus = [
    ['the', 'cat', 'is', 'on', 'the', 'mat'],
    ['hello', 'world']
]

ARGS = {
    'reference_corpus': reference_corpus,
    'translation_corpus': translation_corpus,
    'max_order': 4,
    'smooth': False
}
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
compute_rouge_L Ran
ran on a synthesized input
ZhangShiyue/QGforQA/LIB/EVAL/rouge.py
code served (permissive licence) · get_code("30f594e125b54470")
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.

# Setup code for compute_rouge_L function

# The function expects:
# - pred: list of str (tokenized prediction)
# - refs: list of str (list of tokenized reference strings)
# - beta: float (optional, defaults to 1.2)

# Create tokenized strings (lists of tokens)
pred = ["the", "cat", "sat", "on", "the", "mat"]

refs = [
    ["the", "cat", "is", "on", "the", "mat"],
    ["a", "cat", "sat", "on", "mat"],
    ["the", "dog", "sat", "on", "the", "rug"]
]

beta = 1.2

ARGS = {
    "pred": pred,
    "refs": refs,
    "beta": beta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_float_feature Ran
ran; our contract draft was wrong, not the code
ZhangShiyue/QGforQA/LIB/bert/create_pretraining_data.py
code served (permissive licence) · get_code("b24b3b9c700da839")
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 Feature. 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 tensorflow as tf
import numpy as np

def create_float_feature(values):
    feature = tf.train.Feature(float_list=tf.train.FloatList(value=list(values)))
    return feature

# The function takes 'values' parameter and converts it to a list, then creates a FloatList
# We need to provide an iterable of numeric values

values = [1.0, 2.5, 3.7, 4.2]

ARGS = {
    "values": values
}
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 Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_int_feature Ran
ran; our contract draft was wrong, not the code
ZhangShiyue/QGforQA/LIB/bert/create_pretraining_data.py
code served (permissive licence) · get_code("dd3ef48a15aec0cd")
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 Feature. 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 tensorflow as tf

# The function create_int_feature takes 'values' as a parameter
# It converts values to a list and passes it to tf.train.Int64List
# So values should be an iterable of integers

ARGS = {
    "values": [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
diverse_bleu Ran
ran on a synthesized input
ZhangShiyue/QGforQA/LIB/EVAL/bleu.py
code served (permissive licence) · get_code("51e2ecf02135f000")
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 math
from collections import Counter

# The function diverse_bleu takes 'answers' as its only parameter
# Looking at the function body:
# - answers is used with len() to get m
# - answers is indexed with answers[i] and answers[j]
# - each answer is a tuple where answer[1] is accessed and .lower().split() is called on it
# So each element is a tuple-like object where index 1 contains a string

# Create sample answers - list of tuples where second element is a string
answers = [
    ("id1", "The quick brown fox jumps over the lazy dog"),
    ("id2", "A fast brown fox jumps over a lazy dog"),
    ("id3", "The fast brown fox leaps over the lazy dog"),
]

ARGS = {
    "answers": answers,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
exact_match_score Ran
ran, violated the contract we drafted
ZhangShiyue/QGforQA/LIB/EVAL/evaluate.py
code served (permissive licence) · get_code("f6c275d6a18330a9")
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 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 string
import re

def normalize_answer(s):
    """Lower text and remove punctuation, articles and extra whitespace."""

    def remove_articles(text):
        return re.sub('\\b(a|an|the)\\b', ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation)
        return ''.join((ch for ch in text if ch not in exclude))

    def lower(text):
        return text.lower()
    return white_space_fix(remove_articles(remove_punc(lower(s))))

def exact_match_score(prediction, ground_truth):
    return normalize_answer(prediction) == normalize_answer(ground_truth)

ARGS = {
    "prediction": "The quick brown fox jumps over the lazy dog.",
    "ground_truth": "the quick brown fox jumps over the lazy dog"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
f1_score Ran
ran, honoured the contract we drafted
ZhangShiyue/QGforQA/LIB/EVAL/evaluate.py
code served (permissive licence) · get_code("2112c433b9c6d343")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

ARGS = {
    "prediction": "The quick brown fox jumps over the lazy dog.",
    "ground_truth": "A quick brown fox jumped over a lazy dog"
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gelu Ran
ran, honoured the contract we drafted
ZhangShiyue/QGforQA/LIB/bert/modeling.py
code served (permissive licence) · get_code("d08f324f950148de")
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 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 numpy as np
import tensorflow as tf

# Create a small TensorFlow tensor for testing
x = tf.constant([[-0.5, 0.0, 0.5, 1.0], [0.2, -0.3, 0.8, -0.1]], dtype=tf.float32)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
get_activation Ran
ran; our contract draft was wrong, not the code
ZhangShiyue/QGforQA/LIB/bert/modeling.py
code served (permissive licence) · get_code("5842ee67106321d6")
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 function. 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 numpy as np
import six
import tensorflow as tf

def gelu(x):
    """Gaussian Error Linear Unit.

  This is a smoother version of the RELU.
  Original paper: https://arxiv.org/abs/1606.08415
  Args:
    x: float Tensor to perform activation.

  Returns:
    `x` with the GELU activation applied.
  """
    cdf = 0.5 * (1.0 + tf.tanh(np.sqrt(2 / np.pi) * (x + 0.044715 * tf.pow(x, 3))))
    return x * cdf

def get_activation(activation_string):
    """Maps a string to a Python function, e.g., "relu" => `tf.nn.relu`.

  Args:
    activation_string: String name of the activation function.

  Returns:
    A Python function corresponding to the activation function. If
    `activation_string` is None, empty, or "linear", this will return None.
    If `activation_string` is not a string, it will return `activation_string`.

  Raises:
    ValueError: The `activation_string` does not correspond to a known
      activation.
  """
    if not isinstance(activation_string, six.string_types):
        return activation_string
    if not activation_string:
        return None
    act = activation_string.lower()
    if act == 'linear':
        return None
    elif act == 'relu':
        return tf.nn.relu
    elif act == 'gelu':
        return gelu
    elif act == 'tanh':
        return tf.tanh
    else:
        raise ValueError('Unsupported activation: %s' % act)


ARGS = {
    'activation_string': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
glu Ran
ran, honoured the contract we drafted
ZhangShiyue/QGforQA/LIB/layers.py
code served (permissive licence) · get_code("f9afe5c09ca7b577")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

# Create a small tensor with shape (batch=2, features=8)
# The function splits along the last axis into 2 parts of size 4 each
x = tf.constant(np.random.randn(2, 8).astype(np.float32))

ARGS = {
    "x": x
}
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 SymbolicTensor — a SymbolicTensor 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
input_fn_builder Ran
ran on a synthesized input
ZhangShiyue/QGforQA/LIB/bert/extract_features.py
code served (permissive licence) · get_code("47a3c792cebb6603")
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 function. 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 tensorflow as tf

class Feature:
    def __init__(self, unique_id, input_ids, input_mask, input_type_ids):
        self.unique_id = unique_id
        self.input_ids = input_ids
        self.input_mask = input_mask
        self.input_type_ids = input_type_ids

seq_length = 4
num_examples = 2

features = [
    Feature(
        unique_id=0,
        input_ids=[101, 2054, 2003, 102],
        input_mask=[1, 1, 1, 1],
        input_type_ids=[0, 0, 0, 0]
    ),
    Feature(
        unique_id=1,
        input_ids=[101, 1045, 2572, 102],
        input_mask=[1, 1, 1, 1],
        input_type_ids=[0, 0, 0, 0]
    )
]

ARGS = {
    'features': features,
    'seq_length': seq_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
my_lcs Ran
ran, honoured the contract we drafted
ZhangShiyue/QGforQA/LIB/EVAL/rouge.py
code served (permissive licence) · get_code("16b3541623c0f60b")
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

# Construct setup for my_lcs function
# The function takes two lists of strings (tokens) and computes longest common subsequence

# Example 1: Basic tokenized strings
string_tokens = ["the", "quick", "brown", "fox", "jumps"]
sub_tokens = ["quick", "fox"]

ARGS = {
    "string": string_tokens,
    "sub": sub_tokens,
}
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
normalize_answer Ran
ran; our contract draft was wrong, not the code
ZhangShiyue/QGforQA/LIB/EVAL/evaluate.py
code served (permissive licence) · get_code("c6a80c065d2e4851")
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 string
import re

def normalize_answer(s):
    """Lower text and remove punctuation, articles and extra whitespace."""

    def remove_articles(text):
        return re.sub('\\b(a|an|the)\\b', ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation)
        return ''.join((ch for ch in text if ch not in exclude))

    def lower(text):
        return text.lower()
    return white_space_fix(remove_articles(remove_punc(lower(s))))


ARGS = {
    "s": "The Quick Brown Fox, jumps over the lazy dog!"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
file_based_input_fn_builder Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/bert/run_classifier.py
code served (permissive licence) · get_code("1b46c9ce24fc6db3")
How it ran

no invocation recorded.

get_assignment_map_from_checkpoint Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/bert/modeling.py
pointer only (licence: MIT); the stored copy get_code serves, from toggle1995/RIS-DMMI, is pointer only (licence: NONE) · get_code("50958618b65e514e")
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 toggle1995/RIS-DMMI, 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. No invocation recorded.

get_batch_dataset Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/utils.py
code served (permissive licence) · get_code("a92cc5798a065cd8")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/utils.py
code served (permissive licence) · get_code("d542375d94644b96")
How it ran

no invocation recorded.

layer_norm_compute_python Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/layers.py
code served (permissive licence) · get_code("df5f1c26bcb94d35")
How it ran

no invocation recorded.

noam_norm Not yet run
unverified (harvested, no recorded run)
ZhangShiyue/QGforQA/LIB/layers.py
code served (permissive licence) · get_code("15b2eb813c7ac34f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 14 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 8 the same month, 12 later) and 5 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
normalize_answer 133 other papers
12 dated earlier, 2 the same month, 118 later, 1 undated · 1 only as an assembly brick
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 130 more not named here
exact_match_score 56 other papers
14 dated earlier, 1 the same month, 41 later
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 53 more not named here
f1_score 41 other papers
12 dated earlier, 2 the same month, 27 later
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 38 more not named here
get_activation 32 other papers
11 dated earlier, 2 the same month, 19 later · 1 only as an assembly brick
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 29 more not named here
gelu 26 other papers
8 dated earlier, 2 the same month, 16 later · 4 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 23 more not named here
get_assignment_map_from_checkpoint 26 other papers
11 dated earlier, 1 the same month, 14 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1808.09781 (2018-08)
Self-Attentive Sequential Recommendation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 23 more not named here
create_int_feature 13 other papers
3 dated earlier, 1 the same month, 9 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.05474 (2019-06)
Transfer Learning in Biomedical Natural Language Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 10 more not named here
create_float_feature 9 other papers
2 dated earlier, 1 the same month, 6 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
and 6 more not named here
file_based_input_fn_builder 7 other papers
4 dated earlier, 3 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1905.09217 (2019-05)
Deeper Text Understanding for IR with Contextual Neural Language Modeling
1906.09317 (2019-06)
Identification of Tasks, Datasets, Evaluation Metrics, and Numeric Scores for Scientific Leaderboards Construction
and 4 more not named here
input_fn_builder 6 other papers
2 dated earlier, 4 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
1910.04732 (2019-10)
Structured Pruning of Large Language Models
and 3 more not named here
glu 2 other papers
2 dated earlier
1508.06615 (2015-08)
Character-Aware Neural Language Models
1603.01547 (2016-03)
Text Understanding with the Attention Sum Reader Network
layer_norm_compute_python 2 other papers
1 dated earlier, 1 later
1508.06615 (2015-08)
Character-Aware Neural Language Models
2005.04732 (2020-05)
Towards Robustifying NLI Models Against Lexical Dataset Biases
noam_norm 2 other papers
2 dated earlier
1508.06615 (2015-08)
Character-Aware Neural Language Models
1603.01547 (2016-03)
Text Understanding with the Attention Sum Reader Network
my_lcs 1 other paper
1 later
2203.09313 (2022-03)
EVA2.0: Investigating Open-Domain Chinese Dialogue Systems with Large-Scale Pre-Training

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

Text-based Question Generation (QG) aims at generating natural and relevant questions that can be answered by a given answer in some context. Existing QG models suffer from a "semantic drift" problem, i.e., the semantics of the model-generated question drifts away from the given context and answer. In this paper, we first propose two semantics-enhanced rewards obtained from downstream question paraphrasing and question answering tasks to regularize the QG model to generate semantically valid questions. Second, since the traditional evaluation metrics (e.g., BLEU) often fall short in evaluating the quality of generated questions, we propose a QA-based evaluation method which measures the QG model's ability to mimic human annotators in generating QA training data. Experiments show that our method achieves the new state-of-the-art performance w.r.t. traditional metrics, and also performs best on our QA-based evaluation metrics. Further, we investigate how to use our QG model to augment QA datasets and enable semi-supervised QA. We propose two ways to generate synthetic QA pairs: generate new questions from existing articles or collect QA pairs from new articles. We also propose two empirically effective strategies, a data filter and mixing mini-batch training, to properly use the QG-generated data for QA. Experiments show that our method improves over both BiDAF and BERT QA baselines, even without introducing new articles.

For agents

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

get_harvested_code_for_paper("1909.06356")
get_code_for_paper("1909.06356")
have("1909.06356")

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

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

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

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

Connect an agent — have() is free.