arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.09564cs.AI
收藏

用于语法引导综合的强化学习与数据生成

Reinforcement Learning and Data-Generation for Syntax-Guided Synthesis

University of Oxford(牛津大学);University of Edinburgh(爱丁堡大学)

Julian Parsert, Elizabeth Polgreen

AI总结:

针对 SyGuS 任务,提出基于 MCTS 的强化学习算法,并利用一阶可满足性问题的反统一自动生成训练数据,显著提升了综合性能,在训练集上优于 cvc5 并公开了数据集。

摘要:

程序综合是基于规范自动生成代码的任务。在 Syntax-Guided Synthesis (SyGuS,语法引导综合) 中,该规范是语法模板和逻辑公式的组合,且结果保证同时满足两者。我们提出了一种用于 SyGuS 的强化学习引导算法,该算法使用 Monte-Carlo Tree Search (MCTS,蒙特卡洛树搜索) 来搜索候选解空间。我们的算法学习策略和价值函数,结合树的置信区间上界,使其能够平衡探索与利用。将机器学习方法应用于语法引导综合的一个常见挑战是训练数据的稀缺性。为了解决这个问题,我们提出了一种基于现有的一阶可满足性问题的反统一自动生成 SyGuS 训练数据的方法,我们用它来训练我们的 MCTS 策略。我们实现并评估了该设置,证明学习到的策略和价值在训练集和测试集上将综合性能比基线提高了超过 26 个百分点。我们的工具在训练集上优于最先进的工具 cvc5,并在测试集上解决的问题总数方面表现相当(在 cvc5 失败的基准上解决了 23%)。我们公开了我们的数据集,以促进机器学习方法在 SyGuS 问题上的进一步应用。

英文摘要:

Program synthesis is the task of automatically generating code based on a specification. In Syntax-Guided Synthesis (SyGuS) this specification is a combination of a syntactic template and a logical formula, and the result is guaranteed to satisfy both. We present a reinforcement-learning guided algorithm for SyGuS which uses Monte-Carlo Tree Search (MCTS) to search the space of candidate solutions. Our algorithm learns policy and value functions which, combined with the upper confidence bound for trees, allow it to balance exploration and exploitation. A common challenge in applying machine learning approaches to syntax-guided synthesis is the scarcity of training data. To address this, we present a method for automatically generating training data for SyGuS based on anti-unification of existing first-order satisfiability problems, which we use to train our MCTS policy. We implement and evaluate this setup and demonstrate that learned policy and value improve the synthesis performance over a baseline by over 26 percentage points in the training and testing sets. Our tool outperforms state-of-the-art tool cvc5 on the training set and performs comparably in terms of the total number of problems solved on the testing set (solving 23% of the benchmarks on which cvc5 fails). We make our data set publicly available, to enable further application of machine learning methods to the SyGuS problem.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑