Language Model Crossover: Variation through Few-Shot Prompting
This article 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 article 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 flexible and effective method for evolving genomes representable as text.
Authors
- Elliot Meyerson (ORCID: https://orcid.org/0000-0002-1871-2757)
- Herbie Bradley (ORCID: https://orcid.org/0000-0001-5390-1257)
- Joel Lehman (ORCID: https://orcid.org/0000-0002-9535-1123)
- Amy K. Hoover (ORCID: https://orcid.org/0000-0002-4661-8178)
- Adam Gaier (ORCID: https://orcid.org/0000-0002-4632-0929)
- Mark Nelson (ORCID: https://orcid.org/0000-0003-1882-8896)
- Arash Moradi
Institutions
- New Jersey Institute of Technology (US)
- Autodesk (United States) (US)
- Cognizant (United States) (US)
- American University (US)
- Providence College (US)
- University of Cambridge (GB)
- Bridge University (SS)
Publication Details
- Journal
- ACM Transactions on Evolutionary Learning and Optimization
- Published
- 2024-09-05
- DOI
- https://doi.org/10.1145/3694791
- Citations
- 43
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 14.24