Shirley Anugrah Hayati, Raphael Olivier, Pravalika Avvaru, Pengcheng Yin, Anthony Tomasic, Graham Neubig
| Challenge: | Existing methods to generate program source code from natural language are not able to generate complex code due to a lack of ability to memorize large and complex structures. |
| Approach: | They propose a method that uses subtree retrieval to explicitly reference existing code examples within a neural code generation model. |
| Outcome: | The proposed method improves performance on two code generation tasks by up to +2.6 BLEU. |
Similar Papers
Rewriting the Code: A Simple Method for Large Language Model Augmented Code Search (2024.acl-long)
Copied to clipboard
| Challenge: | Experimental results show that ReCo significantly boosts retrieval accuracy across sparse, zero-shot dense and fine-tuned dense search settings. |
| Approach: | They propose a generation-augmented retrieval framework that additionally Rewrites the Code (ReCo) within the codebase for style normalization. |
| Outcome: | The proposed method significantly boosts retrieval accuracy across sparse, zero-shot dense, and fine-tuned dense retrieval settings in diverse search scenarios. |
Generate-and-Retrieve: Use Your Predictions to Improve Retrieval for Semantic Parsing (2022.coling-1)
Copied to clipboard
Yury Zemlyanskiy, Michiel de Jong, Joshua Ainslie, Panupong Pasupat, Peter Shaw, Linlu Qiu, Sumit Sanghai, Fei Sha
| Challenge: | Existing retrieval techniques for semantic parsing use similarity of query and exemplar inputs . Existing work suggests that appending training samples to training samples improves performance . |
| Approach: | They propose a retrieval procedure that retrieves exemplars for which outputs are similar . existing retrieval techniques are based on similarity of query and exemplar inputs . |
| Outcome: | Existing retrieval techniques rely on similarity of query and exemplar inputs . they retrieve exemplars with similar outputs and generate a final prediction . |
Analysis of Tree-Structured Architectures for Code Generation (2021.findings-acl)
Copied to clipboard
| Challenge: | Code generation is the task of generating code snippets from input user specifications written in natural language (NL). |
| Approach: | They evaluate the significance of input parse trees for code generation by using constituency-based parsers as input and an abstract syntax tree as the target. |
| Outcome: | The proposed models on a Python-based code generation dataset and a semantic parsing dataset show that constituency trees encoded using a structure-aware model improve performance. |
Incorporating External Knowledge through Pre-training for Natural Language to Code Generation (2020.acl-main)
Copied to clipboard
| Challenge: | Existing work on open-domain code generation focuses on limited domains or domain-specific languages with limited set of operators. |
| Approach: | They incorporate external knowledge into NL-to-code generation by combining StackOverflow and programming language API documentation with data augmentation and retrieval-based data re-sampling. |
| Outcome: | The proposed approach improves the current state-of-the-art by up to 2.2% absolute BLEU score on the code generation testbed CoNaLa. |
ReCode: Robustness Evaluation of Code Generation Models (2023.acl-long)
Copied to clipboard
Shiqi Wang, Zheng Li, Haifeng Qian, Chenghao Yang, Zijian Wang, Mingyue Shang, Varun Kumar, Samson Tan, Baishakhi Ray, Parminder Bhatia, Ramesh Nallapati, Murali Krishna Ramanathan, Dan Roth, Bing Xiang
| Challenge: | Existing work on robustness in text or code tasks has focused on classification, while robustness for code generation tasks is an uncharted area. |
| Approach: | They propose a robustness evaluation benchmark for code generation models that customizes over 30 transformations specifically for code on docstrings, function and variable names, code syntax, and code format. |
| Outcome: | The proposed model performs better on human annotators and on SOTA models with human annnotators. |
CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Trees (2021.emnlp-main)
Copied to clipboard
| Challenge: | Existing methods for code summarization do not capture rich information in ASTs . existing methods are labor-intensive and time-consuming to document code with good summaries manually. |
| Approach: | They propose a model that hierarchically splits and reconstructs ASTs by a neural network . they propose to use AST embeddings and a vanilla code token encoder to generate the model . |
| Outcome: | The proposed model splits and reconstructs ASTs into subtrees and then aggregates embeddings of subtreas to get the complete AST. |
CodeRAG-Bench: Can Retrieval Augment Code Generation? (2025.findings-naacl)
Copied to clipboard
Zora Zhiruo Wang, Akari Asai, Xinyan Velocity Yu, Frank F. Xu, Yiqing Xie, Graham Neubig, Daniel Fried
| Challenge: | Language models excel at generating code, but many programs are difficult to generate using only parametric knowledge. |
| Approach: | They propose a retrieval-augmented code generation benchmark that provides reproducible evaluations on retrieval and end-to-end code generation performance. |
| Outcome: | The proposed benchmark covers programming, open-domain, and repository-level tasks and provides reproducible evaluations on retrieval and end-to-end code generation performance. |
cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree (2025.findings-emnlp)
Copied to clipboard
| Challenge: | Existing line-based chunking heuristics often break semantic structures, splitting functions or merging unrelated code. |
| Approach: | They propose a structure-aware method that breaks large AST nodes into smaller chunks . this method generates self-contained, semantically coherent units across programming languages . |
| Outcome: | The proposed method boosts Recall@5 by 4.3 points on RepoEval retrieval and Pass@1 by 2.67 points on SWE-bench generation. |
Retrieval-Augmented Code Generation for Situated Action Generation: A Case Study on Minecraft (2024.findings-emnlp)
Copied to clipboard
| Challenge: | In the Minecraft Collaborative Building Task, two players collaborate to build a building using 3D blocks. |
| Approach: | They propose to use large language models to model the Builder's sequence of actions in the Minecraft Collaborative Building Task. |
| Outcome: | The proposed methods significantly improve performance over baseline methods and provide detailed analysis for future work. |
Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization (2024.findings-naacl)
Copied to clipboard
| Challenge: | Existing methods to generate source code summaries are coarse-grained and noise-filled . however, they do not capture contextual code semantics and are often outdated in continuous software iteration. |
| Approach: | They propose a fine-grained Token-level retrieval-augmented mechanism on the decoder side to enhance performance of neural models. |
| Outcome: | The proposed method produces more low-frequency tokens and is interpretable. |