Peano: Learning Formal Mathematical Reasoning

Gabriel Poesia, Noah D. GoodmanOpenReview 2022 · DOI

TL;DR

This paper introduces "Peano," a novel theorem-proving environment designed to make mathematical reasoning problems computationally tractable by ensuring a finite action space. By combining reinforcement learning with "tactic induction" (learning reusable proof strategies), their agent successfully solves introductory algebra problems, demonstrating how abstractions and curricula are crucial for both automated reasoning and human mathematical learning.

What Problem Does This Paper Address?

Automated theorem proving has long been a goal in AI, but general mathematical reasoning is computationally undecidable. While existing systems can solve well-defined classes of problems, reasoning about novel problems remains a significant challenge. Humans, however, excel at this, not only solving new problems but also efficiently transmitting complex mathematical knowledge across generations. This paper investigates the underlying structure that enables this human capability, specifically focusing on how procedural abstractions and curricula facilitate learning and discovery in mathematics. They aim to build an AI agent that can learn to solve mathematical problems by mimicking these human learning principles.

Methods

The authors introduce Peano, a theorem-proving environment built on a dependent type system. The key innovation is that Peano ensures a finite action space at every step of a proof, making it suitable for reinforcement learning agents. This is achieved by carefully defining how axioms and definitions can be applied.

To tackle the complexity of mathematical problems, they employ reinforcement learning (RL), specifically Contrastive Policy Learning (ConPoLe). However, standard RL struggles with the vast search space of mathematical proofs. To overcome this, they introduce tactic induction: an algorithm that learns reusable, higher-level proof strategies ("tactics") by generalizing segments of previously found solutions. These learned tactics are then added to the agent's action space, effectively creating a hierarchy of abstractions.

Finally, they explore the role of curricula. By analyzing the dependencies between learned tactics, they can infer a natural ordering of problems. This induced curriculum is then used to train a "second-generation" agent, aiming to accelerate learning.

Datasets

The primary "dataset" used in this paper is derived from 5 sections of the beginning algebra curriculum on the Khan Academy platform. The authors formalized these sections within their Peano environment, creating a set of well-defined search problems. They generated new problems by using syntactic templates from Khan Academy exercises and randomizing constants, ensuring that the problems covered the axioms and were not trivial.

Key Insights and Ideas

  • Finite Action Space is Crucial: The undecidability of general mathematical reasoning stems from infinite possibilities. By creating a finite action space in Peano, the authors make the problem tractable for learning agents.
  • Abstractions are Key to Progress: Standard RL agents fail on harder problems because the search space grows too quickly. Learning reusable "tactics" (higher-level proof strategies) dramatically improves an agent's ability to make progress and solve complex problems.
  • Tactic Induction Mimics Human Learning: Humans don't start from scratch; they build on existing knowledge. Tactic induction allows the AI to discover and utilize these building blocks, mirroring how humans learn and generalize.
  • Curricula Accelerate Learning: The order in which problems are presented matters. By inducing a curriculum based on the dependencies of learned tactics, the authors show that a second agent can learn significantly faster, highlighting the importance of structured learning experiences.
  • Synergy Between Abstractions and Curricula: The paper demonstrates a powerful interplay: abstractions (tactics) enable the discovery of a sensible curriculum, and that curriculum, in turn, accelerates the learning of new abstractions.

Key Results

  • A vanilla ConPoLe agent could solve problems in the first two Khan Academy sections but failed on harder ones.
  • Adding tactic induction allowed the agent to make steady progress and solve all problems across the 5 formalized algebra sections.
  • The induced curriculum, based on tactic dependencies, showed significant agreement with the expert-designed Khan Academy curriculum ordering.
  • A second agent trained on the induced curriculum learned significantly faster than an agent trained on problems in a random order.

Limitations and Future Work

  • Limited Tactic Language: The current tactic language is simple, consisting of straight-line programs. It doesn't support recursion or complex control flow (like loops or conditionals), which are necessary for more natural solutions in some domains.
  • No Backward Reasoning: Peano currently only supports forward reasoning. Incorporating backward reasoning (e.g., for proofs by induction) would be necessary for broader applicability.
  • Manual Axiom Engineering: While the environment is general, the axioms themselves are still defined by humans.
  • Future Work: The authors suggest extending Peano to support lambda terms and backward reasoning, developing a more expressive tactic language, and exploring how to computationally characterize "interestingness" in mathematical discoveries, moving beyond just proving new results to identifying significant ones.

Summary updated

Abstract

General mathematical reasoning is computationally undecidable, but humans routinely solve new problems. Moreover, discoveries developed over centuries are taught to subsequent generations quickly. What structure enables this, and how might that inform automated mathematical reasoning? We posit that central to both puzzles is the structure of procedural abstractions underlying mathematics. We explore this idea in a case study on 5 sections of beginning algebra on the Khan Academy platform. To define a computational foundation, we introduce Peano, a theorem-proving environment where the set of valid actions at any point is finite. We use Peano to formalize introductory algebra problems and axioms, obtaining well-defined search problems. We observe existing reinforcement learning methods for symbolic reasoning to be insufficient to solve harder problems. Adding the ability to induce reusable abstractions ("tactics") from its own solutions allows an agent to make steady progress, solving all problems. Furthermore, these abstractions induce an order to the problems, seen at random during training. The recovered order has significant agreement with the expert-designed Khan Academy curriculum, and second-generation agents trained on the recovered curriculum learn significantly faster. These results illustrate the synergistic role of abstractions and curricula in the cultural transmission of mathematics.
BibTeX
@misc{poesia2022peano,
  author = {Gabriel Poesia and Noah D. Goodman},
  title = {{Peano: Learning Formal Mathematical Reasoning}},
  year = {2022},
  eprint = {2211.15864},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.15864},
  howpublished = {OpenReview},
}

Loading related content...

Figure