2018

Retrieval-Based Neural Code Generation

Hayati, Shirley Anugrah, Olivier, Raphael, Avvaru, Pravalika et al.

Understand

In models to generate program source code from natural language, representing this code in a tree structure has been a common approach.

  • However, existing methods often fail to generate complex code correctly due to a lack of ability to memorize large and complex structures.
  • We introduce ReCode, a method based on subtree retrieval that makes it possible to explicitly reference existing code examples within a neural code generation model.
  • First, we retrieve sentences that are similar to input sentences using a dynamic-programming-based sentence similarity scoring method.

Reading the bibliography…