Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs

Xiaoning Ren, Yinxing Xue, Lei Ma, Yuheng Huang
7/14/2026
cs.SEcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

As Code Large Language Models (LLMs) become central to modern software engineering, their inherent stochasticity poses significant real-world risks, where even minor errors can lead to severe functional, security, or safety consequences. Reliable automation, therefore, demands the ability to distinguish between confident, well-supported predictions and stochastic guessing. However, existing uncertainty estimation methods face a critical gap: white and grey-box techniques are often inapplicable to closed-source models, while standard "black-box" text metrics fail to capture the unique fragility of code, where syntactic variation does not always imply semantic divergence. To bridge this syntax-semantics gap, we introduce Code-MUE, a purely black-box framework that measures uncertainty through execution-based Semantic Interaction Graphs. Unlike prior approaches that rely on superficial textual similarity, Code-MUE grounds uncertainty in observable runtime behavior, calculating the Von Neumann entropy of the solution space to quantify global semantic diversity. A large-scale empirical study across eight state-of-the-art LLMs demonstrates that Code-MUE achieves a strong negative correlation with functional correctness (Spearman's correlation up to -0.98), significantly outperforming lexical and embedding-based baselines while enabling robust risk detection and selective prediction in practical workflows.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ren2026codemue,
  title  = {Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs},
  author = {Xiaoning Ren and Yinxing Xue and Lei Ma and Yuheng Huang},
  year   = {2026},
  eprint = {2607.12273},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.12273v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.12273.svg)](https://codeofpaper.com/paper/2607.12273)

Discussion