{"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/language-model-crossover-variation-through","title":"Language Model Crossover: Variation through Few-Shot Prompting","arxiv_id":"2302.12170","date":"2023-02-23","proceeding":null,"authors":["Elliot Meyerson","Mark J. Nelson","Herbie Bradley","Adam Gaier","Arash Moradi","Amy K. Hoover","Joel Lehman"],"abstract":"This paper pursues the insight that language models naturally enable an intelligent variation operator similar in spirit to evolutionary crossover. In particular, language models of sufficient scale demonstrate in-context learning, i.e. they can learn from associations between a small number of input patterns to generate outputs incorporating such associations (also called few-shot prompting). This ability can be leveraged to form a simple but powerful variation operator, i.e. to prompt a language model with a few text-based genotypes (such as code, plain-text sentences, or equations), and to parse its corresponding output as those genotypes' offspring. The promise of such language model crossover (which is simple to implement and can leverage many different open-source language models) is that it enables a simple mechanism to evolve semantically-rich text representations (with few domain-specific tweaks), and naturally benefits from current progress in language models. Experiments in this paper highlight the versatility of language-model crossover, through evolving binary bit-strings, sentences, equations, text-to-image prompts, and Python code. The conclusion is that language model crossover is a promising method for evolving genomes representable as text.","url_abs":"https://arxiv.org/abs/2302.12170v3","url_pdf":"https://arxiv.org/pdf/2302.12170v3.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":"language-model-crossover-variation-through","repo_url":"https://github.com/carperai/openelm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"in-context-learning","task_name":"In-Context Learning"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.12170","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.12170"}},"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/carperai/openelm","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"unverified":4},"by_repo_kind":{"listed":{"samples":5,"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":0,"samples":[{"code_sha256_prefix":"1dacda5180fc1b73","entry":"add","repo":"carperai/openelm","repo_kind":"listed","path":"src/openelm/benchmarks/benchmark_tinygp.py","file_url":"https://github.com/carperai/openelm/blob/HEAD/src/openelm/benchmarks/benchmark_tinygp.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1dacda5180fc1b73"}},{"code_sha256_prefix":"88f2ab46216e23d3","entry":"load_algorithm","repo":"carperai/openelm","repo_kind":"listed","path":"src/openelm/elm.py","file_url":"https://github.com/carperai/openelm/blob/HEAD/src/openelm/elm.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":true,"mcp_get_code":{"code_sha256":"88f2ab46216e23d3"}},{"code_sha256_prefix":"5ea7a73b9c803cb8","entry":"mod","repo":"carperai/openelm","repo_kind":"listed","path":"src/openelm/benchmarks/benchmark_tinygp.py","file_url":"https://github.com/carperai/openelm/blob/HEAD/src/openelm/benchmarks/benchmark_tinygp.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":true,"mcp_get_code":{"code_sha256":"5ea7a73b9c803cb8"}},{"code_sha256_prefix":"7bcf15d75988ef3a","entry":"mul","repo":"carperai/openelm","repo_kind":"listed","path":"src/openelm/benchmarks/benchmark_tinygp.py","file_url":"https://github.com/carperai/openelm/blob/HEAD/src/openelm/benchmarks/benchmark_tinygp.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":true,"mcp_get_code":{"code_sha256":"7bcf15d75988ef3a"}},{"code_sha256_prefix":"1c9de8c6a00e3d8f","entry":"sample_triton","repo":"carperai/openelm","repo_kind":"listed","path":"src/openelm/codegen/codegen_triton.py","file_url":"https://github.com/carperai/openelm/blob/HEAD/src/openelm/codegen/codegen_triton.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":true,"mcp_get_code":{"code_sha256":"1c9de8c6a00e3d8f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}