{"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-attentive-memory-networks-for","title":"Bidirectional Attentive Memory Networks for Question Answering over Knowledge Bases","arxiv_id":"1903.02188","date":"2019-03-06","proceeding":"NAACL 2019 6","authors":["Yu Chen","Lingfei Wu","Mohammed J. Zaki"],"abstract":"When answering natural language questions over knowledge bases (KBs), different question components and KB aspects play different roles. However, most existing embedding-based methods for knowledge base question answering (KBQA) ignore the subtle inter-relationships between the question and the KB (e.g., entity types, relation paths and context). In this work, we propose to directly model the two-way flow of interactions between the questions and the KB via a novel Bidirectional Attentive Memory Network, called BAMnet. Requiring no external resources and only very few hand-crafted features, on the WebQuestions benchmark, our method significantly outperforms existing information-retrieval based methods, and remains competitive with (hand-crafted) semantic parsing based methods. Also, since we use attention mechanisms, our method offers better interpretability compared to other baselines.","url_abs":"https://arxiv.org/abs/1903.02188v3","url_pdf":"https://arxiv.org/pdf/1903.02188v3.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-attentive-memory-networks-for","repo_url":"https://github.com/hugochan/BAMnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"bidirectional-attentive-memory-networks-for","repo_url":"https://github.com/hugochan/PFoodReq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"information-retrieval","task_name":"Information Retrieval"},{"task_slug":"knowledge-base-question-answering","task_name":"Knowledge Base Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"semantic-parsing","task_name":"Semantic Parsing"}],"methods":[{"method_slug":"interpretability","method_name":"Interpretability"},{"method_slug":"memory-network","method_name":"Memory Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1903.02188","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1903.02188"}},"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/hugochan/PFoodReq","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hugochan/BAMnet","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":11},"by_repo_kind":{"official":{"samples":3,"ran":0,"repositories":1},"listed":{"samples":8,"ran":0,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"5724b23174c5ed85","entry":"create_mask","repo":"hugochan/BAMnet","repo_kind":"official","path":"src/core/bamnet/modules.py","file_url":"https://github.com/hugochan/BAMnet/blob/HEAD/src/core/bamnet/modules.py","link_basis":"first_harvest_node","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":"5724b23174c5ed85"}},{"code_sha256_prefix":"e5bbaef1e96051cb","entry":"expand_personalized_query","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/generate_all_qa.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/generate_all_qa.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":"e5bbaef1e96051cb"}},{"code_sha256_prefix":"7b91003a8f6ce910","entry":"expand_query_with_guidelines","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/generate_all_qa.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/generate_all_qa.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":"7b91003a8f6ce910"}},{"code_sha256_prefix":"798984742b8f27da","entry":"generate_personal_preferences","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/generate_all_qa.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/generate_all_qa.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":"798984742b8f27da"}},{"code_sha256_prefix":"785387dacb6461ef","entry":"get_text_overlap","repo":"hugochan/BAMnet","repo_kind":"official","path":"src/core/bamnet/bamnet.py","file_url":"https://github.com/hugochan/BAMnet/blob/HEAD/src/core/bamnet/bamnet.py","link_basis":"first_harvest_node","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":"785387dacb6461ef"}},{"code_sha256_prefix":"e26cf1b4355fc107","entry":"load_json","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/utils/io_utils.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/utils/io_utils.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":"e26cf1b4355fc107"}},{"code_sha256_prefix":"e666a0b5fcf7e4e1","entry":"load_ndjson","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/utils/io_utils.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/utils/io_utils.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":"e666a0b5fcf7e4e1"}},{"code_sha256_prefix":"4462c267d24c10ba","entry":"load_ndjson_to_array","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"data_builder/src/utils/io_utils.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/data_builder/src/utils/io_utils.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":"4462c267d24c10ba"}},{"code_sha256_prefix":"aebe3994bd79e09a","entry":"prepare_similar_ground_truth_answers","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"BAMnet/src/run_online.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/BAMnet/src/run_online.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":"aebe3994bd79e09a"}},{"code_sha256_prefix":"58012762e2fad6b4","entry":"string_search","repo":"hugochan/PFoodReq","repo_kind":"listed","path":"BAMnet/src/core/bamnet/bamnet.py","file_url":"https://github.com/hugochan/PFoodReq/blob/HEAD/BAMnet/src/core/bamnet/bamnet.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":"58012762e2fad6b4"}},{"code_sha256_prefix":"f9709cf808e3e49a","entry":"to_cuda","repo":"hugochan/BAMnet","repo_kind":"official","path":"src/core/bamnet/utils.py","file_url":"https://github.com/hugochan/BAMnet/blob/HEAD/src/core/bamnet/utils.py","link_basis":"first_harvest_node","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":"f9709cf808e3e49a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}