paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automated Repair of Ambiguous Problem Descriptions for LLM-Based Code Generation

面向基于LLM代码生成的歧义问题描述自动修复
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 4/10 · 该论文位于 PL 技术与 LLM 的交叉点(用测试与程序修复、对比式规约推断来修复歧义自然语言描述),与"PL 方法服务于 AI 系统"的大方向有交集,且要求较强的当前模型与 benchmark 评估;但它的研究目标本质是提升 LLM 代码生成正确率(即改进 LLM 本身),而非将静态分析应用于 ML/Agentic 程序、也不是用 LLM 改进静态分析/形式化验证,与浮点程序分析、贝叶斯程序分析两个核心子方向无直接关联,属于邻域而非正中核心。引用 1 inbox
Haoxiang Jia, Robbie Morris, He Ye, Federica Sarro, Sergey Mechtaev
crossref: 2026-09-12

AI 速览

一句话:将歧义自然语言描述的修复分解为解释分布的测试与程序修复、以及对比式规约推断,提升LLM代码生成正确率。

自然语言问题描述中的歧义会使 LLM 生成错误程序,而直接提示 LLM 澄清歧义常产生无关或不一致的修改。本文提出歧义问题描述的自动修复,将任务分解为两步:先用传统测试与程序修复技术分析并修复 LLM 对描述的解释(由所诱导的程序分布刻画);再通过对比式规约推断,依据分布变化精炼描述。作者实现工具 SPEC-FIX,在 GPT-4o、DeepSeek-V3 等四个 LLM 与 HumanEval+、MBPP+、LiveCodeBench 三个基准上评估。无需人工干预或外部信息,SPEC-FIX 修改了 43.58% 的描述,被修改集合上 Pass@1 提升 30.9%,全基准绝对提升 4.09%;修复还可跨模型迁移,使其他模型性能提升 10.48%。

问题
自然语言问题描述的歧义会导致 LLM 生成不正确的程序,而仅靠提示 LLM 自行澄清歧义往往产生无关或不一致的文本编辑。
方法
把歧义修复分解为两步:利用传统测试与程序修复技术分析并修复 LLM 由描述诱导的程序分布,再通过对比式规约推断(contrastive specification inference)根据分布变化改写描述,实现为工具 SPEC-FIX。
评估
在四个先进 LLM(GPT-4o、GPT-4o-mini、DeepSeek-V3、Qwen2.5-Coder-32B-Instruct)与三个代码生成基准(HumanEval+、MBPP+、LiveCodeBench)上评估,报告描述修改比例、Pass@1 提升及跨模型迁移效果。
原文摘要(Abstract)

The growing use of large language models (LLMs) has increased the importance of natural language (NL) in software engineering. However, ambiguity of NL can harm software quality, as unclear problem descriptions may lead to incorrect program generation. Detecting and resolving such ambiguity is challenging, motivating our introduction of the automated repair of ambiguous NL descriptions, which we approach by reducing code generation uncertainty and better aligning NL with input–output examples. Ambiguity repair is difficult for LLMs because they must understand how their interpretation of a description changes when the text is altered. We find that directly prompting LLMs to clarify ambiguity often produces irrelevant or inconsistent edits. To address this, we decompose this task into two simpler steps: (1) analyzing and repairing the LLM’s interpretation of the description — captured by the distribution of programs it induces — using traditional testing and program repair, and (2) refining the description based on distribution changes via a method we call contrastive specification inference. We implement this approach in a tool called SPEC-FIX and evaluate it using four state-of-the-art LLMs (GPT-4o, GPT-4o-mini, DeepSeek-V3, and Qwen2.5-Coder-32B-Instruct) on three popular code generation benchmarks (HumanEval+, MBPP+ and LiveCodeBench). Without human intervention or external information, SPECFIX modified 43.58% of descriptions, improving Pass@1 on the modified set by 30.9%. This yields a 4.09% absolute improvement across the entire benchmark. Repairs also transfer across models: descriptions repaired for one model improve other models’ performance by 10.48%.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9402,
  title = {Automated Repair of Ambiguous Problem Descriptions for LLM-Based Code Generation},
  author = {Haoxiang Jia and Robbie Morris and He Ye and Federica Sarro and Sergey Mechtaev},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00038}
}