BFS-Prover - An automated theorem proving system launched by ByteDance.
BFS-Prover is an automated theorem proving system based on Large Language Models (LLM) developed by ByteDance's Doubao Big Model team. It improves upon the traditional Breadth-First Search (BFS) algorithm by incorporating expert iteration and direct preference optimization...
What is BFS-Prover?
BFS-Prover, developed by ByteDance's Doubao Big Model Team, is an automated theorem proving system based on Large Language Models (LLM). It improves upon the traditional Breadth-First Search (BFS) algorithm by incorporating expert iteration and Direct Preference Optimization (DPO) techniques to achieve highly efficient proof search. Its core lies in a length-normalized scoring heuristic, which prioritizes proof paths using cumulative log probability to optimize search efficiency. Employing an expert iteration framework, it focuses on solving complex theorems and optimizes the policy model based on compiler feedback using DPO, avoiding invalid inference paths. BFS-Prover achieves large-scale parallel proof search through a distributed architecture, supporting high-concurrency tasks.
Main functions of BFS-Prover
- Efficient proof searchBFS-Prover employs an improved breadth-first search (BFS) algorithm, optimizing its ability to explore deep inference paths through a length-normalized scoring mechanism. It can dynamically allocate computational resources, balancing exploration and utilization during the search process.
- Continuous improvement and data accumulationThe system forms a closed loop: LLM generation strategy → LeanDojo execution → feedback acquisition → training data generation → LLM optimization. With iteration, the model can learn more diverse proof strategies.
BFS-Prover's technical principles
- Length normalization scoring mechanismBFS-Prover employs a length-normalized scoring function, which alleviates the penalty for deep paths imposed by traditional BFS by dividing the cumulative log probability of a path by the power of the path length (α∈[0,1]), and can explore complex proofs more effectively.
- Expert Iteration and Self-FilteringThe system employs an expert iterative framework to progressively select more complex theorems for proof. In each iteration, beam search is used to filter out easily solvable theorems, removing these simple problems from the training data and focusing on solving more challenging theorems. As iterations progress, the model gradually learns more complex proof strategies, and the proof length distribution shifts from shorter strategies to longer strategies.
- Direct Preference Optimization (DPO)BFS-Prover optimizes the policy model based on DPO (Depth-Point Error Analysis) feedback from the compiler. By comparing successful and failed policies in the same state, the model can avoid invalid inference paths and improve search efficiency.
- Distributed proof architectureTo achieve large-scale parallel proofs, BFS-Prover employs a distributed system design, using the Ray framework to run on multiple machines, each equipped with multiple GPUs and CPU cores. This achieves near-linear scalability and maximizes hardware utilization.
- Deep integration with Lean4BFS-Prover interacts with LeanDojo and Lean4 to encode mathematical problems into formal systems, generating verifiable machine proofs and ensuring the logical correctness of the proofs.
BFS-Prover project address
- HuggingFace model library:https://huggingface.co/bytedance-research/BFS-Prover
- arXiv technical paper:https://arxiv.org/pdf/2502.03438
Application scenarios of BFS-Prover
- Automatic proof of formal mathematical problemsBFS-Prover can encode mathematical problems into formal languages (such as Lean4) and generate verifiable machine proofs applicable to theorem proofs in various mathematical fields.
- Solving math competition problemsIt can prove complex International Mathematical Olympiad (IMO) problems, demonstrating strong capabilities in complex mathematical reasoning.
- Mathematical research at the undergraduate and graduate levelsBFS-Prover helps solve mathematical theorem proving problems at the undergraduate and graduate levels.
- Promote the development of automated theorem proving technologyBFS-Prover has broken the accuracy record on the MiniF2F test set, providing new methods and technical ideas for the field of automated theorem proving.