techlist.io

Neural Theorem Proving

1 posts

OpenAI2022-02-013 min readCurated summary

Solving (some) formal math olympiad problems

# Neural Theorem Proving with Statement Curriculum Learning This post from OpenAI describes a neural theorem prover for the Lean proof assistant that learns to solve challenging high-school olympiad problems, including AMC12, AIME, and two IMO-adapted problems. The core idea is that a language model can generate proof steps and original mathematical terms, while a curriculum of auxiliary statements (without proofs) of varying difficulty lets the prover improve iteratively. The approach reaches 41.2% on the miniF2F benchmark, up from the previous state of the art of 29.3%, though the authors acknowledge the system is still far from best-student performance. ## Why Formal Mathematics Is a Good Testbed - Formal mathematics is rich enough to express arbitrary theorems requiring reasoning, creativity, and insight. - Like games where AI has excelled, it has an automatic way to check success: the formal system verifies whether a proof is valid. - A proof is a sequence of tactic calls, each transforming the current goal into simpler subgoals until nothing remains. ## Two Challenges for Reinforcement Learning - **Infinite action space:** Unlike Go, each proof step can require generating new mathematical terms, such as a witness for an existential statement or an intermediate lemma (a "cut"). This makes the set of possible actions effectively infinite. - **Lack of self-play:** Two-player games have an opponent whose strength drives an automatic curriculum. A prover faces a fixed set of statements, and when one is too hard, there is no obvious way to generate easier intermediate goals, so naive self-play methods do not transfer. ## Statement Curriculum Learning - **Sampling actions from a language model** addresses the infinite action space, since language models can produce both tactic calls and the mathematical terms they need. - **Auxiliary statements replace self-play's curriculum:** The team manually collected statements of varying difficulty, without proofs, with the hardest ones resembling the target benchmark. - **Iterative training loop:** The prover searches for proofs of these statements, each newly found proof becomes training data, and the network is retrained. After 8 iterations, the prover performed far better on miniF2F. ## Observed Behavior - The model sometimes generates original terms as tactic arguments, such as proposing `n + 1` as a witness and letting `ring_exp` verify it. - It can chain several non-trivial steps, for example applying contraposition, providing a witness `(0 : ℝ)`, and closing the goal with `norm_num`. ## Limitations and Outlook - The prover solves olympiad problems only occasionally rather than consistently, and remains well below top human students. - The authors hope the work will advance research toward the IMO Grand Challenge and that statement curriculum learning will benefit automated reasoning more broadly.