The paper investigates how large language models (LLMs) used for code generation can produce syntactically plausible but incorrect programs, a phenomenon termed overconfident failure. By evaluating four open-source code models across three execution-based benchmarks, the authors examine whether token-level uncertainty metrics can predict execution correctness, analyze overconfidence at both global and local levels, and test mitigation strategies such as selective generation and instruction tuning. Their findings show that existing uncertainty signals are only partially reliable, overconfidence persists across models, instruction tuning can increase certainty without improving correctness discrimination, and common mitigation techniques do not fully resolve the issue.
"whyItMatters":"The study highlights that current uncertainty metrics and mitigation strategies are insufficient to reliably detect or prevent incorrect code generation, underscoring the need for better reliability signals in LLM-based code synthesis."
By Ravishka Rathnasuriya, Wei Yang
arXiv:2608. 04439v1 Announce Type: cross Abstract: Large language models (LLMs) have made notable progress in code generation, but they still struggle on challenging tasks that require sophisticated algorithms or complex implementations.
By Yiru Dong, Richong Zhang, Fanshuang Kong, Si Chen
arXiv:2606. 03852v1 Announce Type: cross Abstract: Large language models often generate code with bugs.
By Yinsheng Yao, Hongxiang Zhang, Weixi Tong, Tianyi Zhang
The paper investigates how to improve confidence calibration for large language models (LLMs) used in automated code revision (ACR). It proposes applying local Platt-scaling to three fine-grained confidence scores, rather than the conventional global method, and demonstrates that this approach consistently reduces calibration error across multiple tasks, metrics, and model sizes. The study shows that fine-grained calibration, especially when combined with global scaling, yields more reliable confidence estimates for ACR tasks.
By Hong Yi Lin, Chunhua Liu, Haoyu Gao, Patanamon Thongtanunam, Christoph Treude
arXiv:2606. 31159v1 Announce Type: cross Abstract: Large Language Models (LLMs) are rapidly transforming software development, yet their use in security-critical contexts raises a key question: do models know when their generated code is insecure?
By Mohammed Latif Siddiq, Md. Nafiu Rahman, Joanna C. S. Santos
arXiv:2607. 12273v1 Announce Type: cross 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.
By Xiaoning Ren, Yinxing Xue, Lei Ma, Yuheng Huang
arXiv:2608. 14653v1 Announce Type: cross Abstract: Prediction uncertainty is a widely adopted metric for quantifying model confidence, with downstream applications spanning model explanation, data selection, and prediction rollback.
By Xianzong Wu, Xiaohong Li, Yuejun Guo, Xinyang Liu, Tianlin Li, Junjie Wang, Qiang Hu
arXiv:2608. 08266v1 Announce Type: cross Abstract: Code generated by modern language models often reads naturally.
By Francisco Ribeiro, Sohaila Abdulsattar, Renata Gonzalez, Mahmoud Kassem, Sarah Nadi
arXiv:2609.37294v1 Announce Type: cross
Abstract: Large language models (LLMs) are increasingly used for software engineering tasks, yet their stochastic behavior challenges the validity, reproducibi...
By Francisco Ortin
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.
arXiv:2606. 09577v1 Announce Type: cross Abstract: Large language models (LLMs) are increasingly deployed as code generators, where silently wrong programs pose real safety and reliability risks.
By Yuling Shi, Caiqi Zhang, Yuexian Li, Haopeng Wang, Yeheng Chen, Nigel Collier, Xiaodong Gu
arXiv:2608.30025v1 Announce Type: new
Abstract: Large language models (LLMs) frequently generate source code containing vulnerabilities, yet little work studies the internal mechanisms that distingui...
By Hao Yan, Ziyu Yao