{"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/entailment-tree-explanations-via-iterative","title":"Entailment Tree Explanations via Iterative Retrieval-Generation Reasoner","arxiv_id":"2205.09224","date":"2022-05-18","proceeding":"Findings (NAACL) 2022 7","authors":["Danilo Ribeiro","Shen Wang","Xiaofei Ma","Rui Dong","Xiaokai Wei","Henry Zhu","Xinchi Chen","Zhiheng Huang","Peng Xu","Andrew Arnold","Dan Roth"],"abstract":"Large language models have achieved high performance on various question answering (QA) benchmarks, but the explainability of their output remains elusive. Structured explanations, called entailment trees, were recently suggested as a way to explain and inspect a QA system's answer. In order to better generate such entailment trees, we propose an architecture called Iterative Retrieval-Generation Reasoner (IRGR). Our model is able to explain a given hypothesis by systematically generating a step-by-step explanation from textual premises. The IRGR model iteratively searches for suitable premises, constructing a single entailment step at a time. Contrary to previous approaches, our method combines generation steps and retrieval of premises, allowing the model to leverage intermediate conclusions, and mitigating the input size limit of baseline encoder-decoder models. We conduct experiments using the EntailmentBank dataset, where we outperform existing benchmarks on premise retrieval and entailment tree generation, with around 300% gain in overall correctness.","url_abs":"https://arxiv.org/abs/2205.09224v2","url_pdf":"https://arxiv.org/pdf/2205.09224v2.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":"entailment-tree-explanations-via-iterative","repo_url":"https://github.com/amazon-research/irgr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2205.09224","atlas_url":"https://app.syntology.ai/?focus=2205.09224","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.09224"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/amazon-research/irgr","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":16,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":19,"ran":17,"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":"74453f96447f48f6","entry":"convert_datapoint_to_sent_to_text","repo":"amazon-research/irgr","repo_kind":"official","path":"src/retrieval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/retrieval_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"74453f96447f48f6"}},{"code_sha256_prefix":"44b66cb0347665db","entry":"count_phrase_matches","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/entail_trees_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/entail_trees_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"44b66cb0347665db"}},{"code_sha256_prefix":"42c325aaed66dd65","entry":"create_sentence_uuid_map_from_corpus","repo":"amazon-research/irgr","repo_kind":"official","path":"src/retrieval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/retrieval_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42c325aaed66dd65"}},{"code_sha256_prefix":"cf21a7d00a46e668","entry":"get_results_file_path","repo":"amazon-research/irgr","repo_kind":"official","path":"src/base_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/base_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cf21a7d00a46e668"}},{"code_sha256_prefix":"c30d329a797e15bd","entry":"load_jsonl","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/angle_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/angle_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c30d329a797e15bd"}},{"code_sha256_prefix":"51014481762b0d1b","entry":"load_slot_data_by_id","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/eval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/eval_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51014481762b0d1b"}},{"code_sha256_prefix":"970c22892bfbf76b","entry":"parse_lisp","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/proof_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/proof_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"970c22892bfbf76b"}},{"code_sha256_prefix":"af3e6075f5840574","entry":"parse_lisp_tokens","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/proof_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/proof_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af3e6075f5840574"}},{"code_sha256_prefix":"b015b685dfa43094","entry":"recursive_polish_notation","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/proof_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/proof_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b015b685dfa43094"}},{"code_sha256_prefix":"d2166ef001a9e416","entry":"replace_punctuation","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/eval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/eval_utils.py","link_basis":"harvester_set","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":"d2166ef001a9e416"}},{"code_sha256_prefix":"00139853f0c3a89e","entry":"score_string_similarity","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/eval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/eval_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00139853f0c3a89e"}},{"code_sha256_prefix":"68ef7c2586529325","entry":"sent_text_as_counter","repo":"amazon-research/irgr","repo_kind":"official","path":"src/retrieval_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/retrieval_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"68ef7c2586529325"}},{"code_sha256_prefix":"8f025f3f4d630f9a","entry":"sentence_index","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/entail_trees_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/entail_trees_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8f025f3f4d630f9a"}},{"code_sha256_prefix":"bc66cae80c3a0886","entry":"sort_sentence_ids_match","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/entail_trees_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/entail_trees_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bc66cae80c3a0886"}},{"code_sha256_prefix":"110b38cab88d9900","entry":"split_info_sentences","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/eval/run_scorer.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/eval/run_scorer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"110b38cab88d9900"}},{"code_sha256_prefix":"fff8963152d95bfe","entry":"str_replace_single_pass","repo":"amazon-research/irgr","repo_kind":"official","path":"src/base_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/base_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fff8963152d95bfe"}},{"code_sha256_prefix":"eeb8dc60c6ef1fa4","entry":"trim_batch","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/angle_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/angle_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eeb8dc60c6ef1fa4"}},{"code_sha256_prefix":"ab5d9464aeabf9fd","entry":"encode_line","repo":"amazon-research/irgr","repo_kind":"official","path":"src/entailment_bank/utils/angle_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/entailment_bank/utils/angle_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":"ab5d9464aeabf9fd"}},{"code_sha256_prefix":"de7e75f07bfecdb0","entry":"run_funtion_redirect_stdout","repo":"amazon-research/irgr","repo_kind":"official","path":"src/base_utils.py","file_url":"https://github.com/amazon-research/irgr/blob/HEAD/src/base_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":"de7e75f07bfecdb0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}