Language Model Crossover: Variation through Few-Shot Prompting
Authors:
- Elliot MeyersonEMElliot Meyerson
- Mark J. NelsonMNMark J. Nelson
- Herbie BradleyHBHerbie Bradley
- Adam GaierAGAdam Gaier
- Arash MoradiAMArash Moradi
- Amy K. HooverAHAmy K. Hoover
- Joel LehmanJLJoel Lehman
Preprint
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.Keywords
All Related Versions
This publication has 31 references indexed in Scilit:
- The OpenELM Library: Leveraging Progress in Language Models for Novel Evolutionary Algorithms2024
- A taxonomy of prompt modifiers for text-to-image generationBehaviour & Information Technology, 2023
- Evolution Through Large Models2023
- A review on sentiment analysis and emotion detection from textSocial Network Analysis and Mining, 2021
- Parameter identification for symbolic regression using nonlinear least squaresGenetic Programming and Evolvable Machines, 2019
- Evolutionary multiobjective optimization: open research areas and some challenges lying aheadComplex & Intelligent Systems, 2019
- An introduction and survey of estimation of distribution algorithmsSwarm and Evolutionary Computation, 2011
- Evolution strategies – A comprehensive introductionNatural Computing, 2002
- Approximation by superpositions of a sigmoidal functionMathematics of Control, Signals, and Systems, 1989
- Multilayer feedforward networks are universal approximatorsNeural Networks, 1989