mlsanityData to 14 Oct 2026

Incoherence as Oracle-less Measure of Error in LLM-Based Code Generation

arXiv 2507.00057 ↗First posted 26 Jun 2025cs.PL cs.AI cs.LGcited by 6

Not on the map. Why?

Abstract (arXiv)

Generating code from a natural language programming task is one of the most successful applications of Large Language Models (LLMs). Yet, the generated program may be buggy. Without an oracle, such as an existing, correct implementation or a formal specification, can we somehow estimate how likely the generated program is correct? In this paper, we propose a measure of incorrectness, called *incoherence*, that can be estimated efficiently in the absence of an oracle and allows us to establish a lower bound on the error, i.e., the probability that the LLM-generated program for that specification is incorrect. In our experiments, our incoherence-based methodology can automatically identify about two-thirds of incorrect programs without reports of false positives for the average task. In fact, *an oracle-based evaluation of LLMs can be reliably replaced by an incoherence-based evaluation*. In particular, we find a very strong agreement between the ranking of LLMs by the number of programs deemed correct via an oracle (pass@1) and the ranking of LLMs by the number of programs deemed correct via incoherence.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 10 of its 27 references that are in the map. First posted on arXiv 26 Jun 2025.

Builds on

10 of 27 references.

References · 10

  1. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  2. 2024A Survey on Large Language Models for Code Generationcited by 658
  3. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  4. 2023Chainpoll: A high efficacy method for LLM hallucination detectioncited by 39
  5. 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
  6. 2025Enhancing LLM Code Generation with Ensembles: A Similarity-Based Selection Approachcited by 10
  7. 2024The Fault in our Stars: Quality Assessment of Code Generation Benchmarkscited by 9
  8. 2025MyGO Multiplex CoT: A Method for Self-Reflection in Large Language Models via Double Chain of Thought Thinkingcited by 5
  9. 2024Showing LLM-Generated Code Selectively Based on Confidence of LLMscited by 4
  10. 2018Assurances in Software Testing: A Roadmapcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 4.

6 papers.