SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1611.01603 · 2016

Bidirectional Attention Flow for Machine Comprehension

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 1 honoured the contract we drafted, 2 violated it and 1 has no contract verdict; 5 failures of our instrument; 2 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/1611.01603.json · badge: /api/ran/1611.01603.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
allenai/bi-att-flow canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
ghus75/Question_Answering community (classifier label)
classifier basis: plan_row
3 ran · 0 no recorded run
tikyau/bidaf-quick-test extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
lmn-extracts/dcn_plus extension (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
shmsw25/qa-transfer extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
data_from_json Ran
ran; our contract draft was wrong, not the code
lmn-extracts/dcn_plus/question_answering/preprocessing/squad_preprocess.py
pointer only (licence: NONE) · get_code("40b9eb36720710bb")
How it ran

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

exact_match_score Ran
ran, violated the contract we drafted
ghus75/Question_Answering/code/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
allenai/bi-att-flow/squad/evaluate-v1.1.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
gb Ran
ran; our contract draft was wrong, not the code
tikyau/bidaf-quick-test/analyze.py
pointer only (licence: NONE) · get_code("27e4ebf8000ce768")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tikyau/bidaf-quick-test 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.

get_word2vec Ran
ran; our contract draft was wrong, not the code
shmsw25/qa-transfer/squad/prepro.py
pointer only (licence: NONE) · get_code("a7dd8bca3454ecd5")
How it ran

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

mask_answer Ran
ran; our contract draft was wrong, not the code
tikyau/bidaf-quick-test/zeroshot/zeroshot2squad.py
pointer only (licence: NONE) · get_code("5b15515dc2386cc7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tikyau/bidaf-quick-test 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.

masked_softmax Ran
ran on a synthesized input
ghus75/Question_Answering/code/modules.py
code served (permissive licence) · get_code("591485e987c9ea09")
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 numpy as np
import tensorflow as tf

# Create small numpy arrays for testing
np.random.seed(0)
tf.random.set_seed(0)

# logits: shape (2, 4) - batch size 2, 4 classes
logits = np.random.randn(2, 4).astype('float32')

# mask: same shape as logits, with 1s for real data and 0s for padding
# Let's mask out the last element of the first batch
mask = np.ones((2, 4), dtype='float32')
mask[0, 3] = 0  # padding in first batch

# dim: dimension over which to take softmax (1 = over classes)
dim = 1

ARGS = {
    "logits": logits,
    "mask": mask,
    "dim": dim
}
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
normalize_answer Ran
ran; our contract draft was wrong, not the code
ghus75/Question_Answering/code/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
parse_no_answers Ran
ran, violated the contract we drafted
tikyau/bidaf-quick-test/analyze.py
pointer only (licence: NONE) · get_code("d8ae123b2848fad9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tikyau/bidaf-quick-test 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.

maybe_download Not yet run
unverified (harvested, no recorded run)
lmn-extracts/dcn_plus/question_answering/preprocessing/squad_preprocess.py
pointer only (licence: NONE) · get_code("4839200676aaf471")
How it ran

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

reporthook Not yet run
unverified (harvested, no recorded run)
lmn-extracts/dcn_plus/question_answering/preprocessing/squad_preprocess.py
pointer only (licence: NONE) · get_code("9724d0da37841e48")
How it ran

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

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 5 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
normalize_answer 133 other papers
3 dated earlier, 129 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
3 dated earlier, 53 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
3 dated earlier, 38 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
reporthook 5 other papers
1 dated earlier, 4 later · 1 only as an assembly brick
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
2107.12309 (2021-07)
Spatial-Temporal Transformer for Dynamic Scene Graph Generation
and 2 more not named here
data_from_json 1 other paper
1 dated earlier
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
get_word2vec 1 other paper
1 later
1702.02171 (2017-02)
Question Answering through Transfer Learning from Large Fine-grained Supervision Data
maybe_download 1 other paper
1 dated earlier
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text

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

Machine comprehension (MC), answering a query about a given context paragraph, requires modeling complex interactions between the context and the query. Recently, attention mechanisms have been successfully extended to MC. Typically these methods use attention to focus on a small portion of the context and summarize it with a fixed-size vector, couple attentions temporally, and/or often form a uni-directional attention. In this paper we introduce the Bi-Directional Attention Flow (BIDAF) network, a multi-stage hierarchical process that represents the context at different levels of granularity and uses bi-directional attention flow mechanism to obtain a query-aware context representation without early summarization. Our experimental evaluations show that our model achieves the state-of-the-art results in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze test.

For agents

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

get_harvested_code_for_paper("1611.01603")
get_code_for_paper("1611.01603")
have("1611.01603")

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

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

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

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

Connect an agent — have() is free.