Learning Formal Mathematics From Intrinsic Motivation

Authors: gabriel  poesia
david  broman
nick  haber
noah d goodman
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 07:10:48

Abstract: How did humanity coax mathematics from the aether? We explore the Platonic view that mathematics can be discovered from its axioms---a game of conjecture and proof. We describe an agent that jointly learns to pose challenging problems for itself (conjecturing) and solve them (theorem proving). Given a mathematical domain axiomatized in dependent type theory, we first combine methods for constrained decoding and type-directed synthesis to sample valid conjectures from a language model. Our method guarantees well-formed conjectures by construction, even as we start with a randomly initialized model. We use the same model to represent a policy and value function for guiding proof search. Our agent targets generating hard but provable conjectures --- a moving target, since its own theorem proving ability also improves as it trains. We propose novel methods for hindsight relabeling on proof search trees to significantly improve the agent's sample efficiency in both tasks. Experiments on 3 axiomatic domains (propositional logic, arithmetic and group theory) demonstrate that our agent can bootstrap from only the axioms, self-improving in generating true and challenging conjectures and in finding proofs.

Main paper: 
 introduction: 
 Mathematical reasoning stands as a grand challenge for Artificial Intelligence (AI) research since the birth of the field [25] . Artificial agents capable of general mathematical reasoning have the potential to drastically impact both mathematics itself and areas where mathematical proof plays a key role, such as program and hardware verification [4] . While this goal has received significant attention from the AI community [22, 46, 30, 42] , it still remains far from the breakthroughs that areas such as general game playing [36] , image [32] generation or protein folding [35] have witnessed.Prior work has reflected two main visions of how AI might achieve general mathematical reasoning abilities. One such strategy is to leverage all of the available human-produced mathematical knowledge as a starting point [31] . This knowledge is encoded in source as varied as textbooks, online forums, academic papers, as well as formal proofs written in computer languages such as Lean, Isabelle, Coq or Metamath [2] . Large Language Models (LLMs) can ingest all such sources of knowledge in a unified manner, and provide a foundation for tasks in both formal and informal mathematics. Benchmarks of mathematical problem solving in natural language, such as GSM8k [10] and MATH [15] , have measured rapid progress over the years, but they remain limited to problems where the final answer is a number, due to the challenge of assessing the correctness of mathematical arguments written in natural language. This difficulty is not a challenge in formal theorem proving, where we can automatically verify the correctness of proofs in arbitrarily high-level mathematics. But benchmarks of formal theorem proving (such as minif2f [46] and LeanDojo [44] ), even with rapid advances in LLMs, have not yet witnessed the same breakthroughs. In fact, these benchmarks remain Figure 1 : We train mathematical reasoning agents starting only from the axioms of a given formal domain, where they jointly learn to pose challenging but provable conjectures and to find their proofs. far from solved even though all of the theorems and problems in them are known mathematical facts, often already presented informally in publicly available training data.An alternative vision of how AI might master mathematical reasoning sees mathematics through the lens of game playing, observing that the rules of the "game of mathematics" can be encoded in a variety of formal systems, such as dependent type theory, using a small set of axioms [24] . In principle, this can allows us to potentially borrow the successes of general game-playing agents, such as AlphaZero [36] , that have achieved remarkable success in mastering complex games entirely from experience. Notably, AlphaZero achieves super-human performance in a range of games without leveraging any human examples. Instead, it learns entirely from experience given only an environment where it can play the game by itself. If this approach could be transported to mathematics, it would bypass the dependency on human examples, and allow us to explore mathematical domains -both known and new, without distinction -by utilizing large scale compute and the potential of axioms to produce infinite data.However, there is a crucial and often neglected difference between mathematics and traditional board games where game-playing AI has succeeded: mathematics is a game with intrinsic rewards [8] . Board games, such as Go or Chess, have a fixed starting configuration, and their rules determine the outcome of the game unequivocally. Mastering the game then amounts to learning a policy that optimizes for the extrinsic signal of winning. In theorem proving, a starting configuration is given by a theorem statement, and the correctness of a proof can be assessed objectively in a formal system. But the choice to work on a particular statement -a conjecture, before it is proved -is not given a priori by the rules of the game of mathematics. Instead, these goals come from the intrinsically motivated agents [8, 34] who are playing the game. Thus, a key skill developed by human mathematicians is to decide which conjectures are worth considering. In stark contrast, current benchmarks of mathematical reasoning abilities, both formal [46, 44] and informal [10, 15] , all measure performance on an extrinsically defined set of problems, without space for further discovery.In this paper, we make the first step towards creating intrinsically motivated mathematical agents by proposing MINIMO -Mathematics from Intrinsic Motivation -, a method to jointly learn conjecturing and theorem proving, starting from nothing but the axioms of a given mathematical domain, represented in dependent type theory [12] . We borrow inspiration from the literature of intrinsic motivation in Reinforcement Learning (RL) [8, 7, 33, 26] , where agents can learn from interacting with an environment even when no specific goals are given. Intrinsic motivation objectives have been instrumental for RL in hard exploration environments, where rewards are too sparse to seek directly [5] . The sparsity of rewards is also a major challenge in theorem proving, making this connection especially attractive. We thus define the objective of conjecturing as generating new problems that are challenging for the current agent but still provable within its given search budget. Since the agent also learns from the solutions it finds, the conjecturer has to continuously increase the difficulty of the problems it generates.MINIMO performs both conjecturing and proof search with a Transformer [40] language model (LM), which starts randomly initialized. To sample conjectures even from a model that starts with no prior knowledge, we combine methods from type-directed program synthesis and constrained generation from language models, enabling us to get valid conjectures by construction -concretely, conjectures are simply terms of type prop, the type of mathematical propositions in our type theory. Then, we perform proof search in the Peano environment [28] , which provides a finite action space for search in a dependent type theory, guiding search using the LM as a policy and value function. When a proof is found, proof search generates training data for improving the policy and values; it also provides data to improve conjecturing, since we then know how hard the problem was. We use this to alternate between conjecturing and theorem proving, in a self-improving loop. However, successful proofs are sparse. We thus adapt the idea of hindsight relabeling [1] to reinterpret failed trajectories as successful ones by rewriting their goals a posteriori. This significantly accelerates learning, allowing us to extract hundreds of new (true) conjectures, and their proofs, even from failed proof searches. In this way, even unprovable conjectures can be highly useful for the agent's learning. We evaluate our system on three axiomatic mathematical domains-propositional logic, natural number arithmetic, and group theory-showing both that agents self-improve successfully in proving theorems in all domains. We also find that they improve at an extrinsic evaluation of theorems (from a classical textbook on logic [20] , and the Lean Natural Number Game [6] ), not given in training. In summary, we make the following contributions:• We introduce a method for conjecturing using LMs that generates valid conjectures by construction in an arbitrary theory, using constrained decoding and type-directed synthesis.• We define a hindsight relabeling method that simultaneously generates training data for conjecturing and theorem proving.• We combine these methods in a learning loop where a mathematical agent can self-improve in a given formal domain given only the axioms.• We evaluate agents trained on axioms for propositional logic, group theory and arithmetic, showing that they improve in both intrinsic and extrinsic evaluations. 
related work: 
 Our work is primarily related to prior work on mathematical conjecturing, learning to prove theorems, and on intrinsic motivation in Reinforcement Learning. To the best of our knowledge, our work is the first attempt to unify insights from these areas for training mathematical reasoning agents.Mathematical conjecturing. The task of discovering mathematical facts was the subject of the influential Automated Mathematician (AM), developed by Lenat in the 1970s [23] . AM was able to conjecture several known mathematical facts and concepts (such as the definition of prime numbers, and the unique factorization theorem). Unlike our system, AM did not aim at proving the conjectures it formulated -instead, it proposed and judged them based on a set of principles and on empirical evidence collected by AM itself. More recently, other works have revisited the idea of generating conjectures by training language models on human-written theorem statements [39, 41] . Unlike our approach, this relies on pre-training data, and does not readily extend to conjecturing in new domains.Learning to prove theorems from human data. A large body of recent work has used Large Language Models to guide formal theorem proving in a number of proof assistants, such as Lean [22] , Isabelle [22, 18] and Metamath [31, 42] . Typically, these systems pre-train an LLM on large-scale Internet corpora and fine-tune on human-written formal mathematical proofs. Work on scaling laws for LLMs has shown that they generally improve when their parameter count and dataset size both increase in similar proportion. But the scarcity of formal proofs for training creates a challenge for this approach for learning formal theorem proving: even the largest datasets to date, such as the ProofPile, which aggregates libraries from 5 proof assistants, form relatively small datasets (e.g., 500MB of formal proofs on the ProofPile, contrasting to terabytes of Python code on Github).Learning to prove theorems from synthetic data. One recent success in automated mathematical reasoning was AlphaGeometry [38] , which was highly effective in solving olympiad-level geometry problems. AlphaGeometry, like our method, was trained entirely on synthetic data. Crucial to its approach is a method for generating both problems and solutions using only the axioms of geometry and a domain-specific deductive closure solver. This allows AlphaGeometry to synthesize and train on hundreds of millions of problems: many orders of magnitude more than existing human-created datasets of mathematical problems. Our approach shares the goal of AlphaGeometry of only using data derived from the axioms of the domain, with the difference that our method (a) is agnostic to the underlying axiomatic system and (b) does not rely on a domain-specific solver. Another line of work, including TacticZero [43] and rlCoP [19] , has explored learning to prove theorems from reinforcement learning only, in a tabula rasa fashion, but still using a human-written set of problems for training (and manually-engineered features, in the case of rlCoP).We leverage inspiration from the literature on training reinforcement learning agents with intrinsic motivation objectives, allowing an agent to learn without pre-specified goals [26, 34, 33, 13, 27, 7, 3, 37] . Our setup is conceptually close to AMIGO [7] , where agents attempt to generate challenging but achievable next goals. While AMIGO was demonstrated in a simple grid-world environment with a simple goal structure (any point in the grid gives a valid goal), we operate on a much richer setting, where the space of goals is unbounded -all conjectures in a formal mathematical theory. To sample conjectures, we use Synchromesh's Constrained Semantic Decoding algorithm [29] , and guide it with type constraints.Self-improvement of language models A significant line of recent work has explored the idea that LLMs can "self-improve": increase performance on a given task by fine-tuning on their own generated reasoning traces, which are selected by some criterion that ensures their quality. STaR [45] fine-tuned on reasoning traces that reached the correct answer on mathematical and multiple choice questions; LMSI [16] was able to obtain self-improvement on a question-only dataset, sampling multiple rationales and training on those that agree with the majority answer. More related to our work, but less explored, is the direction of having LLMs also generate their own problems for training: this has been explored for self-improving on solving programming problems [14, 37] , where code execution provides signal about correctness. In MINIMO, since our problems are formal conjectures and our solutions are formal proofs, we can guarantee correctness in a much stronger form than self-generated test cases. 
minimo: 
 Most recent work on AI for mathematical reasoning assumes a target set of problems to be solved. We deviate from this paradigm by having the agent itself propose problems for it to try to solve and learn from. Our goal is to target increasingly harder problems in a given mathematical domain, where the domain is specified as a set of axioms given in dependent type theory.Our agent is represented by a language model, which we will use to encode (a) a proof search policy π θ (a|s), (b) a value function V π (s), and (c) a difficulty-conditioned conjecturer P θ (c | d), where d is a discretized measure of difficulty and c is a mathematical statement (a string). MINIMO consists of training both components in a loop that alternates between generating conjectures, trying to target hard but provable ones, and doing proof search, as we depict in Figure 1 . As we describe in this section, proof search generates training data both for the conjecturer and the prover componentstraining on that data thus yields a self-improvement loop as the agent interacts with the environment. We now describe the first step in this loop: generating conjectures.We aim to sample conjectures from a language model, conditioned on a target difficulty. By construction, an autoregressive LM gives a distribution over all strings. But if the LM does not have prior knowledge about the domain, it is unlikely to put non-negligible probability mass on valid mathematical statements. We now address the challenge of sampling valid conjectures.To that end, our main insight is to leverage constrained decoding to obtain valid conjectures by construction. Our method will turn any language model -including a randomly initialized one, which is what we start with -into a probability distribution over strings that represent well-formed conjectures in dependent type theory over a given set of axioms. Ultimately, we will also train the LM to generate conjectures given a target difficulty. We use this ability to attempt to generate increasingly difficult problems for training, according to the agent's current ability to prove theorems.To reason about constraining the LM's outputs, we leverage the abstraction of a completion engine, first introduced in the context of code generation with language models [29] . Assuming C is the set of all valid conjectures, a completion engine will allow us to use any LM to sample strings from C in an autoregressive fashion. Mathematically, C is a function f C : Σ * → P(Σ * ), taking a string s ∈ Σ * and returning a set of strings f C (s) 1 . Intuitively, we will sample conjectures from our LM by constraining it to strings that can be generated with iterated calls to f C . Concretely, we will start with s = "", and query f C (s) to obtain the set of valid ways to begin to state a conjecture. After we choose one of those s 1 ∈ f C (s), we can then query f C (s 1 ) to obtain the valid ways to proceed, and repeat until we have a complete conjecture. Our main challenge here is to construct a suitable f C that it is sound (all conjectures obtained by this procedure are valid) and complete (all valid conjectures can be obtained by this procedure). After we define f C , we can sample from any LM while guaranteeing that the output will belong to C by using the Constrained Semantic Decoding (CSD) algorithm [29] .To construct f C , we analyze the minimal formulation of dependent type theory backing Peano [28] essentially the classical Calculus of Constructions (CoC) [12] . In the CoC, mathematical propositions are constructions of type prop. Since generating a proposition might involve generating objects of arbitrary other types, depending on the axioms of the given domain, we will define a more general family of completion engines, f t , which will constrain the LM to sample an object of an arbitrary type t. At the end, we obtain f C = f prop .To sample an object of type t, we leverage the simple grammar of terms in Peano [28] to guide a recursive type-directed synthesis algorithm. Syntactically, terms in Peano are defined by the grammare ::= type | prop | x | (e e) | (lambda x : e, e) | [(x : e) → e].The first two production rules give the names of two built-in base types, type and prop. We then have variables, function application, lambda functions, and function types (denoted in square brackets). As conventional in type theory, let Γ be our typing context: a sequence of pairs of names and their types. For example, we might have Γ = [nat : type, z : nat, succ : [nat → nat]], a context with three objects: a type nat, an object z having that type, and a function succ from nat to nat. Given a context, to obtain an object of type t, it suffices to consider the formation rules in CoC to guide generation:• If our target type is t = type, we can generate either one of the names in Γ having type t = type (e.g., nat, for the example context above), or a function type.• If our target type is t = prop, we can generate either one of the objects in Γ having type prop, or a function type where the output type has type prop.• If our target type is a function type, we must start by generating a square bracket; then, we (recursively) iteratively generate a type for the next parameter, or, if we already have at least one parameter, we can also generate the final output type.• An object of any type t can be formed by function application of a function f chosen from Γ, provided that the output type of f can be unified with t.These rules allow us to determine the possible valid tokens at any point during generation. Besides the base types type and prop, objects of all other types are either in Γ or the result of a function application. We use a recursive descent parser to parse the (incomplete) term we have so far (as originally done in [29] ), and compute the target type t at the current point in generation. Then, we enumerate the possible next tokens for the LM by using the rules above, return the union of the sets of choices allowed by each rules as the output of f t .Note that this is a general procedure for searching for objects of any given type t (i.e., inhabitants of that type). This is undecidable in general (theorem proving is a special case of type inhabitation), so this procedure might not terminate. Therefore, we set a maximum number of tokens K (150, in our experiments), and ignore samples where the LM fails to generate a conjecture after K tokens. In practice, we find the rejection rate for generating propositions to be low, < 10% of the generations.The above procedure forces the LM to generate a valid conjecture, but the LM still assigns a distribution over those. During training, we also aim to generate conjectures that are provable, but hard to prove. The signal on both success and difficulty is generated by running proof search (as we describe next) and, in cases where a proof is found, measuring it's log-likelihood under the current policy, which correlates with how many iterations MCTS takes to find the proof (see Appendix).Having a conjecture represented by a target type t, we then perform proof search using Monte Carlo Tree Search (MCTS; [21] , [42] ), guided by a learned policy π θ and value function V θ . We represent both π θ and V θ using the same underlying language model that we use for conjecturing. We use Peano [28] as the environment for proof search. Peano exposes a finite action space, so we don't need to generate actions using π θ -it suffices to be able to evaluate them. More precisely, at a given state s where we have actions a (s)i available, we compute the distribution π θ (a (s)i |s) by evaluating the likelihood of each a (s) i as the completion to a string of the form "STATE: «s»; POLICY:". We read out the value of a state in a similar way -by considering the likelihood of 1 or 0 as being the next token following "STATE: «s»; VALUE:". In both cases, the probability of the next token is normalized over only the choices that can lead to a valid completion.States and actions in Peano are similar to several other interactive theorem provers, such as Lean and Coq. The state consists of a set of typed objects, along with a set of open proof goals (which are types). Objects in the state whose type is a proposition type are interpreted as evidence for that proposition (either a proof or an assumption). Actions might add new objects to the state (e.g., take the successor of one existing natural number, or use an equality to rewrite an existing proposition into a new one), change the goal (by backward chaining), or both (e.g., if the goal is to prove A → B, which is used to represent both logical implication and universal quantification, the intro action will add object of type A to the state and change the goal to B).When proof search succeeds, we can extract examples to train both the policy and the value function. For the policy, we simply extract the actions that lead to the proof as language modeling examples, using the same format we use to query π θ . For the value function, we take the states in the subtree that complete the proof as examples with value 1, and a random set of other states as examples with value 0 for training. When proof search fails, however, this naïve procedure does not extract any training examples. This happens often at the beginning, since our model initially generates a large number of conjectures it cannot prove (either because they are false, or because naïve proof search times out). But forward actions in the proof search tree often construct proofs for other propositions, even if they are irrelevant for proving the original goal. We levarage this fact for generating training data by hindsight relabeling, as we describe next.Even a conjecture that fails to be proven can be highly informative about the domain. During proof search, forward actions that apply functions whose result type is a proposition type (e.g., concluding A from (and A B)) produce proofs, even when those proofs might not be useful for proving the original conjecture. In Reinforcement Learning, the well-known method of Hindsight Experience Replay [1] extracts training data for the policy from such failed trajectories by relabeling the trajectories with goals that were in fact achieved, as opposed to the original goal. For those alternative goals, the trajectory then represents a successful sequence of actions. We apply this idea to extract training examples for both the policy and value functions from proof search trees, by picking nodes after forward actions that produced a proof, and walking upwards in the tree until we find a backward action (since those change the goal). That path then becomes a successful trajectory after we relabel the goal. Two important steps to improve data quality are (1) we clean up the solutions by eliminating steps irrelevant for the proof of the new goal, and (2) we only add proofs of goals never seen before, to avoid oversampling trivial facts that are rediscovered extremely often (such as 0 = 0).We go one step further and observe that hindsight relabeling can also be useful for training the conjecturer. Concretely, the procedure we described above produces a set of proofs p i for relabeled statements g i . All of these statements are therefore true in the mathematical domain, and we use them as examples of true conjectures. As a concrete example, in arithmetic, the agent will often conjecture simple expressions such as 2 + 1 = 0. Most equalities generated at random will be false. However, by applying the Peano Axioms and facts about equality in succession, the agent eventually finds a proof of 2 + 1 = 3. Evaluating the likelihood of the proof under π θ gives a measure of the difficulty of this alternative statement for the current policy. This insight allows our agent to learn about hundreds of new unique, true statements in each proof search. As our experiments show, we find hindsight relabeling to be crucial for enabling the agent to steadily conjecture harder statements that it is able to prove. Finally, we tie all components together by alternating between (a) generating a batch of conjectures, (b) running proof search on them, (c) extracting training examples from the search trees, and finally (d) training the underlying LM using the standard cross-entropy objective. When a proof is found, either directly or by hindsight relabeling, we first compute a continuous difficulty metric of the statement by taking the log-likelihood of the proof under the current policy. To discretize difficulties, we then consider difficulty percentiles of the last batch of conjectures: we take the 10% least likely proofs to be associated with "hard" conjectures, the 50% most likely to be considered "trivial", and the remaining are taken as "easy". When put together, these components form a self-improving loop that starts only from the axioms of the given mathematical domain, as our experiments show. 
experiments: 
 We now evaluate MINIMO2 on three mathematical domains. We experiment with axiomatic systems for (a) propositional logic, (b) arithmetic, and (c) abstract groups. All the axioms are given in the Appendix. We then train agents over 5 iterations of conjecturing and theorem proving, generating 200 conjectures in each batch, running MCTS for proof search with 1000 expansions, and evaluate our agents guided by the following research questions: RQ1: Can our conjecturing method generate increasingly harder conjectures as training progresses? RQ2: Do agents improve at theorem proving as they train on their own generated problems? RQ3: Is hindsight relabeling effective at improving conjecturing and theorem proving? RQ4: Do our agents improve at proving an externally given set of human-selected theorems, even if these are not given during training?The first three questions require intrinsic evaluations -they ask whether the learning dynamics of agents trained with MINIMO matches the desiderata of self-improving at both conjecturing and theorem proving while given only the axioms. The last question is an extrinsic assessment of what our agents learn -we evaluate whether the learning progresses in a way that aligns with an external criteria -namely, the proficiency of the agent at proving theorems from human sources (a textbook and a Lean game).We first investigate RQ1 and RQ2. Figure 2 shows the progression of difficulty across 5 iterations of the MINIMO learning loop (first conjecturing, then running proof search, and training on collected examples). Here, we evaluate the average log-likelihood (y-axis) of conjectures proven at each conjecturing iteration (x-axis) under the policy after each iteration (line color). Policy 0 is the initial (randomly initialized) policy, while subsequent policies were trained on the examples obtained during proof search, with hindsight relabeling, up to the previous iteration. Lower log-likelihood generally means harder conjectures (i.e., they tend to take more search iterations, see Appendix).Difficulty increases as training progresses (RQ1). Fixing an early policy, the log-likelihood of proofs under that policy steadily decreases across training iterations. This is reflected in the negative slope of difficulty across iterations when the policy is fixed. In particular, the policy at iteration 0 serves as a naïve search baseline, since it is essentially uniform. We observe that, as training progresses, this policy struggles increasingly more with each new batch of conjectures. The same pattern repeats for subsequent policies when we consider conjectures generated in future iterations, giving a generally downward trend in log-likelihood of the solutions for any given policy, showing that conjectures get increasingly more challenging. This provides positive evidence for answering RQ1: in all 3 domains, the conjecturer is able to increasingly propose harder provable conjectures as training progresses.Proof policy improves as training progresses (RQ2). At each iteration, we sample a new set of unseen conjectures for training. From Figure 2 , we see that later policies generally perform better than earlier ones, at a fixed conjecture iteration. This reflects the fact that each new policy assigns higher likelihood to the proofs, even for unseen conjectures at each iteration. For example, after training on the data generated from the first iteration, the policy on iteration 1 has higher log-likelihood for the proofs to the new conjectures found at iteration 1, when compared to the initial policy from iteration 0. This pattern repeats at each iteration, showing that the prover is also progressing and generalizing to unseen problems, though with diminishing gains in the final iterations. This suggests a positive answer to our second research question: our agents effectively self-improve in their ability to prove new statements.Hindsight relabeling is necessary for joint self-improvement (RQ3). The results so far all used hindsight relabeling on all proof searches-successful or not-to extract training data for the policy and value function, as well as conjecturing. To evaluate whether our agents would still show the same continuous self-improvement regardless of the data efficiency gains from hindsight relabeling, Figure 3 compares agents trained with and without hindsight relabeling across 5 iterations over the same 3 axiomatic domains. Here, we look at the ability of the agent to achieve the goal of constantly proposing provable but challenging conjectures for itself. Ideally, the difficulty of conjectures should not fluctuate significantly during the course of training: we would like the agent to always find new challenging conjectures that it nevertheless still proves. We find that, in all 3 domains, the agent fails to achieve this goal when not trained with hindsight relabeling. Instead, as it trains on its own proofs, the agent's conjectures fail to remain challenging-all provable conjectures end up with high log-likelihood as training progresses, and the conjecturer is unable to leave that regime. We attribute this to the volume of signal that the conjecturer receives: at each initial batch, only around 10-20% of the conjectures are proven. When not using hindsight relabeling, the only feedback that the conjecturer recevies is that proof search timed out on these statements. On the other hand, with hindsight relabeling, even these failures lead the conjecturer to observe hundreds of actual true statements in each domain (along with their proofs), leading to better learning dynamics. This provides positive evidence for RQ3: hindsight relabeling significantly helps the agent to jointly improve in conjecturing and theorem proving-without it, training tends to collapse to by proposing only easy conjectures.Finally, we evaluate whether our agent, trained only on problems that it proposes to itself, also improves in solving problems that are of interest to humans. Since our agent does not grow its library of theorems over time, starting every new proof from the axioms, a meaningful evaluation requires theorems that can be reasonably proven straight from the axioms, without lemmas. We thus use two human-written sources of theorems meeting this criterion, for the domains of propositional logic and arithmetic. For logic, we take the set of 35 theorems of propositional logic from Stephen Kleene's textbook "Introduction to Metamathematics" [20] . Precisely, in Theorem 41, Kleene states (and proves a subset of) 35 useful statements of Propositional Logic (such as contraposition Figure 3 : Difficulty of proved conjectures proposed in each iteration under the current policy at that same iteration, comparing when using and not using hindsight relabeling to generate new proofs and conjectures, with standard error bands for runs with 3 random seeds. Ideal behavior would be a flat line, representing constant relative difficulty. Hindsight significantly helps the agent conjecture propose harder problems.rules, commutativity and transitivity laws of logical connectives, and properties of double negation).For arithmetic, we use the Natural Number Game [6] , a popular game used to introduce formal mathematics in the Lean theorem prover. We take levels of the game that are (a) theorems about natural numbers, and (b) do not refer to previous lemmas, only the axioms; this results in 10 levels spanning the Tutorial, Addition, and Multiplication worlds. We translate the statements into Peano, and evaluate our agents on their success rate on those problems within 2000 MCTS expansions. As agents train on their own conjectures, they also improve at solving problems from these two human-written sources.Figure 4 shows the results. We find that, as our agents train on their self-generated problems, they steadily become more successful at proving theorems from both Kleene's book and the Natural Number Game. This happens even though these theorems are not targeted during training, since our agent only uses its own conjectures. Four theorems in Propositional Logic are only proved after the last iteration of training: commutativity and transitivity of the "if and only if" logical connector, a law connecting double negation and implication (¬¬(A ⇒ B), ¬¬A ⊢ ¬¬B), and the "currying law" of the conjunction -(A ∧ B) ⇒ C ⊢ A ⇒ (B ⇒ C).In the Natural Number game, only the final agent proves ∀n, ∀m, succ(n) + m = succ(n + m), a theorem requiring induction on the correct variable (m) and a non-trivial sequence of rewrites in the inductive case (we include the full proof in the Appendix). While admitedly small scale, these results suggest a positive answer to our last research question: agents trained on their own conjectures can also improve at solving human-written problems, which are not given during training. 
limitations and conclusion: 
 We present MINIMO: an approach to training agents for formal mathematical reasoning starting from only the axioms of a given domain. The agent jointly learns to propose challenging conjectures and to prove them. Our experiments show evidence of MINIMO improving its performance across training iterations. In the Groups domain, the average proof length it finds on generated conjectures (i.e., not found by hindsight) increased from 2.67 steps in the first iteration, when the model is randomly initialized, to 5 steps by iteration 4, with proofs for 'hard' conjectures growing from 3.67 to 6.10 steps. The longest proofs found grew from 4 steps to 9 steps from the first to last iteration. Similar trends appear in Propositional Logic (average length from 2.75 to 4.21 steps, longest proofs from 5 to 11 steps) and Arithmetic (average from 2.36 to 3.35 steps, longest from 4 to 7 steps).However, MINIMO currently has two crucial limitations that prevent it from (a) discovering deep mathematical theories, and (b) scaling up to large theories. First, even if the agent's policy improves, its library remains fixed to the definitions and axioms that it starts with. Proofs that do not use lemmas (cut-free proofs in logic) can be exponentially longer than equivalent ones that do, and thus quickly grow beyond the reach of search. With this constraint, our agent most often finds harder conjectures by making the statements longer and more complicated. For example, in Groups, early conjectures include trivial statements like e = e; by the last iteration, the conjecture requiring the longest proof reads as ∀g ∈ G, if e = (g -1 ) 2 then e 2 = e(e(e((g -1 ) 2 ))) (proved in 9 steps). In contrast, human mathematicians develop deep theories by accumulating results and definitions along the way, in such a way that even very high-level results can be described succinctly at the right level of abstraction.Understanding how to bootstrap such cumulative learning in an agent (e.g., exploring notions of usefulness or interestingness, several of which have been posited [4, 11] ) will be a key direction for future work.Another bottleneck in our current setup is that a large library can cause the current action enumeration algorithm in Peano to become prohibitively slow (a finite action space can still become intractable).A method that scales unboundedly should incorporate some form of premise selection [17] . In past work, premise selection has either been based on symbolic heuristics or in learning useful premises from human-written proofs. We believe that developing a premise selection method that bootstraps together with the other learned components will be as important as understanding how to grow the agent's library.Together, lifting these limitations from our method might lead to a completely compute-bound, self-improving agent for formal mathematics capable of discovering deep mathematical theories starting only from basic axioms -the rules of the game of mathematics.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material? Answer: [Yes] Justification: We provide a zip file containing all of our implementation in our supplementary material, and the configuration files and commands used to run the main experiments. This was also released on Github (https://github.com/gpoesia/minimo).Guidelines:• The answer NA means that paper does not include experiments requiring code. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
experimental setting/details: 
 Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes] Justification: These are provided in the Appendix, and in the code release.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [Yes] Justification: Figures 2 and 3 contain standard error bands, together with a description of those in the captions.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.• The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. Justification: We provided these details in the Appendix.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?Answer: [Yes] Justification: our paper only uses synthetic data of formal mathematics, and thus not incurr in any of the issues listed in the Ethics guideline.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [NA] Justification: We don't foresee any social impact of our work in its current form, since we only train agents on synthetic data, collected from formal mathematical environments, and evaluate their behavior there.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)? Answer: [NA] Justification: Our models have no such potential for misuse. Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort. 12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected? Answer: [NA] Justification: Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.• If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: We represent our agents with GPT-2-style character-level Transformer models totalling approximately 8.45M parameters each (8 layers, 8 attention heads, hidden size 512, feed-forward size 2048, vocabulary size 128, absolute positional embeddings, with maximum context size of 1024). After each training iteration, we train the LM for a fixed number of 2000 steps of the AdamW optimizer (learning rate of 1e -4) with a dynamic batch size of most 10000 characters (random examples are added until their padded sequence lengths add up to more than 10000). We found these parameters to generally lead to stable training across all runs, without divergence, and 2000 steps was enough to bring each iteration to convergence in training loss.Our training runs (5 iterations of generating and proving 200 conjectures in each) were done on 2 machines with 5 NVIDIA A40 40GB GPUs each. Each run took from 8 to 16h on a single GPU, totalling 288 GPU hours for the runs underlying our main results.Throughout the paper, we used the likelihood of the proof under the policy as a measure of difficulty.Figure 5 shows that this quantity is linked to the number of iterations that MCTS takes to find the proof. This allows us to estimate difficulty easily without running search for theorems that we have proofs for (such as those we find by hindsight relabeling).Figure 5 : Relation between MCTS iterations until the proof is found, vs log-likelihood of the proof that is found. The higher the likelihood, the faster MCTS is in finding the proof.Our conjecturing procedure steers to LM to generate "hard", where that means they can still be proven by the current agent. Figure 6 shows how the ratio of proven conjectures evolves across training. In Groups and Propositional Logic, this ratio steadily increases both when and when not using hindsight. In Arithmetic, we observe that the ratio remains consistent up to iteration 3, but then decreases, whereas it increases sharply without hindsight. We note that this sharp increase is due to the conjecturer generating mostly trivial conjectures, by adding new combinations of assumptions that are not necessary for the proof (e.g., the most common conclusion for the conjecturer to generate without hindsight is often 0 = 0). Even though the hard conjectures with hindisight often fail to be proven, they still seem to generate useful training data for the prover, as we see in our extrinsic evaluation with problems from the Natural Number Game. Thus, this analysis points out that ideal behavior for the conjecturer is unclear -it is still perhaps positive to generate false conjectures, as long as the process of proving them leads to learning progress (as seems to be the case in Arithmetic). We here provide the full Peano axiomatization of each domain.Our axiomatization of arithmetic includes the classical unary definition of the natural numbers (zero and successor function), axioms about addition, multiplication, and the principle of induction. nat_ind : [('p : [nat -> prop]) -> ('p z) -> [('n : nat) -> ('p 'n) -> ('p (s 'n))] -> [('n : nat) -> ('p 'n)]].Here we list all problems used in the extrinsic evaluation in Arithmetic and Propositional Logic.The following are the 10 problems we extracted from from the Natural Number Game that (a) don't use previous lemmas, being reasonably provable straight from the axioms, (b) are about natural numbers (so, for example, this excludes the Proposition World, which is essentially about propositional logic). The prefix in these problems tell which "world" of the game it came from: t stands for the Tutorial World, a is for the Addition World, and finally m is for the Multiplication World.t_example1. [('x : nat) -> ('y : nat) -> ('z : nat This proof is not minimal -our human-written Peano proof for this level of the game has 7 steps in the inductive case, compared to 12 in the proof the agent finds. Nevertheless, this is a non-trivial theorem to prove by hand in this low-level axiomatic system, and our agent was not explicitly trained to target this theorem. Thus, this shows that it does learn general patterns that are useful in proof search.) -> (= (+ (* x y) z) (+ (* x y) z))] t_example2. [('x : nat) -> ('y : nat) -> (= 'y (+ 'x n7)) -> (= (* n2 'y) (* n2 (+ 'x n7)))] t_example3. [('a : nat) -> ('b : nat) -> (= (s 'a) 'b) -> (= (s (s 'a)) (s 'b))] t_add_succ_zero. [('a : nat) -> (= (+ 'a (s z)) (s 'a))] a_zero_add. [('n : nat) -> (= (+ z 'n) 'n)]We here list all the statements in Theorem 41 of Kleene's book [20] , "Introduction to Metamathematics", represented in Peano: integration would be similar to recent tools like Duper [9] : embedding problems from the target system (e.g., Lean) into a Peano representation, running the prover, and then reconstructing the discovered proofs in the original system. While developing a Peano-to-Lean proof object translator would be relatively straightforward given the simplicity of Peano's type system, translating arbitrary Lean problems to Peano would require significant more engineering effort (e.g., we would need to generate explicit axioms for inductive types and quotients, which are not part of Peano). However, we believe a simplified environment is valuable for investigating how self-improving agents can build towards deeper theorems, eventually being able to invent new definitions and accumulate a growing library (which MINIMO does not, yet). Once these capabilities are demonstrated convincingly, the engineering investment in proof translation will become more compelling.38th Conference on Neural Information Processing Systems (NeurIPS 2024).This set can be implicitly defined by a regular expression, so it might be infinite. This allows a completion engine to represent constraints such as "what follows can be any valid identifier".Our code is available at https://github.com/gpoesia/minimo. 


Decision: The paper provides a novel scheme for generating mathematical conjectures and proving them when the input is the theory axioms only.
All reviewers acknowledged that this is a challenging and highly interesting task and that the approach is quite pioneering.  The critic by reviewers is centered on the small scale of experiments, and issues of non-scalability. The authors provided detailed rebuttals that was well received by the reviewers (and one raised its score). Overall,  all reviewers were quite positive.

Reviews: review: paper_summary: paper_summary: This paper presents a new method for training LLM agents in mathematical reasoning, starting only from basic axioms. The main idea is to make the agent learn two skills together: coming up with hard math problems (conjecturing) and solving them (theorem proving). The authors use a language model to do both tasks, and they introduce clever ways to generate valid math statements and learn from failed attempts at proofs. They test their method on three areas of math: logic, arithmetic, and group theory. The results show that the agents get better at both making harder problems and solving them over time. Importantly, the agents can also solve some human-written math problems they weren't directly trained on.
strength_weakness: strength_weakness: 1. The current approach does not accumulate a growing library of proven theorems, which limits its ability to tackle more complex mathematical problems efficiently. This restriction to essentially "cut-free" proofs could become a significant bottleneck as the complexity of the target domain increases.
2. The paper doesn't show how this new way compares to other neural ATP methods. This makes it hard to know how good it really is.
3. The authors didn't try their model on standard math problem sets like mathlib or mini-f2f, which many other neural ATP methods use. This makes it hard to compare their results to other research.
questions: questions: 1. Did the authors consider evaluating the system on widely-used benchmarks like mathlib or mini-f2f? If not, what are the main challenges in adapting the approach to these benchmarks?
2. How well does an agent trained in one mathematical domain (e.g., propositional logic) generalize to another (e.g., arithmetic)?
limitations: limitations: Yes
paper_summary: paper_summary: The authors investigate a novel setting for ML-based formal theorem proving, where the proving agent in addition to learning to prove theorems at the same time learns to propose conjectures. The process is composed into a self-improving feedback loop that starts just from axioms and continues to prove increasingly difficult self-generated conjectures. The hindsight relabeling method is introduced that extracts training data points even from the failed proof searches, which improves the learning process.
strength_weakness: strength_weakness: As the presented setting is limited (simple conjectures generated, no mechanism for abstracting reusable lemmas), it is not clear to what extent the proposed methodology will transfer to fully-fledged formal proving environments like Lean, Coq, or other ITPs. (The authors are aware of this limitation and they mention it in Section 5.)

The presented experiments are small: only five iterations of conjecturing-proving loop are run.

Some hyper-parameters of the experimental setup are fixed in an ad hoc manner without performing any grid searches (n. of conjectures generated per iteration, n. of expansions in the MCTS). It would perhaps be good to measure the effect of some of these parameters.

It would be interesting to see more metrics tracked across the learning iterations for better insights about the process, for instance:
- the average length/syntactic complexity of the generated conjectures,
- the average length of a proof per iteration,
- the duplication rate between consecutive batches of generated conjectures.

Some details of the method are not specified clearly (see my questions below).

Minor:
- evaluate as -- evaluated as (the caption of Fig. 2)
questions: questions: How the conjecture generation is conditioned on the difficulty level?

How do you tokenize formulas?

How exactly do you calculate the average proof log-likelihood (Figure 2):
- how do you incorporate the failed proof attempts into the average?
- what is the set of conjectures you compute the average for: is it across a new batch of 200 conjectures, or the old ones (which were used for training the prover) are also used?
- are the conjectures from hindsight relabeling taken into the average here?

Is it correct that the lines in Fig. 2, right, for the policies from iterations 0 and 1 are completely overlapping?

Why do you display the proof log-likelihood instead of perhaps more interpretable metrics like the proving success rate for a batch of new conjectures or the average length of a proof search / a proof size?

Why group theory is missing from the evaluation presented in Fig. 4?

Is the success rate in Fig. 4 computed independently per each iteration, or rather cumulatively (taking union of theorems proved in all the past iterations)?

Could you provide a list of requirements to create a Python environment for running the supplemented code? I would like to test it, but there is no detailed installation instructions.
limitations: limitations: The authors correctly identify the major limitations of their approach.
paper_summary: paper_summary: This paper proposes to create mathematical agents by jointly learning to posing challenging problems (conjecturing) and solving the problems (theorem proving). Specifically, they use a randomly initialized Transformer to perform both conjecturing and proof search in a loop.
strength_weakness: strength_weakness: 1. Further justification of using log-likelihood as the main evaluation in this paper. 
2. How does this method facilitates solving dataset such as miniF2F and mathlib?
questions: questions: Q1: How to guarantee f_C soundness and completeness?
Q2: In Figure 2, propositional logic, the search baseline policy at iteration 0 seems missing. 
Q3: According to Appendix B and Figure 5, the authors use the likelihood of the proof under the policy as a measure of difficulty. To what extent is the distinction of the difficulty between the log-likelihood of -13 and -1? Could you please provide some cases for each? 
Q4: Figure 2 shows diminishing gains in conjecture and policy iteration 4. Does it mean approaching the saturated performance? How to decide the number of iterations? 
Q5: How many evaluated theorems are in the Natural Number Game dataset?
limitations: limitations: The authors have adequately addressed the limitations.
paper_summary: paper_summary: The authors propose a novel approach to formal theorem proving (FTP) that leverages a language model's self-improvement capabilities by framing mathematical theorem proving as a sequential game involving generating a conjecture to be proven, and then proving it, and so forth. The approach consists of two primary steps: first, the authors use a constrained decoding approach to generate mathematically valid conjectures of a target difficulty, treating an arbitrary language model (LM) as a probability distribution over conjectures in a given domain. Then, the generated conjectures are solved using an MCTS-guided policy, which allows for backtracking-based relabeling for improved reward shaping signal during policy learning. Experimental results conducted in the Peano language on three different domains of theorems show that the proposed approach can find increasingly challenging conjectures and train a policy that solves them, and that this learned policy can also solve human-written conjectures of interest.
strength_weakness: strength_weakness: * There is a substantial body of work on the self-improvement of LLMs that I felt was not adequately addressed by the authors. Although I am not familiar with an existing self-improvement approach in the space of FTP specifically, there are numerous works like [1] that allow LLM-generated content to improve themselves. The paradigm proposed in this paper is not exactly the same, but a comparison to and acknowledgement of this related work should be included. The 'mathematical conjecturing' section of the related work could be condensed (or moved to the appendix) in favor of covering this topic that appears to have more recent and relevant literature.
* The MCTS policy and learning approach was a bit light on detail. What exactly is the state for the MCTS policy? What are the details of each operator in the MCTS approach? This information will help the reader understand just how general the approach proposed is for general FTP and not just Peano-based domains. This could be included even in the appendix.
* To the previous point - it would be nice to see the authors include a more thorough discussion regarding if and how their approach could extend to popular theorem proving environments like Coq and Lean. Is it applicable? Why or why not? The strongest addition would be to actually show the approach in one of these environments. I don't think it's necessarily a knock on the approach to be instantiated only in Peano, but the community would greatly benefit from an instantiation of this approach in Coq or Lean, or at least a discussion of how and why this can be done.
* The idea of using the (fixed) learned policy itself to evaluate 'difficulty' of conjectures does not totally inspire confidence in the claims made in the paper. Is there a qualitative analysis for RQ1 that can be done on these conjectures to show that they indeed become harder over time? 

Overall, I think the contribution is novel and of great interest to the community, but I am left unsure about a lot of details regarding the approach and its design decisions. I am happy to increase my score based on the authors' response. 

[1] Language Models Can Teach Themselves to Program Better. Haluptzok et. al. ICLR 2023.
questions: questions: * Later iterations of the policy seem to be a bit worse on (or consider a bit harder) "easy" conjectures, and seem to do better on (or consider to be easier) "harder" conjectures (as evidenced by Fig. 2.)  Why do these further trained policies have more trouble discerning what is "easy" and what is "hard"? Is it just generally 'good' at solving all conjectures? Or would it be useful to have a curriculum-style approach that occasionally asks "easy" conjectures even later in training?
* Why do we start with a randomly initialized Language Model? How does the choice of Language Model affect the performance of conjecture generation?
* I didn't seem to fully understand how the approach chooses a specific difficulty of conjecture generator. I understand where difficulty 'scores' come from, but how do we choose a conjecture based on its difficulty?
* Can the authors provide explanation for if/how to apply the approach to environments like Coq and Lean?
limitations: limitations: Limitations are discussed in the paper but there are some questions about the limitations of the approach and its applicability to other environments (that I have detailed above.)
paper_summary: paper_summary: This work targets the problem of formal theorem-proving, in the particular setting where a learning agent starts only from axioms (contrary to most other works which use models trained on a plethora of mathematics data already) similar to an AlphaZero style setup. They use a single neural model (transformer) to learn to (1) produce conjectures (2) a distribution over proof steps (3) a value function for proof search. In an alternating process, conjectures are sampled from the model using constrained decoding, on which proof search is then attempted, yielding data for further training, with the goal of producing a model capable of generating harder conjectures as its proof-writing ability increases. They also incorporate hindsight relabeling in this setting. The results indicate that the model does learn to generate harder conjectures and become better at proving them. On a set of known theorems from arithmetic and propositional logic, the model is capable of improving as it learns to prove more of the conjectures it generates.
strength_weakness: strength_weakness: 1. Lack of evidence: While conjecturing is a main component of the approach, examples of conjectures provided by the model (at any stage) are not provided neither in the main content nor in the appendix. It is hard to judge the quality of such conjectures or to empirically see an improvement in conjecture difficulty over phases when none are provided.

Similarly, only a single proof is included in the entire submission, in the appendix. It is useful for the reader to get a sense of what kinds of proofs the model is finding, especially amongst each of the three domains, on both extrinsically defined goals and those the conjecturer comes up with.

Additionally, only the propositional logic and arithmetic tasks have an extrinsically defined set of theorems for testing. Why is a similar set not included for the abelian group task? Judging from Figures 2 and 3, the learning dynamics for the group theory task are different than the other two tasks.

2. Conjecturing & intrinsic motivation: It is unclear how much the agent itself is producing conjectures that it is intrinsically motivated to solve. As I understand it, the conjectures are generated via a constrained decoding on the language model, but I'm not sure how much the LM would actually generate conjectures without the constraint after being trained for a while. How much is the conjecturing really improving, given that at the end of each proof search round, only 10% of conjectures are considered hard, 40% easy, and the rest trivial. Perhaps it is better to discretize difficulty based on proof length? 

3. Poor scalability: Even with the modest compute resources as described in the appendix, the tasks are quite simple, as are the extrinsically defined goals, which the model shows improvement on mostly on the arithmetic task sourced from NNG. On the propositional logic task, the model at the end of the fifth policy can only solve 4(?) more of 30 problems as compared to the randomly initialized model from the 0th iteration on the policy.

Some typos I noticed:
1. Line 169: "Mathematically, $\mathcal{C}$ is a function $f_{\mathcal{C} : \Sigma* \to $..." but $\mathcal{C}$ is a set.
2. Line 245: "levarage" -> leverage
3. Figure 2 caption: I think you meant "evaluated"
4. Line 341: "recevies" -> "receives"
5. Line 345: "training tends to collapse to ? by"
questions: questions: 1. Given the simple evaluation domains, the lengths of proofs for conjectures (measured in # of tactics) at the end of each iteration could be a useful indicator for how the both how the proof search improves over time, and how difficult the conjectures become. Can you report numbers measuring problem difficulty as length of proofs? Can you include examples of proofs found over iterations?

2. How often does the conjecturer produce "trivial" conjectures? Do you have any measure as to how sound the completion engine is as iterations proceed? I imagine that the first round of conjectures is entirely random given the model is untrained. Can you include examples of conjectures produced over the iterations?

3. It seems unclear whether this sort of learning in multiple phases is better than just performing one single phase. In AlphaGeometry (https://www.nature.com/articles/s41586-023-06747-5), though geometry is a particularly pointed domain, all data is generated upfront and then a model is trained. In this paper, the extra training data produced from hindsight relabeling is crucial, they indicate on line 336 that the approach does not reach its intended goal without it. Perhaps upfront training may be better? It could be the case that by placing a somewhat more complex distribution on the constrained decoding, one can generate many harder yet valid conjectures without learning a transformer first. Can the authors comment on this?

4. On page 22, Is the supplied full proof for a_succ_add exactly that found by the proof search? For example, is the step "show (= x (+ x z)) by eq_symm" predicted by the model, or just "eq_symm"? Similarly does the model produce "intro x1 : (= (+ (s x) x0) (s (+ x x0)))" or just "intro x1".
If the case of the former, does the Peano language automatically enumerate all relevant types and reachable hypotheses? Otherwise generating a type like "(= (+ (s x) x0) (s (+ x x0))" might make the action space infinite?

5. The performance of the last checkpoint compared to the initial checkpoint on the propositional logic extrinsic set is not very different, can you comment on why this might be the case? That extrinsic set, as specified on page 23, does not seem to be particularly challenging?

6. Sampling conjectures from a small model should be fairly quick. Can the authors comment on how much time is spent generating conjectures and proving conjectures separately? Only the aggregated number is reported in the appendix section A.
limitations: limitations: I believe the authors have adequately addressed the limitations and broader societal impacts of their work.

Comments: title: Thanks for your response
comment: Thank you for your rebuttal, it addressed my questions very well! I keep my positive score.
Thanks for the rebuttal. I keep the score.
I thank the authors for the interesting remarks regarding my question, and the comments about compute requirements. I feel that works like GPT-f and HTPS are on the extreme end of the compute scale, and there are many reasonable works exist that show "good results" with a fairer compute budget. 

The primary concern I have is how to judge an adequate attempt at a highly interesting problem. The results are not particularly convincing, especially when referring to performance on the extrinsic set of problems, and the conjectures generated are closer to "alien math" (which is fine) but also seem to not convey any particularly interesting results, even on a simple level. However, this paper is the first to attempt this conjecturing-proving setup as far as I know. I think the particularly interesting research ideas would be those which show real improvements on this task. Further consideration of this is better done by the metareviewer.

Because the authors have nicely addressed my questions and clarified their work, I have increased my score.
Thank you for the rebuttal, which solves some of my concerns. I'm happy to raise my score.
We sincerely thank the reviewer for engaging with our work and the response! We agree that this discussion on how this setup can connect to existing theorem provers is extremely important for readers. We will expand and include this discussion in the paper. 
We will also include the examples and descriptions from the previous discussion to improve on the original points of confusion you had raised. Thank you again!
We thank the reviewer for reading through our previous response! We're glad it addressed most of your questions.

> While I think this piece is a good initial exploration into this area, ultimately I would feel that the goal should be either to (1) produce systems capable of solving problems interesting to humans or (2) doing "alien" mathematics.

We fully agree that either (1) or (2) would be the most interesting ultimate goals. We would argue that our system is closer right now to "doing alien mathematics", in the sense that it does self-improve and prove thousands of theorems that are not given to it, though these aren't yet of special interest to humans. Doing "deep" alien mathematics (in the sense of developing full mathematical theories about novel mathematical objects) will be possible with library learning - growing a library of lemmas and new definitions. Still, in either case, we would want to understand what it takes to make such alien mathematics "interesting" (aligning or not with human mathematics). We completely concede that we don't close these fundamental questions with this work, but rather open them up for study in a concrete setting with the setup we propose.

> Especially since the compute requirements are quite high to get to the current results.

Our compute requirements are modest compared to prior work that attempts self-improvement in formal mathematics. Each of our runs could be completed in a day on a single academic node, as mentioned in Appendix A. In contrast, expert iteration in prior work (typically in Lean) required a much larger scale to see improvements. For instance, in gpt-f lean [1], each run took "about 2000 A100 days of compute"; this leads to solving 10 extra problems in minif2f. HTPS [2] employed 232 A100s for 7 days for each of their runs in Lean; the improvement from day 2 to day 7 was 29 extra training problems (minif2f-curriculum). Given the small absolute scale of those gains, it seems unlikely that they would be able to measure improvements at all within a day on a single GPU, as we do (> 1000x less compute). Our results could certainly be improved by increasing scale, as our setup is also embarrassingly parallel, but we believe it already allows interesting deep questions to be studied with much less compute.

[1] Polu, Stanislas, et al. "Formal mathematics statement curriculum learning." arXiv preprint arXiv:2202.01344 (2022).
[2] Lample, Guillaume, et al. "Hypertree proof search for neural theorem proving." NeurIPS 2022

> What do you see as a way to structure the learning process to be able to prove all of these held-out theorems. For example, will more training rounds suffice?

This is a really interesting question! While a larger scale (e.g. more rounds, larger batches per round, larger Transformer, more search) could all likely improve the extrinsic results, it would not yet be the most interesting. We think that studying what to reward during self-improvement that maximizes performance in held-out problems will first help make the "scaling law" (improvement x compute) more favorable, for scaling up to then make sense. Here is a notable observation and ideas coming from analyzing our existing runs:

Human mathematicians tend to prefer more general theorems. Our agent doesn't. In fact, the conjecturer often ends up adding unnecessary/unrelated assumptions to the theorem statement as a way to make conjectures harder for the prover, because those add more actions to the action space and thus make search more challenging. There are two possible ideas to mitigate this:
* For the conjecturer, we can reward it when it produces conjectures that generalize previous results (there are simple symbolic strategies for checking whether a theorem A trivially follows from theorem B, by checking whether A is a substitution instance of B), or penalize it when it produces conjectures that trivially follow from previous ones (using the same check).
* For the prover, one could try a related data augmentation strategy, where after proving A, we can synthesize theorems that consist of A with extra assumptions (thus, essentially the same proof still works, after doing 'intro' on the unnecessary assumptions). Training on these would help the prover not find theorems with unnecessary assumptions to be harder, and thus the conjecturer would be discouraged from generating those.

We don't know the effect of either of these strategies yet, but this is the kind of investigation that our setup allows future work to explore. Besides, the RL literature on intrinsic rewards is very rich, and we only scratch the connection here. We will include a discussion of these directions in the paper, emphasizing that should they work here, they can also translate to novel domains (with no pre-existing data).

We thank you again for the thoughtful response. Please let us know if any other questions remain, and we'd be happy to discuss them before the discussion period ends.
Thanks for the detailed response, which has addressed most of my questions.

> Given that our agent is only trained on its own self-generated problems, there is no a priori guarantee that it gets better at solving human-written problems, which are only a very small subset of what is formally true

While I think this piece is a good initial exploration into this area, ultimately I would feel that the goal should be either to (1) produce systems capable of solving problems interesting to humans or (2) doing "alien" mathematics. I feel that the results are not particularly enlightening either way. I think it will take more than straightforward modifications of the learning dynamics to achieve success on, for example, this held-out set of human problems in the arithmetic task. Especially since the compute requirements are quite high to get to the current results.

What do you see as a way to structure the learning process to be able to prove all of these held-out theorems. For example, will more training rounds suffice?
Thanks to the authors for the engaging and detailed response!

>We think Peano's more minimal type system makes it suitable to investigate how to get the self-improving agent to eventually build towards much deeper theorems (making new definitions and a library on the way), and at the point where that works it will pay off to spend the engineering effort to build proof object translators.

I think a discussion of this would be of great use to include in the paper. This is probably more appendix material than main text, but readers will definitely want to know what advantages Peano brings in this specific context and how it could feasibly be extended to existing theorem provers. I highly encourage the authors to include an even more thorough version of this discussion in the paper.

The additional qualitative results are also useful and I hope the authors include these and a few more in the main text, along with a comprehensive analysis of them (which includes the metrics recorded in the general response.)

Conditioned on these points, I am increasing my score. I look forward to the extended discussion that the authors will be adding to the main text.