EditSum: A Retrieve-and-Edit Framework for Source Code Summarization
Not on the map. Why?
Abstract (arXiv)
Existing studies show that code summaries help developers understand and maintain source code. Unfortunately, these summaries are often missing or outdated in software projects. Code summarization aims to generate natural language descriptions automatically for source code. Code summaries are highly structured and have repetitive patterns. Besides the patternized words, a code summary also contains important keywords, which are the key to reflecting the functionality of the code. However, the state-of-the-art approaches perform poorly on predicting the keywords, which leads to the generated summaries suffering a loss in informativeness. To alleviate this problem, this paper proposes a novel retrieve-and-edit approach named EditSum for code summarization. Specifically, EditSum first retrieves a similar code snippet from a pre-defined corpus and treats its summary as a prototype summary to learn the pattern. Then, EditSum edits the prototype automatically to combine the pattern in the prototype with the semantic information of input code. Our motivation is that the retrieved prototype provides a good start-point for post-generation because the summaries of similar code snippets often have the same pattern. The post-editing process further reuses the patternized words in the prototype and generates keywords based on the semantic information of input code. We conduct experiments on a large-scale Java corpus and experimental results demonstrate that EditSum outperforms the state-of-the-art approaches by a substantial margin. The human evaluation also proves the summaries generated by EditSum are more informative and useful. We also verify that EditSum performs well on predicting the patternized words and keywords.
Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Builds on 8 of its 36 references that are in the map. First posted on arXiv 26 Aug 2023.
Builds on
8 of 36 references.
References · 8
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
- 2017Six Challenges for Neural Machine Translationcited by 335
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
- 2017Generating Sentences by Editing Prototypescited by 88
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
- 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 29
Built on by
Citing papers per year: 2023: 3; 2024: 6; 2025: 7; 2026: 2.
18 papers.
Sort:
By area:
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 44
- 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generationcited by 36
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verificationcited by 27
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 8
- 2025Retrieval-Augmented Code Review Comment Generationcited by 6
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
6 more
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
- 2024Generating Equivalent Representations of Code By A Self-Reflection Approachcited by 0
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025LibRec: Benchmarking Retrieval-Augmented LLMs for Library Migration Recommendationscited by 0
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectationscited by 0
- 2026Retrieval-Oriented Code Representations in Agentic Bug Localizationcited by 0
- 2026Retrieval-Oriented Code Representations in Agentic Bug Localization13 Jul 2026
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations3 Feb 2026
- 2025LibRec: Benchmarking Retrieval-Augmented LLMs for Library Migration Recommendations13 Aug 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025Retrieval-Augmented Code Review Comment Generation13 Jun 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generation11 Mar 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verification18 Dec 2024
- 2024Generating Equivalent Representations of Code By A Self-Reflection Approach4 Oct 2024
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
6 more
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair12 Sep 2023
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 44
- 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generationcited by 36
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verificationcited by 27
- 2025Retrieval-Augmented Code Review Comment Generationcited by 6
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025LibRec: Benchmarking Retrieval-Augmented LLMs for Library Migration Recommendationscited by 0
- 2025LibRec: Benchmarking Retrieval-Augmented LLMs for Library Migration Recommendations13 Aug 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025Retrieval-Augmented Code Review Comment Generation13 Jun 2025
- 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generation11 Mar 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verification18 Dec 2024
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair12 Sep 2023
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 8
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
- 2024Generating Equivalent Representations of Code By A Self-Reflection Approachcited by 0
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectationscited by 0
- 2026Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations3 Feb 2026
- 2024Generating Equivalent Representations of Code By A Self-Reflection Approach4 Oct 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023