{"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/towards-realistic-low-resource-relation","title":"Towards Realistic Low-resource Relation Extraction: A Benchmark with Empirical Baseline Study","arxiv_id":"2210.10678","date":"2022-10-19","proceeding":null,"authors":["Xin Xu","Xiang Chen","Ningyu Zhang","Xin Xie","Xi Chen","Huajun Chen"],"abstract":"This paper presents an empirical study to build relation extraction systems in low-resource settings. Based upon recent pre-trained language models, we comprehensively investigate three schemes to evaluate the performance in low-resource settings: (i) different types of prompt-based methods with few-shot labeled data; (ii) diverse balancing methods to address the long-tailed distribution issue; (iii) data augmentation technologies and self-training to generate more labeled in-domain data. We create a benchmark with 8 relation extraction (RE) datasets covering different languages, domains and contexts and perform extensive comparisons over the proposed schemes with combinations. Our experiments illustrate: (i) Though prompt-based tuning is beneficial in low-resource RE, there is still much potential for improvement, especially in extracting relations from cross-sentence contexts with multiple relational triples; (ii) Balancing methods are not always helpful for RE with long-tailed distribution; (iii) Data augmentation complements existing baselines and can bring much performance gain, while self-training may not consistently achieve advancement to low-resource RE. Code and datasets are in https://github.com/zjunlp/LREBench.","url_abs":"https://arxiv.org/abs/2210.10678v3","url_pdf":"https://arxiv.org/pdf/2210.10678v3.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":"towards-realistic-low-resource-relation","repo_url":"https://github.com/zjunlp/KnowPrompt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"towards-realistic-low-resource-relation","repo_url":"https://github.com/zjunlp/lrebench","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"relation-extraction","task_name":"Relation Extraction"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2210.10678","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.10678"}},"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/zjunlp/lrebench","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zjunlp/KnowPrompt","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":5,"unverified":8},"by_repo_kind":{"official":{"samples":13,"ran":5,"repositories":2}},"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":"cf9ffa02a42184af","entry":"whitespace_tokenize","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"models/bert/tokenization_bert.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/models/bert/tokenization_bert.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf9ffa02a42184af"}},{"code_sha256_prefix":"108aa80124e0d67f","entry":"get_labels","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"generate_k_shot.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/generate_k_shot.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"108aa80124e0d67f"}},{"code_sha256_prefix":"e7fbc7a74a3457c7","entry":"load_vocab","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"models/bert/tokenization_bert.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/models/bert/tokenization_bert.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7fbc7a74a3457c7"}},{"code_sha256_prefix":"9f7a364b023cf31f","entry":"merge","repo":"zjunlp/lrebench","repo_kind":"official","path":"DA.py","file_url":"https://github.com/zjunlp/lrebench/blob/HEAD/DA.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f7a364b023cf31f"}},{"code_sha256_prefix":"91ecdc93072606d6","entry":"read_dataset","repo":"zjunlp/lrebench","repo_kind":"official","path":"DA.py","file_url":"https://github.com/zjunlp/lrebench/blob/HEAD/DA.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"91ecdc93072606d6"}},{"code_sha256_prefix":"e5c96daa2363c6ff","entry":"acc","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/util.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/util.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":"e5c96daa2363c6ff"}},{"code_sha256_prefix":"526185d23747e06f","entry":"compute_f1","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/util.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/util.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":"526185d23747e06f"}},{"code_sha256_prefix":"c178ab3e6d9537ee","entry":"decode","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/transformer.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/transformer.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":"c178ab3e6d9537ee"}},{"code_sha256_prefix":"0d1aa602358c71ac","entry":"f1_eval","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/util.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/util.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":"0d1aa602358c71ac"}},{"code_sha256_prefix":"ff15928b8b33b40f","entry":"get_trie","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"models/trie.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/models/trie.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":"ff15928b8b33b40f"}},{"code_sha256_prefix":"efbb0f3903b5f779","entry":"load_tf_weights_in_bert","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"models/bert/modeling_bert.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/models/bert/modeling_bert.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":"efbb0f3903b5f779"}},{"code_sha256_prefix":"6a897796e2310e3b","entry":"mask_hook","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/transformer.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/transformer.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":"6a897796e2310e3b"}},{"code_sha256_prefix":"d235c954a3acaf08","entry":"multilabel_categorical_crossentropy","repo":"zjunlp/KnowPrompt","repo_kind":"official","path":"lit_models/transformer.py","file_url":"https://github.com/zjunlp/KnowPrompt/blob/HEAD/lit_models/transformer.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":"d235c954a3acaf08"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}