Lune

ICSE2022顶会

On the Evaluation of Neural Code Summarization

Ensheng Shi, Yanlin Wang, Lun Du, Junjie Chen, Shi Han, Hongyu Zhang, Dongmei Zhang, Hongbin Sun

摘要

Source code summaries are important for program comprehension and maintenance. However, there are plenty of programs with missing, outdated, or mismatched summaries. Recently, deep learning techniques have been exploited to automatically generate summaries for given code snippets. To achieve a profound understanding of how far we are from solving this problem and provide suggestions to future research, in this paper, we conduct a systematic and in-depth analysis of 5 state-of-the-art neural code summarization models on 6 widely used BLEU variants, 4 pre-processing operations and their combinations, and 3 widely used datasets. The evaluation results show that some important factors have a great influence on the model evaluation, especially on the performance of models and the ranking among the models. However, these factors might be easily overlooked. Specifically, (1) the BLEU metric widely used in existing work of evaluating code summarization models has many variants. Ignoring the differences among these variants could greatly affect the validity of the claimed results. Besides, we discover and resolve an important and previously unknown bug in BLEU calculation in a commonly-used software package. Furthermore, we conduct human evaluations and find that the metric BLEU-DC is most correlated to human perception; (2) code preprocessing choices can have a large (from -18% to +25%) impact on the summarization performance and should not be neglected. We also explore the aggregation of pre-processing combinations and boost the performance of models; (3) some important characteristics of datasets (corpus sizes, data splitting methods, and duplication ratios) have a significant impact on model evaluation. Based on the experimental results, we give actionable suggestions for evaluating code summarization and choosing the best method in different scenarios. We also build a shared code summarization toolbox to facilitate future research.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 20 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Code Summarization with Structure-induced Transformer 引用了 Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning
  • Code Summarization with Structure-induced Transformer 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 Code Summarization with Structure-induced Transformer
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 Retrieval-based neural source 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
  • Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization) 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization) 引用了 Retrieval-based neural source code summarization
  • Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization) 引用了 Reassessing automatic evaluation metrics for code summarization tasks
  • Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization) 引用了 Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models
  • Reassessing automatic evaluation metrics for code summarization tasks 引用了 Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning
  • Reassessing automatic evaluation metrics for code summarization tasks 引用了 Retrieval-based neural source code summarization
  • What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs? 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs? 引用了 Retrieval-based neural source code summarization
  • Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models 引用了 Reassessing automatic evaluation metrics for code summarization tasks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper20

  1. OctoPack: Instruction Tuning Code Large Language ModelsNiklas Muennighoff, Qian Liu, Armel Randy Zebaze, Qinkai Zheng 等ICLR 2024 · 203 次引用
  2. Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language ModelsToufique Ahmed, Supriyo Ghosh, Chetan Bansal, Thomas Zimmermann 等ICSE 2023 · 93 次引用
  3. What Makes Good In-Context Demonstrations for Code Intelligence Tasks with LLMs?Shuzheng Gao, Xin-Cheng Wen, Cuiyun Gao, Wenxuan Wang 等ASE 2023 · 80 次引用
  4. Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)Toufique Ahmed, Kunal Suresh Pai, Premkumar T. Devanbu, Earl T. BarrICSE 2024 · 71 次引用
  5. 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 次引用

它引用的 Paper11

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用
  3. Reassessing automatic evaluation metrics for code summarization tasksDevjeet Roy, Sarah Fakhoury, Venera ArnaoudovaFSE 2021 · 103 次引用
  4. Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual LearningWei Ye, Rui Xie, Jinglei Zhang, Tianxiang Hu 等WWW 2020 · 83 次引用
  5. Code Summarization with Structure-induced TransformerHongqiu Wu, Hai Zhao, Min ZhangACL Findings 2021 · 70 次引用

相关 Paper

  1. SimLLM: Calculating Semantic Similarity in Code Summaries using a Large Language Model-Based ApproachXin Jin, Zhiqiang LinFSE 2024 · 8 次引用
  2. How Effectively Do Code Language Models Understand Poor-Readability Code?Chao Hu, Yitian Chai, Hao Zhou, Fandong Meng 等ASE 2024 · 3 次引用
  3. Calibration of Large Language Models on Code SummarizationYuvraj Virk, Premkumar T. Devanbu, Toufique AhmedFSE 2025 · 5 次引用
  4. Evaluating Code Summarization Techniques: A New Metric and an Empirical CharacterizationAntonio Mastropaolo, Matteo Ciniselli, Massimiliano Di Penta, Gabriele BavotaICSE 2024 · 28 次引用
  5. Learning and Evaluating Contextual Embedding of Source CodeAditya Kanade, Petros Maniatis, Gogul Balakrishnan, Kensen ShiICML 2020 · 438 次引用
黄昏的海面,两侧是细线勾勒的悬崖