{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/formalmath-benchmarking-formal-mathematical","title":"FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models","arxiv_id":"2505.02735","date":"2025-05-05","proceeding":null,"authors":["Zhouliang Yu","Ruotian Peng","Keyi Ding","Yizhe Li","Zhongyuan Peng","Minghao Liu","Yifan Zhang","Zheng Yuan","Huajian Xin","Wenhao Huang","Yandong Wen","Ge Zhang","Weiyang Liu"],"abstract":"Formal mathematical reasoning remains a critical challenge for artificial intelligence, hindered by limitations of existing benchmarks in scope and scale. To address this, we present FormalMATH, a large-scale Lean4 benchmark comprising 5,560 formally verified problems spanning from high-school Olympiad challenges to undergraduate-level theorems across diverse domains (e.g., algebra, applied mathematics, calculus, number theory, and discrete mathematics). To mitigate the inefficiency of manual formalization, we introduce a novel human-in-the-loop autoformalization pipeline that integrates: (1) specialized large language models (LLMs) for statement autoformalization, (2) multi-LLM semantic verification, and (3) negation-based disproof filtering strategies using off-the-shelf LLM-based provers. This approach reduces expert annotation costs by retaining 72.09% of statements before manual verification while ensuring fidelity to the original natural-language problems. Our evaluation of state-of-the-art LLM-based theorem provers reveals significant limitations: even the strongest models achieve only 16.46% success rate under practical sampling budgets, exhibiting pronounced domain bias (e.g., excelling in algebra but failing in calculus) and over-reliance on simplified automation tactics. Notably, we identify a counterintuitive inverse relationship between natural-language solution guidance and proof success in chain-of-thought reasoning scenarios, suggesting that human-written informal reasoning introduces noise rather than clarity in the formal reasoning settings. We believe that FormalMATH provides a robust benchmark for benchmarking formal mathematical reasoning.","url_abs":"https://arxiv.org/abs/2505.02735v1","url_pdf":"https://arxiv.org/pdf/2505.02735v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"formalmath-benchmarking-formal-mathematical","repo_url":"https://github.com/sphere-ai-lab/formalmath-bench","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"mathematical-reasoning","task_name":"Mathematical Reasoning"},{"task_slug":"negation","task_name":"Negation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.02735","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.02735"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sphere-ai-lab/formalmath-bench","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"f7fa34e021f66336","entry":"check_correct","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"evaluate_results.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/evaluate_results.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f7fa34e021f66336"}},{"code_sha256_prefix":"6122ad5dac7dcce0","entry":"get_processed_items","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"generate_answers.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/generate_answers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6122ad5dac7dcce0"}},{"code_sha256_prefix":"fb9704f4a410dd44","entry":"load_checkpoint","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"generate_answers.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/generate_answers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fb9704f4a410dd44"}},{"code_sha256_prefix":"1a271976c31318ca","entry":"load_progress_from_file","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"verify_answers.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/verify_answers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a271976c31318ca"}},{"code_sha256_prefix":"14c5116f1bf2b4fa","entry":"monte_carlo_evaluate","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"evaluate_results.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/evaluate_results.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"14c5116f1bf2b4fa"}},{"code_sha256_prefix":"aa547b75c4c59632","entry":"process_answer","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"verify_answers.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/verify_answers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa547b75c4c59632"}},{"code_sha256_prefix":"364022703da9e6db","entry":"process_single_item","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"generate_answers.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/generate_answers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"364022703da9e6db"}},{"code_sha256_prefix":"a3e8557fa26d12f8","entry":"simulate_single","repo":"sphere-ai-lab/formalmath-bench","repo_kind":"official","path":"evaluate_results.py","file_url":"https://github.com/sphere-ai-lab/formalmath-bench/blob/HEAD/evaluate_results.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a3e8557fa26d12f8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}