Semantic Scaffolds for Pseudocode-to-Code Generation
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.
Code (1)
Tasks
Code GenerationSimilar Papers 제목 키워드 기반
Knowledge Transfer for Pseudo-code Generation from Low Resource Programming Language
Generation of pseudo-code descriptions of legacy source code for software maintenance is a manually intensive task. Recent encoder-decoder language models have shown promise for automating pseudo-code generation for high…
Code GenerationDecoderTransfer LearningTranslationScaling Automatic Extraction of Pseudocode
Pseudocode in a scholarly paper provides a concise way to express the algorithms implemented therein. Pseudocode can also be thought of as an intermediary representation that helps bridge the gap between programming lang…
Code GenerationOptical Character RecognitionOptical Character Recognition (OCR)DuET: Dual Execution for Test Output Prediction with Generated Code and Pseudocode
This work addresses test output prediction, a key challenge in test case generation. To improve the reliability of predicted outputs by LLMs, prior approaches generate code first to ground predictions. One grounding stra…
BioPlanner: Automatic Evaluation of LLMs on Protocol Planning in Biology
The ability to automatically generate accurate protocols for scientific experiments would represent a major step towards the automation of science. Large Language Models (LLMs) have impressive capabilities on a wide rang…
Language ModellingQuestion AnsweringSPoC: Search-based Pseudocode to Code
We consider the task of mapping pseudocode to long programs that are functionally correct. Given test cases as a mechanism to validate programs, we search over the space of possible translations of the pseudocode to find…
Program SynthesisTranslation