真实场景下的自动形式化:评估大语言模型在现实世界数学定义上的表现
Autoformalization in the Wild: Assessing LLMs on Real-World Mathematical Definitions
AI总结:
该研究针对LLM在现实数学定义自动形式化上的泛化能力不足问题,构建两个真实定义数据集,评估LLM形式化到Isabelle/HOL的能力,提出反馈优化和定义锚定策略,显著提升自我修正能力并减少未定义错误。
摘要:
大语言模型(LLM)凭借其语言能力,为通过自动形式化弥合非形式化数学与形式语言之间的鸿沟提供了契机。然而,目前尚不清楚LLM对复杂且自然出现的数学表述的泛化能力如何。为填补这一空白,我们研究了现实世界数学定义的自动形式化任务——这是数学论述的关键组成部分。具体而言,我们构建了两个全新的自动形式化资源,分别从维基百科收集定义(Def_Wiki)和从arXiv论文收集定义(Def_ArXiv)。随后我们系统评估了一系列LLM,分析它们将定义形式化为Isabelle/HOL的能力。此外,我们还探究了提升LLM性能的策略,包括通过证明助手的外部反馈进行优化,以及形式定义锚定——即通过形式数学库中的相关上下文元素来增强LLM的形式化结果。我们的研究结果表明,与miniF2F等现有基准相比,定义形式化的难度更大。具体来说,我们发现LLM在自我修正以及匹配相关数学库方面仍存在困难。同时,结构化优化方法和定义锚定策略带来了显著提升:自我修正能力最高提升16%,未定义错误最多减少43%,为增强真实场景下基于LLM的自动形式化指明了有前景的方向。
英文摘要:
Thanks to their linguistic capabilities, LLMs offer an opportunity to bridge the gap between informal mathematics and formal languages through autoformalization. However, it is still unclear how well LLMs generalize to sophisticated and naturally occurring mathematical statements. To address this gap, we investigate the task of autoformalizing real-world mathematical definitions: a critical component of mathematical discourse. Specifically, we introduce two novel resources for autoformalization, collecting definitions from Wikipedia (Def_Wiki) and arXiv papers (Def_ArXiv). We then systematically evaluate a range of LLMs, analyzing their ability to formalize definitions into Isabelle/HOL. Furthermore, we investigate strategies to enhance LLMs' performance including refinement through external feedback from Proof Assistants, and formal definition grounding, where we augment LLMs' formalizations through relevant contextual elements from formal mathematical libraries. Our findings reveal that definitions present a greater challenge compared to existing benchmarks, such as miniF2F. In particular, we found that LLMs still struggle with self-correction, and aligning with relevant mathematical libraries. At the same time, structured refinement methods and definition grounding strategies yield notable improvements of up to 16% on self-correction capabilities and 43% on the reduction of undefined errors, highlighting promising directions for enhancing LLM-based autoformalization in real-world scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。