CLFeb 20, 2024

Code Needs Comments: Enhancing Code LLMs with Comment Augmentation

arXiv:2402.13013v133 citationsh-index: 25ACL
Originality Incremental advance
AI Analysis

This work addresses the challenge of enhancing programming skills in LLMs for developers and AI researchers, but it is incremental as it builds on existing methods with a specific data-focused improvement.

The authors tackled the problem of improving code-focused large language models (LLMs) by addressing the scarcity of code-comment aligned data in pre-training corpora, introducing a novel data augmentation method that generates comments for existing code and filters poorly correlated data, resulting in consistent performance improvements on programming skill benchmarks where the augmented model outperformed both the comment-generating model and a model trained without augmentation.

The programming skill is one crucial ability for Large Language Models (LLMs), necessitating a deep understanding of programming languages (PLs) and their correlation with natural languages (NLs). We examine the impact of pre-training data on code-focused LLMs' performance by assessing the comment density as a measure of PL-NL alignment. Given the scarcity of code-comment aligned data in pre-training corpora, we introduce a novel data augmentation method that generates comments for existing code, coupled with a data filtering strategy that filters out code data poorly correlated with natural language. We conducted experiments on three code-focused LLMs and observed consistent improvements in performance on two widely-used programming skill benchmarks. Notably, the model trained on the augmented data outperformed both the model used for generating comments and the model further trained on the data without augmentation.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes