[论文解读] Neuro-Symbolic Program Synthesis
该论文提出 Neuro-Symbolic Program Synthesis (NSPS),这是一个框架,通过递归-逆递归神经网络(R3NN)在输入输出编码条件下,学习从输入输出示例生成基于 DSL 的程序,并在基于正则表达式的字符串转换任务中进行演示。
Recent years have seen the proposal of a number of neural architectures for the problem of Program Induction. Given a set of input-output examples, these architectures are able to learn mappings that generalize to new test inputs. While achieving impressive results, these approaches have a number of important limitations: (a) they are computationally expensive and hard to train, (b) a model has to be trained for each task (program) separately, and (c) it is hard to interpret or verify the correctness of the learnt mapping (as it is defined by a neural network). In this paper, we propose a novel technique, Neuro-Symbolic Program Synthesis, to overcome the above-mentioned problems. Once trained, our approach can automatically construct computer programs in a domain-specific language that are consistent with a set of input-output examples provided at test time. Our method is based on two novel neural modules. The first module, called the cross correlation I/O network, given a set of input-output examples, produces a continuous representation of the set of I/O examples. The second module, the Recursive-Reverse-Recursive Neural Network (R3NN), given the continuous representation of the examples, synthesizes a program by incrementally expanding partial programs. We demonstrate the effectiveness of our approach by applying it to the rich and complex domain of regular expression based string transformations. Experiments show that the R3NN model is not only able to construct programs from new input-output examples, but it is also able to construct new programs for tasks that it had never observed before during training.
研究动机与目标
- 通过提出一个神经符号方法来解决纯神经程序诱导方法在计算成本、任务特定模型和可解释性方面的局限性。
- 学习一个条件于 I/O 示例的 DSL 程序生成模型,以实现自动、在测试时构建一致程序。
- 在受 FlashFill 启发的复杂字符串变换 DSL 上展示有效性,并评估对未见任务和现实世界基准的泛化。
提出的方法
- 提出一个交叉相关 I/O 网络,以产生一组输入输出示例的连续表示。
- 引入 Recursive-Reverse-Recursive Neural Network (R3NN) 将部分程序逐步扩展为完整的 DSL 树。
- 将 DSL 程序编码为解析树,采用叶子和规则表示以及全局树状态的树结构化概率生成。
- 将程序生成条件设定为 I/O 编码(包括基于 LSTM 的、交叉相关和增强交叉相关编码器等变体)。
- 在大量带有生成的 I/O 示例的 DSL 程序上端到端训练,学习偏好与 I/O 规范匹配的展开。
实验结果
研究问题
- RQ1NSPS 能否在不给出显式搜索的情况下,合成与给定输入输出示例一致的基于 DSL 的程序?
- RQ2基于 R3NN 的生成在未见程序和未见 I/O 对的情况下,在基于正则表达式的字符串变换 DSL 中的泛化能力如何?
- RQ3不同 I/O 编码器对程序合成的准确性和泛化有什么影响?
- RQ4与更简单的 io2seq 方法相比,NSPS 在基于 I/O 条件生成 DSL 树方面的表现如何?
- RQ5在现实世界的 FlashFill 基准测试中,该系统在可解决任务数和程序大小限制方面的性能如何?
主要发现
- NSPS 能为新的 I/O 示例甚至在训练中未观察到的任务合成程序。
- 在核心基准测试上,未见任务的成功率为 63%,从模型采样 100 个程序时的成功率为 94%。
- NSPS 在 238 个现实世界的 FlashFill 基准中,在大小为 13 的 DSL 限制下学习了 38%。
- 在合适的 I/O 条件下,R3NN 显著优于 io2seq,io2seq 在 100 次采样下约为 42%,而 R3NN 为 91%。
- 事先对 I/O 编码进行条件设定比事后或根条件设定得到更好的结果。
- 回溯(采样多个程序)显著提高准确性,充足样本时接近完美结果(例如,300 次采样)。
- 在 FlashFill 基准测试中,10 次采样的结果仅解决约 13%,而更广泛的采样(多达 2000 次采样)可以提高到约 38%。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。