arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.05740cs.LGcs.AIcs.PL
收藏

生成实用示例以训练神经程序合成器

Generating Pragmatic Examples to Train Neural Program Synthesizers

Carnegie Mellon University(卡内基梅隆大学);Autodesk Research(欧特克研究中心)

Saujas Vaduguru, Daniel Fried, Yewen Pu

AI总结:

本文提出PraX方法,通过听者与说话者模型自玩采样程序和示例对,利用语用推理选训练示例,提升程序合成器消除示例歧义能力,在正则表达式合成任务上性能优于无实用示例训练模型且接近人类示例监督学习效果。

摘要:

示例编程是合成与用户提供的一组输入-输出示例一致的程序的任务。由于示例通常是对用户意图的不完全规范,优秀的合成器必须从众多与给定示例集一致的程序中选择预期程序。先前的工作将程序合成框架化为听者(合成程序)和说话者(选择示例的用户)之间的合作博弈,并表明计算语用推理模型在选择用户预期程序方面是有效的。然而,这些模型需要对大量程序和示例进行反事实推理,这在现实的程序空间中是不可行的。在本文中,我们提出PraX,一种使用神经网络分摊这种搜索的新方法。我们通过听者和说话者模型之间的自玩来采样程序和示例对,并使用语用推理从该样本中选择信息丰富的训练示例。然后,我们使用该信息丰富的数据集训练模型,以提高合成器在无需人类监督的情况下消除用户提供示例歧义的能力。我们在从示例字符串合成正则表达式的具有挑战性的任务上验证了PraX,发现我们的方法(1)比未选择实用示例的模型性能高出23%(相对增长51%);(2)尽管训练中未使用人类数据,但与使用人类提供的实用示例数据集的监督学习性能相当。

英文摘要:

Programming-by-example is the task of synthesizing a program that is consistent with a set of user-provided input-output examples. As examples are often an under-specification of one's intent, a good synthesizer must choose the intended program from the many that are consistent with the given set of examples. Prior work frames program synthesis as a cooperative game between a listener (that synthesizes programs) and a speaker (a user choosing examples), and shows that models of computational pragmatic inference are effective in choosing the user intended programs. However, these models require counterfactual reasoning over a large set of programs and examples, which is infeasible in realistic program spaces. In this paper, we propose PraX, a novel way to amortize this search with neural networks. We sample pairs of programs and examples via self-play between listener and speaker models, and use pragmatic inference to choose informative training examples from this sample. We then use the informative dataset to train models to improve the synthesizer's ability to disambiguate user-provided examples without human supervision. We validate PraX on the challenging task of synthesizing regular expressions from example strings, and find that our method (1) outperforms models trained without choosing pragmatic examples by 23% (a 51% relative increase) (2) matches the performance of supervised learning on a dataset of pragmatic examples provided by humans, despite using no human data in training.

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

↑