cs.NENov 26, 2026

The LLM Proposes, the Benchmark Disposes: Centre Bias in LLM-Driven Automated Algorithm Design

Authors: Yuefeng Xu, Rui Zhong, Jun Yu

Organizations: Graduate School of Science and Technology, Niigata University, Niigata, Japan · Information Initiative Center, Hokkaido University, Sapporo, Japan · Institute of Science and Technology, Niigata University, Niigata, Japan

Abstract

Large language models (LLMs) are increasingly used to design black-box optimisation algorithms automatically (LLM-driven automated algorithm design, LLM-AAD). Selected by scores on training benchmarks, many of which place optima at or near the search-box centre, do LLM-AAD optimisers develop a centre or origin bias? Using Kůdela's shift-ratio test and the BIAS toolbox, we screen 330 published LLM-generated algorithms from six sources, flagging 1.9% (6/312) at D=5D=5 and 1.8% (5/276) at D=10D=10. A controlled LLaMEA experiment then varies only the training benchmark: with unshifted functions (optima near the origin), 5/20 final algorithms are flagged at D=10D=10 vs. 0/20 with randomly shifted functions (exploratory; Holm-corrected p=0.094p=0.094). On independent test instances, centre-trained algorithms lose more performance when the optimum moves (AOCC gap: median 0.024 vs. 0.005, mean 0.092 vs. 0.005; Mann-Whitney p=0.003p=0.003, r=0.52r=0.52), driven by four losing 0.30-0.36. Across all 497 best-so-far algorithms, biased code reaches the top under both regimes (6/20 vs. 3/20 runs) but persists to the end more often under unshifted training (5/6 vs. 0/3). A single code edit removes the flag for all ten examined biased algorithms, uncovering unreported LLM-optimiser mechanisms including a velocity clamp equal to box half-width (landing particles on the centre) and origin-trapping bugs. For four of five centre-trained algorithms this edit causes no detectable loss on shifted instances, unlike CMA-ES initialised at the box centre. Randomly shifting training functions offers a simple safeguard.

Figures & tables

Explore similar work

Mar 3, 2026

From Heuristic Selection to Automated Algorithm Design: LLMs Benefit from Strong Priors

Large Language Models (LLMs) have already been widely adopted for automated algorithm design, demonstrating strong abilities in generating and evolving algorithms across various fields. Existing work has largely focused on examining their effectiveness in solving specific problems, with search strategies primarily guided by adaptive prompt designs. In this paper, through investigating the token-wise attribution of the prompts to LLM-generated algorithmic code, we show that the embedded code examples and their associated strategy instructions have the strongest influence on the generated algorithms. Building upon this insight, we propose leveraging existing benchmark algorithms as strong priors to guide LLM-driven optimization. We evaluate this approach with three LLMs on two black-box optimization benchmarks: the pseudo-Boolean optimization suite (pbo) and the black-box optimization suite (bbob). Despite relying on a simple (1+1) elitist search, it obtains the best average rank in five of six benchmark--LLM settings against six state-of-the-art LLM-driven methods, including more sophisticated search strategies. Our findings highlight the value of integrating benchmarking studies to enhance both efficiency and robustness of the LLM-driven black-box optimization methods.
Oct 26, 2026

Agentic Algorithm Design: LLMs that Propose, Formalise, and Prove Runtime Bounds for Evolutionary Algorithms in Lean

LLMs now prove hard theorems in Lean. Can they also design algorithms and prove their correctness and efficiency? LLM-guided design of optimisation heuristics (such as AlphaEvolve) is purely empirical. Automated theorem provers with LLMs prove given statements. So far, there has been little evidence that LLMs can do both: design an algorithm and guarantee its efficiency by a mathematical proof. We present a staged pipeline modelled after research methodology in design and analysis of evolutionary algorithms. The agent proposes black-box optimisation algorithms, and Lean guards filter out flawed designs. The agent then defines a potential function and proves drift bounds that guarantee an expected runtime improvement over the baseline algorithm. At no point in the pipeline are the algorithms compared empirically. The agent generates a black-box optimisation algorithm with expected runtime O(n2)O(n^2) on a CycleUncover problem, where the classical (1+1) EA needs runtime eΩ(n)e^{Ω(n)}. The pipeline also designs and analyses a black-box optimisation algorithm for integer-valued submodular minimisation with expected runtime O(n2+2c)O(n^{2+2c}), and it matches the classical runtime O(n2)O(n^2) on LeadingOnes. Across 8 problem classes, 12 of 15 runs with frontier models complete the pipeline with a machine-checked expected-runtime bound. An ablation study shows that removing the staging and asking the agent to zero-shot an algorithmic design with a runtime guarantee leads to a copy of the seeded baseline algorithm (random search) or to incomplete proofs. Our study suggests that machine-checked specifications in Lean can replace empirical evaluation in open-ended algorithm discovery. To the best of our knowledge, this is the first example of an automated pipeline that designs efficient black-box optimisation algorithms with machine-checked runtime bounds in Lean.
Jun 2, 2026

The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generation

Large language models (LLMs) now generate substantial production code, often for tasks with multiple valid algorithmic solutions. Incidental prompt cues, meaning contextual words or metadata outside the task specification, can steer which algorithm the model selects, even when all outputs pass the same tests. Prompt sensitivity is well studied as a tool to improve output quality. Here, output policy means algorithm choice under fixed correctness. We define algorithm steering as cue-induced shifts in algorithm-family distributions and run 46,535 controlled experiments across 11 tasks, 19 cue types (18 channels plus a memoization semantic-vs-surface ablation that preserves meaning while changing typography and punctuation), and 15 model configurations. We find large, systematic shifts in algorithm-family distributions (up to 100 pp), largely consistent with cue semantics, including in applied tasks such as rate limiting. Direct algorithm naming is the most reliable mitigation we tested. Accidental context therefore creates an "invisible lottery" over performance, security, and maintainability.