{"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/great-truths-are-always-simple-a-rather-1","title":"Great Truths are Always Simple: A Rather Simple Knowledge Encoder for Enhancing the Commonsense Reasoning Capacity of Pre-Trained Models","arxiv_id":"2205.01841","date":"2022-05-04","proceeding":null,"authors":["Jinhao Jiang","Kun Zhou","Wayne Xin Zhao","Ji-Rong Wen"],"abstract":"Commonsense reasoning in natural language is a desired ability of artificial intelligent systems. For solving complex commonsense reasoning tasks, a typical solution is to enhance pre-trained language models~(PTMs) with a knowledge-aware graph neural network~(GNN) encoder that models a commonsense knowledge graph~(CSKG). Despite the effectiveness, these approaches are built on heavy architectures, and can't clearly explain how external knowledge resources improve the reasoning capacity of PTMs. Considering this issue, we conduct a deep empirical analysis, and find that it is indeed relation features from CSKGs (but not node features) that mainly contribute to the performance improvement of PTMs. Based on this finding, we design a simple MLP-based knowledge encoder that utilizes statistical relation paths as features. Extensive experiments conducted on five benchmarks demonstrate the effectiveness of our approach, which also largely reduces the parameters for encoding CSKGs. Our codes and data are publicly available at https://github.com/RUCAIBox/SAFE.","url_abs":"https://arxiv.org/abs/2205.01841v1","url_pdf":"https://arxiv.org/pdf/2205.01841v1.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":"great-truths-are-always-simple-a-rather-1","repo_url":"https://github.com/rucaibox/safe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":null,"task_name":"Relation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2205.01841","atlas_url":"https://app.syntology.ai/?focus=2205.01841","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.01841"}},"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/rucaibox/safe","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"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":"8d4cd6c11b3d961f","entry":"calculate_loss","repo":"rucaibox/safe","repo_kind":"official","path":"qagnn.py","file_url":"https://github.com/rucaibox/safe/blob/HEAD/qagnn.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":"8d4cd6c11b3d961f"}},{"code_sha256_prefix":"2839d26e6f9412c8","entry":"evaluate_accuracy","repo":"rucaibox/safe","repo_kind":"official","path":"qagnn.py","file_url":"https://github.com/rucaibox/safe/blob/HEAD/qagnn.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":"2839d26e6f9412c8"}},{"code_sha256_prefix":"238fcc4489158070","entry":"generate_meta_path_from_adj_data","repo":"rucaibox/safe","repo_kind":"official","path":"utils/extract_meta_path_feature.py","file_url":"https://github.com/rucaibox/safe/blob/HEAD/utils/extract_meta_path_feature.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":"238fcc4489158070"}},{"code_sha256_prefix":"20290ba8c232b036","entry":"get_meta_path_for_sample","repo":"rucaibox/safe","repo_kind":"official","path":"utils/extract_meta_path_feature.py","file_url":"https://github.com/rucaibox/safe/blob/HEAD/utils/extract_meta_path_feature.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":"20290ba8c232b036"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}