{"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/dreamcoder-growing-generalizable","title":"DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learning","arxiv_id":"2006.08381","date":"2020-06-15","proceeding":null,"authors":["Kevin Ellis","Catherine Wong","Maxwell Nye","Mathias Sable-Meyer","Luc Cary","Lucas Morales","Luke Hewitt","Armando Solar-Lezama","Joshua B. Tenenbaum"],"abstract":"Expert problem-solving is driven by powerful languages for thinking about problems and their solutions. Acquiring expertise means learning these languages -- systems of concepts, alongside the skills to use them. We present DreamCoder, a system that learns to solve problems by writing programs. It builds expertise by creating programming languages for expressing domain concepts, together with neural networks to guide the search for programs within these languages. A ``wake-sleep'' learning algorithm alternately extends the language with new symbolic abstractions and trains the neural network on imagined and replayed problems. DreamCoder solves both classic inductive programming tasks and creative tasks such as drawing pictures and building scenes. It rediscovers the basics of modern functional programming, vector algebra and classical physics, including Newton's and Coulomb's laws. Concepts are built compositionally from those learned earlier, yielding multi-layered symbolic representations that are interpretable and transferrable to new tasks, while still growing scalably and flexibly with experience.","url_abs":"https://arxiv.org/abs/2006.08381v1","url_pdf":"https://arxiv.org/pdf/2006.08381v1.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":"dreamcoder-growing-generalizable","repo_url":"https://github.com/CatherineWong/dreamcoder","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"dreamcoder-growing-generalizable","repo_url":"https://github.com/gpoesia/peano","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dreamcoder-growing-generalizable","repo_url":"https://github.com/ellisk42/ec","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"drawing-pictures","task_name":"Drawing Pictures"},{"task_slug":"program-synthesis","task_name":"Program Synthesis"},{"task_slug":"program-induction","task_name":"Program induction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.08381","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.08381"}},"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/gpoesia/peano","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/CatherineWong/dreamcoder","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ellisk42/ec","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":10},"by_repo_kind":{"listed":{"samples":11,"ran":1,"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":11,"samples":[{"code_sha256_prefix":"4e57120be17c7bb3","entry":"choose","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/image_robustfill.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/image_robustfill.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"4e57120be17c7bb3"}},{"code_sha256_prefix":"8a25cd4de8768a5e","entry":"add_string_constants","repo":"ellisk42/ec","repo_kind":"listed","path":"dreamcoder/likelihoodModel.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/dreamcoder/likelihoodModel.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"8a25cd4de8768a5e"}},{"code_sha256_prefix":"b73217cc91293cb2","entry":"getCutOffHits","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/graphs.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/graphs.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"b73217cc91293cb2"}},{"code_sha256_prefix":"9e26201b088c6846","entry":"loadCheckpoint","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/analyzeDepth.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/analyzeDepth.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9e26201b088c6846"}},{"code_sha256_prefix":"0db3e7eae4cf7eff","entry":"load_image","repo":"ellisk42/ec","repo_kind":"listed","path":"prototypical-networks/protonet_score.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/prototypical-networks/protonet_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"0db3e7eae4cf7eff"}},{"code_sha256_prefix":"50e887f7bdba986b","entry":"load_image_path","repo":"ellisk42/ec","repo_kind":"listed","path":"prototypical-networks/protonet_score.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/prototypical-networks/protonet_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"50e887f7bdba986b"}},{"code_sha256_prefix":"e8fb8d57c05b2528","entry":"loadfun","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/graphs.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/graphs.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"e8fb8d57c05b2528"}},{"code_sha256_prefix":"9c780e620ac96d86","entry":"longest_common_substr","repo":"ellisk42/ec","repo_kind":"listed","path":"dreamcoder/likelihoodModel.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/dreamcoder/likelihoodModel.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9c780e620ac96d86"}},{"code_sha256_prefix":"f92c759e18eedb66","entry":"primitiveDepth","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/analyzeDepth.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/analyzeDepth.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"f92c759e18eedb66"}},{"code_sha256_prefix":"4763f5190ab2ad6d","entry":"shuffled","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/graphs.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/graphs.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"4763f5190ab2ad6d"}},{"code_sha256_prefix":"edcb9a638e63635f","entry":"verbatim","repo":"ellisk42/ec","repo_kind":"listed","path":"bin/examineFrontier.py","file_url":"https://github.com/ellisk42/ec/blob/HEAD/bin/examineFrontier.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"edcb9a638e63635f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}