StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusion
该论文提出了一种名为ThinkingF的数据合成和训练流程,通过知识推理融合,显著提升了大型语言模型在自动形式化任务中的性能。
更新于 2025-08-08。作者:Yutong Wu、Di Huang、Ruosi Wan、Yue Peng、Shijie Shang、Chenrui Cao、Lei Qi、Rui Zhang、Zidong Du、Jie Yan、Xing Hu。
中文摘要
自动形式化旨在将自然语言的数学陈述翻译成形式语言。虽然大型语言模型(LLMs)在这一领域加速了进步,但现有方法仍然存在准确性低的问题。我们确定了有效自动形式化的两个关键能力:全面掌握形式语言领域的知识,以及自然语言问题理解和非正式-正式对齐的推理能力。没有前者,模型无法识别正确的形式对象;没有后者,模型在解释现实世界情境并将其精确映射到形式表达上会感到困难。为了解决这些差距,我们引入了ThinkingF,这是一个数据合成和训练流程,旨在提高这两种能力。首先,我们构建了两个数据集:一个是通过提炼和选择富含形式知识的大规模示例,另一个是通过专家设计的模板引导生成的非正式到正式推理轨迹。然后,我们使用这些数据集应用强化学习(SFT)和强化学习-虚拟奖励(RLVR)来进一步融合和细化这两种能力。结果产生的70亿和320亿参数模型既展现了全面的形式知识,又具有强大的非正式到正式推理能力。值得注意的是,StepFun-Formalizer-32B在FormalMATH-Lite上实现了40.5%的SOTA BEq@1分数,在ProverBench上实现了26.7%,超过了所有先前的一般用途和专用模型。
英文摘要
Autoformalization aims to translate natural-language mathematical statements into a formal language. While LLMs have accelerated progress in this area, existing methods still suffer from low accuracy. We identify two key abilities for effective autoformalization: comprehensive mastery of formal-language domain knowledge, and reasoning capability of natural language problem understanding and informal-formal alignment. Without the former, a model cannot identify the correct formal objects; without the latter, it struggles to interpret real-world contexts and map them precisely into formal expressions. To address these gaps, we introduce ThinkingF, a data synthesis and training pipeline that improves both abilities. First, we construct two datasets: one by distilling and selecting large-scale examples rich in formal knowledge, and another by generating informal-to-formal reasoning trajectories guided by expert-designed templates. We then apply SFT and RLVR with these datasets to further fuse and refine the two abilities. The resulting 7B and 32B models exhibit both comprehensive formal knowledge and strong informal-to-formal reasoning. Notably, StepFun-Formalizer-32B achieves SOTA BEq@1 scores of 40.5% on FormalMATH-Lite and 26.7% on ProverBench, surpassing all prior general-purpose and specialized models.
解读
一句话总结
该论文提出了一种名为ThinkingF的数据合成和训练流程,通过知识推理融合,显著提升了大型语言模型在自动形式化任务中的性能。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:自动形式化任务旨在将自然语言数学陈述转换为形式语言,但现有方法在准确率上仍有不足。
- 现有方案不足:现有方法在领域知识掌握和自然语言问题理解与形式化对齐方面存在缺陷。
- 研究目标:开发一个能够有效自动形式化的模型,通过数据合成和训练流程提升模型在形式语言领域知识掌握和自然语言问题理解与形式化对齐方面的能力。
问题2:论文的核心创新点是什么?
- 技术创新:提出了ThinkingF数据合成和训练流程,包括知识蒸馏、推理数据合成、两阶段监督微调和可验证奖励的强化学习。
- 方法改进:通过构建包含丰富形式知识的数据库和指导专家设计的推理轨迹,提升了模型的形式语言领域知识和推理能力。
- 优势:与现有方法相比,该模型在形式语言领域知识掌握和自然语言问题理解与形式化对齐方面表现更优。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在FormalMATH-Lite、ProverBench和CombiBench三个基准上进行评估。
- 性能提升:StepFun-Formalizer-32B在FormalMATH-Lite和ProverBench上分别达到了40.5%和26.7%的SOTA BEq@1分数。
- 对比结果:与基线模型相比,StepFun-Formalizer在所有基准测试中都取得了更好的性能。
问题4:这个研究的实际应用价值是什么?
- 应用场景:自动形式化可以用于支撑定理证明、验证非形式化数学推理和生成可验证代码。
- 实施建议:建议将StepFun-Formalizer应用于需要自动形式化的场景,如自动定理证明和代码生成。
- 局限与展望:目前模型在某些复杂场景下可能仍存在局限性,未来可以进一步研究更高级的推理和知识表示方法。