基于进化树的大型语言模型驱动的代码优化
Large Language Model-Powered Evolutionary Code Optimization on a Phylogenetic Tree
AI总结:
PhyloEvolve利用大型语言模型和进化算法优化GPU科学计算算法,通过进化树结构提升优化效率和可重复性。
摘要:
优化现代GPU的科学计算算法是一个劳动密集且迭代的过程,涉及重复的代码修改、基准测试和调整,跨越复杂的硬件和软件堆栈。最近的研究探索了利用大型语言模型(LLM)辅助的进化方法进行自动化代码优化,但这些方法主要依赖于基于结果的选择和随机突变,未能充分利用迭代优化过程中生成的丰富轨迹信息。我们提出了PhyloEvolve,一个基于LLM代理的系统,将GPU导向的算法优化重新表述为上下文强化学习(ICRL)问题。这种表述使在轨迹条件下重用优化经验成为可能,而无需模型重新训练。PhyloEvolve将算法蒸馏和基于提示的决策变压器整合到一个迭代的工作流程中,将算法修改序列和性能反馈作为第一类学习信号。为了组织优化历史,我们引入了进化树表示法,该表示法捕捉算法变体之间的继承、分化和重组,从而实现回溯、跨谱系转移和可重复性。系统结合了精英轨迹池、多岛屿并行探索和容器化执行,以在异构硬件上平衡探索和利用。我们评估了PhyloEvolve在科学计算工作负载上的表现,包括偏微分方程求解器、流形学习和谱图算法,展示了在运行时间、内存效率和正确性方面相对于基线和进化方法的一致改进。代码已发布在:https://github.com/annihi1ation/phylo_evolve
英文摘要:
Optimizing scientific computing algorithms for modern GPUs is a labor-intensive and iterative process involving repeated code modification, benchmarking, and tuning across complex hardware and software stacks. Recent work has explored large language model (LLM)-assisted evolutionary methods for automated code optimization, but these approaches primarily rely on outcome-based selection and random mutation, underutilizing the rich trajectory information generated during iterative optimization. We propose PhyloEvolve, an LLM-agent system that reframes GPU-oriented algorithm optimization as an In-Context Reinforcement Learning (ICRL) problem. This formulation enables trajectory-conditioned reuse of optimization experience without model retraining. PhyloEvolve integrates Algorithm Distillation and prompt-based Decision Transformers into an iterative workflow, treating sequences of algorithm modifications and performance feedback as first-class learning signals. To organize optimization history, we introduce a phylogenetic tree representation that captures inheritance, divergence, and recombination among algorithm variants, enabling backtracking, cross-lineage transfer, and reproducibility. The system combines elite trajectory pooling, multi-island parallel exploration, and containerized execution to balance exploration and exploitation across heterogeneous hardware. We evaluate PhyloEvolve on scientific computing workloads including PDE solvers, manifold learning, and spectral graph algorithms, demonstrating consistent improvements in runtime, memory efficiency, and correctness over baseline and evolutionary methods. Code is published at: https://github.com/annihi1ation/phylo_evolve
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。