# Oral 31870

- Kind: Oral
- Talk page and recording: https://iclr.cc/virtual/2025/oral/31870

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Good morning everyone, I'm Jianwen Hu and this is my colleague Thomas. Today we are going to present our community CTX, neural theorem proving with long context. So mini CTX is a context-rich benchmark aimed to evaluating formal math proof under a more realistic setting.
Let's first talk about math. So when we talk about math, we're usually referring to math expressed in natural language, like the proof shown on the right. We sometimes call it informal math because as you can see, informal math is intuitive, it's human readable and also offer extra flexibility for expressions. For example, when we say Px in probability, we sometimes mean two different things. When taking expectation over Px, it is kind of treated as a...
distribution function but when we write out the normal distribution formula explicitly Px becomes a value that is probably density at point X so this ambiguity or sometimes we call it abuse of notation rarely cause confusion for human readers who understand the context well but for models when dealing with automated proof of verification this ambiguity will introduce extra challenges
In contrast to informal math, formal math treats math as soft code, and this transformation turns math statements into a precise and verifiable language, could be verified by computers and run by computers. In the example shown here, informal math system, even the simplest expression like 1 plus 1 requires explicitly write out what the addition is and how to derive the results from those steps explicitly.
So when the proof compiles, it is mechanically verified by the computer as correct. There's no missing gaps and no logic gaps. And during years of development, now we have several formal languages available for people to use, like the Dean Isabel, COC, and Digital Simplicity and Popularity among mathematicians will focus on these projects.
Great. So to reiterate of the formal maths, the maths community have began to embrace formal maths for many years. The most notable example is the liquid tensor experiment posed by Fields Medalist Peter Schultz in December 2020. So the
This challenge involves formalizing a complex proof even Strauss himself cannot be 100% confident in its correctness. So he seeked help from the formal math community and asked the formal math community to verify this proof. And remarkably, after two years of this challenge, the complex proof was verified.
Similarly, another field medalist, Terrence Tao, has been actively involving in formalizing projects like the PFR polynomial framework use of conjecture, which we will discuss more about later.
Recently, machine learning committee also noticed the potential of formal math and do a lot of experiments on them. So formal math, unlike natural language math, have automated verification systems. So we can do a lot of things like data synthesis and reinforced learning based on them. In 2022, OpenAI has published their exploration on the formal math proof generation.
based on curriculum learning and expert generation and last year we are more excited to see alpha proof and alpha geometry team from the deep mind has achieved silver medal standard in IMO the International Maths Olympiad with a formal mass proof and we are seeing more exciting breakthroughs recently and I believe there are a few here at ICLR as well
While these exciting achievements are quite impressive, but it is important to notice that most of them have focused on computational problems from AMC AMI. These problems are carefully crafted to better aid reasoning ability under a controlled environment. So they are self-contained and all use the most basic math techniques, which are good, but...
The real projects differ significantly. In the real projects, the most important difference between computational problems and real projects is the context or dependencies. In the real life projects, seriousness does not exist in isolation. They are interconnected pieces from a much larger math framework. So this is the blueprint of the PFR polynomial frame resolution project.
project formalized by Terrence Tao's group and each green note represents a single theorem that depends on each other. As you can see the complex dependency relationships here means when proving a single theorem, the understanding of the new definitions and new lemmas are quite important. And for the most of time those new definitions and new lemmas articulate elsewhere not in the same file or in the in the same problem.
So this new definition of a lemma of dependency is usually unseen in the training data. Based on this difference, we hypothesize that model performing well on composition problems may not excel in real projects. That's why we need to evaluate on the real project directly.
So, what problem should we evaluate or test on? After examining several of the projects in our GitHub, we picked five diverse categories. The first one is a deep library method for, which contains the most general and fundamental theorem like the mean value theorem, zero theorem. And most of them also serves as the important part of the training data for the deep models. So it's kind of in distribution splits. And for the math project, we picked prime number theorem formalized by Alice.
control of its group and polynomial framework research projects formalized by Terence Tao's group. To address educational scenarios, we include a formalized math textbook, how to prove it by Daniel Wellman. And to address more applications beyond pure math, we include HEPINFO physics and SININFO scientific computing.
So now with all this information, how do we turn those information into a benchmark? Remember which I mentioned the most important difference between competition problems and real projects is the context. So our benchmark should include those contextual information alongside with theorem statements into the benchmark and turn them into a good testing environment. Now I will hand over to my colleague Thomas to discuss more about our benchmark mini-CTX and how do we implement those contextual information.
information. So our task for model is to generate a proof of theorem given the theorem statement and the full set of contextual information. This information includes in-file context, which is the preceding code in the file, including definitions, lemmas, proofs, and comments related to the theorem, and cross-file context, which includes lemmas and definitions outside of the current file that may also be hopeful for the proof.
So specifically we collect problems for mini cities as follows. We sample theorems from recent formal mathematics projects that mathematicians worked on such as the formalization of the polynomial Freiman-Ruja conjecture. We collect about 50 validation and 50 test theorems for each project and each theorem is a problem consisting of the context which includes all preceding code in the current file containing the theorem.
And limits and definitions from other files that may be helpful for the proof. And the theorem statement, which is what we want to prove. The context and theorem statement are given as input to the model, which produces the proof of theorem. This proof is then checked by the lean proof assistant to determine if it is correct. So the first natural question we want to answer is, does contextual information actually matter?
We as a simple experiment, we fine-tune two different language models. The first, no context model ignores all context and only uses the theorem statement to generate the next step of the proof. The second, file context model takes in the preceding code in the file as the context and combines it with the theorem statement to generate the next step of the proof.
Their results show that these two models achieve similar performance on standalone competition problems in an existing benchmark called MiniF2F. However, the file context model achieves much better performance on real world problems in our benchmark. This shows that context is crucial for theorem proving performance and this ability to utilize context is not captured by previous benchmarks that only target competition problems. As an example, we find some theorems that may be difficult for the no context model because it cannot see important information.
Well, the file contents model can utilize things like analogous proofs, natural language comments, and Lemelson definitions in the context to prove a theorem. We also identify some open challenges revealed in our experiments. The first is that we discover that real-world problems, especially those in research math areas, are often much more difficult than the high school competition problems in the existing benchmarks.
Usually proofs of computational problems are always self-contained, using no new lemmas or definitions, and they use simple arithmetic techniques that may be automated by powerful tactics. On the other hand, the proofs in research math usually depend on up to hundreds of previously established facts, such as definitions and lemmas defined in different files, and they may use sophisticated proving techniques that may be much longer.
Another challenge is effectively serializing the theory-improving context for a large language model. The context may include in-file notations, proofs and comments, and cross-file definitions and lemmas. All combined, this spans at least hundreds of thousands of tokens. We found that techniques like retrieval augmented generation partially helps their improving, but it is challenging to combine all these different aspects of the context without overwhelming the model with too much information.
Finally, we plan to periodically update mini's DX with newer themes in order to stay ahead of the large language model training cutoff dates, and we open source our code and evaluation script, and please visit our project page for more information. Thank you very much.
So I had a quick question. So I'm curious on some of the settings that you explored. So you mentioned that for more of these open-ended questions, it's challenging to formulate in the setting you've described earlier. How would you imagine changing your framework to account for some of these more complex settings?
um for open open Yeah, for more open -ended math problems. yeah for those ones i think it is still challenging to describe them but i think uh you can enlarge the action space of the language model in the formal environment environment to make it possible to conjecture new lemmas or or explore proofs that without um actually proposing a proof in the end
