用自然语言与Lean形式化的差异训练模型,提升研究级数学形式化的语义等价性
Improving semantic equivalence in research-level math formalization
研究从832个Lean项目中收集4,076条经审核的“自然语言原文与忠实Lean形式化之间的差异”样本,用于训练模型在真实研究级项目中写Lean。训练集含141个仓库的3,431个任务,测试集为其余27个仓库的645个任务。按项目内Lean训练使完整证明率从11%提升到20%,与项目自身形式化一致的语句占比从30%升至39%;仅训练预测差异的适配器或预先告知差异的模型几乎无帮助。
arXiv:2611.28819v1 Announce Type: new Abstract: Formalizing mathematics in Lean is never a word-for-word translation of a paper: a Lean formalization changes definitions, strengthens hypotheses, splits arguments, and adds lemmas the paper never mentions. It stands to reason that a model that is good at autoformalization must be a good predictor of how a natural language source must differ from its faithful Lean formalization. With that in mind, we collect 4{,}076 audited examples of such changes from 832 Lean projects that formalize research-level mathematics, and use them to ask a practical question: how well can a model \emph{write} Lean inside a real research-level project that may contain tens of thousands of lines of code, and does training on discrepancies between natural language sources and their faithful Lean formalizations help? Our training set consists of 3{,}431 tasks from 141 repositories, and the test set consists of 645 tasks from the remaining 27 repositories. Training on in-project Lean nearly doubles complete proofs ($11\% \to 20\%$) and raises the share of statements in gold agreement with the project's own formalization by nearly a third ($30\%$ to $39\%$). The gain comes from the pairs themselves: an adapter trained only to predict how the Lean will differ, or a model told the difference in advance, barely helps. Training on where formalizations depart from their sources is thus an effective way of improving semantic equivalence in research-level formalization.
来源:arXiv (AI + Vision + Imaging) · arxiv.org