Relevance Transformer: Generating Concise Code Snippets with Relevance Feedback
Not on the map. Why?
Abstract (arXiv)
Tools capable of automatic code generation have the potential to augment programmer's capabilities. While straightforward code retrieval is incorporated into many IDEs, an emerging area is explicit code generation. Code generation is currently approached as a Machine Translation task, with Recurrent Neural Network (RNN) based encoder-decoder architectures trained on code-description pairs. In this work we introduce and study modern Transformer architectures for this task. We further propose a new model called the Relevance Transformer that incorporates external knowledge using pseudo-relevance feedback. The Relevance Transformer biases the decoding process to be similar to existing retrieved code while enforcing diversity. We perform experiments on multiple standard benchmark datasets for code generation including Django, Hearthstone, and CoNaLa. The results show improvements over state-of-the-art methods based on BLEU evaluation. The Relevance Transformer model shows the potential of Transformer-based architectures for code generation and introduces a method of incorporating pseudo-relevance feedback during inference.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Jul 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 3; 2022: 3.
6 papers.
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2021Neural Program Generation Modulo Static Analysiscited by 13
- 2022Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generatorscited by 10
- 2021PGT: Pseudo Relevance Feedback Using a Graph-Based Transformercited by 3
- 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generationcited by 2
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Studycited by 0
- 2022Who Evaluates the Evaluators? On Automatic Metrics for Assessing AI-based Offensive Code Generators12 Dec 2022
- 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generation29 Mar 2022
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Study8 Feb 2022
- 2021Neural Program Generation Modulo Static Analysis26 Oct 2021
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generation27 Apr 2021
- 2021PGT: Pseudo Relevance Feedback Using a Graph-Based Transformer20 Jan 2021