2022

Natural Language to Code Translation with Execution

Shi, Freda, Fried, Daniel, Ghazvininejad, Marjan et al.

Understand

Generative models of code, pretrained on large corpora of programs, have shown great success in translating natural language to code (Chen et al., 2021; Austin et al., 2021; Li et al., 2022, inter alia).

  • While these models do not explicitly incorporate program semantics (i.e., execution results) during training, they are able to generate correct solutions for many problems.
  • However, choosing a single correct program from a generated set for each problem remains challenging.
  • In this work, we introduce execution result--based minimum Bayes risk decoding (MBR-EXEC) for program selection and show that it improves the few-shot performance of pretrained code models on natural-language-to-code tasks.

Reading the bibliography…