Papers › STP: Self-play LLM Theorem Provers with Iterative Conjecturing and Proving

STP: Self-play LLM Theorem Provers with Iterative Conjecturing and Proving

31 Jan 2025arXiv:2502.00212archive 2025-07-28

Kefan Dong, Tengyu Ma

A fundamental challenge in formal theorem proving by LLMs is the lack of high-quality training data. Although reinforcement learning or expert iteration partially mitigates this issue by alternating between LLM generating proofs and finetuning them on correctly generated ones, performance quickly plateaus due to the scarcity of correct proofs (sparse rewards). To keep improving the models with limited data, we draw inspiration from mathematicians, who continuously develop new results, partly by proposing novel conjectures or exercises (which are often variants of known results) and attempting to solve them. We design the Self-play Theorem Prover (STP) that simultaneously takes on two roles, conjecturer and prover, each providing training signals to the other. The conjecturer is trained iteratively on previously generated conjectures that are barely provable by the current prover, which incentivizes it to generate increasingly challenging conjectures over time. The prover attempts to prove the conjectures with standard expert iteration. We evaluate STP with both Lean and Isabelle formal versifiers. With 51.3 billion tokens generated during the training in Lean, STP proves 28.5% of the statements in the LeanWorkbook dataset, doubling the previous best result of 13.2% achieved through expert iteration. The final model achieves state-of-the-art performance among whole-proof generation methods on miniF2F-test (65.0%, pass@3200), Proofnet-test (23.9%, pass@3200) and PutnamBench (8/644, pass@3200). We release our code, model, and dataset in this URL: https://github.com/kfdong/STP.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2502.00212")

Code

Syntology Ran 0 of 12 code samples harvested from 1 repository linked to this paper; 12 have no recorded run.

By repository: official repository: 12 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kfdong/STP officialmentioned in papermentioned on GitHubjaxMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 0 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

12unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from kfdong/STP. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_docker kfdong/STP/levanter/infra/push_docker.py official repository unverified MIT (permissive) · de272c3c1e0ec598 · report
compute_succ_lemmas kfdong/STP/RL/summary.py official repository unverified MIT (permissive) · e6d24885a45ef32d · report
compute_succ_rate kfdong/STP/RL/summary.py official repository unverified MIT (permissive) · dbb2b224505ab89f · report
compute_weight kfdong/STP/RL/RL_step3_final_model.py official repository unverified MIT (permissive) · c6775b43722353a9 · report
compute_weight kfdong/STP/RL/RL_step2_train.py official repository unverified MIT (permissive) · 761e416f700e9ef7 · report
get_checkpoint_name kfdong/STP/RL/utils/model_utils.py official repository unverified MIT (permissive) · e9dcbdf1132f8052 · report
get_prompt kfdong/STP/RL/utils/model_utils.py official repository unverified MIT (permissive) · ba7c25429714f2b5 · report
list_tpus kfdong/STP/levanter/infra/launch.py official repository unverified MIT (permissive) · aefb09b34244c0e3 · report
merge_labels kfdong/STP/RL/utils/RL_utils.py official repository unverified MIT (permissive) · 1686317bd96ca309 · report
push_to_gcp kfdong/STP/levanter/infra/push_docker.py official repository unverified MIT (permissive) · d6503a4e0ef91a8b · report
push_to_github kfdong/STP/levanter/infra/push_docker.py official repository unverified MIT (permissive) · 9f6615b4d3762c8e · report
right_truncate kfdong/STP/RL/utils/model_utils.py official repository unverified MIT (permissive) · 9bdec843cb765dde · report

Tasks

Automated Theorem Proving

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections