[论文解读] Learning Compositional Neural Programs with Recursive Tree Search and Planning
该论文提出 AlphaNPI,一种强化学习算法,通过仅使用程序规范和正确性测试,无需执行轨迹即可训练神经程序员解释器(NPIs)。通过将递归树搜索和 AlphaZero 风格的规划整合进 NPI,AlphaNPI 在排序任务上表现优异,并能泛化至任意汉诺塔谜题,其性能与弱监督基线相当,且无需强监督。
We propose a novel reinforcement learning algorithm, AlphaNPI, that incorporates the strengths of Neural Programmer-Interpreters (NPI) and AlphaZero. NPI contributes structural biases in the form of modularity, hierarchy and recursion, which are helpful to reduce sample complexity, improve generalization and increase interpretability. AlphaZero contributes powerful neural network guided search algorithms, which we augment with recursion. AlphaNPI only assumes a hierarchical program specification with sparse rewards: 1 when the program execution satisfies the specification, and 0 otherwise. Using this specification, AlphaNPI is able to train NPI models effectively with RL for the first time, completely eliminating the need for strong supervision in the form of execution traces. The experiments show that AlphaNPI can sort as well as previous strongly supervised NPI variants. The AlphaNPI agent is also trained on a Tower of Hanoi puzzle with two disks and is shown to generalize to puzzles with an arbitrary number of disk
研究动机与目标
- 消除训练神经程序员解释器(NPIs)时对强监督的需求,传统方法通常需要完整的执行轨迹。
- 通过用程序规范和正确性测试替代执行轨迹,实现对 NPI 的有效强化学习(RL)训练。
- 利用分层和递归的程序结构,提升强化学习智能体的泛化能力和可解释性。
- 证明蒙特卡洛树搜索(MCTS)规划在组合任务中显著优于单纯神经策略的性能。
提出的方法
- 将 NPI 重新表述为演员-评论家网络,以支持端到端的强化学习训练。
- 在 NPI 框架中集成递归树搜索和 AlphaZero 风格的 MCTS 规划,以处理分层和递归的程序组合。
- 使用稀疏奖励信号:若程序执行满足规范则奖励为 1,否则为 0。
- 采用课程学习策略,通过温度控制调度器逐步提升任务难度。
- 引入狄利克雷噪声和 PUCT 基础探索策略,以在 MCTS 中平衡利用与探索。
- 应用递归执行惩罚($r_{\text{pen-recur}}$),以在训练过程中鼓励发现递归程序轨迹。
实验结果
研究问题
- RQ1NPI 是否能在无执行轨迹的情况下通过强化学习有效训练?
- RQ2仅通过正确性反馈和程序规范,能否使用 RL 学习递归程序结构?
- RQ3与直接策略学习相比,MCTS 引导的规划是否显著提升 NPI 训练的样本效率和性能?
- RQ4基于在小规模实例上观察到的行为,训练好的智能体是否能泛化至更大规模的问题实例(如汉诺塔中的更多圆盘)?
主要发现
- 尽管仅使用稀疏奖励且无执行轨迹,AlphaNPI 在冒泡排序任务上的性能与强监督的 NPI 变体相当。
- 该智能体成功泛化至解决任意圆盘数的汉诺塔谜题,其泛化能力通过小规模实例行为的归纳推理得到验证。
- 在推理阶段使用 MCTS 规划的智能体优于单纯的神经网络策略,证明了规划在组合程序的样本高效强化学习中的关键作用。
- 递归执行惩罚有效促进了递归程序轨迹的发现,提高了学习正确递归解法的可能性。
- 在仅使用 CPU 的设置下(12 个 CPU,无 GPU),每种环境的训练时间约为 2 小时,表明该方法在普通硬件上具有可行性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。