Improving the Learning of Code Review Successive Tasks with Cross-Task Knowledge Distillation
Oussama Ben Sghaier, Houari A. Sahraoui
Abstract
Code review is a fundamental process in software development that plays a pivotal role in ensuring code quality and reducing the likelihood of errors and bugs. However, code review can be complex, subjective, and time-consuming. Quality estimation , comment generation , and code refinement constitute the three key tasks of this process, and their automation has traditionally been addressed separately in the literature using different approaches. In particular, recent efforts have focused on fine-tuning pre-trained language models to aid in code review tasks, with each task being considered in isolation. We believe that these tasks are interconnected, and their fine-tuning should consider this interconnection. In this paper, we introduce a novel deep-learning architecture, named DISCOREV, which employs cross-task knowledge distillation to address these tasks simultaneously. In our approach, we utilize a cascade of models to enhance both comment generation and code refinement models. The fine-tuning of the comment generation model is guided by the code refinement model, while the fine-tuning of the code refinement model is guided by the quality estimation model. We implement this guidance using two strategies: a feedback-based learning objective and an embedding alignment objective. We evaluate DISCOREV by comparing it to state-of-the-art methods based on independent training and fine-tuning. Our results show that our approach generates better review comments, as measured by the BLEU score, as well as more accurate code refinement according to the CodeBLEU score.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Multilingual Code Snippets Training for Program Translation cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation cites CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
- SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation cites Using Pre-Trained Models to Boost Code Review Automation
- SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation cites Automating code review activities by large-scale pre-training
- Towards Practical Defect-Focused Automated Code Review cites Using Pre-Trained Models to Boost Code Review Automation
- Towards Practical Defect-Focused Automated Code Review cites Automating code review activities by large-scale pre-training
- Automating code review activities by large-scale pre-training cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Automating code review activities by large-scale pre-training cites Using Pre-Trained Models to Boost Code Review Automation
- Automating code review activities by large-scale pre-training cites Multilingual Code Snippets Training for Program Translation
- SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review Activities cites Using Pre-Trained Models to Boost Code Review Automation
- SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review Activities cites Automating code review activities by large-scale pre-training
Cited by top-tier papers3
- SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment GenerationZhengran Zeng, Ruikai Shi, Keke Han, Yixin Li et al.FSE 2026
- Towards Practical Defect-Focused Automated Code ReviewJunyi Lu, Lili Jiang, Xiaojia Li, Jianbing Fang et al.ICML 2025
- SeRe: A Security-Related Code Review Dataset Aligned with Real-World Review ActivitiesZixiao Zhao, Yanjie Jiang, Hui Liu, Kui Liu et al.ICSE 2026
Builds on10
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 citations
- Automating code review activities by large-scale pre-trainingZhiyu Li, Shuai Lu, Daya Guo, Nan Duan et al.FSE 2022 · 195 citations
- Using Pre-Trained Models to Boost Code Review AutomationRosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella et al.ICSE 2022 · 149 citations
- Multilingual Code Snippets Training for Program TranslationMing Zhu, Karthik Suresh, Chandan K. ReddyAAAI 2022 · 72 citations
Related papers
- E4R-Reviewer: Effective and Explainable Automated Code Review via End-to-End Reasoning-Guided AlignmentYifei Liu, Xizhi Hou, Li Yang, Huan Liu et al.ISSTA 2026
- CoditT5: Pretraining for Source Code and Natural Language EditingJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li et al.ASE 2022 · 81 citations
- CodeReviewQA: The Code Review Comprehension Assessment for Large Language ModelsHong Yi Lin, Chunhua Liu, Haoyu Gao, Patanamon Thongtanunam et al.ACL Findings 2025 · 7 citations
- Intention is All you Need: Refining your Code from your IntentionQi Guo, Xiaofei Xie, Shangqing Liu, Ming Hu et al.ICSE 2025 · 7 citations
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio et al.ICSE 2021 · 9 citations
