On the Evaluation of Neural Code Summarization
Not on the map. Why?
Abstract (arXiv)
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. Furthermore, we conduct human evaluations and find that the metric BLEU-DC is most correlated to human perception; (2) code pre-processing 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.
Key facts. Cited by 47 papers in the map (data through 7 Oct 2026). Builds on 33 of its 72 references that are in the map. First posted on arXiv 15 Jul 2021.
Builds on
33 of 72 references.
References · 33
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2014CIDEr: Consensus-based Image Description Evaluationcited by 2,027
- 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,281
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2016Improving Neural Language Models with a Continuous Cachecited by 81
21 more
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2018Structured Neural Summarizationcited by 53
- 2019Recommendations for Datasets for Source Code Summarizationcited by 46
- 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
- 2020Improved Automatic Summarization of Subroutines via Attention to File Contextcited by 34
- 2020Learning to Update Natural Language Comments Based on Code Changescited by 30
- 2020Code Summarization with Structure-induced Transformercited by 29
- 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
- 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Networkcited by 22
- 2020Deep Just-In-Time Inconsistency Detection Between Comments and Source Codecited by 20
- 2021On the Evaluation of Commit Message Generation Models: An Experimental Studycited by 20
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2019Automatic Code Summarization: A Systematic Literature Reviewcited by 18
- 2020Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learningcited by 16
- 2019A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniquescited by 15
- 2020TAG : Type Auxiliary Guiding for Code Comment Generationcited by 8
- 2021Exploiting Method Names to Improve Code Summarization: A Deliberation Multi-Task Learning Approachcited by 5
Built on by
Citing papers per year: 2022: 7; 2023: 18; 2024: 8; 2025: 7; 2026: 7.
47 papers.
Sort:
By area:
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
- 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generationcited by 39
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2022RACE: Retrieval-Augmented Commit Message Generationcited by 27
- 2023Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binariescited by 25
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
35 more
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworkscited by 14
- 2023Binary Code Summarization: Benchmarking ChatGPT/GPT-4 and Other Large Language Modelscited by 13
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarizationcited by 9
- 2023SoTaNa: The Open-Source Software Development Assistantcited by 8
- 2023MedChatZH: a Better Medical Adviser Learns from Better Instructionscited by 8
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2022Pre-Training Representations of Binary Code Using Contrastive Learningcited by 6
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2022Learning code summarization from a small and local datasetcited by 5
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2023LUNA: A Model-Based Universal Analysis Framework for Large Language Modelscited by 4
- 2022NeuDep: Neural Binary Memory Dependence Analysiscited by 3
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentationcited by 2
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
- 2025Assessing Large Language Models in Generating RTL Design Specificationscited by 2
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 1
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarizationcited by 0
- 2024Transducer Tuning: Efficient Model Adaptation for Software Tasks Using Code Property Graphscited by 0
- 2025Enhancing Code LLM Training with Programmer Attentioncited by 0
- 2025Knowledge Distillation of Domain-adapted LLMs for Question-Answering in Telecomcited by 0
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarizationcited by 0
- 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detectioncited by 0
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detection28 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2025An Empirical Study of Agent Developer Practices in AI Agent Frameworks1 Dec 2025
- 2025Assessing Large Language Models in Generating RTL Design Specifications17 Nov 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025Knowledge Distillation of Domain-adapted LLMs for Question-Answering in Telecom28 Apr 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
35 more
- 2025Enhancing Code LLM Training with Programmer Attention19 Mar 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2024Transducer Tuning: Efficient Model Adaptation for Software Tasks Using Code Property Graphs18 Dec 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024Calibration of Large Language Models on Code Summarization30 Apr 2024
- 2024Analyzing the Performance of Large Language Models on Code Summarization10 Apr 2024
- 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generation26 Mar 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarization21 Feb 2024
- 2023A Prompt Learning Framework for Source Code Summarization26 Dec 2023
- 2023Binary Code Summarization: Benchmarking ChatGPT/GPT-4 and Other Large Language Models15 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generation14 Nov 2023
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Code13 Nov 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023Understanding Code Semantics: An Evaluation of Transformer Models in Summarization25 Oct 2023
- 2023LUNA: A Model-Based Universal Analysis Framework for Large Language Models22 Oct 2023
- 2023MedChatZH: a Better Medical Adviser Learns from Better Instructions3 Sep 2023
- 2023SoTaNa: The Open-Source Software Development Assistant25 Aug 2023
- 2023OctoPack: Instruction Tuning Code Large Language Models14 Aug 2023
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?22 May 2023
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?24 Apr 2023
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)13 Apr 2023
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyond11 Apr 2023
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation3 Mar 2023
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Models10 Jan 2023
- 2023Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binaries4 Jan 2023
- 2022Pre-Training Representations of Binary Code Using Contrastive Learning11 Oct 2022
- 2022NeuDep: Neural Binary Memory Dependence Analysis4 Oct 2022
- 2022Few-shot training LLMs for project-specific code-summarization9 Jul 2022
- 2022An Extractive-and-Abstractive Framework for Source Code Summarization15 Jun 2022
- 2022Learning code summarization from a small and local dataset2 Jun 2022
- 2022CoCoSoDa: Effective Contrastive Learning for Code Search7 Apr 2022
- 2022RACE: Retrieval-Augmented Commit Message Generation5 Mar 2022
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 178
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
- 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generationcited by 39
- 2023Recommending Root-Cause and Mitigation Steps for Cloud Incidents using Large Language Modelscited by 38
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2023Extending Source Code Pre-Trained Language Models to Summarise Decompiled Binariescited by 25
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2023Towards Efficient Fine-tuning of Pre-trained Code Models: An Experimental Study and Beyondcited by 20
- 2024Analyzing the Performance of Large Language Models on Code Summarizationcited by 19
12 most cited of 41 All 41 (JSON)
- 2026Learning Generalizable Multimodal Representations for Software Vulnerability Detection28 Apr 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2025Assessing Large Language Models in Generating RTL Design Specifications17 Nov 2025
- 2025Knowledge Distillation of Domain-adapted LLMs for Question-Answering in Telecom28 Apr 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2025Enhancing Code LLM Training with Programmer Attention19 Mar 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2024Transducer Tuning: Efficient Model Adaptation for Software Tasks Using Code Property Graphs18 Dec 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
12 newest of 41 All 41 (JSON)