Calibration of Large Language Models on Code Summarization
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
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2018Analyzing Uncertainty in Neural Machine Translationcited by 126
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
11 more
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 72
- 2020On the Inference Calibration of Neural Machine Translationcited by 61
- 2024Calibration and Correctness of Language Models for Codecited by 49
- 2021On the Evaluation of Neural Code Summarizationcited by 48
- 2023Large Language Models and Simple, Stupid Bugscited by 45
- 2021Multilingual training for Software Engineeringcited by 43
- 2023Look Before You Leap: An Exploratory Study of Uncertainty Measurement for Large Language Modelscited by 41
- 2023Distilled GPT for Source Code Summarizationcited by 31
- 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
- 2019Automatic Code Summarization: A Systematic Literature Reviewcited by 18
- 2022Semantic Similarity Metrics for Evaluating Source Code Summarizationcited by 14
Built on by
Citing papers per year: 2024: 1; 2025: 7; 2026: 4.
12 papers.
- 2025Maximizing Confidence Alone Improves Reasoningcited by 100
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2024Multi-Programming Language Sandbox for LLMscited by 10
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
- 2025Localized Calibrated Uncertainty in Code Language Modelscited by 3
- 2025PCS: Perceived Confidence Scoring of Black Box LLMs with Metamorphic Relationscited by 0
- 2025Retrofit: Continual Learning with Controlled Forgetting for Binary Security Detection and Analysiscited by 0
- 2025Toward Explaining Large Language Models in Software Engineering Taskscited by 0
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarizationcited by 0
- 2026Rethinking Ground Truth: A Case Study on Human Label Variation in MLLM Benchmarkingcited by 0
- 2026Fine-grained Approaches for Confidence Calibration of LLMs in Automated Code Revisioncited by 0
- 2026Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphscited by 0
- 2026Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs14 Jul 2026
- 2026Fine-grained Approaches for Confidence Calibration of LLMs in Automated Code Revision8 Apr 2026
- 2026Rethinking Ground Truth: A Case Study on Human Label Variation in MLLM Benchmarking20 Mar 2026
- 2026EyeLayer: Integrating Human Attention Patterns into LLM-Based Code Summarization25 Feb 2026
- 2025Localized Calibrated Uncertainty in Code Language Models31 Dec 2025
- 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Framework28 Dec 2025
- 2025Toward Explaining Large Language Models in Software Engineering Tasks23 Dec 2025
- 2025Retrofit: Continual Learning with Controlled Forgetting for Binary Security Detection and Analysis14 Nov 2025
- 2025Maximizing Confidence Alone Improves Reasoning28 May 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025PCS: Perceived Confidence Scoring of Black Box LLMs with Metamorphic Relations11 Feb 2025
- 2024Multi-Programming Language Sandbox for LLMs30 Oct 2024