SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.05492 · 2018

Did the Model Understand the Question?

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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 9 have no contract verdict; 0 failures of our instrument; 1 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/1805.05492.json · badge: /api/ran/1805.05492.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
pramodkaushik/np_analysis community (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
FunctionStatusWhere it lives
LSTMCell Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/nn_utils.py
code served (permissive licence) · get_code("77535dcfef8b0dbc")
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 3, 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 tensorflow as tf
import numpy as np

tf.random.set_seed(0)

# Set up small tensor dimensions
batch_size = 2
input_dim = 4
hidden_dim = 3

# Create input tensor x: shape (batch_size, input_dim)
x = tf.constant(np.random.randn(batch_size, input_dim), dtype=tf.float32)

# Create previous hidden state mprev: shape (batch_size, hidden_dim)
mprev = tf.constant(np.random.randn(batch_size, hidden_dim), dtype=tf.float32)

# Create previous cell state cprev: shape (batch_size, hidden_dim)
cprev = tf.constant(np.random.randn(batch_size, hidden_dim), dtype=tf.float32)

# Create a key string for parameter lookup
key = "lstm"

# Create params dictionary with all required weight matrices and biases
# The function expects params[key + '_ix'], params[key + '_im'], etc.
params = {
    key + '_ix': tf.Variable(np.random.randn(input_dim, hidden_dim).astype(np.float32)),
    key + '_im': tf.Variable(np.random.randn(hidden_dim, hidden_dim).astype(np.float32)),
    key + '_i': tf.Variable(np.random.randn(hidden_dim).astype(np.float32)),
    
    key + '_fx': tf.Variable(np.random.randn(input_dim, hidden_dim).astype(np.float32)),
    key + '_fm': tf.Variable(np.random.randn(hidden_dim, hidden_dim).astype(np.float32)),
    key + '_f': tf.Variable(np.random.randn(hidden_dim).astype(np.float32)),
    
    key + '_cx': tf.Variable(np.random.randn(input_dim, hidden_dim).astype(np.float32)),
    key + '_cm': tf.Variable(np.random.randn(hidden_dim, hidden_dim).astype(np.float32)),
    key + '_c': tf.Variable(np.random.randn(hidden_dim).astype(np.float32)),
    
    key + '_ox': tf.Variable(np.random.randn(input_dim, hidden_dim).astype(np.float32)),
    key + '_om': tf.Variable(np.random.randn(hidden_dim, hidden_dim).astype(np.float32)),
    key + '_o': tf.Variable(np.random.randn(hidden_dim).astype(np.float32)),
}

ARGS = {
    'x': x,
    'mprev': mprev,
    'cprev': cprev,
    'key': key,
    'params': params,
}
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 tuple, ndim 3, 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
apply_dropout Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/nn_utils.py
code served (permissive licence) · get_code("ad5bb040fe1f5334")
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 small tensor for testing
x = tf.constant(np.random.randn(2, 4).astype(np.float32))

# Define dropout rate
dropout_rate = 0.5

# Define mode
mode = 'train'

# Construct ARGS dictionary with all parameters
ARGS = {
    'x': x,
    'dropout_rate': dropout_rate,
    'mode': mode
}
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
convert_to_int_2d_and_pad Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/data_utils.py
code served (permissive licence) · get_code("bc1a05fa2d44edab")
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 torch
import numpy as np

class MockFlags:
    def __init__(self):
        self.max_entry_length = 5

class MockUtility:
    def __init__(self):
        self.FLAGS = MockFlags()
        self.unk_token = "<unk>"
        self.dummy_token = "<pad>"
        self.word_ids = {
            "hello": 1,
            "world": 2,
            "foo": 3,
            "bar": 4,
            "<unk>": 0,
            "<pad>": 5,
        }

utility = MockUtility()

a = [
    ["hello", "world", "foo"],
    ["bar", "hello", "world", "foo", "bar", "extra"]
]

ARGS = {
    "a": a,
    "utility": utility,
}
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 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
correct_unicode Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/wiki_data.py
code served (permissive licence) · get_code("58b53508826d68cb")
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 re
import unicodedata as ud

def strip_accents(s):
    u = s.format('utf-8')
    u_new = ''.join((c for c in ud.normalize('NFKD', u) if ud.category(c) != 'Mn'))
    return u_new.encode('utf-8')

def correct_unicode(string):
    string = strip_accents(string)
    string = str(string, 'utf-8')
    string = re.sub('\\xc2\\xa0', ' ', string).strip()
    string = re.sub('\\xe2\\x80\\x93', '-', string).strip()
    string = re.sub('‚', ',', string)
    string = re.sub('…', '...', string)
    string = re.sub('ˆ', '^', string)
    string = re.sub('˜', '~', string)
    string = re.sub('‹', '<', string)
    string = re.sub('›', '>', string)
    string = re.sub('[\\u2E00-\\uFFFF]', '', string)
    string = re.sub('\\s+', ' ', string).strip()
    return string

ARGS = {
    'string': 'Hello World with accénts and spëcial chârs'
}
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_embedding Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/nn_utils.py
code served (permissive licence) · get_code("6955954c1e19d195")
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 (3, 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 small word embedding matrix
# vocab_size=5, embedding_dim=4
word_embedding_matrix = tf.constant(
    np.random.randn(5, 4).astype(np.float32),
    dtype=tf.float32
)

# Create word indices to look up
word_indices = tf.constant([0, 2, 1], dtype=tf.int32)

# Create utility (unused in function body, but required parameter)
utility = None

# Create params dict with 'word' key containing the embedding matrix
params = {
    'word': word_embedding_matrix
}

ARGS = {
    'word': word_indices,
    'utility': utility,
    'params': params
}
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 (3, 4) — shape (3, 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
is_nan_or_inf Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/wiki_data.py
code served (permissive licence) · get_code("30c358b2ca0a8aea")
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 math

def is_nan_or_inf(number):
    return math.isnan(number) or math.isinf(number)

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

torch.manual_seed(0)

# The function return_index(a) iterates through a list/array-like object,
# checks if each element equals 1.0, and returns the index when found.
# We need to provide an argument 'a' that supports len() and indexing with [i],
# and contains at least one element equal to 1.0

a = [0.5, 1.0, 0.3, 0.8]

ARGS = {
    "a": a
}
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 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
strip_accents Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/wiki_data.py
code served (permissive licence) · get_code("8378d8e8e76a6e45")
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 bytes. 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 unicodedata as ud

# The function strip_accents takes a single parameter 's' which should be a string
# Looking at the function body:
# - s.format('utf-8') is called, which means s should be a string
# - ud.normalize('NFKD', u) is called on the result
# - ud.category(c) is called on characters
# - The result is encoded to 'utf-8'

# Note: There's a bug in the original function - s.format('utf-8') doesn't make sense
# for a plain string, but we'll construct valid input anyway

ARGS = {
    's': 'café'
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
word_lookup Ran
ran on a synthesized input
pramodkaushik/np_analysis/neural_programmer/data_utils.py
code served (permissive licence) · get_code("a40d31c6f62a9b43")
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 torch

class UtilityStandIn:
    def __init__(self):
        self.word_ids = {"hello", "world", "python"}
        self.unk_token = "<UNK>"

utility = UtilityStandIn()
word = "hello"

ARGS = {
    "word": word,
    "utility": utility
}
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 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
restore_model Not yet run
unverified (harvested, no recorded run)
pramodkaushik/np_analysis/neural_programmer/notebook_utils.py
code served (permissive licence) · get_code("f74d08d012c8804a")
How it ran

no invocation recorded.

Also present in other papers' code

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

We analyze state-of-the-art deep learning models for three tasks: question answering on (1) images, (2) tables, and (3) passages of text. Using the notion of \emph{attribution} (word importance), we find that these deep networks often ignore important question terms. Leveraging such behavior, we perturb questions to craft a variety of adversarial examples. Our strongest attacks drop the accuracy of a visual question answering model from $61.1\%$ to $19\%$, and that of a tabular question answering model from $33.5\%$ to $3.3\%$. Additionally, we show how attributions can strengthen attacks proposed by Jia and Liang (2017) on paragraph comprehension models. Our results demonstrate that attributions can augment standard measures of accuracy and empower investigation of model performance. When a model is accurate but for the wrong reasons, attributions can surface erroneous logic in the model that indicates inadequacies in the test data.

For agents

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

get_harvested_code_for_paper("1805.05492")
get_code_for_paper("1805.05492")
have("1805.05492")

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

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

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

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

Connect an agent — have() is free.