mlsanityData to 14 Oct 2026

Automatic Comment Generation via Multi-Pass Deliberation

arXiv 2209.06634 ↗First posted 14 Sep 2022cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Deliberation is a common and natural behavior in human daily life. For example, when writing papers or articles, we usually first write drafts, and then iteratively polish them until satisfied. In light of such a human cognitive process, we propose DECOM, which is a multi-pass deliberation framework for automatic comment generation. DECOM consists of multiple Deliberation Models and one Evaluation Model. Given a code snippet, we first extract keywords from the code and retrieve a similar code fragment from a pre-defined corpus. Then, we treat the comment of the retrieved code as the initial draft and input it with the code and keywords into DECOM to start the iterative deliberation process. At each deliberation, the deliberation model polishes the draft and generates a new comment. The evaluation model measures the quality of the newly generated comment to determine whether to end the iterative process or not. When the iterative process is terminated, the best-generated comment will be selected as the target comment. Our approach is evaluated on two real-world datasets in Java (87K) and Python (108K), and experiment results show that our approach outperforms the state-of-the-art baselines. A human evaluation study also confirms the comments generated by DECOM tend to be more readable, informative, and useful.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 23 of its 65 references that are in the map. First posted on arXiv 14 Sep 2022.

Builds on

23 of 65 references.

References · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2016Layer Normalizationcited by 5,669
  4. 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,046
  5. 2020Circle Loss: A Unified Perspective of Pair Similarity Optimizationcited by 403
  6. 2020A Transformer-based Approach for Source Code Summarizationcited by 133
  7. 2016Sequence-to-Sequence Learning as Beam-Search Optimizationcited by 127
  8. 2018Achieving Human Parity on Automatic Chinese to English News Translationcited by 119
  9. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
  10. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
  11. 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 57
  12. 2020Deliberation Model Based Two-Pass End-to-End Speech Recognitioncited by 57
11 more
  1. 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
  2. 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
  3. 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 29
  4. 2021Transformer Based Deliberation for Two-Pass Speech Recognitioncited by 29
  5. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  6. 2019Let's Ask Again: Refine Network for Automatic Question Generationcited by 13
  7. 2021Ensemble Models for Neural Source Code Summarization of Subroutinescited by 12
  8. 2020Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 10
  9. 2017ROSF: Leveraging Information Retrieval and Supervised Learning for Recommending Code Snippetscited by 4
  10. 2021GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarizationcited by 3
  11. 2021Cross Modification Attention Based Deliberation Model for Image Captioningcited by 1

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 1; 2025: 1.

3 papers.