mlsanityData to 14 Oct 2026

Distilling Desired Comments for Enhanced Code Review with Large Language Models

arXiv 2412.20340 ↗First posted 29 Dec 2024cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

There has been a growing interest in using Large Language Models (LLMs) for code review thanks to their proven proficiency in code comprehension. The primary objective of most review scenarios is to generate desired review comments (DRCs) that explicitly identify issues to trigger code fixes. However, existing LLM-based solutions are not so effective in generating DRCs for various reasons such as hallucination. To enhance their code review ability, they need to be fine-tuned with a customized dataset that is ideally full of DRCs. Nevertheless, such a dataset is not yet available, while manual annotation of DRCs is too laborious to be practical. In this paper, we propose a dataset distillation method, Desiview, which can automatically construct a distilled dataset by identifying DRCs from a code review dataset. Experiments on the CodeReviewer dataset comprising more than 150K review entries show that Desiview achieves an impressive performance of 88.93%, 80.37%, 86.67%, and 84.44% in terms of Precision, Recall, Accuracy, and F1, respectively, surpassing state-of-the-art methods. To validate the effect of such a distilled dataset on enhancing LLMs' code review ability, we first fine-tune the latest LLaMA series (i.e., LLaMA 3 and LLaMA 3.1) to build model Desiview4FT. We then enhance the model training effect through KTO alignment by feeding those review comments identified as non-DRCs to the LLMs, resulting in model Desiview4FA. Verification results indicate that Desiview4FA slightly outperforms Desiview4FT, while both models have significantly improved against the base models in terms of generating DRCs. Human evaluation confirms that both models identify issues more accurately and tend to generate review comments that better describe the issues contained in the code than the base LLMs do.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 29 of its 55 references that are in the map. First posted on arXiv 29 Dec 2024.

Builds on

29 of 55 references.

References · 29

  1. 2017Proximal Policy Optimization Algorithmscited by 15,215
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  6. 2023A Survey of Large Language Modelscited by 2,576
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  11. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  12. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
17 more
  1. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
  2. 2022CodeT: Code Generation with Generated Testscited by 384
  3. 2024LoRA Learns Less and Forgets Lesscited by 328
  4. 2024KTO: Model Alignment as Prospect Theoretic Optimizationcited by 264
  5. 2023AI Alignment: A Comprehensive Surveycited by 263
  6. 2023Large Language Model Alignment: A Surveycited by 243
  7. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solvingcited by 177
  8. 2024LLM Critics Help Catch LLM Bugscited by 147
  9. 2022The 'Problem' of Human Label Variation: On Ground Truth in Data, Modeling and Evaluationcited by 139
  10. 2024Understanding the performance gap between online and offline alignment algorithmscited by 110
  11. 2023Learning Performance-Improving Code Editscited by 106
  12. 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 77
  13. 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
  14. 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
  15. 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
  16. 2024Towards Trustable Language Models: Investigating Information Quality of Large Language Modelscited by 6
  17. 2024Semi-Instruct: Bridging Natural-Instruct and Self-Instruct for Code Large Language Modelscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generation
  2. 2026Rethinking Training Data for Generating Code Review Comments
  3. 2025Fine-Tuning Multilingual Language Models for Code Review: An Empirical Study on Industrial C# Projects
  4. 2025Combining Large Language Models with Static Analyzers for Code Review Generation
  5. 2025CodeReviewQA: The Code Review Comprehension Assessment for Large Language Models
  6. 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM
  7. 2026Automated Classification of Human Code Review Comments with Large Language Models
  8. 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositories