paperbot · PL 论文追踪

全部论文 待读 收藏

P2 How Does ChatGPT Make Assumptions When Creating Erroneous Programs?

ChatGPT 在生成错误程序时如何做出假设?
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文是对 GPT-4o 在 HumanEval 上代码生成失败原因的实证分析,研究对象是 LLM 自身的行为特征,既不做静态分析/形式化验证,也不涉及浮点或贝叶斯程序分析,与用户的三个核心交叉方向均无直接交集。其“用 LLM 作为工具改进分析”这一层也缺失,属于用户明确表示不感兴趣的研究目标本身就是 LLM 的论文。引用 1 inbox
Sadia Jahan, Xiaoyin Wang
crossref: 2026-09-12

AI 速览

一句话:通过 HumanEval 上 GPT-4o 的实证分析,揭示错误或错误实现的假设是代码生成失败的重要诱因。

本文关注 LLM 代码生成中错误程序频发的问题,尤其是需求误解与逻辑不一致是否源于模型隐含假设。作者在 HumanEval 数据集上提示 GPT-4o 生成 Python 解,并要求其列出最重要的 3 个假设;随后用数据集测试用例验证输出。在 164 个解中发现 17 个错误程序,并分析这 17 个失败及对应的 51 个假设。结果显示,约 53% 的失败与 GPT 自身提出但错误或错误实现的假设直接相关,总计 71% 的代码生成失败与假设的错误提出或实现有关,表明显式化并校验模型假设有助于理解和减少 LLM 代码错误。

问题
LLM 代码生成常因需求误解和逻辑不一致产生错误代码,但模型在生成过程中做出何种假设以及这些假设如何导致失败尚缺实证理解。
方法
在 HumanEval 上提示 GPT-4o 生成 Python 解并列出 3 个最重要假设,再用数据集测试用例验证程序,并分析失败和假设之间的关联。
评估
在 164 个解中识别出 17 个缺陷程序,分析 17 个失败与 51 个假设;发现 53% 的失败直接关联错误或错误实现的假设,总计 71% 的失败与假设问题相关。
原文摘要(Abstract)

Large Language Models (LLMs) like ChatGPT are increasingly integrated into software development environments due to their strong performance in code generation. However, they often struggle with complex logic, security vulnerabilities, and code quality issues. These problems frequently originate from misunderstandings of problem requirements and logical inconsistencies, which can lead to faulty or vulnerable software. In this study, we conduct an initial empirical analysis to investigate the causes of erroneous code generated by the state-of-the-art LLM model GPT-4o. Using the HumanEval dataset, we prompt GPT-4o to generate Python solutions and list its 3 most important assumptions. We validate these outputs against the provided test cases in dataset and identify 17 defective programs out of 164 total solutions. By analyzing the 17 failures and 51 assumptions made on these tasks, we find that about 53% the failures are directly related to wrong or erroneously implemented assumptions raised by the GPT model itself, and totally 71% of code generation failures are related to erroneously made or implemented assumptions.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9482,
  title = {How Does ChatGPT Make Assumptions When Creating Erroneous Programs?},
  author = {Sadia Jahan and Xiaoyin Wang},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00321}
}