arXiv:2606.29999 · 中英对照阅读
AlgoSkill:通过调度类人技能学习算法设计
AlgoSkill: Learning to Design Algorithms by Scheduling Human-Like Skills
中文速览
把自然语言题目稳定地转成正确、够快的算法,难点不只是写代码,还包括读约束、选思路、证明正确并不断修补。AlgoSkill把这些步骤拆成20种有明确分工的算法技能,让模型根据当前进展挑选下一步,再用蒙特卡洛树搜索(MCTS)探索不同组合,并借助编译、测试、压力测试和复杂度检查反馈来纠错。实验显示,它在竞赛编程和组合优化任务上优于直接生成、思维链、自我修改以及不使用技能库的搜索方法,消融实验也表明技能库、验证修复和搜索调度都能带来提升。这种做法把算法设计从“一次写出答案”变成“有步骤地尝试并验证”,让模型的推理过程更可控,也更容易定位和改进错误。
摘要
从自然语言问题描述中设计算法,需要识别问题结构、解读约束、选择合适的算法范式、检查正确性并优化复杂度。现有的大语言模型(LLM)方法往往依赖直接生成或通用自我改进,将这些步骤隐含处理。我们提出 AlgoSkill,将算法设计建模为在类型化算法技能库上进行的序贯决策,其中包括问题抽象、约束分析、状态设计、数据结构选择、证明检查、反例构造和复杂度优化。学习型调度器根据当前设计状态提出技能,而蒙特卡洛树搜索(MCTS)控制器则利用编译、测试、压力测试和复杂度分析提供的验证反馈,探索技能序列。在竞赛编程基准和组合优化基准上的实验表明,AlgoSkill 的表现优于直接的大语言模型生成、思维链提示、自我改进以及不使用类型化技能的 MCTS。消融实验表明,类型化技能、基于验证的修复和基于搜索的调度均有助于提升性能。这些结果支持将自动算法设计视为验证引导的技能调度,而非一次性代码生成。我们的代码已发布于:https://github.com/Hik289/algorithm_skill.git】【。
Designing an algorithm from a natural-language problem statement requires identifying the problem structure, reading constraints, choosing a suitable paradigm, checking correctness, and refining complexity. Existing large language model (LLM) methods often rely on direct generation or generic self-refinement, leaving these steps implicit. We propose AlgoSkill, which models algorithm design as sequential decision-making over a typed library of algorithmic skills, including abstraction, constraint analysis, state design, data-structure selection, proof checking, counterexample construction, and complexity refinement. A learned scheduler proposes skills from the current design state, while a Monte Carlo Tree Search (MCTS) controller explores skill sequences using verification feedback from compilation, testing, stress testing, and complexity analysis. Experiments on competitive programming and combinatorial optimization benchmarks show that AlgoSkill improves over direct LLM generation, chain-of-thought prompting, self-refinement, and MCTS without typed skills. Ablations show that typed skills, verification-based repair, and search-based scheduling each contribute to performance. These results support treating automatic algorithm design as verification-guided skill scheduling rather than one-shot code generation. Our code is available at: https://github.com/Hik289/algorithm_skill.git.
术语表
- AlgoSkill
- AlgoSkill
- large language model (LLM)
- 大语言模型(LLM)
- algorithm design
- 算法设计
- typed algorithmic skills
- 类型化算法技能
- skill library
- 技能库
- design state
- 设计状态
- learned scheduler
- 学习型调度器
- skill scheduling
- 技能调度
- Monte Carlo Tree Search (MCTS)
- 蒙特卡洛树搜索(MCTS)
- verification feedback
- 验证反馈
- verification-guided skill scheduling
- 验证引导的技能调度
- chain-of-thought reasoning
- 思维链推理
- self-refinement
- 自我改进
- Reflexion
- Reflexion
- Tree of Thoughts
- 思维树
- program synthesis
- 程序综合
- code generation
- 代码生成
- competitive programming benchmarks
- 竞赛编程基准
- combinatorial optimization benchmarks
- 组合优化基准
- problem abstraction
- 问题抽象
- constraint analysis
- 约束分析
- state design
- 状态设计
- data-structure selection
- 数据结构选择
- proof checking
- 证明检查
- counterexample construction
- 反例构造
- complexity refinement
- 复杂度优化
- brute-force construction
- 暴力算法构造
- design trajectory
- 设计轨迹
- valid-skill filter
- 有效技能筛选器