Manuscript Offprint

arXiv:2610.03675

FrugalEvo: Towards Cost-Aware LLM-Guided Program Evolution

Hui Chen, Xuan Qi, James Xu Zhao, Zhaopeng Feng, Shilong Liu, Kuang Xu, Pang Wei Koh, Bryan Hooi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

LLM-guided evolutionary methods, such as AlphaEvolve, have emerged as powerful approaches for challenging computational optimization problems, such as circle packing. However, prior work typically optimizes performance gain over a fixed number of iterations. We argue that practical optimization should maximize gain per unit cost. To this end, we propose FrugalEvo, a cost-aware evolutionary framework where a stronger, higher-cost LLM explores solution strategies, and a cheaper LLM implements them and iteratively refines the resulting code. We also design a cache-efficient evolution process, where our harness and prompts maximize the sharing of prefixes across different evolution steps, to improve cache reuse. To measure solution quality throughout a fixed cost budget, we introduce Budget-Aware Area Under the Curve (BA-AUC), defined as the area under the best-so-far evaluation score curve over cumulative LLM cost, up to the budget. Across 10 mathematical and systems optimization tasks, FrugalEvo matches or surpasses state-of-the-art baselines, including OpenEvolve, ShinkaEvolve, AdaEvolve, and EvoX, in final solution quality and achieves higher BA-AUC on 9 tasks. It also achieves higher average performance than these baselines on 10 algorithmic optimization tasks from ALE-Bench-Lite. Notably, on circle packing, FrugalEvo achieves new state-of-the-art performance with GPT-5.6 Terra and Luna for only 1.68andwithGLM−5.3anditsFlashvariantforonly1.68 and with GLM-5.3 and its Flash variant for only0.55, matching or surpassing all baselines, including multi-agent methods such as CORAL and SwarmResearch, which cost approximately $50 on average.

Figure

(a) Comparison of frameworks.

Comparison of Methods on Circle Packing

(b) Solution quality vs. cost.

Average Cost per Iteration

(c) Average cost per iteration.

Figure 1: High-level overview of FrugalEvo. (a) compares the FrugalEvo framework with those of prior work. (b) and (c) evaluate methods on the circle packing task: (b) plots solution quality against cumulative API cost, and (c) reports the average cost per iteration. FrugalEvo pairs GLM 5.3 with the cheaper GLM 5.3 Flash, whereas all other methods use GLM 5.3 alone. Results are averaged over three runs, each given a budget of $1 (USD).

*Correspondence to: hui.chen@nus.edu.sg

1 INTRODUCTION

Rapid advances in large language models (LLMs) have accelerated scientific discovery across diverse domains (Feng et al., 2026b; Liu et al., 2026a; Wang et al., 2026). In particular, LLM-guided evolutionary methods, such as AlphaEvolve (Novikov et al., 2025), OpenEvolve (Sharma, 2025), and ShinkaEvolve (Lange et al., 2026), have shown promise in computational optimization problems, including mathematics (Glazer et al., 2024), systems (Cheng et al., 2025), and algorithmic optimization (Imajuku et al., 2026). These methods typically maintain a pool of high-performing programs or solutions; they iteratively select a parent from this pool, prompt an LLM to propose a mutation, and then evaluate the resulting candidate. Progress is often measured as performance after a given number of evolutionary iterations (Liu et al., 2026b; Cemri et al., 2026), with curves plotted against the number of LLM-generated candidates or evaluator calls.

However, focusing on performance after a fixed number of iterations may overlook a key practical constraint in computational optimization: the total cost. This cost may include API fees or GPU compute costs for LLM inference, CPU compute costs for evaluator execution, and other CPU/GPU resource costs associated with task execution. On many challenging tasks, AI agents achieve better performance with more inference-time computation, a phenomenon known as test-time scaling (Snell et al., 2024; Brown et al., 2024; Muennighoff et al., 2025). Consequently, higher performance alone does not establish greater efficiency, as it may simply reflect higher expenditure. We therefore argue that methods should be assessed by their performance-cost trade-offs and their ability to maximize solution quality under a fixed cost budget. This shifts the focus from gain per iteration to gain per unit cost. To measure gain per unit cost, we introduce a new metric, Budget-Aware Area Under the Curve (BA-AUC), based on the performance achieved at each cost budget.

Next, we propose FrugalEvo, a cost-aware LLM-guided evolutionary framework for computational optimization. Since LLM inference often accounts for the largest proportion of search costs in this domain, compared with those of evaluator execution and other CPU/GPU operations, we focus on improving the cost efficiency of LLM inference. As shown in Figure 1a, FrugalEvo splits candidate program generation into two steps and uses two different models to carry them out: a strong, high-cost LLM explores diverse, promising design strategies, while a weaker, low-cost LLM implements them as executable programs and iteratively refines the resulting code.

Beyond model collaboration, we design a cache-efficient evolution process for FrugalEvo. Inference systems and APIs that support prompt caching can reuse cached key-value (KV) states for identical prompt prefixes, reducing latency and cost. To facilitate this reuse, we design our harness and prompts to maximize the sharing of prefixes across different evolution steps, improving cache reuse.

We evaluate FrugalEvo on 20 tasks spanning mathematical, systems, and algorithmic optimization (Section 3). With two model configurations—GPT-5.6 Terra and Luna (OpenAI, 2026), and GLM-5.3 and its Flash variant (Z.ai, 2026a;b)—FrugalEvo matches or outperforms OpenEvolve (Sharma, 2025), ShinkaEvolve (Lange et al., 2026), AdaEvolve (Cemri et al., 2026), and EvoX (Liu et al., 2026b) in final solution quality and BA-AUC on 9 of 10 mathematical and systems optimization tasks. It also achieves the highest average performance across 10 algorithmic optimization tasks and matches or surpasses the reported AlphaEvolve (Novikov et al., 2025) results on all four mathematical tasks with available comparisons. Notably, as shown in Figure 1b, FrugalEvo achieves a sum of radii of 2.63599 on Circle Packing using GLM-5.3 and its Flash variant for only 0.55,surpassingallbaselines,includingmulti−agentmethodswhichcostapproximately0.55, surpassing all baselines, including multi-agent methods which cost approximately50 on average. Moreover, Figure 1c shows that FrugalEvo substantially reduces the average cost per iteration.

In summary, our contributions include:

• We argue that practical LLM-guided evolutionary search in computational optimization should focus on improving performance gain per unit cost. In this work, we introduce Budget-Aware Area Under the Curve (BA-AUC) to assess solution quality throughout a fixed LLM cost budget, complementing evaluation based on final scores.

• We propose FrugalEvo, a cost-aware evolutionary framework that combines strategy exploration by a strong, high-cost model with code implementation and refinement by a low-cost model, and design a cache-efficient evolution process.

• We evaluate FrugalEvo on 20 real-world computational optimization tasks. FrugalEvo matches or surpasses all baselines, including OpenEvolve, ShinkaEvolve, AdaEvolve, and EvoX, in solution quality and achieves higher BA-AUC on 9 of 10 mathematical and systems optimization tasks. It also achieves the highest average performance on 10 algorithmic optimization tasks.

References (31)