{"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/explain-yourself-leveraging-language-models","title":"Explain Yourself! Leveraging Language Models for Commonsense Reasoning","arxiv_id":"1906.02361","date":"2019-06-06","proceeding":"ACL 2019 7","authors":["Nazneen Fatema Rajani","Bryan McCann","Caiming Xiong","Richard Socher"],"abstract":"Deep learning models perform poorly on tasks that require commonsense reasoning, which often necessitates some form of world-knowledge or reasoning over information not immediately present in the input. We collect human explanations for commonsense reasoning in the form of natural language sequences and highlighted annotations in a new dataset called Common Sense Explanations (CoS-E). We use CoS-E to train language models to automatically generate explanations that can be used during training and inference in a novel Commonsense Auto-Generated Explanation (CAGE) framework. CAGE improves the state-of-the-art by 10% on the challenging CommonsenseQA task. We further study commonsense reasoning in DNNs using both human and auto-generated explanations including transfer to out-of-domain tasks. Empirical results indicate that we can effectively leverage language models for commonsense reasoning.","url_abs":"https://arxiv.org/abs/1906.02361v1","url_pdf":"https://arxiv.org/pdf/1906.02361v1.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":"explain-yourself-leveraging-language-models","repo_url":"https://github.com/salesforce/cos-e","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"common-sense-reasoning","task_name":"Common Sense Reasoning"},{"task_slug":"form","task_name":"Form"},{"task_slug":"world-knowledge","task_name":"World Knowledge"}],"methods":[],"datasets_introduced":[{"slug":"cos-e","name":"CoS-E","full_name":"Commonsense Explanations Dataset"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/common-sense-reasoning-on-commonsenseqa","task":"Common Sense Reasoning","dataset":"CommonsenseQA","model":"CAGE-reasoning","rank_in_archive_order":23,"of":38,"metrics":{"Accuracy":"64.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1906.02361","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1906.02361"}},"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/salesforce/cos-e","reach":null}],"summary":{"ran_honours":1,"ran_draft_wrong":4},"by_repo_kind":{"listed":{"samples":4,"ran":4,"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":1,"samples":[{"code_sha256_prefix":"eb725d5794b15f6b","entry":"accuracy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"eb725d5794b15f6b"}},{"code_sha256_prefix":"3a47cdeefbf57240","entry":"convert_examples_to_features","repo":"salesforce/cos-e","repo_kind":"listed","path":"code/classification/run_commonsenseQA_expl_v1.1.py","file_url":"https://github.com/salesforce/cos-e/blob/HEAD/code/classification/run_commonsenseQA_expl_v1.1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3a47cdeefbf57240"}},{"code_sha256_prefix":"29b85865cef26284","entry":"download","repo":"salesforce/cos-e","repo_kind":"listed","path":"code/generation/train_commonsenseqa_v1.1.py","file_url":"https://github.com/salesforce/cos-e/blob/HEAD/code/generation/train_commonsenseqa_v1.1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"29b85865cef26284"}},{"code_sha256_prefix":"f07f9c1dffbc68b1","entry":"pre_process_datasets","repo":"salesforce/cos-e","repo_kind":"listed","path":"code/generation/train_commonsenseqa_v1.1.py","file_url":"https://github.com/salesforce/cos-e/blob/HEAD/code/generation/train_commonsenseqa_v1.1.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":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f07f9c1dffbc68b1"}},{"code_sha256_prefix":"948b9a52b33729e4","entry":"read_cqa_examples","repo":"salesforce/cos-e","repo_kind":"listed","path":"code/classification/run_commonsenseQA_expl_v1.1.py","file_url":"https://github.com/salesforce/cos-e/blob/HEAD/code/classification/run_commonsenseQA_expl_v1.1.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":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"948b9a52b33729e4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}