2024 MathematicalDiscoveriesfromProg

From GM-RKB
Jump to navigation Jump to search

Subject Headings:

Notes

Cited By

Quotes

Abstract

Large language models (LLMs) have demonstrated tremendous capabilities in solving complex tasks, from quantitative reasoning to understanding natural language. However, LLMs sometimes suffer from confabulations (or hallucinations), which can result in them making plausible but incorrect statements. This hinders the use of current large models in scientific discovery. Here we introduce FunSearch (short for searching in the function space), an evolutionary procedure based on pairing a pretrained LLM with a systematic evaluator. We demonstrate the effectiveness of this approach to surpass the best-known results in important problems, pushing the boundary of existing LLM-based approaches. Applying FunSearch to a central problem in extremal combinatorics — the cap set problem — we discover new constructions of large cap sets going beyond the best-known ones, both in finite dimensional and asymptotic cases. This shows that it is possible to make discoveries for established open problems using LLMs. We showcase the generality of FunSearch by applying it to an algorithmic problem, online bin packing, finding new heuristics that improve on widely used baselines. In contrast to most computer search approaches, FunSearch searches for programs that describe how to solve a problem, rather than what the solution is. Beyond being an effective and scaleable strategy, discovered programs tend to be more interpretable than raw solutions, enabling feedback loops between domain experts and FunSearch, and the deployment of such programs in real-world applications.

Introduction

FunSearch

FunSearch Algorithm:
1. Initialize with a pretrained LLM and an evaluator
2. Set the initial program
3. Repeat until an optimal program is found:
   a. Create a prompt using the current best program
   b. Use LLM to generate new programs
   c. Evaluate the new programs
   d. Update the current best program with the highest-scoring new program
4. Return the optimal program

Overview of FunSearch

  • NOTE: Describes the general methodology and workflow of FunSearch, emphasizing its innovative approach to problem solving.

Specification

  • NOTE: Outlines the problem specification process, including the use of an 'evaluate' function and initial program implementation.

Pretrained LLM

Evaluation

  • NOTE: Explains how generated programs are assessed and scored based on their performance on specific tasks.

Programs database

  • NOTE: Details the management of a diverse pool of correct programs, crucial for maintaining exploratory capability.

Prompt

  • NOTE: Elaborates on the creation of new prompts by combining high-scoring programs from the database for further LLM refinement.
Best-shot Prompting Algorithm:
1. Select top-scoring programs from the database
2. Create a prompt by combining these programs
3. Feed the prompt to the LLM to generate a new program
4. Return the new program

Distributed approach

Extremal Combinatorics

Cap sets

  • NOTE: Focuses on the discovery of new constructions for large cap sets, demonstrating FunSearch's capability in finding superior solutions.
Cap Set Problem Algorithm:
1. Initialize dimension and priority function
2. Use FunSearch to evolve the priority function
3. Construct cap set:
   a. For each vector in the space:
       i. If the vector satisfies cap set constraints, add it to the cap set
4. Return the cap set

Admissible sets

  • NOTE: Discusses the evolution of admissible sets, leading to significant improvements in lower bounds on the cap set capacity.
Admissible Sets Algorithm:
1. Initialize dimension and priority function
2. Use FunSearch to evolve the priority function
3. Construct admissible set:
   a. For each vector in the space:
       i. If the vector satisfies admissible set constraints, add it to the set
4. Return the admissible set

Bin Packing

Online Bin Packing Algorithm:
1. Initialize bin size and heuristic function
2. Use FunSearch to evolve the heuristic function
3. Pack bins:
   a. For each item:
       i. Determine the best bin using the heuristic function
       ii. Place the item in the best bin
4. Return the packed bins

Discussion

Methods

Implementation details of FunSearch

Prompt building

  • NOTE: Describes the mechanism for constructing prompts that guide the LLM in generating improved programs.

Evolutionary method and program selection

Island-based Evolutionary Method:
1. Initialize multiple islands with initial programs
2. Repeat evolution:
   a. Evolve population within each island
   b. Evaluate and select top-performing individuals
   c. Periodically replace worst-performing islands with best individuals from other islands
3. Return the best program from all islands

Robustness

  • NOTE: Addresses the inherent variability in FunSearch's performance due to randomness and the steps taken to ensure consistent results.

Related work

LLMs
Genetic programming
Program superoptimization and software engineering

References

;

 AuthorvolumeDate ValuetitletypejournaltitleUrldoinoteyear
2024 MathematicalDiscoveriesfromProgMohammadamin Barekatain
Pushmeet Kohli
Bernardino Romera-Paredes
Alexander Novikov
Matej Balog
M. Pawan Kumar
Emilien Dupont
Francisco J. R. Ruiz
Jordan S. Ellenberg
Pengming Wang
Omar Fawzi
Alhussein Fawzi
Mathematical Discoveries from Program Search with Large Language Models10.1038/s41586-023-06924-62024