arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.10598cs.AI
收藏

通过代码图实现高效的预算自动算法设计

Budget-Efficient Automatic Algorithm Design via Code Graph

Operations Research Center(运筹学研究中心);Department of Civil and Environmental Engineering(土木与环境工程系);University of California, Berkeley(加州大学伯克利分校);Laboratory for Information & Decision Systems(信息与决策系统实验室)

Maxime Bouscary, Manxi Wu, Saurabh Amin

AI总结:

本文提出基于代码图的高效自动算法设计方法,通过优化搜索策略和图结构分解算法,提升算法生成效率并验证其在组合优化问题中的优越性。

摘要:

大型语言模型(LLMs)已发展为自动算法设计(AAD)的强大工具,但现有流程仍效率低下。现有方法在全算法粒度下操作,重复性地重写重复的子结构并丢弃可能包含有价值算法特征的低适应性候选。我们正式化了预算高效的自动算法设计,其中搜索策略在有限计算成本下最大化实现的适应性。我们提出了一种有向无环图的算法表示方法,并构建了一个充分利用LLM输出的搜索框架。而非查询LLM获取完整算法,我们利用其获得修正:紧凑的操作符,用于添加、替换或删除代码块。每个修正增强图,产生与先前修正可组合的新算法。此图结构将算法分解为修正集,使修正层面的信用分配能够指导后续查询。我们还补充了关于不同预算水平下搜索深度和广度之间理想平衡的理论见解。我们通过三个组合优化问题实证验证了我们的方法,在相同token预算下,基于图的搜索优于全算法搜索。最后,我们的实验表明,丰富的上下文有助于仅当LLM的先前知识较浅时,否则可能阻碍性能。

英文摘要:

Large language models (LLMs) have emerged as powerful tools for automatic algorithm design (AAD). However, existing pipelines remain inefficient. They operate at the granularity of full algorithms, redundantly rewriting recurring substructures and discarding low-fitness candidates that may contain valuable algorithmic features. We formalize budget-efficient automatic algorithm design, wherein the search policy maximizes realized fitness subject to limited computational cost. We propose a directed acyclic graph representation of algorithms and build a search framework that fully exploits the LLM's output. Instead of querying the LLM for full algorithms, we use it to obtain corrections: compact operators that add, replace, or remove code blocks. Each correction augments the graph, yielding new algorithms that compose with prior corrections. This graph structure decomposes algorithms into sets of corrections, enabling correction-level credit assignment that informs subsequent queries. We complement this framework with theoretical insights into the ideal balance between search depth and breadth at different budget levels. We validate our method empirically on three combinatorial optimization problems, demonstrating consistent superiority of our graph-based search over full-algorithm search at equal token budget. Finally, our experiments suggest that rich contexts help only when the LLM's prior knowledge is shallow, and can hinder performance otherwise.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑