Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterization
Not on the map. Why?
Abstract (arXiv)
Several code summarization techniques have been proposed in the literature to automatically document a code snippet or a function. Ideally, software developers should be involved in assessing the quality of the generated summaries. However, in most cases, researchers rely on automatic evaluation metrics such as BLEU, ROUGE, and METEOR. These metrics are all based on the same assumption: The higher the textual similarity between the generated summary and a reference summary written by developers, the higher its quality. However, there are two reasons for which this assumption falls short: (i) reference summaries, e.g., code comments collected by mining software repositories, may be of low quality or even outdated; (ii) generated summaries, while using a different wording than a reference one, could be semantically equivalent to it, thus still being suitable to document the code snippet. In this paper, we perform a thorough empirical investigation on the complementarity of different types of metrics in capturing the quality of a generated summary. Also, we propose to address the limitations of existing metrics by considering a new dimension, capturing the extent to which the generated summary aligns with the semantics of the documented code snippet, independently from the reference summary. To this end, we present a new metric based on contrastive learning to capture said aspect. We empirically show that the inclusion of this novel dimension enables a more effective representation of developers' evaluations regarding the quality of automatically generated summaries.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). First posted on arXiv 24 Dec 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 5; 2025: 12; 2026: 4.
21 papers.
Sort:
By area:
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2025Code Summarization Beyond Function Levelcited by 8
- 2024Leveraging LLMs for Legacy Code Modernization: Challenges and Opportunities for LLM-Generated Documentationcited by 6
- 2024MALSIGHT: Exploring Malicious Source Code and Benign Pseudocode for Iterative Binary Malware Summarizationcited by 5
- 2025Summarizing Speech: A Comprehensive Surveycited by 5
- 2025Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarizationcited by 4
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
- 2025Assessing Large Language Models in Generating RTL Design Specificationscited by 2
9 more
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
- 2025CIDRe: A Reference-Free Multi-Aspect Criterion for Code Comment Quality Measurementcited by 1
- 2026ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code Summarizationcited by 1
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 1
- 2025Simple and Effective Baselines for Code Summarisation Evaluationcited by 0
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generationcited by 0
- 2025Enhancing Neural Code Representation with Additional Contextcited by 0
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarizationcited by 0
- 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code Summarization12 Apr 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2025Assessing Large Language Models in Generating RTL Design Specifications17 Nov 2025
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025Enhancing Neural Code Representation with Additional Context14 Oct 2025
- 2025Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation17 Jun 2025
- 2025CIDRe: A Reference-Free Multi-Aspect Criterion for Code Comment Quality Measurement26 May 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Summarizing Speech: A Comprehensive Survey10 Apr 2025
9 more
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarization13 Mar 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2025Code Summarization Beyond Function Level23 Feb 2025
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT18 Dec 2024
- 2024Leveraging LLMs for Legacy Code Modernization: Challenges and Opportunities for LLM-Generated Documentation22 Nov 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024MALSIGHT: Exploring Malicious Source Code and Benign Pseudocode for Iterative Binary Malware Summarization26 Jun 2024
- 2024Calibration of Large Language Models on Code Summarization30 Apr 2024
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2025Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarizationcited by 4
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebasescited by 1
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Teamwork makes the dream work: LLMs-Based Agents for GitHub README.MD Summarization13 Mar 2025
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2025Code Summarization Beyond Function Levelcited by 8
- 2024Leveraging LLMs for Legacy Code Modernization: Challenges and Opportunities for LLM-Generated Documentationcited by 6
- 2024MALSIGHT: Exploring Malicious Source Code and Benign Pseudocode for Iterative Binary Malware Summarizationcited by 5
- 2025Summarizing Speech: A Comprehensive Surveycited by 5
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
- 2025Assessing Large Language Models in Generating RTL Design Specificationscited by 2
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Modelscited by 1
- 2025CIDRe: A Reference-Free Multi-Aspect Criterion for Code Comment Quality Measurementcited by 1
- 2026ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code Summarizationcited by 1
12 most cited of 16 All 16 (JSON)
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code Summarization12 Apr 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2025Assessing Large Language Models in Generating RTL Design Specifications17 Nov 2025
- 2025Enhancing Neural Code Representation with Additional Context14 Oct 2025
- 2025CIDRe: A Reference-Free Multi-Aspect Criterion for Code Comment Quality Measurement26 May 2025
- 2025Simple and Effective Baselines for Code Summarisation Evaluation26 May 2025
- 2025Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models14 May 2025
- 2025Summarizing Speech: A Comprehensive Survey10 Apr 2025
- 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization13 Mar 2025
- 2025Code Summarization Beyond Function Level23 Feb 2025
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT18 Dec 2024
12 newest of 16 All 16 (JSON)