arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.22568cs.AIcs.CL
收藏

用确定性诊断修复大语言模型生成的规格说明

Repairing LLM-Generated Specifications with Deterministic Diagnosis

University of Oxford(牛津大学);University of Illinois Chicago(伊利诺伊大学芝加哥分校);Politecnico di Milano(米兰理工大学);The Pennsylvania State University(宾夕法尼亚州立大学);Institute for Decentralized AI (IDAI)(去中心化人工智能研究所(IDAI))

Giovanni Vaccarino, Emanuele La Malfa, Dehai Min, Hanrong Zhang, Pier Luca Lanzi, Lu Cheng, Michael J. Wooldridge, Philip S. Yu, Sara Bernardini

AI总结:

DRAGO框架用确定性特定形式化诊断修复LLM生成的规格说明,将退化率降至1.3%,提升了答案准确率,还修正了Planetarium的地板瓷砖拆分问题。

摘要:

大语言模型(LLM)正越来越多地被用作形式化工具:给定一个用自然语言表述的推理问题,它们会生成一个形式化规格说明,符号求解器可基于该规格说明求解,并提供与该规格说明相关的保证。许多规格说明可运行但语义错误,编码了不正确的约束、域、目标、谓词或目标,且一旦执行成功,求解器错误反馈就会消失。纯基于LLM的诊断因缺乏形式化真值,常无法发现这些错误,其无根据的批评在我们的实验中导致11.8%的初始正确规格说明出现退化。我们提出DRAGO,一个修复框架,它用确定性的、特定于形式化的诊断取代无根据的批评,且仅当诊断出的错误权重在无参考的接受谓词下严格降低时,才保留重写结果。在涵盖逻辑推理(SMT-LIB2)、约束编程(MiniZinc)和规划(PDDL)的五个基准测试中,DRAGO将退化率降低了近一个数量级,至1.3%,同时在基准测试的平均值上,与零样本形式化相比,答案准确率提高了12.9个百分点,与LLM诊断修复相比,提高了8.7个百分点。我们还发现Planetarium存在两个渲染缺陷,导致其50%(3086个实例)的地板瓷砖拆分与参考形式化不一致,并发布了修正后的拆分。

英文摘要:

Large language models (LLMs) are increasingly used as formalizers: given a reasoning problem expressed in natural language, they produce a formal specification that a symbolic solver can then solve, with guarantees relative to that specification. Many specifications are runnable yet semantically wrong, encoding incorrect constraints, domains, objectives, predicates, or goals, and solver-error feedback dries up once execution succeeds. Purely LLM-based diagnosis, lacking a formal ground truth, often fails to spot these errors, and its ungrounded critiques cause regressions in 11.8% of initially correct specifications in our experiments. We propose DRAGO, a repair framework that replaces this ungrounded critique with deterministic, formalism-specific diagnosis, and retains a rewrite only when the diagnosed error weight strictly decreases under a reference-free acceptance predicate. Across five benchmarks spanning logical reasoning (SMT-LIB2), constraint programming (MiniZinc), and planning (PDDL), DRAGO cuts regressions by nearly an order of magnitude, to 1.3%, while improving answer accuracy by 12.9 percentage points over zero-shot formalization and 8.7 percentage points over LLM-diagnostic repair, averaged across benchmarks. We also uncover two rendering defects in Planetarium that cause 50% (3,086 instances) of its floor-tile split to be inconsistent with the reference formalizations, and release a corrected split.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑