{"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/retrieval-enhanced-model-for-commonsense","title":"Retrieval Enhanced Model for Commonsense Generation","arxiv_id":"2105.11174","date":"2021-05-24","proceeding":"Findings (ACL) 2021 8","authors":["Han Wang","Yang Liu","Chenguang Zhu","Linjun Shou","Ming Gong","Yichong Xu","Michael Zeng"],"abstract":"Commonsense generation is a challenging task of generating a plausible sentence describing an everyday scenario using provided concepts. Its requirement of reasoning over commonsense knowledge and compositional generalization ability even puzzles strong pre-trained language generation models. We propose a novel framework using retrieval methods to enhance both the pre-training and fine-tuning for commonsense generation. We retrieve prototype sentence candidates by concept matching and use them as auxiliary input. For fine-tuning, we further boost its performance with a trainable sentence retriever. We demonstrate experimentally on the large-scale CommonGen benchmark that our approach achieves new state-of-the-art results.","url_abs":"https://arxiv.org/abs/2105.11174v1","url_pdf":"https://arxiv.org/pdf/2105.11174v1.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":"retrieval-enhanced-model-for-commonsense","repo_url":"https://github.com/HanNight/RE-T5","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.11174","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.11174"}},"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/HanNight/RE-T5","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"unverified":4},"by_repo_kind":{"official":{"samples":6,"ran":2,"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":"a3826392847cbef3","entry":"count_trainable_parameters","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/callbacks.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/callbacks.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a3826392847cbef3"}},{"code_sha256_prefix":"295d9fdc5ce0b054","entry":"get_early_stopping_callback","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/callbacks.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/callbacks.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"295d9fdc5ce0b054"}},{"code_sha256_prefix":"c66ab1dac5e4762c","entry":"add_newline_to_end_of_each_sentence","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/sentence_splitter.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/sentence_splitter.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":"c66ab1dac5e4762c"}},{"code_sha256_prefix":"952f6fff9428619b","entry":"get_checkpoint_callback","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/callbacks.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/callbacks.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":"952f6fff9428619b"}},{"code_sha256_prefix":"e386d3a24af4d168","entry":"label_smoothed_nll_loss","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/utils.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/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":"e386d3a24af4d168"}},{"code_sha256_prefix":"7c43af131a6f39a6","entry":"lmap","repo":"HanNight/RE-T5","repo_kind":"official","path":"code/RE-T5/utils.py","file_url":"https://github.com/HanNight/RE-T5/blob/HEAD/code/RE-T5/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":"7c43af131a6f39a6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}