{"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/re-matching-a-fine-grained-semantic-matching","title":"RE-Matching: A Fine-Grained Semantic Matching Method for Zero-Shot Relation Extraction","arxiv_id":"2306.04954","date":"2023-06-08","proceeding":null,"authors":["Jun Zhao","WenYu Zhan","Xin Zhao","Qi Zhang","Tao Gui","Zhongyu Wei","Junzhe Wang","Minlong Peng","Mingming Sun"],"abstract":"Semantic matching is a mainstream paradigm of zero-shot relation extraction, which matches a given input with a corresponding label description. The entities in the input should exactly match their hypernyms in the description, while the irrelevant contexts should be ignored when matching. However, general matching methods lack explicit modeling of the above matching pattern. In this work, we propose a fine-grained semantic matching method tailored for zero-shot relation extraction. Following the above matching pattern, we decompose the sentence-level similarity score into entity and context matching scores. Due to the lack of explicit annotations of the redundant components, we design a feature distillation module to adaptively identify the relation-irrelevant features and reduce their negative impact on context matching. Experimental results show that our method achieves higher matching $F_1$ score and has an inference speed 10 times faster, when compared with the state-of-the-art methods.","url_abs":"https://arxiv.org/abs/2306.04954v1","url_pdf":"https://arxiv.org/pdf/2306.04954v1.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":"re-matching-a-fine-grained-semantic-matching","repo_url":"https://github.com/zweny/re-matching","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"Relation"},{"task_slug":"relation-extraction","task_name":"Relation Extraction"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.04954","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.04954"}},"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/zweny/RE-Matching","reach":null}],"summary":{"ran":3,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":6,"samples":[{"code_sha256_prefix":"883bdbb6823771ab","entry":"GradientReversal","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"883bdbb6823771ab"}},{"code_sha256_prefix":"da1aa3d5418bb35a","entry":"GradientReversalFunction","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da1aa3d5418bb35a"}},{"code_sha256_prefix":"b925fd8e7e0f9be9","entry":"REMatchingModel","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b925fd8e7e0f9be9"}},{"code_sha256_prefix":"690255d0e59768d1","entry":"dot_attention","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"690255d0e59768d1"}},{"code_sha256_prefix":"49754df6189b9599","entry":"extract_entity","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49754df6189b9599"}},{"code_sha256_prefix":"353badcb1899e507","entry":"emb_proj","repo":"zweny/RE-Matching","repo_kind":"official","path":"model/model.py","file_url":"https://github.com/zweny/RE-Matching/blob/HEAD/model/model.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":"353badcb1899e507"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}