about
Incorporating External Knowledge for Natural Language to Code Generation (arxiv.org)
2 points by blopeur on May 1, 2020 | hide | past | pdf | discuss on HN

In plain words: Before learning to turn plain English into Python, the system studies code snippets from StackOverflow and official tool documentation, then re-samples training examples to match retrieved ones. It beats the best previous system by up to 2.2 points on a standard code-generation score.

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

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.

Frank F. Xu, Zhengbao Jiang, Pengcheng Yin, Bogdan Vasilescu, Graham Neubig
arXiv:2004.09015 · cs.CL · submitted Apr 20, 2020
abstract · pdf · html · Accepted by ACL 2020

add comment on HN