没有人有时间编码:从自然语言进行结构感知的程序合成
Ain't Nobody Got Time For Coding: Structure-Aware Program Synthesis From Natural Language
摘要:
从自然语言(NL)的程序合成对人类是实用的,一旦技术上可行,将大大促进软件开发和革命性的最终用户编程。我们提出了SAPS,一个端到端的神经网络能够映射相对复杂的,多句NL规范的可执行代码片段。所提出的架构完全依赖于神经组件,并在抽象语法树上进行训练,结合预训练的词嵌入和双向多层LSTM来处理词序列。解码器具有双递归LSTM,为此我们提出了新的信号传播方案和软注意力机制。当应用于以前的研究中提出的问题的大型数据集时,SAPS的性能与那里提出的方法相当或更好,在92%以上的情况下产生正确的程序。与其他方法相比,它不需要对生成的程序进行后处理,并且使用固定维的潜在表示作为NL分析器和源代码生成器之间的唯一接口。
英文摘要:
Program synthesis from natural language (NL) is practical for humans and, once technically feasible, would significantly facilitate software development and revolutionize end-user programming. We present SAPS, an end-to-end neural network capable of mapping relatively complex, multi-sentence NL specifications to snippets of executable code. The proposed architecture relies exclusively on neural components, and is trained on abstract syntax trees, combined with a pretrained word embedding and a bi-directional multi-layer LSTM for processing of word sequences. The decoder features a doubly-recurrent LSTM, for which we propose novel signal propagation schemes and soft attention mechanism. When applied to a large dataset of problems proposed in a previous study, SAPS performs on par with or better than the method proposed there, producing correct programs in over 92% of cases. In contrast to other methods, it does not require post-processing of the resulting programs, and uses a fixed-dimensional latent representation as the only interface between the NL analyzer and the source code generator.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。