paper-with-me

홈 › Papers

Enhancing Code Generation via Bidirectional Comment-Level Mutual Grounding

2025-05-12 · Yifeng Di, Tianyi Zhang

Large Language Models (LLMs) have demonstrated unprecedented capability in code generation. However, LLM-generated code is still plagued with a wide range of functional errors, especially for complex programming tasks that LLMs have not seen before. Recent studies have shown that developers often struggle with inspecting and fixing incorrect code generated by LLMs, diminishing their productivity and trust in LLM-based code generation. Inspired by the mutual grounding theory in communication, we propose an interactive approach that leverages code comments as a medium for developers and LLMs to establish a shared understanding. Our approach facilitates iterative grounding by interleaving code generation, inline comment generation, and contextualized user feedback through editable comments to align generated code with developer intent. We evaluated our approach on two popular benchmarks and demonstrated that our approach significantly improved multiple state-of-the-art LLMs, e.g., 17.1% pass@1 improvement for code-davinci-002 on HumanEval. Furthermore, we conducted a user study with 12 participants in comparison to two baselines: (1) interacting with GitHub Copilot, and (2) interacting with a multi-step code generation paradigm called Multi-Turn Program Synthesis. Participants completed the given programming tasks 16.7% faster and with 10.5% improvement in task success rate when using our approach. Both results show that interactively refining code comments enables the collaborative establishment of mutual grounding, leading to more accurate code generation and higher developer confidence.

📄 PDF Abstract BibTeX arXiv:2505.07768

Code (1)

NecoraNyaru/PInG 공식 구현

Tasks

Code GenerationComment GenerationHumanEvalProgram Synthesis

Methods 이 논문이 사용한 방법론

ALIGN In the ALIGN method, visual and language representations are jointly trained from noisy image alt-text data. The image and text encoders are learned via contrastive loss…

Similar Papers 제목 키워드 기반

Towards Context-Aware Code Comment Generation

2020-11-01 · Findings of the Association for Computational Linguistics 2020 · Xiaohan Yu, Quzhe Huang, Zheng Wang, Yansong Feng 외

Code comments are vital for software maintenance and comprehension, but many software projects suffer from the lack of meaningful and up-to-date comments in practice. This paper presents a novel approach to automatically…

Code Comment GenerationComment GenerationGraph Attention

A Transfer Learning Approach for Dialogue Act Classification of GitHub Issue Comments

2020-11-10 · Ayesha Enayet, Gita Sukthankar

Social coding platforms, such as GitHub, serve as laboratories for studying collaborative problem solving in open source software development; a key feature is their ability to support issue reporting which is used by te…

Dialogue Act ClassificationGeneral ClassificationSentenceTransfer Learning

Towards Automatic Soccer Commentary Generation with Knowledge-Enhanced Visual Reasoning

2026-03-31 · Zeyu Jin, Xiaoyu Qin, Songtao Zhou, Kaifeng Yun 외 arxiv

Soccer commentary plays a crucial role in enhancing the soccer game viewing experience for audiences. Previous studies in automatic soccer commentary generation typically adopt an end-to-end method to generate anonymous …

Visual Reasoning

DCA: Diversified Co-Attention towards Informative Live Video Commenting

2019-11-07 · Zhihan Zhang, Zhiyi Yin, Shuhuai Ren, Xinhang Li 외

We focus on the task of Automatic Live Video Commenting (ALVC), which aims to generate real-time video comments with both video frames and other viewers' comments as inputs. A major challenge in this task is how to prope…

Comment GenerationMetric Learning

Generating Pertinent and Diversified Comments with Topic-aware Pointer-Generator Networks

2020-05-09 · Junheng Huang, Lu Pan, Kang Xu, Weihua Peng 외

Comment generation, a new and challenging task in Natural Language Generation (NLG), attracts a lot of attention in recent years. However, comments generated by previous work tend to lack pertinence and diversity. In thi…

ArticlesComment GenerationDiversityText Generation