Language Model Crossover: Variation through Few-Shot Prompting
Top Cited Papers
Open Access
- 28 November 2024
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Evolutionary Learning and Optimization
- Vol. 4 (4) , 1-40
Abstract
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.Keywords
All Related Versions
Funding Information
- National Science Foundation (1948017)
This publication has 58 references indexed in Scilit:
- Mathematical discoveries from program search with large language modelsNature, 2023
- 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
- Compositional pattern producing networks: A novel abstraction of developmentGenetic Programming and Evolvable Machines, 2007
- Helper-Objectives: Using Multi-Objective Evolutionary Algorithms for Single-Objective OptimisationJournal of Mathematical Modelling and Algorithms, 2004
- A fast and elitist multiobjective genetic algorithm: NSGA-IIIEEE Transactions on Evolutionary Computation, 2002
- Evolution strategies – A comprehensive introductionNatural Computing, 2002
- The compact genetic algorithmIEEE Transactions on Evolutionary Computation, 1999
- Genetic AlgorithmsScientific American, 1992