Learning Formal Mathematics From Intrinsic Motivation

Gabriel Poesia, David Broman, Nick Haber, Noah D. Goodman

MINIMO (Mathematics from Intrinsic Motivation) is an AI agent designed to learn formal mathematics from scratch, bypassing the need for human-curated proof datasets. By framing mathematical discovery as a self-driven game of conjecture and proof, MINIMO bootstraps its knowledge from basic axioms, eventually tackling human-level benchmarks in logic and arithmetic.

The Challenge of Formal Reasoning

Traditional AI models for mathematical reasoning are often bottlenecked by the scarcity of formal proof data. Unlike natural language, formal proofs in languages like Lean or Isabelle are difficult to scale. Furthermore, relying on human data limits agents to existing mathematical knowledge. MINIMO addresses the "sparse reward" problem in mathematics—where random symbol strings are rarely provable—by using intrinsic motivation to decide which conjectures are worth pursuing, effectively coaxing mathematics from the "æther."

The MINIMO Framework

The MINIMO agent operates through two interleaved processes:

  1. Conjecturing: A Transformer-based Language Model (LM) generates mathematical statements. To ensure these are well-formed even at initialization, MINIMO employs constrained decoding and type-directed synthesis, adhering to the grammar of dependent type theory (Calculus of Constructions).
  2. Theorem Proving: The agent attempts to prove these conjectures using Monte Carlo Tree Search (MCTS). The LM serves as both the policy (suggesting moves) and the value function (evaluating states) for the search.
The MINIMO architecture: an interleaved cycle of conjecturing and theorem proving via MCTS.

A critical component is Hindsight Relabeling. When a proof search for a specific conjecture fails, the agent identifies "accidental" proofs of other statements discovered within the search tree. This significantly improves sample efficiency by turning failed attempts into valuable training data.

Experimental Setup and Results

The agent was evaluated across three axiomatic domains: Propositional Logic, Natural Number Arithmetic (Peano axioms), and Group Theory. Extrinsic testing included 35 theorems from Kleene’s Introduction to Metamathematics and 10 levels of the Natural Number Game.

MINIMO demonstrated a clear ability to self-improve. In Group Theory, average proof lengths increased from 2.7 to 5 steps over just four iterations. The agent successfully proved 70% of Kleene’s logic theorems and solved induction problems in the Natural Number Game without ever seeing human-written proofs.

Evolution of problem difficulty across training iterations for three mathematical domains.

The results indicate that intrinsic motivation acts as an effective curriculum, pushing the agent toward "hard but provable" conjectures. Hindsight relabeling proved essential; without it, the learning process failed to gain traction as the agent would get stuck generating trivialities.

Discussion and Future Directions

While MINIMO can prove complex theorems from first principles, it currently lacks "lemma discovery"—the ability to save and reuse proven theorems as building blocks for more complex proofs. This currently limits the depth of the mathematics it can reach. Future work will focus on scaling to larger libraries through premise selection and refining the agent's ability to distinguish between mere syntactic complexity and deep mathematical insight.

Summary updated

BibTeX
@inproceedings{poesia2024learning,
  author = {Gabriel Poesia and David Broman and Nick Haber and Noah D. Goodman},
  title = {{Learning Formal Mathematics From Intrinsic Motivation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=uNKlTQ8mBD},
}
Figure