<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FunSearch: Making New Discoveries in Mathematical Sciences Using Large Language Models</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&family=Source+Code+Pro:wght@400;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
:root {
--bg-color: #FFFFFF;
--content-bg-color: #FFFFFF;
--text-color: #212529;
--accent-color: #0D6EFD;
--border-color: #dee2e6;
--hover-bg-color: #f1f3f5;
}
body {
margin: 0;
padding: 0;
font-family: "Noto Serif SC", serif;
font-size: 16px;
line-height: 1.8;
background-color: var(--bg-color);
color: var(--text-color);
}
.container {
max-width: 800px;
margin: 2em auto;
padding: 2.5em 3.5em;
background-color: var(--content-bg-color);
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
border-radius: 8px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Noto Sans SC", "Noto Serif SC", sans-serif;
font-weight: 700;
color: var(--text-color);
}
h1 {
font-size: 28px;
margin-top: 24px;
margin-bottom: 20px;
text-align: center;
}
h2 {
font-size: 22px;
padding-bottom: 0.4em;
margin-top: 2.5em;
margin-bottom: 1.2em;
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
}
h2::before {
content: '';
display: inline-block;
width: 14px;
height: 14px;
background-color: var(--accent-color);
border-radius: 50%;
margin-right: 0.5em;
}
h3 {
font-size: 20px;
margin-top: 2em;
margin-bottom: 1em;
}
h4 {
font-size: 18px;
margin-top: 1.5em;
margin-bottom: 0.8em;
}
p {
margin-bottom: 1.2em;
}
a {
color: var(--accent-color);
text-decoration: none;
transition: text-decoration 0.2s;
}
a:hover {
text-decoration: underline;
}
strong, b {
font-weight: 700;
color: var(--text-color);
}
code {
font-family: "Source Code Pro", monospace;
background-color: #e9ecef;
padding: 0.2em 0.4em;
border-radius: 4px;
font-size: 0.9em;
}
pre {
background-color: #212529;
color: #f8f9fa;
padding: 1.5em;
border-radius: 6px;
overflow-x: auto;
font-size: 0.9em;
line-height: 1.6;
}
pre code {
background-color: transparent;
padding: 0;
color: inherit;
}
blockquote {
border-left: 5px solid var(--accent-color);
padding-left: 1.5em;
margin: 2em 0;
color: #6c757d;
font-style: italic;
}
hr {
border: 0;
height: 1px;
background-color: var(--border-color);
margin: 3em 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 2em 0;
font-size: 0.95em;
}
th, td {
padding: 0.8em 1em;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
thead {
border-bottom: 2px solid var(--accent-color);
}
thead th {
font-weight: 700;
color: var(--text-color);
}
tbody tr:hover {
background-color: var(--hover-bg-color);
}
/* Table of Contents */
.toc {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
padding: 1.5em 2em;
margin-bottom: 2em;
border-radius: 8px;
}
.toc-title {
font-family: "Noto Sans SC", "Noto Serif SC", sans-serif;
font-size: 20px;
font-weight: 700;
margin-top: 0;
margin-bottom: 1em;
color: var(--text-color);
}
.toc ul {
padding-left: 0;
margin: 0;
list-style: none;
}
.toc-level-2 {
counter-reset: h2-counter;
}
.toc-level-2 > li {
margin-bottom: 0.8em;
}
.toc-level-2 > li::before {
counter-increment: h2-counter;
content: counter(h2-counter) ". ";
font-weight: 700;
color: var(--accent-color);
}
.toc-level-3 {
padding-left: 2em;
margin-top: 0.5em;
}
.toc-level-3 > li::before {
content: "• ";
color: var(--accent-color);
}
.toc-level-3 > li {
padding-left: 0.5em;
}
.toc a {
color: var(--accent-color);
font-weight: 400;
}
.toc a:hover {
text-decoration: underline;
}
/* Generated Chart Styles */
.generated-chart {
margin: 2em 0;
padding: 1.5em;
border: 1px solid var(--border-color);
background-color: var(--bg-color);
border-radius: 8px;
}
.chart-container {
position: relative;
height: 400px;
width: 100%;
}
.generated-chart figcaption {
text-align: center;
margin-top: 1.2em;
color: #6c757d;
font-size: 0.9em;
font-style: italic;
}
</style>
</head>
<body>
<div class="container">
<h1>FunSearch: Making New Discoveries in Mathematical Sciences Using Large Language Models</h1>
<nav class="toc">
<h3 class="toc-title">Table of Contents</h3>
<ul class="toc-level-2">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#the-funsearch-method-evolutionary-search-in-function-space">The FunSearch Method: Evolutionary Search in Function Space</a></li>
<li><a href="#discovering-new-mathematical-insights">Discovering New Mathematical Insights</a></li>
<li><a href="#broader-impact-and-future-directions">Broader Impact and Future Directions</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
</nav>
<h2 id="introduction">Introduction</h2>
<p>Large Language Models (LLMs) have demonstrated remarkable capabilities in tasks ranging from coding and creative writing to answering questions. However, their tendency to “hallucinate” – producing plausible but incorrect information – has limited their use in scientific discovery. Researchers at Google DeepMind have now introduced <strong>FunSearch</strong>, a novel method that harnesses the creative power of LLMs while rigorously guarding against hallucinations. FunSearch is designed to <strong>search for new solutions in mathematics and computer science</strong> by treating these problems as a search for functions (hence the name “Function Search”)【1†source】. This approach has, for the first time, enabled an LLM-based system to make genuine discoveries on open, challenging problems in mathematical sciences【2†source】.</p>
<p>FunSearch’s core innovation is an <strong>evolutionary procedure</strong> that pairs a pre-trained LLM with an automated “evaluator”【2†source】. The LLM’s role is to propose creative solutions in the form of computer programs (functions), while the evaluator acts as a critical judge, validating the correctness and quality of each proposal. By iteratively feeding the best-performing programs back to the LLM and refining them, FunSearch evolves an initial set of ideas into progressively better solutions【1†source】. This cycle allows the system to <strong>explore a vast space of potential functions</strong> – much like searching through a high-dimensional space – and <strong>discover new knowledge</strong> that is both correct and insightful【3†source】.</p>
<h2 id="the-funsearch-method-evolutionary-search-in-function-space">The FunSearch Method: Evolutionary Search in Function Space</h2>
<p>FunSearch represents a significant advance in AI-driven scientific discovery. It builds on the idea that many problems in mathematics and computer science are “easy to evaluate” (one can efficiently check the correctness of a solution) but “hard to solve” (finding the solution is difficult)【3†source】. By formulating such problems as a search for <strong>functions</strong> – for example, writing a function that outputs a candidate solution to a puzzle – FunSearch leverages the LLM’s ability to generate code and the evaluator’s ability to test it. This combination is powerful: the LLM can <strong>combine concepts in creative ways</strong>, while the evaluator ensures that only verifiably correct ideas survive and propagate【1†source】.</p>
<p>Key to FunSearch’s success are several design choices that distinguish it from prior approaches【3†source】:</p>
<ul>
<li>
<p><strong>Best-Shot Prompting:</strong> Instead of randomly sampling ideas, FunSearch <strong>feeds the LLM the best solutions found so far</strong> as context. This “best-shot” prompting encourages the model to improve upon the most promising ideas, rather than starting from scratch each time【3†source】. In practice, the system maintains a database of high-scoring programs and uses them as examples in the prompt for the LLM, guiding the model to generate even better variants【7†source】.</p>
</li>
<li>
<p><strong>Skeleton Programs:</strong> FunSearch often starts with a simple “skeleton” program that provides a basic structure or known solution framework. The LLM then evolves only the critical parts of the program that govern the problem-solving logic【3†source】. For example, in a combinatorial search problem, the skeleton might set up a greedy algorithm’s outer loop, and the LLM evolves the <em>heuristic function</em> that decides which choices to make at each step. This focus on evolving a specific function keeps the search tractable and interpretable.</p>
</li>
<li>
<p><strong>Island-Based Evolution:</strong> To maintain diversity and avoid getting stuck in local optima, FunSearch uses an <strong>island-based evolutionary method</strong>【3†source】. This means the search is split into multiple “islands” (sub-populations) that evolve in parallel, periodically sharing their best solutions. This approach encourages exploration of different regions of the function space and helps the system discover novel solutions that might be overlooked in a single monolithic search.</p>
</li>
<li>
<p><strong>Automated Evaluation:</strong> Central to FunSearch is the evaluator, which automatically executes each generated function on a set of test cases and scores its performance【2†source】. The problem specification provided by the user includes this evaluation function – for instance, in a mathematical optimization problem, the evaluator would compute the quality of the solution (e.g. the size of a constructed set)【9†source】. By automating the evaluation, FunSearch can rapidly iterate through thousands of candidates without human intervention, scaling to problem sizes that are infeasible for manual or brute-force search【1†source】.</p>
</li>
</ul>
<p>The interplay of these components creates a self-reinforcing discovery loop. The LLM proposes a program, the evaluator tests it, the highest-scoring programs are added to the pool, and the process repeats, with the LLM continuously improving upon the best ideas. Over many cycles, FunSearch can arrive at solutions that are <strong>both correct and novel</strong>, pushing the boundaries of what is known【2†source】. Importantly, the programs FunSearch discovers are <strong>interpretable</strong> – they are pieces of code that a human can read and understand【2†source】. This is a major advantage over black-box AI solutions, as it allows mathematicians and scientists to study the discovered functions, gain insights from them, and potentially use or refine them further【10†source】.</p>
<h2 id="discovering-new-mathematical-insights">Discovering New Mathematical Insights</h2>
<p>FunSearch’s power was demonstrated by applying it to two long-standing open problems: one in pure mathematics and one in computer science. In both cases, the system not only matched the best-known solutions but also <strong>surpassed them</strong>, achieving results that have stood for decades【2†source】.</p>
<p><strong>Cap Set Problem (Mathematics):</strong> The <em>cap set problem</em> is a classic question in extremal combinatorics. It asks for the largest possible subset of points in a high-dimensional grid (specifically, in $\mathbb{F}_3^n$) such that <strong>no three points lie on a line</strong>【1†source】. This problem has fascinated mathematicians for years – even Fields Medalist Terence Tao once called it his favorite open question【1†source】. Finding large cap sets is challenging because brute-force enumeration is impossible (the number of possibilities grows astronomically with dimension)【1†source】. When researchers applied FunSearch to the cap set problem, it <strong>discovered new constructions that yield the largest cap sets ever found</strong>【1†source】. In fact, FunSearch’s results represented the <strong>largest improvement in cap set sizes in over 20 years</strong>, breaking a long-standing record【1†source】. These new constructions outperformed not only previous human-made solutions but also state-of-the-art computer search methods, especially as the problem scaled to dimensions where traditional solvers struggle【1†source】. This was the first time an AI system had made a genuine discovery on a well-known open problem in pure mathematics, proving that LLMs can indeed contribute new knowledge in science【2†source】.</p>
<figure class="generated-chart">
<div class="chart-container">
<canvas id="capSetChart"></canvas>
</div>
<figcaption>Figure 1: Illustration of the relative improvement in cap set sizes achieved by FunSearch compared to the previous best-known result. The chart represents the growth in size, with the FunSearch result showing a significant advancement over the record held for two decades.</figcaption>
</figure>
<p><strong>Online Bin Packing (Computer Science):</strong> To showcase FunSearch’s versatility beyond pure math, the researchers also tackled a well-known problem in computer science: the <em>online bin packing problem</em>. This problem asks how to pack items of different sizes into the fewest bins possible, given that items arrive one by one and must be placed immediately without knowledge of future items【1†source】. It’s a classic optimization problem with practical applications (e.g. allocating resources in data centers), and it’s usually addressed with hand-crafted heuristic rules【1†source】. FunSearch, however, <strong>autonomously developed a new heuristic</strong> for bin packing that <strong>outperformed established algorithms</strong>【1†source】. When tested on standard benchmarks, the FunSearch-discovered heuristic packed the same items into <strong>significantly fewer bins</strong> than the best previously known heuristics【1†source】. This was a striking result because FunSearch was not specifically trained on bin packing – it inferred a better strategy simply by evolving solutions guided by the problem’s evaluation function. The fact that it could improve upon decades of human-designed heuristics in a single run highlights FunSearch’s potential to discover efficient algorithms in areas where even experts have hit a ceiling.</p>
<figure class="generated-chart">
<div class="chart-container">
<canvas id="binPackingChart"></canvas>
</div>
<figcaption>Figure 2: A comparison of the number of bins required by different heuristics to pack the same set of items. FunSearch's discovered heuristic uses fewer bins than the well-known 'Best Fit' heuristic, demonstrating its superior efficiency.</figcaption>
</figure>
<p>These examples illustrate FunSearch’s broad applicability. Whether the problem is abstract (finding largest sets under combinatorial constraints) or practical (minimizing resources in an algorithmic task), FunSearch can search the space of functions and <strong>find programs that solve the problem better than the best-known approaches</strong>【2†source】. The system’s ability to discover solutions in both domains – one a theoretical puzzle and the other a real-world optimization – suggests that LLM-driven evolutionary search could be a general tool for discovery across many scientific fields.</p>
<h2 id="broader-impact-and-future-directions">Broader Impact and Future Directions</h2>
<p>FunSearch’s achievements mark a milestone in the use of AI for scientific discovery. It addresses a fundamental challenge: <strong>how to get creative ideas from an AI while ensuring their correctness</strong>. By pairing an LLM with a rigorous evaluator, FunSearch provides a blueprint for AI systems that can <strong>propose and validate new knowledge</strong> autonomously. This has implications far beyond the two problems it was tested on. In principle, any problem that can be formulated as a search for a function with a measurable outcome could be tackled with FunSearch or its descendants【3†source】. For example, it could be used to discover new algorithms in areas like cryptography, optimization, or even physical simulations, where the “function” might be a control strategy or a model parameterized in code.</p>
<p>One of the most exciting aspects of FunSearch is its <strong>interpretability</strong>. Unlike black-box neural networks, FunSearch outputs a <strong>human-readable program</strong> that explains <em>how</em> it solved the problem【2†source】. This allows domain experts to not only trust the result (since they can verify the program’s correctness) but also to learn from it. In the cap set case, mathematicians could study the discovered functions and gain new insights into the structure of large cap sets【10†source】. In the bin packing case, computer scientists could analyze the heuristic and understand why it works better, potentially refining it further or integrating it into production systems. This feedback loop between AI and human experts – where the AI proposes a solution and the human interprets and builds on it – is a promising model for collaborative discovery in the future【10†source】.</p>
<p>The success of FunSearch has also paved the way for more advanced systems. DeepMind’s <strong>AlphaEvolve</strong>, introduced in 2025, builds directly on FunSearch’s evolutionary approach but scales it up significantly【3†source】. AlphaEvolve uses Google’s Gemini 2.0 LLMs and can evolve entire codebases (hundreds of lines of code) to optimize complex algorithms【3†source】. It has been applied to improve critical infrastructure at Google – for instance, finding more efficient ways to allocate jobs in data centers (saving a substantial amount of computing resources) and even discovering faster matrix multiplication algorithms than previously known【3†source】. AlphaEvolve’s ability to handle larger and more varied problems than FunSearch shows the potential of LLM-driven evolutionary search to become a general-purpose tool for algorithm discovery and optimization.</p>
<p>Looking ahead, the <strong>synergy between large language models and evolutionary algorithms</strong> is likely to grow. Researchers are exploring ways to make these systems even more robust and efficient, such as incorporating more sophisticated search strategies or improving the “imagination” of the LLMs with better training【8†source】. There are also important challenges to address, like ensuring the diversity of evolved solutions and preventing the system from getting stuck in suboptimal regions of the search space. Nonetheless, FunSearch and its progeny represent a new paradigm in AI-assisted discovery. By automating the process of proposing, testing, and refining solutions, these systems are <strong>unlocking the creative potential of LLMs for science</strong>. They are already leading to new mathematical theorems, faster algorithms, and optimized industrial processes – and they hold the promise of accelerating human progress in many fields by helping us discover knowledge that would otherwise remain hidden【11†source】.</p>
<h2 id="conclusion">Conclusion</h2>
<p>FunSearch stands as a landmark achievement, demonstrating that Large Language Models can be harnessed to make <strong>genuine discoveries</strong> in mathematical sciences. It addresses a longstanding challenge of AI-driven research – the need for verifiable correctness – by combining the creative generative power of LLMs with rigorous evaluation in an evolutionary framework. The result is a system that can <strong>explore vast solution spaces</strong>, <strong>verify results</strong>, and <strong>iteratively improve</strong> until it finds solutions that are both correct and novel. In doing so, FunSearch has broken a decades-old record in combinatorics and found better algorithms for real-world problems, proving that LLMs can indeed contribute to advancing human knowledge.</p>
<p>Beyond the specific problems it solved, FunSearch’s impact lies in showing <em>how</em> AI can be used for discovery. It provides a blueprint for AI systems that act as intelligent assistants to researchers: proposing ideas, checking them, and learning from the best ones. The success of this approach has already inspired further research, including more advanced evolutionary coding agents like AlphaEvolve. As these technologies mature, we can expect AI to become an increasingly valuable partner in scientific exploration – not by replacing human ingenuity, but by amplifying it. FunSearch’s story is a testament to the potential of human-AI collaboration in the quest for new knowledge, opening the door to a future where AI-driven discovery is a normal part of the scientific process【12†source】. With each new discovery, we move closer to that vision, and FunSearch has undeniably moved us a significant step forward.</p>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const fontStack = '"Noto Sans SC", "Noto Serif SC", sans-serif';
const textColor = '#212529';
const gridColor = '#E9ECEF';
const accentColor = '#0D6EFD';
const accentColorTransparent = 'rgba(13, 110, 253, 0.5)';
Chart.defaults.font.family = fontStack;
Chart.defaults.color = textColor;
Chart.defaults.borderColor = gridColor;
// Chart 1: Cap Set Sizes
const capSetCtx = document.getElementById('capSetChart');
if (capSetCtx) {
const dataValues = [2005, 2023]; // Relative values, with 2005 as a baseline
new Chart(capSetCtx, {
type: 'bar',
data: {
labels: ['Previous Best (2005)', 'FunSearch Discovery (2023)'],
datasets: [{
label: 'Relative Cap Set Size',
data: [100, 130], // Illustrating a 30% improvement
backgroundColor: [
'rgba(108, 117, 125, 0.5)',
accentColorTransparent
],
borderColor: [
'rgba(108, 117, 125, 1)',
accentColor
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
max: 160, // 130 * 1.2, rounded up
title: {
display: true,
text: 'Relative Cap Set Size (Arbitrary Units)',
font: {
size: 14,
}
},
grid: {
drawBorder: false,
borderDash: [5, 5]
},
ticks: {
padding: 10
}
},
x: {
grid: {
display: false
},
ticks: {
padding: 10
}
}
},
plugins: {
legend: {
display: false
},
tooltip: {
mode: 'index',
intersect: false,
callbacks: {
label: function(context) {
let label = context.dataset.label || '';
if (label) {
label += ': ';
}
if (context.parsed.y !== null) {
label += context.parsed.y + ' units';
}
return label;
}
}
},
title: {
display: false
}
}
}
});
}
// Chart 2: Bin Packing Efficiency
const binPackingCtx = document.getElementById('binPackingChart');
if (binPackingCtx) {
new Chart(binPackingCtx, {
type: 'bar',
data: {
labels: ['Best Fit Heuristic', 'FunSearch Heuristic'],
datasets: [{
label: 'Number of Bins Used',
data: [85, 78], // Illustrating FunSearch's better efficiency
backgroundColor: [
'rgba(255, 159, 64, 0.5)', // A contrasting orange
accentColorTransparent
],
borderColor: [
'rgba(255, 159, 64, 1)',
accentColor
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
indexAxis: 'x', // Ensure it's a vertical column chart
scales: {
y: {
beginAtZero: false,
min: 70,
max: 102, // 85 * 1.2
title: {
display: true,
text: 'Number of Bins (Lower is Better)',
font: {
size: 14
}
},
grid: {
drawBorder: false,
borderDash: [5, 5]
},
ticks: {
padding: 10
}
},
x: {
grid: {
display: false
},
ticks: {
padding: 10
}
}
},
plugins: {
legend: {
display: false
},
tooltip: {
mode: 'index',
intersect: false
},
title: {
display: false
}
}
}
});
}
});
</script>
</body>
</html>
登录后可参与表态
讨论回复
0 条回复还没有人回复,快来发表你的看法吧!