Automatic Comment Generation via Multi-Pass Deliberation
Fangwen Mu, Xiao Chen, Lin Shi, Song Wang, Qing Wang

TL;DR
This paper introduces DECOM, a multi-pass deliberation framework for automatic comment generation that iteratively refines comments based on code and human-like deliberation, outperforming existing methods.
Contribution
The paper proposes a novel multi-pass deliberation approach for comment generation, incorporating iterative polishing and evaluation to produce higher quality comments.
Findings
Outperforms state-of-the-art baselines on Java and Python datasets.
Generated comments are more readable, informative, and useful according to human evaluation.
Effective in producing high-quality comments through iterative refinement.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Natural Language Processing Techniques
