ARTFEED — Contemporary Art Intelligence

Uncertainty Estimation in Code LLMs: Multi-Sample P(True) Shows Promise, Self-Correction Fails

ai-technology · 2026-08-18

A recent study published on arXiv (2608.14659) explores the applicability of uncertainty estimation techniques from natural language processing to code generation, assessing if these methods can enhance code generation via selective self-correction. Researchers tested five uncertainty techniques—mean token entropy, verbalized confidence, P(True), entropy ensembles, and semantic entropy probes—using three small code LLMs on the HumanEval and BigCodeBench benchmarks. The findings indicated that multi-sample P(True) had the highest correlation with correctness, while the other methods, including semantic entropy probes, showed only weak correlations. The authors implemented three self-correction strategies based on these signals: adaptive decoding, uncertainty-based regeneration, and verification-based regeneration. Surprisingly, the results demonstrated that uncertainty-driven self-correction did not enhance code generation and, in some instances, worsened it, underscoring the limitations of current uncertainty estimation methods in this area and the need for more effective solutions.

Key facts

  • Study on arXiv:2608.14659
  • Evaluates five uncertainty methods
  • Methods: mean token entropy, verbalized confidence, P(True), entropy ensembles, semantic entropy probes
  • Three small code LLMs tested
  • Benchmarks: HumanEval and BigCodeBench
  • Multi-sample P(True) strongest correlation with correctness
  • Other methods weak correlation
  • Three self-correction policies: adaptive decoding, uncertainty-based regeneration, verification-based regeneration
  • Uncertainty-based self-correction did not improve performance

Entities

Institutions

  • arXiv

Sources