Skip to main content
QUICK REVIEW

[论文解读] Learning to select examples for program synthesis

Yewen Pu, Zachery Miranda|arXiv (Cornell University)|Nov 9, 2017
Software Engineering Research被引用 1
一句话总结

本文提出一种基于神经网络的方法,用于为程序综合选择少量具有代表性的输入-输出示例,从而提升约束求解器的效率。通过基于学习到的不确定性,迭代添加概率最低(冗余度最低)的示例,该方法在保持解决方案准确性的前提下减少了求解器的开销,其有效性已在绘图程序综合任务中得到验证。

ABSTRACT

Program synthesis is a class of regression problems where one seeks a solution, in the form of a source-code program, mapping the inputs to their corresponding outputs exactly. Due to its precise and combinatorial nature, it is commonly formulated as a constraint satisfaction problem, where input-output examples are encoded as constraints and solved with a constraint solver. A key challenge of this formulation is scalability: while constraint solvers work well with few well-chosen examples, a large set of examples can incur significant overhead in both time and memory. We address this challenge by constructing a representative subset of examples that is both small and able to constrain the solver sufficiently. We build the subset one example at a time, using a neural network to predict the probability of unchosen input-output examples conditioned on the chosen input-output examples, and adding the least probable example to the subset. Experiment on a diagram drawing domain shows our approach produces subsets of examples that are small and representative for the constraint solver.

研究动机与目标

  • 为解决因大量输入-输出示例导致的程序综合可扩展性挑战。
  • 通过选择最小但最具约束力的示例子集,减少约束求解器的时间和内存开销。
  • 在不牺牲解决方案准确性的前提下,提升基于约束满足的程序综合效率。
  • 开发一种基于其信息量动态选择示例的方法,信息量通过神经网络概率估计进行衡量。

提出的方法

  • 训练一个神经网络,以预测在已选择示例的基础上,未选择的输入-输出示例的概率。
  • 该方法迭代选择预测概率最低的示例,假设其为冗余度最低且最具信息量的示例。
  • 选择过程以不确定性为导向:概率较低的示例被认为更不可能冗余,因此更具价值,应被纳入。
  • 所选子集随后用作约束求解器中的约束,以综合目标程序。
  • 该方法在绘图程序综合领域进行了评估,其能够学习优先选择多样化且具有约束力的示例。

实验结果

研究问题

  • RQ1神经模型能否有效识别程序综合中最具信息量的输入-输出示例?
  • RQ2基于预测不确定性的迭代示例选择如何影响求解器性能与可扩展性?
  • RQ3与使用全部示例相比,一个小型且具有代表性的示例子集在多大程度上能保持解决方案的准确性?
  • RQ4该方法是否在保持正确性的同时,减少了约束求解器的时间和内存开销?

主要发现

  • 所提出的方法生成了显著更小的示例子集,同时仍能有效约束求解器,从而降低了计算开销。
  • 神经网络成功识别出低概率(冗余度最低)的示例,从而生成了更具多样性与信息量的子集。
  • 即使示例数量减少,该方法在绘图程序综合任务中仍保持了较高的解决方案准确性。
  • 基于不确定性的迭代选择策略提升了求解器效率,且未损害找到正确程序的能力。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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