{"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/back-to-the-future-unsupervised-backprop","title":"Back to the Future: Unsupervised Backprop-based Decoding for Counterfactual and Abductive Commonsense Reasoning","arxiv_id":"2010.05906","date":"2020-10-12","proceeding":"EMNLP 2020 11","authors":["Lianhui Qin","Vered Shwartz","Peter West","Chandra Bhagavatula","Jena Hwang","Ronan Le Bras","Antoine Bosselut","Yejin Choi"],"abstract":"Abductive and counterfactual reasoning, core abilities of everyday human cognition, require reasoning about what might have happened at time t, while conditioning on multiple contexts from the relative past and future. However, simultaneous incorporation of past and future contexts using generative language models (LMs) can be challenging, as they are trained either to condition only on the past context or to perform narrowly scoped text-infilling. In this paper, we propose DeLorean, a new unsupervised decoding algorithm that can flexibly incorporate both the past and future contexts using only off-the-shelf, left-to-right language models and no supervision. The key intuition of our algorithm is incorporating the future through back-propagation, during which, we only update the internal representation of the output while fixing the model parameters. By alternating between forward and backward propagation, DeLorean can decode the output representation that reflects both the left and right contexts. We demonstrate that our approach is general and applicable to two nonmonotonic reasoning tasks: abductive text generation and counterfactual story revision, where DeLorean outperforms a range of unsupervised and some supervised methods, based on automatic and human evaluation.","url_abs":"https://arxiv.org/abs/2010.05906v4","url_pdf":"https://arxiv.org/pdf/2010.05906v4.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":"back-to-the-future-unsupervised-backprop","repo_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"counterfactual-reasoning","task_name":"Counterfactual Reasoning"},{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"text-infilling","task_name":"Text Infilling"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.05906","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.05906"}},"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/qkaren/unsup_gen_for_cms_reasoning","reach":null}],"summary":{"ran":2,"ran_fixture":3,"unverified":3},"by_repo_kind":{"official":{"samples":7,"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":8,"samples":[{"code_sha256_prefix":"ddba0eea3fb589d6","entry":"forward_pass","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddba0eea3fb589d6"}},{"code_sha256_prefix":"468a8782c34e522c","entry":"get_text_from_logits","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"468a8782c34e522c"}},{"code_sha256_prefix":"c7967a9cb34c0871","entry":"get_token_from_logits","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7967a9cb34c0871"}},{"code_sha256_prefix":"bbebd95a156061b0","entry":"to_var","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"bbebd95a156061b0"}},{"code_sha256_prefix":"66bb73836d7e23ad","entry":"top_k_filter","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"66bb73836d7e23ad"}},{"code_sha256_prefix":"5f648876b576f47b","entry":"backward_pass","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5f648876b576f47b"}},{"code_sha256_prefix":"5a36862dd43da237","entry":"delorean_decoding","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5a36862dd43da237"}},{"code_sha256_prefix":"e8feea2d968e86f6","entry":"get_input_embeds","repo":"qkaren/unsup_gen_for_cms_reasoning","repo_kind":"official","path":"abductive_main.py","file_url":"https://github.com/qkaren/unsup_gen_for_cms_reasoning/blob/HEAD/abductive_main.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e8feea2d968e86f6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}