FunSearch makes new mathematical discoveries with an LLM

On December 14, 2023, DeepMind announced FunSearch, a method that uses a large language model to make new discoveries in mathematics and computer science. The work was published in Nature as “Mathematical discoveries from program search with large language models.” DeepMind described it as the first time an LLM had produced a verified new discovery for a long-standing open problem in the sciences.

FunSearch searches over computer programs rather than over answers directly. It pairs a pretrained LLM, which proposes creative code, with an automated evaluator that scores each program and rejects anything wrong or hallucinated. Promising programs are stored, recombined, and fed back into the model in an evolutionary loop, so the final result is a verifiable program rather than free-form text the model could fabricate.

Applied to the cap set problem, a long-standing question in extremal combinatorics, FunSearch found larger constructions than were previously known - the largest such improvement in twenty years. Applied to the online bin packing problem, it discovered new heuristics that pack items into fewer bins than the standard rules, with potential use in job scheduling.

FunSearch matters because the evaluator makes the output trustworthy: the model can be creative and even wrong, but only correct, checkable programs survive. That structure became the template for DeepMind’s later AlphaEvolve.