[论文解读] Learning to Represent Programs with Property Signatures
本文提出属性签名——一种基于在输入-输出对上评估一组布尔值属性的、面向机器学习的程序与规格表示方法。通过学习预测组合函数的属性签名,该方法使合成器的运行速度提升两倍,且成功率显著高于基线方法,在一系列多样化的函数式编程问题上展现出显著改进。
We introduce the notion of property signatures, a representation for programs and program specifications meant for consumption by machine learning algorithms. Given a function with input type $τ_{in}$ and output type $τ_{out}$, a property is a function of type: $(τ_{in}, τ_{out}) ightarrow exttt{Bool}$ that (informally) describes some simple property of the function under consideration. For instance, if $τ_{in}$ and $τ_{out}$ are both lists of the same type, one property might ask `is the input list the same length as the output list?'. If we have a list of such properties, we can evaluate them all for our function to get a list of outputs that we will call the property signature. Crucially, we can `guess' the property signature for a function given only a set of input/output pairs meant to specify that function. We discuss several potential applications of property signatures and show experimentally that they can be used to improve over a baseline synthesizer so that it emits twice as many programs in less than one-tenth of the time.
研究动机与目标
- 开发一种通用的程序与规格表示方法,以支持机器学习。
- 通过利用属性签名作为归纳偏置,提升程序合成性能。
- 通过学习实现自动发现有用的程序属性,而非依赖人工设计。
- 证明属性签名可显著加速复杂、人工编写的编程问题的合成过程。
提出的方法
- 本文将属性定义为一个布尔函数,用于检查目标函数输入-输出对上的简单不变量。
- 属性签名通过在函数的输入-输出示例上评估一组固定属性而生成,形成一个二进制向量。
- 该方法训练一个组合预测模型,从组合的属性签名中推断出组件函数的属性签名。
- 合成器利用属性签名引导搜索过程,基于预测的属性匹配度筛选候选程序。
- 该方法在一种名为 Searcho 的自定义图灵完备函数式语言中进行评估,该语言专为合成过程中的快速程序执行而设计。
- 该系统已开源,包括语言、运行时、搜索基础设施和训练数据,以支持未来在机器学习引导的程序合成领域的研究。
实验结果
研究问题
- RQ1属性签名能否作为程序合成的有效归纳偏置?
- RQ2学习模型能否从组合中预测出组件函数的属性签名,从而提升合成效率?
- RQ3属性签名能否使合成器发现基线方法无法找到的程序?
- RQ4在复杂、人工编写的编程问题上,属性签名增强的合成器性能与基线相比如何?
主要发现
- 在 185 个函数式编程问题的测试集中,该属性签名方法合成的程序数量是基线合成器的两倍以上。
- 该方法在基线所需时间的十分之一以内完成了性能提升。
- 超过一半使用属性签名合成的程序,即使在基线方法运行一整天后仍未能被找到。
- 组合预测模型成功推断出中间属性签名,从而在合成过程中实现了有效的前提选择。
- 该方法成功合成了一个复杂程序——从列表中移除连续重复元素——而基线方法未能找到。
- 开源系统为未来在机器学习引导的程序合成领域研究提供了坚实基础。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。