程序合成传统上依赖人类提供的规范、示例或先验知识来生成功能性算法。现有方法要么模仿人类编写的算法,要么解决特定任务却不生成可复用的程序逻辑,这限制了它们创造新型算法的能力。我们提出AlgoPilot,这是一种无需人类编写的程序或轨迹、实现全自动化程序合成的突破性方法。AlgoPilot利用由轨迹语言模型(Trajectory Language Model,TLM)引导的强化学习(reinforcement learning,RL)从零开始合成算法。TLM在随机Python函数生成的轨迹上训练,在RL过程中充当软约束,使生成的序列与可能代表有效算法的模式对齐。以排序为测试用例,AlgoPilot展现出在无先验算法知识的情况下,生成可解释为冒泡排序(Bubble Sort)等经典算法的轨迹的能力。该工作确立了算法发现的新范式,为自主程序合成的未来发展奠定了基础。
英文摘要:
Program synthesis has traditionally relied on human-provided specifications, examples, or prior knowledge to generate functional algorithms. Existing methods either emulate human-written algorithms or solve specific tasks without generating reusable programmatic logic, limiting their ability to create novel algorithms. We introduce AlgoPilot, a groundbreaking approach for fully automated program synthesis without human-written programs or trajectories. AlgoPilot leverages reinforcement learning (RL) guided by a Trajectory Language Model (TLM) to synthesize algorithms from scratch. The TLM, trained on trajectories generated by random Python functions, serves as a soft constraint during the RL process, aligning generated sequences with patterns likely to represent valid algorithms. Using sorting as a test case, AlgoPilot demonstrates its ability to generate trajectories that are interpretable as classical algorithms, such as Bubble Sort, while operating without prior algorithmic knowledge. This work establishes a new paradigm for algorithm discovery and lays the groundwork for future advancements in autonomous program synthesis.
Can AI Agents Synthesize Scientific Conclusions in Health?
Princeton University(普林斯顿大学);Universidade Federal de Minas Gerais(米纳斯吉拉斯联邦大学);Stony Brook University(石溪大学);Hackensack Meridian School of Medicine(哈肯萨克子午线医学院)
SapientML: Synthesizing Machine Learning Pipelines by Learning from Human-Written Solutions
Fujitsu Research of America, Inc.(美国富士通研究有限公司);Fujitsu Ltd.(富士通有限公司);The University of Texas at Austin(德克萨斯大学奥斯汀分校);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
Improving Code Generation by Training with Natural Language Feedback
New York University(纽约大学);FAR AI;University of Sussex(萨塞克斯大学);University of the Basque Country UPV/EHU(巴斯克大学 UPV/EHU);Genentech(基因泰克);CIFAR LMB(加拿大高级研究院 LMB);Anthropic