mlsanityData to 14 Oct 2026

Calibration of Large Language Models on Code Summarization

arXiv 2404.19318 ↗First posted 30 Apr 2024cs.SE cs.CLcited by 12

Not on the map. Why?

Abstract (arXiv)

A brief, fluent, and relevant summary can be helpful during program comprehension; however, such a summary does require significant human effort to produce. Often, good summaries are unavailable in software projects, which makes maintenance more difficult. There has been a considerable body of research into automated AI-based methods, using Large Language models (LLMs), to generate summaries of code; there also has been quite a bit of work on ways to measure the performance of such summarization methods, with special attention paid to how closely these AI-generated summaries resemble a summary a human might have produced. Measures such as BERTScore and BLEU have been suggested and evaluated with human-subject studies. However, LLM-generated summaries can be inaccurate, incomplete, etc.: generally, too dissimilar to one that a good developer might write. Given an LLM-generated code summary, how can a user rationally judge if a summary is sufficiently good and reliable? Given just some input source code, and an LLM-generated summary, existing approaches can help judge brevity, fluency and relevance of the summary; however, it's difficult to gauge whether an LLM-generated summary sufficiently resembles what a human might produce, without a "golden" human-produced summary to compare against. We study this resemblance question as calibration problem: given just the code & the summary from an LLM, can we compute a confidence measure, that provides a reliable indication of whether the summary sufficiently resembles what a human would have produced in this situation? We examine this question using several LLMs, for several languages, and in several different settings. Our investigation suggests approaches to provide reliable predictions of the likelihood that an LLM-generated summary would sufficiently resemble a summary a human might write for the same code.

Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 23 of its 56 references that are in the map. First posted on arXiv 30 Apr 2024.

Builds on

23 of 56 references.

References · 23

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2017On Calibration of Modern Neural Networkscited by 4,960
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  6. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  7. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  8. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
  9. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  10. 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
  11. 2018Analyzing Uncertainty in Neural Machine Translationcited by 126
  12. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
11 more
  1. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 72
  2. 2020On the Inference Calibration of Neural Machine Translationcited by 61
  3. 2024Calibration and Correctness of Language Models for Codecited by 49
  4. 2021On the Evaluation of Neural Code Summarizationcited by 48
  5. 2023Large Language Models and Simple, Stupid Bugscited by 45
  6. 2021Multilingual training for Software Engineeringcited by 43
  7. 2023Look Before You Leap: An Exploratory Study of Uncertainty Measurement for Large Language Modelscited by 41
  8. 2023Distilled GPT for Source Code Summarizationcited by 31
  9. 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
  10. 2019Automatic Code Summarization: A Systematic Literature Reviewcited by 18
  11. 2022Semantic Similarity Metrics for Evaluating Source Code Summarizationcited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 1; 2025: 7; 2026: 4.

12 papers.