paper-with-me

홈 › Papers

The Fools are Certain; the Wise are Doubtful: Exploring LLM Confidence in Code Completion

2025-08-22 · Zoe Kotti, Konstantina Dritsa, Diomidis Spinellis, Panos Louridas arxiv

Code completion entails the task of providing missing tokens given a surrounding context. It can boost developer productivity and serve as a code discovery tool. Code completion has recently been approached with Large Language Models (LLMs) fine-tuned on code (code LLMs). The performance of code LLMs can be assessed with downstream and intrinsic metrics. Downstream metrics are usually employed to evaluate the practical utility of a model, but can be unreliable and require complex calculations and domain-specific knowledge. In contrast, intrinsic metrics such as perplexity, entropy, and mutual information, which measure model confidence or uncertainty, are simple, versatile, and universal across LLMs and tasks, and have been proposed as proxies for functional correctness and hallucination risk in LLM-generated code. Motivated by this, we evaluate the confidence of LLMs when generating code by measuring code perplexity across programming languages, models, and datasets using various LLMs, and a sample of 2254 files from 881 GitHub projects. We find that strongly-typed languages exhibit lower perplexity than dynamically typed languages. Scripting languages also demonstrate higher perplexity. Shell appears universally high in perplexity, whereas Java appears low. Code perplexity depends on the employed LLM; under a fixed model, relative language-level rankings are largely stable across evaluation corpora. Although code comments modestly increase perplexity, the language ranking based on perplexity is barely affected by their presence. LLM researchers, developers, and users can use our findings to assess the suitability of LLM-based code completion in specific software projects based on how language, model choice, and code characteristics impact model confidence.

📄 PDF Abstract BibTeX arXiv:2508.16131

Code (0)

등록된 구현이 없습니다.

Tasks

Code Completion

Similar Papers 제목 키워드 기반

FastEnsemble: Benchmarking and Accelerating Ensemble-based Uncertainty Estimation for Image-to-Image Translation

2021-09-29 · Xuanqing Liu, Sara Imboden, Marie Payne, Neil Lin 외

Estimating prediction uncertainty and confidence of deep learning models is crucial for mission-critical machine learning applications, such as biomedical imaging for diagnostics or therapy, and self-driving cars. Howeve…

BenchmarkingImage GenerationImage-to-Image TranslationSelf-Driving Cars+1

Are You Doubtful? Oh, It Might Be Difficult Then! Exploring the Use of Model Uncertainty for Question Difficulty Estimation

2024-12-16 · Leonidas Zotos, Hedderik van Rijn, Malvina Nissim

In an educational setting, an estimate of the difficulty of multiple-choice questions (MCQs), a commonly used strategy to assess learning progress, constitutes very useful information for both teachers and students. Sinc…

Multiple-choice

Tribrid: Stance Classification with Neural Inconsistency Detection

2021-09-14 · EMNLP 2021 11 · Song Yang, Jacopo Urbani

We study the problem of performing automatic stance classification on social media with neural architectures such as BERT. Although these architectures deliver impressive results, their level is not yet comparable to the…

ClassificationFact CheckingStance Classification

GraphBit: Bitwise Interaction Mining via Deep Reinforcement Learning

2018-06-01 · CVPR 2018 6 · Yueqi Duan, Ziwei Wang, Jiwen Lu, Xudong Lin 외

In this paper, we propose a GraphBit method to learn deep binary descriptors in a directed acyclic graph unsupervisedly, representing bitwise interactions as edges between the nodes of bits. Conventional binary represent…

BinarizationDeep Reinforcement Learningreinforcement-learningReinforcement Learning+2

Enhancing Uncertainty Estimation in LLMs with Expectation of Aggregated Internal Belief

2025-09-01 · Zeguan Xiao, Diyang Dou, Boya Xiong, Yun Chen 외 arxiv

Large Language Models (LLMs) have achieved remarkable success across a wide range of natural language tasks, but often exhibit overconfidence and generate plausible yet incorrect answers. This overconfidence, especially …

Reinforcement Learning