[論文レビュー] LeanDojo: Theorem Proving with Retrieval-Augmented Language Models
LeanDojoはデータ、モデル、ベンチマークを備えたオープンソースの Lean playground を導入し、Leanの数学ライブラリから前提を取得してLLMでの定理証明を改善するリトリーバル拡張の証明器 ReProver を提示します。
Large language models (LLMs) have shown promise in proving formal theorems using proof assistants such as Lean. However, existing methods are difficult to reproduce or build on, due to private code, data, and large compute requirements. This has created substantial barriers to research on machine learning methods for theorem proving. This paper removes these barriers by introducing LeanDojo: an open-source Lean playground consisting of toolkits, data, models, and benchmarks. LeanDojo extracts data from Lean and enables interaction with the proof environment programmatically. It contains fine-grained annotations of premises in proofs, providing valuable data for premise selection: a key bottleneck in theorem proving. Using this data, we develop ReProver (Retrieval-Augmented Prover): an LLM-based prover augmented with retrieval for selecting premises from a vast math library. It is inexpensive and needs only one GPU week of training. Our retriever leverages LeanDojo's program analysis capability to identify accessible premises and hard negative examples, which makes retrieval much more effective. Furthermore, we construct a new benchmark consisting of 98,734 theorems and proofs extracted from Lean's math library. It features challenging data split requiring the prover to generalize to theorems relying on novel premises that are never used in training. We use this benchmark for training and evaluation, and experimental results demonstrate the effectiveness of ReProver over non-retrieval baselines and GPT-4. We thus provide the first set of open-source LLM-based theorem provers without any proprietary datasets and release it under a permissive MIT license to facilitate further research.
研究の動機と目的
- Leanデータを抽出し、Leanとプログラム的に対話するためのオープンで再現可能なツールを提供する。
- ReProver を開発し mathlib から前提を選択して戦術を生成する。
- 前提選択と証明性能を評価する大規模で挑戦的な Lean ベースのベンチマークを作成する。
- リトリーバル拡張が非リトリーバルのベースラインおよび GPT-4 より LeanMath ベンチマークで証明性能を向上させることを示す。
提案手法
- LeanDojo は Lean からランタイム証明データ(状態、戦術、前提)を抽出し、前提名とアクセス情報を完全に付与して Lean を拡張する。
- ReProver は retrieved premises の小さなセットを条件として用いるリトリーバル拡張戦術生成器を使用する。
- Premise retrieval は Dense Passage Retriever に基づき、アクセス可能な前提に制限し、同ファイル内のネガティブ例を使用するなどの強化を行う。
- states+premises から tactic を生成する Finetunes ByT5 エンコーダ-デコーダを訓練し、その後最良探索で証明を行う。
- LeanDojo Benchmark データセットは 98,734 の定理/証明と 130,262 の前提を含み、novel_premises データ分割は一般化を test するために用いられる。
実験結果
リサーチクエスチョン
- RQ1取得した前提を用いたリトリーバル拡張プロンプトは、非リトリーバルベースラインと比較して Lean で対話的定理証明を改善するか?
- RQ2アクセス可能な前提にリトリーブを制限し、ファイル内ネガティブを使用することは前提 recalls および証明成功にどのように影響するか?
- RQ3LeanDojo Benchmark の splits(random vs novel_premises)が新規前提への一般化に与える影響は?
- RQ4ReProver は MiniF2F および ProofNet の外部データセットに対して、重い RL なしの既存手法と比較してどう動作するか?
主な発見
| 方法 | random R@1 | random R@10 | random MRR | novel_premises R@1 | novel_premises R@10 | novel_premises MRR |
|---|---|---|---|---|---|---|
| BM25 | 6.7 | 17.2 | 0.15 | 5.9 | 15.5 | 0.14 |
| 前提をすべて使用 | 1.9 | 11.9 | 0.08 | 2.1 | 12.4 | 0.08 |
| 我々の手法 | 13.5 | 38.4 | 0.31 | 9.1 | 27.6 | 0.24 |
| 前提をすべて使用 | 11.7 | 36.2 | 0.27 | 7.1 | 23.1 | 0.20 |
| ファイル内ネガティブなし | 10.8 | 33.1 | 0.25 | 7.9 | 25.7 | 0.22 |
- ReProver は LeanDojo Benchmark random split で 51.2% Pass@1 を達成し、非リトリーバルベースライン(47.6%)および GPT-4(29.0%)を上回る。
- novel_premises では ReProver は 26.3% Pass@1 を達成、非リトリーバルベースライン(23.2%)および GPT-4(7.4%)を上回る。
- accessible-pr Premises および in-file negatives を用いた前提検索は、例えば Table 1 のように、random での R@1 が 13.5、BM25 は 6.7 というベースラインに対して大幅に recall 指標を向上させる。
- ReProver は MiniF2F のテストセットで 26.5%、ProofNet のテストセットで 13.8% を Lean で証明し、最先端の非 RL 手法と競合し、Lean の証明を欠く何十もの証明を発見する。
- 訓練は単一の GPU でわずか 5 日、評価は 8 GPU で行われ、オープンソースのコード、データ、モデルを MIT ライセンスで公開。
- LeanDojo Benchmark は、数学を中心とした最大級の定理証明データセットのひとつであり、挑戦的な一般化データ分割を強調している。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。