← All papers
First page of Scaling up Multi-Turn Off-Policy RL and Multi-Agent Tree Search for LLM Step-Provers

Scaling up Multi-Turn Off-Policy RL and Multi-Agent Tree Search for LLM Step-Provers

Ran Xin, Zeyu Zheng, Yanchen Nie, Kun Yuan, Xia Xiao

cs.AI Sep 8, 2025 · v2
Trains an LLM step-prover that generates Lean4 tactics with Lean compiler feedback via LeanDojo, evaluated on miniF2F and ProofNet in Lean.
The integration of Large Language Models (LLMs) into automated theorem proving has shown immense promise, yet is fundamentally constrained by challenges in scaling up both training-time reinforcement learning (RL) and inference-time compute. This paper introduces BFS-Prover-V2, a system designed to address this dual scaling problem. We present two primary innovations. The first is a novel multi-turn off-policy RL framework for continually improving the performance of LLM step-prover at training time. This framework, inspired by the principles of AlphaZero, utilizes a multi-stage expert iteration pipeline featuring adaptive tactic-level data filtering and periodic retraining to surmount the performance plateaus that typically curtail long-term RL in LLM-based agents. The second innovation is a planner-enhanced multi-agent search architecture that scales reasoning capabilities at inference time. This architecture employs a general reasoning model as a high-level planner to iteratively decompose complex theorems into a sequence of simpler subgoals. This hierarchical approach substantially reduces the search space, enabling a team of parallel prover agents to collaborate efficiently by leveraging a shared proof cache. We demonstrate that this dual approach to scaling yields state-of-the-art results on established formal mathematics benchmarks. BFS-Prover-V2 achieves 95.08% and 41.4% on the MiniF2F and ProofNet test sets respectively. While demonstrated in the domain of formal mathematics, the RL and inference techniques presented in this work are of broader interest and may be applied to other domains requiring long-horizon multi-turn reasoning and complex search.

LLM-based theorem provers are limited by performance plateaus during long-term RL training and by the cost of inference-time search on complex theorems.

BFS-Prover-V2 models Lean4 tactic-mode proving as an MDP in which the LLM proposes tactics and the Lean compiler acts as the environment. Training uses multi-stage expert iteration with best-first search, perplexity-based tactic-level data filtering, and periodic retraining from the base model to escape plateaus. The training corpus is about 3 million formal statements, built largely by autoformalizing NuminaMath with Lean compiler feedback. At inference time, a general reasoning model (Gemini 2.5 Pro) acts as a planner that decomposes theorems into subgoals, which parallel prover agents solve using a shared subgoal cache, with dynamic replanning when they get stuck.

BFS-Prover-V2-32B with the planner reaches 95.1% on miniF2F-test and 95.5% on miniF2F-valid. Without the planner it reaches 41.4% on ProofNet-test. Its step-level proofs are often far shorter than whole-proof outputs, for example a one-tactic simp proof where DeepSeek-Prover-V2 produced roughly 2000 lines.

ProverminiF2F-testminiF2F-validProofNet-test
BFS-Prover-V2-7B82.4%--
BFS-Prover-V2-32B86.1%85.5%41.4%
BFS-Prover-V2-32B w/ Planner95.1%95.5%-
DeepSeek-Prover-V2-671B88.9%90.6%37.1%
Comparison with leading provers (selected rows)