Incorporating External Knowledge through Pre-training for Natural Language to Code Generation

By Frank F. Xu, Zhengbao Jiang, Pengcheng Yin, Bogdan Vasilescu, Graham Neubig. 2020

88 citations recorded by the source corpus.

Open-domain code generation aims to generate code in a general-purpose programming language (such as Python) from natural language (NL) intents. Motivated by the intuition that developers usually retrieve resources on the web when writing code, we explore the effectiveness of incorporating two varieties of external knowledge into NL-to-code generation: automatically mined NL-code pairs from the online programming QA forum StackOverflow and programming language API documentation. Our evaluations show that combining the two sources with data augmentation and retrieval-based data re-sampling improves the current state-of-the-art by up to 2.2% absolute BLEU score on the code generation testbed CoNaLa. The code and resources are available at https://github.com/neulab/external-knowledge-codegen.

Subfields: Artificial Intelligence, Information Systems, Natural Language Processing, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Graham Neubig
  2. Luke S. Zettlemoyer
  3. Percy Liang
  4. Mohit Bansal
  5. Yejin Choi
  6. Marjan Ghazvininejad
  7. Frank F. Xu
  8. Jianfeng Gao

In Information Systems

  1. Graham Neubig
  2. Shuyan Zhou
  3. Frank F. Xu
  4. Tianyi Zhang
  5. Elena L. Glassman
  6. Priyan Vaithilingam
  7. Shraddha Barke
  8. Michael B. James

In Natural Language Processing

  1. Graham Neubig
  2. Luke S. Zettlemoyer
  3. Frank F. Xu
  4. Marjan Ghazvininejad
  5. Percy Liang
  6. Mohit Bansal
  7. Sida I. Wang
  8. Yejin Choi

In Code Generation & Program Synthesis

  1. Graham Neubig
  2. Frank F. Xu
  3. Shuyan Zhou
  4. Zhiruo Wang
  5. Bogdan Vasilescu
  6. Daniel Fried
  7. Grace Cuenca
  8. Erfan Al-Hossami

Citations in the corpus