Exponential Sample Complexity Separation between Flat and Hierarchical Agentic Theorem Provers

Sho Sonoda, Shunta Akiyama, Yuya Uezato

TL;DR

This paper tackles the challenge of learning to prove theorems efficiently. It shows that by representing proofs hierarchically, allowing for reusable sub-proofs (like lemmas), learners can achieve exponentially better sample efficiency compared to "flat" provers that treat every sub-proof instance independently. This is crucial for making AI theorem provers more practical.

What Problem Does This Paper Address?

Modern AI theorem provers often use "agentic" approaches, breaking down complex proofs into smaller steps, generating intermediate lemmas, or creating proof sketches. While this seems intuitive, it raises a question: if proving these intermediate lemmas is itself hard, why would an AI prover spend effort on them? This paper addresses this by providing a statistical learning perspective. Instead of looking at the worst-case difficulty of proving any theorem, they focus on the biased data distribution generated by a "teacher" prover (i.e., successful proofs). They want to understand when learning to represent reusable proof structures (like lemmas) can lead to significantly better learning performance for a student prover, especially when the data is generated by a teacher that already uses such structures.

Methods

The core of the paper's methodology is modeling theorem proving as a deterministic finite-horizon Markov Decision Process (MDP). They then analyze offline imitation learning, where a student prover learns by observing successful proof traces from a teacher. The key innovation lies in comparing two learning paradigms:

  • Flat Prover: Learns from fully "inlined" proof traces. If a sub-proof is used multiple times, the student sees it as many distinct learning instances.
  • Hierarchical Prover: Learns to predict a reusable proof DAG (Directed Acyclic Graph). This allows it to solve a shared sub-proof (a "block") once and reuse it, rather than re-learning it for each occurrence.

They derive theoretical bounds on the "sufficient sample complexity" – how many examples are needed to learn a good prover. These bounds depend on factors like the average proof length, how predictable the teacher's next step is, and the student's prediction error.

Datasets

The paper doesn't introduce new datasets. Instead, it models the data generation process as coming from a "teacher prover" that produces successful verified proof traces. The learning is done via offline imitation learning from these generated traces.

Key Insights and Ideas

  • Structure Matters for Learning: The paper provides a formal statistical mechanism for why hierarchical proof structures (like lemmas and reusable DAGs) can be beneficial for learning. It's not just about making proofs shorter, but about reducing the learning burden.
  • Flattening Destroys Sharing: When a reusable proof DAG is "flattened" into a linear trace, shared sub-proofs are duplicated. This means a flat learner has to learn the same hard sub-problem multiple times, leading to a much higher sample complexity.
  • Statistical Provability is Key: The authors focus on "statistical provability" (the probability of finding a verified proof within a budget over a distribution of problems) rather than just reachability, which is more relevant for evaluating learned provers.
  • Hierarchy Reduces Decision Counts: The core idea is that a hierarchical prover makes fewer distinct decisions overall because it reuses learned sub-proofs. This directly translates to needing fewer training examples to learn those decisions.

Key Results

The main result is a theoretical exponential separation in sample complexity between flat and hierarchical learners. Specifically, when a proof structure involves duplicating a hard local argument exponentially many times (e.g., through flattening), the sufficient sample certificate for a hierarchical learner can be exponentially smaller than for a flat learner. This separation holds even when the local learning quality (how well the student imitates the teacher's local steps) is comparable.

Limitations and Future Work

  • Assumptions: The theoretical guarantees rely on specific assumptions, such as a "Tsybakov-type margin condition" (related to how predictable the teacher's actions are) and "search completeness" (ensuring that if the student's top-k choices are correct, it will find a proof).
  • Idealized Model: The paper uses a deterministic verifier and models proof search as an MDP. Real-world theorem provers might have more complex dynamics.
  • Future Work: The authors suggest that their framework can be extended to analyze other aspects of agentic proving, such as the trade-off between search budget and learning efficiency, and how different proving styles (e.g., sequent calculus vs. Hilbert systems) might interact with hierarchical structures. They also note that their separation relies on the "duplication pattern" and that learners with perfect canonicalization might not show this separation.

Summary updated

BibTeX
@inproceedings{sonoda2026exponential,
  author = {Sho Sonoda and Shunta Akiyama and Yuya Uezato},
  title = {{Exponential Sample Complexity Separation between Flat and Hierarchical Agentic Theorem Provers}},
  booktitle = {Open MIND},
  year = {2026},
  doi = {10.48550/arxiv.2602.10512},
}
Figure