论文标题
伪代码生成的语义支架
Semantic Scaffolds for Pseudocode-to-Code Generation
论文作者
论文摘要
我们提出了一种基于语义支架的程序生成的方法,该方法是代表程序的高级语义和句法组成的轻质结构。通过首先搜索合理的脚手架,然后将这些脚手架用作对程序进行光束搜索的约束,与现有技术相比,我们可以更好地覆盖搜索空间。我们将层次搜索方法应用于SPOC数据集,以生成伪代码到代码,在该数据集中,我们将获得线条级的自然语言伪模式注释,并旨在产生满足基于执行的基于执行的测试案例的程序。通过在推断期间使用语义脚手架,我们比以前的最新时间实现了前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.