{"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/graph-based-reasoning-over-heterogeneous","title":"Graph-Based Reasoning over Heterogeneous External Knowledge for Commonsense Question Answering","arxiv_id":"1909.05311","date":"2019-09-09","proceeding":null,"authors":["Shangwen Lv","Daya Guo","Jingjing Xu","Duyu Tang","Nan Duan","Ming Gong","Linjun Shou","Daxin Jiang","Guihong Cao","Songlin Hu"],"abstract":"Commonsense question answering aims to answer questions which require background knowledge that is not explicitly expressed in the question. The key challenge is how to obtain evidence from external knowledge and make predictions based on the evidence. Recent works either learn to generate evidence from human-annotated evidence which is expensive to collect, or extract evidence from either structured or unstructured knowledge bases which fails to take advantages of both sources. In this work, we propose to automatically extract evidence from heterogeneous knowledge sources, and answer questions based on the extracted evidence. Specifically, we extract evidence from both structured knowledge base (i.e. ConceptNet) and Wikipedia plain texts. We construct graphs for both sources to obtain the relational structures of evidence. Based on these graphs, we propose a graph-based approach consisting of a graph-based contextual word representation learning module and a graph-based inference module. The first module utilizes graph structural information to re-define the distance between words for learning better contextual word representations. The second module adopts graph convolutional network to encode neighbor information into the representations of nodes, and aggregates evidence with graph attention mechanism for predicting the final answer. Experimental results on CommonsenseQA dataset illustrate that our graph-based approach over both knowledge sources brings improvement over strong baselines. Our approach achieves the state-of-the-art accuracy (75.3%) on the CommonsenseQA leaderboard.","url_abs":"https://arxiv.org/abs/1909.05311v2","url_pdf":"https://arxiv.org/pdf/1909.05311v2.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":"graph-based-reasoning-over-heterogeneous","repo_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"graph-attention","task_name":"Graph Attention"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/common-sense-reasoning-on-commonsenseqa","task":"Common Sense Reasoning","dataset":"CommonsenseQA","model":"XLNet+GraphReason","rank_in_archive_order":14,"of":38,"metrics":{"Accuracy":"75.3"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1909.05311","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1909.05311"}},"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/DecstionBack/AAAI_2020_CommonsenseQA","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":5,"ran_honours":2,"unverified":10},"by_repo_kind":{"official":{"samples":17,"ran":7,"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":"0f786c407fb1ee4c","entry":"swish","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"f44985272d18127a","entry":"Identity","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f44985272d18127a"}},{"code_sha256_prefix":"35ef111fc00c21b4","entry":"build_tf_to_pytorch_map","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_transfo_xl.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35ef111fc00c21b4"}},{"code_sha256_prefix":"8d23fbe2b99b840b","entry":"gelu","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_gpt2.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_gpt2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8d23fbe2b99b840b"}},{"code_sha256_prefix":"fdc64f4c72036ae4","entry":"gelu","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fdc64f4c72036ae4"}},{"code_sha256_prefix":"d30d6c3098df2c42","entry":"prune_linear_layer","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d30d6c3098df2c42"}},{"code_sha256_prefix":"93228a3eb5c4d179","entry":"sample_logits","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl_utilities.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_transfo_xl_utilities.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93228a3eb5c4d179"}},{"code_sha256_prefix":"c92ba449e48ecffe","entry":"build_tf_xlnet_to_pytorch_map","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_xlnet.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_xlnet.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":"c92ba449e48ecffe"}},{"code_sha256_prefix":"b05b2bb38c0e4e72","entry":"gelu","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_xlnet.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_xlnet.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":"b05b2bb38c0e4e72"}},{"code_sha256_prefix":"b3c2618f6b7fb60c","entry":"gelu","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_xlm.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_xlm.py","link_basis":"first_harvest_node","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":"b3c2618f6b7fb60c"}},{"code_sha256_prefix":"f5d8d44f65a08b76","entry":"get_masks","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_xlm.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_xlm.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":"f5d8d44f65a08b76"}},{"code_sha256_prefix":"03a94dbb436249a3","entry":"load_tf_weights_in_bert","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_bert.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_bert.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":"03a94dbb436249a3"}},{"code_sha256_prefix":"07bb0220eb5b609f","entry":"load_tf_weights_in_gpt2","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_gpt2.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_gpt2.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":"07bb0220eb5b609f"}},{"code_sha256_prefix":"42ee168c3ae12e60","entry":"load_tf_weights_in_openai_gpt","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_openai.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_openai.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":"42ee168c3ae12e60"}},{"code_sha256_prefix":"23d246e59ef9447b","entry":"load_tf_weights_in_transfo_xl","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_transfo_xl.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_transfo_xl.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":"23d246e59ef9447b"}},{"code_sha256_prefix":"4a94662ff3b5c5cf","entry":"load_tf_weights_in_xlnet","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_xlnet.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_xlnet.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":"4a94662ff3b5c5cf"}},{"code_sha256_prefix":"7183a17dd79327a8","entry":"prune_conv1d_layer","repo":"DecstionBack/AAAI_2020_CommonsenseQA","repo_kind":"official","path":"pytorch_transformers/modeling_utils.py","file_url":"https://github.com/DecstionBack/AAAI_2020_CommonsenseQA/blob/HEAD/pytorch_transformers/modeling_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":"7183a17dd79327a8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}