{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/bidirectional-attention-flow-for-machine","title":"Bidirectional Attention Flow for Machine Comprehension","arxiv_id":"1611.01603","date":"2016-11-05","proceeding":null,"authors":["Minjoon Seo","Aniruddha Kembhavi","Ali Farhadi","Hannaneh Hajishirzi"],"abstract":"Machine comprehension (MC), answering a query about a given context\nparagraph, requires modeling complex interactions between the context and the\nquery. Recently, attention mechanisms have been successfully extended to MC.\nTypically these methods use attention to focus on a small portion of the\ncontext and summarize it with a fixed-size vector, couple attentions\ntemporally, and/or often form a uni-directional attention. In this paper we\nintroduce the Bi-Directional Attention Flow (BIDAF) network, a multi-stage\nhierarchical process that represents the context at different levels of\ngranularity and uses bi-directional attention flow mechanism to obtain a\nquery-aware context representation without early summarization. Our\nexperimental evaluations show that our model achieves the state-of-the-art\nresults in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze\ntest.","url_abs":"http://arxiv.org/abs/1611.01603v6","url_pdf":"http://arxiv.org/pdf/1611.01603v6.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/allenai/bi-att-flow","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/Deepak-Work/Passage_Retrieval","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/ElizaLo/Question-Answering-based-on-SQuAD","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/GauthierDmn/question_answering","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/Shravsridhar/NLP-Question-Answer-Model","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/Shravsridhar/QA-Model-INFO-7374","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/WarruzuEndo/BiDAF_mindspore","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mindspore","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/baidu/DuReader","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/davidgolub/QuestionGeneration","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/distractor-generation/dg_survey","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/dsouzadaniel/BiDAF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/galsang/BiDAF-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/ghus75/Question_Answering","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/kokikwbt/deepsect","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/lmn-extracts/dcn_plus","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/minstar/BIDAF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/rajatgermany/qa-nlp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/shmsw25/qa-transfer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/surekhamedapati/NLPA_NEO","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/suryaiyer/squad-bidaf","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/techit-limtiyakul/bidirectional-attention-flow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/tikyau/bidaf-quick-test","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/white127/squad-2.0-bidaf","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/xiaobaicxy/Bidaf_SQuAD_MC_Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/yugrocks/Question-Answering-with-BIDAF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/Wadaboa/squad-question-answering","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"bidirectional-attention-flow-for-machine","repo_url":"https://github.com/allenai/allennlp-reading-comprehension","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"cloze-test","task_name":"Cloze Test"},{"task_slug":"navigate","task_name":"Navigate"},{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"reading-comprehension","task_name":"Reading Comprehension"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/open-domain-question-answering-on-quasar","task":"Open-Domain Question Answering","dataset":"Quasar","model":"BiDAF","rank_in_archive_order":6,"of":6,"metrics":{"EM (Quasar-T)":"25.9","F1 (Quasar-T)":"28.5"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-cnn-daily-mail","task":"Question Answering","dataset":"CNN / Daily Mail","model":"BiDAF","rank_in_archive_order":4,"of":16,"metrics":{"CNN":"76.9","Daily Mail":"79.6"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-ms-marco","task":"Question Answering","dataset":"MS MARCO","model":"BiDaF Baseline","rank_in_archive_order":4,"of":4,"metrics":{"BLEU-1":"10.64","Rouge-L":"23.96"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-narrativeqa","task":"Question Answering","dataset":"NarrativeQA","model":"BiDAF","rank_in_archive_order":8,"of":10,"metrics":{"BLEU-1":"33.45","BLEU-4":"15.69","METEOR":"15.68","Rouge-L":"36.74"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11","task":"Question Answering","dataset":"SQuAD1.1","model":"BiDAF (ensemble)","rank_in_archive_order":134,"of":213,"metrics":{"EM":"73.744","F1":"81.525"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11","task":"Question Answering","dataset":"SQuAD1.1","model":"BiDAF (single model)","rank_in_archive_order":170,"of":213,"metrics":{"EM":"67.974","F1":"77.323"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-squad11-dev","task":"Question Answering","dataset":"SQuAD1.1 dev","model":"BIDAF (single)","rank_in_archive_order":41,"of":55,"metrics":{"EM":" 67.7","F1":"77.3"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1611.01603","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1611.01603"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shmsw25/qa-transfer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/white127/squad-2.0-bidaf","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/minstar/BIDAF","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/allenai/bi-att-flow","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yugrocks/Question-Answering-with-BIDAF","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rajatgermany/qa-nlp","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/GauthierDmn/question_answering","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WarruzuEndo/BiDAF_mindspore","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xiaobaicxy/Bidaf_SQuAD_MC_Pytorch","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/surekhamedapati/NLPA_NEO","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/techit-limtiyakul/bidirectional-attention-flow","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/galsang/BiDAF-pytorch","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/baidu/DuReader","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/davidgolub/QuestionGeneration","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/suryaiyer/squad-bidaf","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Deepak-Work/Passage_Retrieval","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Shravsridhar/NLP-Question-Answer-Model","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kokikwbt/deepsect","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/allenai/allennlp-reading-comprehension","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Wadaboa/squad-question-answering","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lmn-extracts/dcn_plus","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tikyau/bidaf-quick-test","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Shravsridhar/QA-Model-INFO-7374","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dsouzadaniel/BiDAF","reach":{"status":"ok","spdx":"GPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/distractor-generation/dg_survey","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":5,"ran_violates":2,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":10,"ran":7,"repositories":4}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":7,"samples":[{"code_sha256_prefix":"40b9eb36720710bb","entry":"data_from_json","repo":"lmn-extracts/dcn_plus","repo_kind":"listed","path":"question_answering/preprocessing/squad_preprocess.py","file_url":"https://github.com/lmn-extracts/dcn_plus/blob/HEAD/question_answering/preprocessing/squad_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40b9eb36720710bb"}},{"code_sha256_prefix":"f6c275d6a18330a9","entry":"exact_match_score","repo":"ghus75/Question_Answering","repo_kind":"listed","path":"code/evaluate.py","file_url":"https://github.com/ghus75/Question_Answering/blob/HEAD/code/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c275d6a18330a9"}},{"code_sha256_prefix":"2112c433b9c6d343","entry":"f1_score","repo":"allenai/bi-att-flow","repo_kind":"official","path":"squad/evaluate-v1.1.py","file_url":"https://github.com/allenai/bi-att-flow/blob/HEAD/squad/evaluate-v1.1.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2112c433b9c6d343"}},{"code_sha256_prefix":"27e4ebf8000ce768","entry":"gb","repo":"tikyau/bidaf-quick-test","repo_kind":"listed","path":"analyze.py","file_url":"https://github.com/tikyau/bidaf-quick-test/blob/HEAD/analyze.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"27e4ebf8000ce768"}},{"code_sha256_prefix":"a7dd8bca3454ecd5","entry":"get_word2vec","repo":"shmsw25/qa-transfer","repo_kind":"listed","path":"squad/prepro.py","file_url":"https://github.com/shmsw25/qa-transfer/blob/HEAD/squad/prepro.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a7dd8bca3454ecd5"}},{"code_sha256_prefix":"5b15515dc2386cc7","entry":"mask_answer","repo":"tikyau/bidaf-quick-test","repo_kind":"listed","path":"zeroshot/zeroshot2squad.py","file_url":"https://github.com/tikyau/bidaf-quick-test/blob/HEAD/zeroshot/zeroshot2squad.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b15515dc2386cc7"}},{"code_sha256_prefix":"c6a80c065d2e4851","entry":"normalize_answer","repo":"ghus75/Question_Answering","repo_kind":"listed","path":"code/evaluate.py","file_url":"https://github.com/ghus75/Question_Answering/blob/HEAD/code/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c6a80c065d2e4851"}},{"code_sha256_prefix":"d8ae123b2848fad9","entry":"parse_no_answers","repo":"tikyau/bidaf-quick-test","repo_kind":"listed","path":"analyze.py","file_url":"https://github.com/tikyau/bidaf-quick-test/blob/HEAD/analyze.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8ae123b2848fad9"}},{"code_sha256_prefix":"591485e987c9ea09","entry":"masked_softmax","repo":"ghus75/Question_Answering","repo_kind":"listed","path":"code/modules.py","file_url":"https://github.com/ghus75/Question_Answering/blob/HEAD/code/modules.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"591485e987c9ea09"}},{"code_sha256_prefix":"4839200676aaf471","entry":"maybe_download","repo":"lmn-extracts/dcn_plus","repo_kind":"listed","path":"question_answering/preprocessing/squad_preprocess.py","file_url":"https://github.com/lmn-extracts/dcn_plus/blob/HEAD/question_answering/preprocessing/squad_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4839200676aaf471"}},{"code_sha256_prefix":"9724d0da37841e48","entry":"reporthook","repo":"lmn-extracts/dcn_plus","repo_kind":"listed","path":"question_answering/preprocessing/squad_preprocess.py","file_url":"https://github.com/lmn-extracts/dcn_plus/blob/HEAD/question_answering/preprocessing/squad_preprocess.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9724d0da37841e48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}