FormalMATH
收藏资源简介:
FormalMATH是一个大规模的形式数学推理基准数据集,包含5,560个经过形式验证的数学陈述,涵盖Lean4中的多个领域和难度级别。它旨在通过提供一个全面且可靠的测试平台来推动自动定理证明的研究,并引入了一个人机交互的流程,利用语言模型和自动检查来高效生成形式化的数学陈述。
FormalMATH is a large-scale benchmark dataset for formal mathematical reasoning, containing 5,560 formally verified mathematical statements spanning multiple domains and difficulty levels within Lean4. It aims to advance research in automated theorem proving by providing a comprehensive and reliable testbed, and introduces a human-machine interactive workflow that leverages language models and automated checking to efficiently generate formal mathematical statements.
FormalMATH数据集概述
基本信息
- 数据集名称: FormalMATH
- 论文标题: FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models
- 论文链接: https://arxiv.org/abs/2505.02735
- 项目页面: https://sphere-ai-lab.github.io/FormalMATH/
- Hugging Face Spaces: https://huggingface.co/SphereLab
数据集简介
- 规模: 5,560个经过正式验证的数学陈述
- 领域: 涵盖多个数学领域和难度级别
- 语言: Lean4
- 目的: 为自动定理证明研究提供全面的测试基准
数据集构建流程
- 方法: 结合微调的大型语言模型和最佳N采样方法
- 验证过程:
- 编译器检查
- 多LLM语义验证
- 预训练证明器的逻辑过滤
- 最终人工审核
性能比较
最佳优先树搜索方法
| 方法 | 采样预算 | Pass@K(%) |
|---|---|---|
| BFS(DeepSeek-V1.5-RL) | 32×32×100 | 17.41 |
| BFS(InternLM-V2.5) | 32×32×100 | 25.65 |
| BFS(BFS-Prover) | 32×32×100 | 45.88 |
单次生成方法
| 方法 | 采样预算 | Pass@K(%) |
|---|---|---|
| Kimina-Prover-7B | 32 | 48.94 |
| STP | 3200 | 53.17 |
| DeepSeek-V1.5-SFT | 3200 | 46.82 |
| Goedel-Prover | 3200 | 49.41 |
安装与使用
环境要求
- Python 3
- Pytorch
- LEAN4
- REPL环境
- Mathlib
核心配置参数
| 参数 | 描述 | 默认值 |
|---|---|---|
--auto_dl |
自动下载数据集 | True |
--datasets |
数据集版本选择 | FomaMATH-All |
--generate |
启用答案生成 | False |
--verify |
启用答案验证 | False |
--evaluate |
启用结果评估 | False |
快速评估
bash python FoMA_Eval.py --auto_dl --generate --verify --evaluate --datasets FomaMATH-All --model your_model_path --n 32 --nums_answer 32 --num_batches 1
引用
bibtex @misc{yu2025formalmathbenchmarkingformalmathematical, title={FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models}, author={Zhouliang Yu and Ruotian Peng and Keyi Ding and Yizhe Li and Zhongyuan Peng and Minghao Liu and Yifan Zhang and Zheng Yuan and Huajian Xin and Wenhao Huang and Yandong Wen and Ge Zhang and Weiyang Liu}, year={2025}, eprint={2505.02735}, archivePrefix={arXiv}, primaryClass={cs.AI}, url={https://arxiv.org/abs/2505.02735}, }




