Skip to main content
QUICK REVIEW

[论文解读] BUSTLE: Bottom-Up Program Synthesis Through Learning-Guided Exploration

Augustus Odena, Kensen Shi|arXiv (Cornell University)|Jul 28, 2020
Software Engineering Research参考文献 27被引用 5
一句话总结

BUSTLE 提出了一种基于学习引导的自底向上程序合成方法,通过神经分类器在搜索过程中优先处理中间程序值,利用执行结果和属性签名实现高效计算。与基线方法相比,该方法显著减少了合成时间和候选程序的探索量,即使在仅使用随机程序进行训练并应用于人工编写的基准测试时,仍表现出色。

ABSTRACT

Program synthesis is challenging largely because of the difficulty of search in a large space of programs. Human programmers routinely tackle the task of writing complex programs by writing sub-programs and then analyzing their intermediate results to compose them in appropriate ways. Motivated by this intuition, we present a new synthesis approach that leverages learning to guide a bottom-up search over programs. In particular, we train a model to prioritize compositions of intermediate values during search conditioned on a given set of input-output examples. This is a powerful combination because of several emergent properties. First, in bottom-up search, intermediate programs can be executed, providing semantic information to the neural network. Second, given the concrete values from those executions, we can exploit rich features based on recent work on property signatures. Finally, bottom-up search allows the system substantial flexibility in what order to generate the solution, allowing the synthesizer to build up a program from multiple smaller sub-programs. Overall, our empirical evaluation finds that the combination of learning and bottom-up search is remarkably effective, even with simple supervised learning approaches. We demonstrate the effectiveness of our technique on two datasets, one from the SyGuS competition and one of our own creation.

研究动机与目标

  • 为解决程序合成中大规模搜索空间的挑战,通过借鉴人类自底向上的编程策略。
  • 通过使用可执行的中间值作为神经模型的特征,实现在循环中高效学习的程序合成。
  • 通过快速批量模型推理和属性签名,减少程序合成的运行时间和候选探索量。
  • 弥合合成训练数据与真实人工编写基准之间在程序合成中的分布差距。
  • 证明在随机程序上进行简单监督学习,可有效泛化至复杂的人工编写程序合成任务。

提出的方法

  • BUSTLE 在程序上执行自底向上的枚举搜索,通过执行部分程序生成中间值作为模型输入。
  • 训练一个神经分类器以预测某个中间值是否属于解的一部分,特征来源于已执行的值。
  • 使用属性签名对程序输入和输出进行特征工程,为模型提供丰富的语义表示。
  • 将模型推理批量处理数百个中间值,以减少单次预测的开销并提升效率。
  • 将模型集成到合成循环中,以指导搜索过程,优先处理有希望的中间组合。
  • 通过随机程序生成方式创建训练数据,以模拟多样化的中间表达式,尽管与人工基准存在分布差异。

实验结果

研究问题

  • RQ1学习模型能否在自底向上的合成循环中有效优先处理中间程序值,从而减少搜索空间?
  • RQ2使用已执行的中间值和属性签名,如何提升模型在合成数据与人工编写基准之间的泛化能力?
  • RQ3在随机程序上训练的简单监督模型,能在多大程度上泛化至真实世界程序合成任务?
  • RQ4与基线合成器相比,采用自底向上搜索的学习循环是否能带来可测量的运行时间加速?
  • RQ5自底向上搜索与模型引导的结合,是否能超越传统的枚举搜索和端到端神经生成方法?

主要发现

  • 与无学习的基线合成器相比,BUSTLE 将探索的候选程序数量减少了高达 90%。
  • 模型展现出强大的泛化能力,其预测结果对实际解中出现的子表达式呈正向偏倚,对其他表达式则呈负向偏倚。
  • 运行时间显著减少,BUSTLE 在合成基准和 SyGuS 基准上均优于基线和 DeepCoder 风格的方法。
  • 尽管训练数据为随机程序,模型仍能有效泛化至人工编写的基准,展现出对分布偏移的鲁棒性。
  • 批量模型推理与属性签名的结合,实现了学习在合成循环中的高效集成,使系统适用于实际应用。
  • 除一个基准外,基线能解决的所有基准BUSTLE均能解决,证实模型未牺牲完备性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。