超越编译:评估忠实的自然语言到Lean陈述形式化

·

研究论文 · 2026/10/21

Lean 可以验证生成的声明类型正确,但无法检查其是否表达了用户意图。我们测量了在没有规范 Lean 目标的情况下,编译在多大程度上高估了语句自动形式化的忠实性。我们的标准要求 Lean 编译通过,并且来自不同模型族的两个 LLM 评判员一致同意。在独立的随机审计中,该标准与人类多数意见在 91.5% 的案例上一致;它很少接受不忠实的输出,但会拒绝一些忠实的输出。在 227 个大学水平的语句上,八个系统的编译与接受输出之间的差距从 1.3 到 29.5 个百分点不等:我们的工具增强代理编译了 87.2% 的语句,但只有 57.7% 被接受。对代理所有拒绝的人工审查确认,其 29.5 个百分点中有 23.8 个是真实的翻译错误。对于七个一次性系统的差距,由 Claude Opus 5.5 与 Lean 和 GPT-6.1 Sol 进行的两阶段审查(在这些人类标签上验证)发现,其中六个系统的 78-100% 是真实的翻译错误。当 GPT-5.2(两个评判员之一)对两个在其之后发布的模型(GPT-6 Astra 和 Claude Opus 5.5)的翻译进行评分时,它接受了每个模型 83% 的语句,而一次性 GPT-5.2 的接受率为 21%。对于这两个模型,同一审查仅将其 54 次拒绝中的 4 次(7%)归类为翻译错误,因此它们测量到的差距大部分是评判员错误而非翻译错误。这与这些系统错误更少而评判员没有相应减少错误的情况一致:系统犯的错误越少,其拒绝中翻译错误的比例就越小。最后,对代理进行的 2^3 工具消融实验表明,Lean 反馈驱动了其大部分编译增益,并且该增益中近一半未通过语义标准。代码和数据可在 https://github.com/grenadeComing/beyond-compilation 获取。

该研究揭示了仅靠编译验证会严重高估自然语言到 Lean 语句形式化的忠实性,并提出了一个与人类判断高度一致的实用标准,对自动形式化评估具有重要方法学意义。

Lean verifies that a generated declaration is well typed, but cannot check whether it states what the user intended. We measure how far compilation overstates faithfulness in statement autoformalization without canonical Lean targets. Our criterion requires Lean compilation and agreement of two LLM judges from different model families. On an independent random audit, it agrees with the human majority on 91.5% of cases; it rarely accepts an unfaithful output but rejects some faithful ones. Across eight systems on 227 university-level statements, the gap between compiling and accepted outputs ranges from 1.3 to 29.5 percentage points: our tool-augmented agent compiles 87.2% of the statements, but only 57.7% are accepted. Human review of all the agent's rejections confirms that 23.8 of its 29.5 points are real translation errors. For the gaps of the seven one-shot systems, a two-stage review by Claude Opus 5.5 with Lean and GPT-6.1 Sol, validated on these human labels, finds that 78-100% are real translation errors for six of them. When GPT-5.2, one of the two judges, grades the translations of two models released after it, GPT-6 Astra and Claude Opus 5.5, it accepts 83% of the statements for each, against 21% for one-shot GPT-5.2. For these two models, the same review classifies only 4 of their 54 rejections (7%) as translation errors, so most of their measured gap is judge errors rather than translation errors. This is consistent with these systems erring less while the judge does not: the fewer errors a system makes, the smaller the share of its rejections that are translation errors. Finally, a 2^3 tool ablation of the agent shows that Lean feedback drives most of its compilation gain, and that nearly half of this gain fails the semantic criterion. Code and data are available at https://github.com/grenadeComing/beyond-compilation.

阅读原文

参与讨论