{"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/document-level-entity-based-extraction-as","title":"Document-level Entity-based Extraction as Template Generation","arxiv_id":"2109.04901","date":"2021-09-10","proceeding":"EMNLP 2021 11","authors":["Kung-Hsiang Huang","Sam Tang","Nanyun Peng"],"abstract":"Document-level entity-based extraction (EE), aiming at extracting entity-centric information such as entity roles and entity relations, is key to automatic knowledge acquisition from text corpora for various domains. Most document-level EE systems build extractive models, which struggle to model long-term dependencies among entities at the document level. To address this issue, we propose a generative framework for two document-level EE tasks: role-filler entity extraction (REE) and relation extraction (RE). We first formulate them as a template generation problem, allowing models to efficiently capture cross-entity dependencies, exploit label semantics, and avoid the exponential computation complexity of identifying N-ary relations. A novel cross-attention guided copy mechanism, TopK Copy, is incorporated into a pre-trained sequence-to-sequence model to enhance the capabilities of identifying key information in the input document. Experiments done on the MUC-4 and SciREX dataset show new state-of-the-art results on REE (+3.26%), binary RE (+4.8%), and 4-ary RE (+2.7%) in F1 score.","url_abs":"https://arxiv.org/abs/2109.04901v1","url_pdf":"https://arxiv.org/pdf/2109.04901v1.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":"document-level-entity-based-extraction-as","repo_url":"https://github.com/PlusLabNLP/TempGen","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"4-ary-relation-extraction","task_name":"4-ary Relation Extraction"},{"task_slug":"binary-relation-extraction","task_name":"Binary Relation Extraction"},{"task_slug":"role-filler-entity-extraction","task_name":"Role-filler Entity Extraction"}],"methods":[{"method_slug":"topk-copy","method_name":"TopK Copy"}],"datasets_introduced":[],"methods_introduced":[{"slug":"topk-copy","name":"TopK Copy","full_name":"TopK Copy"}],"results":[{"leaderboard":"/sota/4-ary-relation-extraction-on-scirex","task":"4-ary Relation Extraction","dataset":"SciREX","model":"TempGen","rank_in_archive_order":1,"of":1,"metrics":{"Avg. F1":"3.55"},"uses_additional_data":false},{"leaderboard":"/sota/binary-relation-extraction-on-scirex","task":"Binary Relation Extraction","dataset":"SciREX","model":"TempGen","rank_in_archive_order":1,"of":1,"metrics":{"Avg. F1":"14.47"},"uses_additional_data":false},{"leaderboard":"/sota/role-filler-entity-extraction-on-muc-4","task":"Role-filler Entity Extraction","dataset":"MUC-4","model":"TempGen","rank_in_archive_order":1,"of":1,"metrics":{"Avg. F1":"57.76"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.04901","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.04901"}},"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":"deterministic:regex_extraction","url":"https://github.com/PlusLabNLP/TempGen","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"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":"179c577cfe250d9c","entry":"bre_eval","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"bre_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/bre_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"179c577cfe250d9c"}},{"code_sha256_prefix":"1a6bd830af39580b","entry":"compute_mapping","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"bre_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/bre_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a6bd830af39580b"}},{"code_sha256_prefix":"5dc251a1bb16c94f","entry":"f1","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"ree_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/ree_eval.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5dc251a1bb16c94f"}},{"code_sha256_prefix":"86ce8222fefed159","entry":"format_inputs_outputs","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"util.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"86ce8222fefed159"}},{"code_sha256_prefix":"cc66af9f533680f2","entry":"has_all_mentions","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"bre_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/bre_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc66af9f533680f2"}},{"code_sha256_prefix":"f7b10b434d2ca733","entry":"phi_prop","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"ree_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/ree_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f7b10b434d2ca733"}},{"code_sha256_prefix":"6cc07897ce7e5e2b","entry":"phi_strict","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"ree_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/ree_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6cc07897ce7e5e2b"}},{"code_sha256_prefix":"999a0e4f59e1e104","entry":"process_entities","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"convert_grit.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/convert_grit.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"999a0e4f59e1e104"}},{"code_sha256_prefix":"bc8299f646161453","entry":"scirex_eval","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"scirex_eval.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/scirex_eval.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc8299f646161453"}},{"code_sha256_prefix":"6b87c15aae792362","entry":"token2sub_tokens","repo":"PlusLabNLP/TempGen","repo_kind":"official","path":"util.py","file_url":"https://github.com/PlusLabNLP/TempGen/blob/HEAD/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b87c15aae792362"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}