无需人类编程,自动发现可解释的排序算法
AlgoPilot: Fully Autonomous Program Synthesis Without Human-Written Programs
- 用强化学习+轨迹语言模型从零生成算法
- 在排序任务中自动生成冒泡排序等经典算法
- 适合对自主算法生成感兴趣的开发者
程序合成传统依赖人工提供的规范、示例或先验知识来生成功能性算法。现有方法或模仿人类编写的算法,或仅解决特定任务而无法生成可复用的程序逻辑,限制了其创造新算法的能力。我们提出 AlgoPilot,一种完全自动化的程序合成方法,无需人类编写的程序或轨迹。AlgoPilot 利用强化学习(RL)并由轨迹语言模型(TLM)引导,从零开始合成算法。TLM 在随机生成的 Python 函数轨迹上训练,作为强化学习过程中的软约束,使生成序列与可能代表有效算法的模式对齐。以排序为例,AlgoPilot 展示了其生成可解释为经典算法(如冒泡排序)轨迹的能力,且不依赖任何先验算法知识。本工作建立了算法发现的新范式,为未来自主程序合成的发展奠定基础。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。