Improving Automatic Source Code Summarization via Deep Reinforcement Learning
Not on the map. Why?
Abstract (arXiv)
Code summarization provides a high level natural language description of the function performed by code, as it can benefit the software maintenance, code categorization and retrieval. To the best of our knowledge, most state-of-the-art approaches follow an encoder-decoder framework which encodes the code into a hidden space and then decode it into natural language space, suffering from two major drawbacks: a) Their encoders only consider the sequential content of code, ignoring the tree structure which is also critical for the task of code summarization, b) Their decoders are typically trained to predict the next word by maximizing the likelihood of next ground-truth word with previous ground-truth word given. However, it is expected to generate the entire sequence from scratch at test time. This discrepancy can cause an textitexposure bias issue, making the learnt decoder suboptimal. In this paper, we incorporate an abstract syntax tree structure as well as sequential content of code snippets into a deep reinforcement learning framework (i.e., actor-critic network). The actor network provides the confidence of predicting the next word according to current state. On the other hand, the critic network evaluates the reward value of all possible extensions of the current state and can provide global guidance for explorations. We employ an advantage reward composed of BLEU metric to train both networks. Comprehensive experiments on a real-world dataset show the effectiveness of our proposed model when compared with some state-of-the-art methods.
Key facts. Cited by 100 papers in the map (data through 14 Oct 2026). First posted on arXiv 17 Nov 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2020: 1; 2021: 22; 2022: 24; 2023: 22; 2024: 15; 2025: 14; 2026: 2.
100 papers.
Sort:
By area:
- 2023ChatDev: Communicative Agents for Software Developmentcited by 919
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2022Large Language Models Meet NL2Code: A Surveycited by 138
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 76
- 2024A Systematic Survey of Text Summarization: From Statistical Methods to Large Language Modelscited by 52
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designscited by 44
- 2021Multilingual training for Software Engineeringcited by 43
38 more
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2023Distilled GPT for Source Code Summarizationcited by 31
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
- 2021CodeQA: A Question Answering Dataset for Source Code Comprehensioncited by 30
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Codecited by 24
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 18
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
- 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2021Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchycited by 14
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
- 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
- 2022Cross-Language Binary-Source Code Matching with Intermediate Representationscited by 13
- 2022Code Recommendation for Open Source Software Developerscited by 13
- 2022An Exploratory Study on Code Attention in BERTcited by 12
- 2022Summarize and Generate to Back-translate: Unsupervised Translation of Programming Languagescited by 12
- 2021Impact of Evaluation Methodologies on Code Summarizationcited by 11
- 2021AST-Transformer: Encoding Abstract Syntax Trees Efficiently for Code Summarizationcited by 11
- 2023Reinforcement Learning for Generative AI: A Surveycited by 11
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Codecited by 11
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2021API2Com: On the Improvement of Automatically Generated Code Comments Using API Documentationscited by 10
- 2024Model Editing for LLMs4Code: How Far are We?cited by 10
- 2021Leveraging Unsupervised Learning to Summarize APIs Discussed in Stack Overflowcited by 9
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainercited by 9
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 8
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalnesscited by 8
50 most cited of 100 All 100 (JSON)
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translation30 Jan 2026
- 2025Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models19 Dec 2025
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearning17 Sep 2025
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025Leveraging Reward Models for Guiding Code Review Comment Generation4 Jun 2025
- 2025Backdoors in Code Summarizers: How Bad Is It?2 Jun 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
38 more
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale23 Feb 2025
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalness20 Feb 2025
- 2025Knowing When to Stop: Efficient Context Processing via Latent Sufficiency Signals3 Feb 2025
- 2025How to Select Pre-Trained Code Models for Reuse? A Learning Perspective7 Jan 2025
- 2024Model Editing for LLMs4Code: How Far are We?11 Nov 2024
- 2024Leveraging Large Language Models in Code Question Answering: Baselines and Issues5 Nov 2024
- 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainer3 Sep 2024
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Survey2 Sep 2024
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generation1 Aug 2024
- 2024DeepCodeProbe: Towards Understanding What Models Trained on Code Learn11 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024Jailbreaking LLMs with Arabic Transliteration and Arabizi26 Jun 2024
- 2024A Systematic Survey of Text Summarization: From Statistical Methods to Large Language Models17 Jun 2024
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code24 Apr 2024
- 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designs9 Apr 2024
- 2024CSA-Trans: Code Structure Aware Transformer for AST7 Apr 2024
- 2024Multi-modal Learning for WebAssembly Reverse Engineering4 Apr 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2023DREAM: Debugging and Repairing AutoML Pipelines31 Dec 2023
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance25 Nov 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Code24 Oct 2023
- 2023Revisiting File Context for Source Code Summarization5 Sep 2023
- 2023Distilled GPT for Source Code Summarization28 Aug 2023
- 2023Reinforcement Learning for Generative AI: A Survey28 Aug 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023Statement-based Memory for Neural Source Code Summarization21 Jul 2023
- 2023ChatDev: Communicative Agents for Software Development16 Jul 2023
- 2023ARIST: An Effective API Argument Recommendation Approach11 Jun 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization18 May 2023
- 2023RLocator: Reinforcement Learning for Bug Localization9 May 2023
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?24 Apr 2023
- 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarization28 Mar 2023
50 newest of 100 All 100 (JSON)
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization18 May 2023
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERT27 Jun 2022
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNN9 Jun 2020
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Codecited by 24
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalnesscited by 8
- 2024Jailbreaking LLMs with Arabic Transliteration and Arabizicited by 7
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearningcited by 7
- 2025Backdoors in Code Summarizers: How Bad Is It?cited by 1
- 2025Scrub It Out! Erasing Sensitive Memorization in Code Language Models via Machine Unlearning17 Sep 2025
- 2025Backdoors in Code Summarizers: How Bad Is It?2 Jun 2025
- 2025Show Me Your Code! Kill Code Poisoning: A Lightweight Method Based on Code Naturalness20 Feb 2025
- 2024Jailbreaking LLMs with Arabic Transliteration and Arabizi26 Jun 2024
- 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code24 Apr 2024
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2022Large Language Models Meet NL2Code: A Surveycited by 138
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 76
- 2024A Systematic Survey of Text Summarization: From Statistical Methods to Large Language Modelscited by 52
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designscited by 44
- 2021Multilingual training for Software Engineeringcited by 43
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
12 most cited of 84 All 84 (JSON)
- 2026BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translation30 Jan 2026
- 2025Attention Distance: A Novel Metric for Directed Fuzzing with Large Language Models19 Dec 2025
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2025How to Select Pre-Trained Code Models for Reuse? A Learning Perspective7 Jan 2025
- 2024Model Editing for LLMs4Code: How Far are We?11 Nov 2024
- 2024Leveraging Large Language Models in Code Question Answering: Baselines and Issues5 Nov 2024
- 2024RACONTEUR: A Knowledgeable, Insightful, and Portable LLM-Powered Shell Command Explainer3 Sep 2024
- 2024The Role of Transformer Models in Advancing Blockchain Technology: A Systematic Survey2 Sep 2024
- 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generation1 Aug 2024
12 newest of 84 All 84 (JSON)