Incorporating External Knowledge through Pre-training for Natural Language to Code Generation
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 36 papers in the map (data through 7 Oct 2026). First posted on arXiv 20 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 10; 2022: 17; 2023: 6; 2024: 1; 2025: 2.
36 papers.
Sort:
By area:
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2022Natural Language to Code Translation with Executioncited by 122
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2022Python Code Generation by Asking Clarification Questionscited by 16
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
24 more
- 2022Recent Advances in Neural Text Generation: A Task-Agnostic Surveycited by 14
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learningcited by 10
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
- 2022On the Effectiveness of Pretrained Models for API Learningcited by 9
- 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generationcited by 8
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generationcited by 8
- 2021Code Generation from Natural Language with Less Prior and More Monolingual Datacited by 6
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2021Natural Language-Guided Programmingcited by 4
- 2021CoRI: Collective Relation Integration with Data Augmentation for Open Information Extractioncited by 3
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2022Code Generation for Unknown Libraries via Reading API Documentationscited by 3
- 2022Transformer with Tree-order Encoding for Neural Program Generationcited by 3
- 2023NL2CMD: An Updated Workflow for Natural Language to Bash Commands Translationcited by 3
- 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generationcited by 2
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
- 2021Teach me how to Label: Labeling Functions from Natural Language with Text-to-text Transformerscited by 0
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Studycited by 0
- 2022Programming Language Agnostic Mining of Code and Language Pairs with Sequence Labeling Based Question Answeringcited by 0
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generationcited by 0
- 2023Structural Transfer Learning in NL-to-Bash Semantic Parserscited by 0
- 2023Answering Subjective Induction Questions on Products by Summarizing Multi-sources Multi-viewpoints Knowledgecited by 0
- 2025RETROcode: Leveraging a Code Database for Improved Natural Language to Code Generationcited by 0
- 2025RETROcode: Leveraging a Code Database for Improved Natural Language to Code Generation8 Apr 2025
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generation5 Apr 2025
- 2024Automatic Programming: Large Language Models and Beyond3 May 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Answering Subjective Induction Questions on Products by Summarizing Multi-sources Multi-viewpoints Knowledge12 Sep 2023
- 2023Structural Transfer Learning in NL-to-Bash Semantic Parsers31 Jul 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023SelfEvolve: A Code Evolution Framework via Large Language Models5 Jun 2023
- 2023NL2CMD: An Updated Workflow for Natural Language to Bash Commands Translation15 Feb 2023
- 2022Python Code Generation by Asking Clarification Questions19 Dec 2022
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generation22 Aug 2022
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generation22 Aug 2022
24 more
- 2022DocPrompting: Generating Code by Retrieving the Docs13 Jul 2022
- 2022Transformer with Tree-order Encoding for Neural Program Generation30 May 2022
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviors10 May 2022
- 2022Natural Language to Code Translation with Execution25 Apr 2022
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languages5 Apr 2022
- 2022On the Effectiveness of Pretrained Models for API Learning5 Apr 2022
- 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generation29 Mar 2022
- 2022Programming Language Agnostic Mining of Code and Language Pairs with Sequence Labeling Based Question Answering21 Mar 2022
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages16 Mar 2022
- 2022Recent Advances in Neural Text Generation: A Task-Agnostic Survey6 Mar 2022
- 2022Code Generation for Unknown Libraries via Reading API Documentations16 Feb 2022
- 2022Source Code Summarization with Structural Relative Position Guided Transformer14 Feb 2022
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspective10 Feb 2022
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Study8 Feb 2022
- 2021Retrieval Augmented Code Generation and Summarization26 Aug 2021
- 2021Natural Language-Guided Programming11 Aug 2021
- 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generation8 Jun 2021
- 2021CoRI: Collective Relation Integration with Data Augmentation for Open Information Extraction1 Jun 2021
- 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generation1 Jun 2021
- 2021Improving Tree-Structured Decoder Training for Code Generation via Mutual Learning31 May 2021
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generation27 Apr 2021
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation9 Feb 2021
- 2021Teach me how to Label: Labeling Functions from Natural Language with Text-to-text Transformers18 Jan 2021
- 2021Code Generation from Natural Language with Less Prior and More Monolingual Data1 Jan 2021
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2021Retrieval Augmented Code Generation and Summarization26 Aug 2021
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2022Natural Language to Code Translation with Executioncited by 122
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2022Python Code Generation by Asking Clarification Questionscited by 16
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
- 2022Recent Advances in Neural Text Generation: A Task-Agnostic Surveycited by 14
12 most cited of 34 All 34 (JSON)
- 2025RETROcode: Leveraging a Code Database for Improved Natural Language to Code Generation8 Apr 2025
- 2024Automatic Programming: Large Language Models and Beyond3 May 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Answering Subjective Induction Questions on Products by Summarizing Multi-sources Multi-viewpoints Knowledge12 Sep 2023
- 2023Structural Transfer Learning in NL-to-Bash Semantic Parsers31 Jul 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023SelfEvolve: A Code Evolution Framework via Large Language Models5 Jun 2023
- 2023NL2CMD: An Updated Workflow for Natural Language to Bash Commands Translation15 Feb 2023
- 2022Python Code Generation by Asking Clarification Questions19 Dec 2022
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generation22 Aug 2022
- 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generation22 Aug 2022
- 2022DocPrompting: Generating Code by Retrieving the Docs13 Jul 2022
12 newest of 34 All 34 (JSON)