用于伪代码到代码生成的语义支架
Semantic Scaffolds for Pseudocode-to-Code Generation
摘要:
我们提出了一种基于语义脚手架的程序生成方法,轻量级结构代表了程序的高级语义和语法组成。通过首先搜索合理的支架,然后使用这些作为约束的束搜索程序,我们实现了更好的覆盖范围的搜索空间相比,现有的技术。我们将我们的分层搜索方法应用于Sunday数据集的伪代码到代码生成,其中我们给出了行级自然语言伪代码注释,旨在产生一个程序满足基于执行的测试用例。通过在推理过程中使用语义支架,我们在前100名的准确性上比以前的最先进的方法提高了10%。此外,我们只需要11个候选人就可以达到前3000名的性能,这表明效率有了很大的提高。
英文摘要:
We propose a method for program generation based on semantic scaffolds, lightweight structures representing the high-level semantic and syntactic composition of a program. By first searching over plausible scaffolds then using these as constraints for a beam search over programs, we achieve better coverage of the search space when compared with existing techniques. We apply our hierarchical search method to the SPoC dataset for pseudocode-to-code generation, in which we are given line-level natural language pseudocode annotations and aim to produce a program satisfying execution-based test cases. By using semantic scaffolds during inference, we achieve a 10% absolute improvement in top-100 accuracy over the previous state-of-the-art. Additionally, we require only 11 candidates to reach the top-3000 performance of the previous best approach when tested against unseen problems, demonstrating a substantial improvement in efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。