Skip to main content
QUICK REVIEW

[论文解读] Neural-Guided Deductive Search for Real-Time Program Synthesis from Examples

Ashwin Kalyan, Abhishek Mohta|arXiv (Cornell University)|Apr 3, 2018
Software Engineering Research参考文献 9被引用 56
一句话总结

NGDS 将演绎式符号搜索与神经引导相结合,能够在少量输入输出示例中快速合成用户意图的程序,在实时性能下达到 PROSE 的准确性并在速度上超越最先进的神经方法。

ABSTRACT

Synthesizing user-intended programs from a small number of input-output examples is a challenging problem with several important applications like spreadsheet manipulation, data wrangling and code refactoring. Existing synthesis systems either completely rely on deductive logic techniques that are extensively hand-engineered or on purely statistical models that need massive amounts of data, and in general fail to provide real-time synthesis on challenging benchmarks. In this work, we propose Neural Guided Deductive Search (NGDS), a hybrid synthesis technique that combines the best of both symbolic logic techniques and statistical models. Thus, it produces programs that satisfy the provided specifications by construction and generalize well on unseen examples, similar to data-driven systems. Our technique effectively utilizes the deductive search framework to reduce the learning problem of the neural component to a simple supervised learning setup. Further, this allows us to both train on sparingly available real-world data and still leverage powerful recurrent neural network encoders. We demonstrate the effectiveness of our method by evaluating on real-world customer scenarios by synthesizing accurate programs with up to 12x speed-up compared to state-of-the-art systems.

研究动机与目标

  • 通过将符号推理与神经引导相结合,推动从少量示例中实现更快、更可靠的程序综合。
  • 利用具有学习得分的分支定界控制器,在 DSL 搜索空间中裁剪无效子分支。
  • 在提升实时性能的同时,保留符号方法的正确性与泛化保证。

提出的方法

  • 对字符串变换的DSL(FlashFill DSL)使用PROSE风格的演绎搜索。
  • 训练神经分数模型,在给定规格时预测每个 DSL 产生式的最佳泛化潜力。
  • 集成分支选择控制器(基于阈值或分支定界),仅探索有前景的分支。
  • 通过将规格、产生式与实现的最佳分数映射到回归目标,采用监督学习设置。
  • 可能为每个DSL层级或产生式训练单独的模型,以简化学习。

实验结果

研究问题

  • RQ1神经预测是否能够可靠指示哪些 DSL 分支能产生最佳泛化程序?
  • RQ2与纯符号方法或纯神经方法相比,NGDS 是否在不牺牲准确性的前提下提升综合速度?
  • RQ3不同的分支选择控制器在现实任务中如何影响准确性和运行时间?
  • RQ4考虑到 PROSE 现有的 witness 函数,监督学习形式是否足以指导分支选择?
  • RQ5为每个 DSL 层级或产生式分别训练模型是否能带来更好的泛化和效率?

主要发现

  • NGDS 在73个测试任务、仅用一个示例时达到68.49%的泛化准确率,与PROSE的准确率相当,同时在困难任务上实现高达12倍的加速。
  • 与 RobustFill 和 DeepCoder 相比,NGDS 使用单个示例时更准确且显著更快。
  • 多种 NGDS 消融实验表明,性能取决于分数模型组合(如 T1、PP、POS)与控制器(阈值或分支定界)的组合。
  • 表1显示 PROSE 基线在测试任务上的准确率为 67.12%,加速为 1.00x;NGDS 变体在测试准确率方面达到相当或更高,并具有显著的加速(多个配置中约 1.22–1.93x)。
  • 表2展示消融结果,速度提升范围为 0.86x 至 1.93x,取决于控制器与模型的组合,测试准确率通常接近 PROSE 水平。

更好的研究,从现在开始

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

无需绑定信用卡

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