mlsanityData to 7 Oct 2026

Retrieval-Based Neural Code Generation

arXiv 1808.10025 ↗First posted 29 Aug 2018cs.CLcited by 41

Not on the map. Why?

Abstract (arXiv)

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. Next, we extract n-grams of action sequences that build the associated abstract syntax tree. Finally, we increase the probability of actions that cause the retrieved n-gram action subtree to be in the predicted code. We show that our approach improves the performance on two code generation tasks by up to +2.6 BLEU.

Key facts. Cited by 41 papers in the map (data through 7 Oct 2026). First posted on arXiv 29 Aug 2018.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 11; 2022: 12; 2023: 6; 2024: 6; 2025: 4; 2026: 2.

41 papers.

Sort:

By area:

  1. 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
  2. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  3. 2022RARR: Researching and Revising What Language Models Say, Using Language Modelscited by 286
  4. 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
  5. 2021Retrieval Augmented Code Generation and Summarizationcited by 148
  6. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
  7. 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
  8. 2021Improving Named Entity Recognition by External Context Retrieving and Cooperative Learningcited by 76
  9. 2024Reliable, Adaptable, and Attributable Language Models with Retrievalcited by 73
  10. 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
  11. 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
  12. 2022Retrieval-based Controllable Molecule Generationcited by 44
29 more
  1. 2021Controllable Semantic Parsing via Retrieval Augmentationcited by 35
  2. 2024Automatic Programming: Large Language Models and Beyondcited by 35
  3. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  4. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  5. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 17
  6. 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
  7. 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
  8. 2021Exploring Dynamic Selection of Branch Expansion Orders for Code Generationcited by 10
  9. 2023De-fine: Decomposing and Refining Visual Programs with Auto-Feedbackcited by 10
  10. 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
  11. 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
  12. 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generationcited by 8
  13. 2022T5QL: Taming language models for SQL generationcited by 8
  14. 2025A Survey on Retrieval And Structuring Augmented Generation with Large Language Modelscited by 8
  15. 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decodingcited by 6
  16. 2021A Neural Question Answering System for Basic Questions about Subroutinescited by 5
  17. 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
  18. 2022Generation-Augmented Query Expansion For Code Retrievalcited by 5
  19. 2026RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Modelscited by 5
  20. 2021Lyra: A Benchmark for Turducken-Style Code Generationcited by 4
  21. 2021ComSum: Commit Messages Summarization and Meaning Preservationcited by 3
  22. 2022Transformer with Tree-order Encoding for Neural Program Generationcited by 3
  23. 2021End to End Software Engineering Researchcited by 2
  24. 2022Can NMT Understand Me? Towards Perturbation-based Evaluation of NMT Models for Code Generationcited by 2
  25. 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
  26. 2023Dynamic Retrieval-Augmented Generationcited by 1
  27. 2026SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repaircited by 1
  28. 2022Can We Generate Shellcodes via Natural Language? An Empirical Studycited by 0
  29. 2022Antecedent Predictions Are More Important Than You Think: An Effective Method for Tree-Based Code Generationcited by 0