Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning
Wei Ye, Rui Xie, Jinglei Zhang, Tianxiang Hu, Xiaoyin Wang, Shikun Zhang
摘要
Code summarization generates brief natural language description given a source code snippet, while code retrieval fetches relevant source code given a natural language query. Since both tasks aim to model the association between natural language and programming language, recent studies have combined these two tasks to improve their performance. However, researchers have yet been able to effectively leverage the intrinsic connection between the two tasks as they train these tasks in a separate or pipeline manner, which means their performance can not be well balanced. In this paper, we propose a novel end-to-end model for the two tasks by introducing an additional code generation task. More specifically, we explicitly exploit the probabilistic correlation between code summarization and code generation with dual learning, and utilize the two encoders for code summarization and code generation to train the code retrieval task via multi-task learning. We have carried out extensive experiments on an existing dataset of SQL and Python, and results show that our model can significantly improve the results of the code retrieval task over the-state-of-art models, as well as achieve competitive performance in terms of BLEU score for the code summarization task.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 On the Evaluation of Neural Code Summarization
- Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 Reassessing automatic evaluation metrics for code summarization tasks
- Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 On the Importance of Building High-quality Training Datasets for Neural Code Search
- On the Evaluation of Neural Code Summarization 引用了 Reassessing automatic evaluation metrics for code summarization tasks
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning 引用了 Reassessing automatic evaluation metrics for code summarization tasks
引用它的顶会 Paper12
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context LearningMingyang Geng, Shangwen Wang, Dezun Dong, Haotian Wang 等ICSE 2024 · 124 次引用
- Reassessing automatic evaluation metrics for code summarization tasksDevjeet Roy, Sarah Fakhoury, Venera ArnaoudovaFSE 2021 · 103 次引用
- On the Evaluation of Neural Code SummarizationEnsheng Shi, Yanlin Wang, Lun Du, Junjie Chen 等ICSE 2022 · 76 次引用
- On the Importance of Building High-quality Training Datasets for Neural Code SearchZhensu Sun, Li Li, Yan Liu, Xiaoning Du 等ICSE 2022 · 67 次引用
- Are we building on the rock? on the importance of data preprocessing for code summarizationLin Shi, Fangwen Mu, Xiao Chen, Song Wang 等FSE 2022 · 65 次引用
相关 Paper
- Novel Natural Language Summarization of Program Code via Leveraging Multiple Input RepresentationsFuxiang Chen, Mijung Kim, Jaegul ChooEMNLP Findings 2021 · 12 次引用
- Retrieval Augmented Code Generation and SummarizationMd. Rizwan Parvez, Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray 等EMNLP Findings 2021 · 141 次引用
- SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code RepresentationsChangan Niu, Chuanyi Li, Vincent Ng, Jidong Ge 等ICSE 2022 · 99 次引用
- Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial NetworkShangwen Wang, Bo Lin, Zhensu Sun, Ming Wen 等OOPSLA 2023 · 21 次引用
- Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用
