File size: 11,982 Bytes
ded1676
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
af3fbeb
 
ded1676
af3fbeb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
858b853
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
---
language:
- en
tags:
- lean
- theorem-proving
- graph-neural-network
- actor-critic
- reinforcement-learning
- mcts
- mathlib
---

# Lean Proof Search β€” Actor–Critic Checkpoints and Deployment Bundles

This repository hosts versioned checkpoints and matched serving artifacts for
Lean theorem proving with a source-aware graph neural network policy and an
actor–critic reinforcement-learning pipeline.

The application supports PUCT Monte Carlo tree search and best-first search.
Optional Probabilistic Logic Networks (PLN) provide additional search guidance.
Candidate proofs must pass the application's replay and Lean kernel-certification
process before being reported as certified successes.

Application source:
https://github.com/iCog-Labs-Dev/Mathematics-ai-atp/tree/MCTS-AC-branch

## Model architecture

The source-aware policy combines:

- A graph encoder for normalized Lean proof-state expressions.
- A tactic-prediction head.
- An explicit argument-count head.
- A GRU argument decoder.
- A source-selection head that chooses local context or external library
  arguments.
- Local-declaration selection and retrieved-library candidate scoring.
- A critic that estimates proof-state value for reinforcement learning.

External premises are retrieved through a matched text encoder and lemma index.
The policy checkpoint, graph vocabularies, query encoder, lemma vectors, and
declaration inventory must be used as a compatible deployment set.

These checkpoints are used through the project's custom inference and search
code. They are not standalone Transformers text-generation models.

## Training and checkpoint provenance

The supervised initialization supplied for this work used a joint source-aware
policy followed by local-selection refinement. Its matched retrieval artifacts
come from the epoch-5 retriever and index.

Published RL releases may differ in:

- Starting checkpoint and selected final checkpoint.
- Search algorithm: PUCT or best-first.
- Whether PLN guidance was enabled.
- Training rounds, search budgets, and evaluation settings.
- Checkpoint selection: periodic-evaluation best or final saved checkpoint.

Consult each release manifest and accompanying release notes for its identity.
The serving configuration records search settings but is not a complete
training experiment report.

A checkpoint trained using PUCT can also be searched using best-first, provided
the model and runtime interfaces remain compatible. The search algorithm is a
runtime configuration rather than a separate neural-network architecture.

## Repository organization

`main` contains the repository overview. Published serving bundles live on
versioned branches such as `v1.0.0`.

Each release uses this directory structure:

```text
deployments/mcts/<version>/
β”œβ”€β”€ release.json
β”œβ”€β”€ README.md
β”œβ”€β”€ artifacts/
β”‚   β”œβ”€β”€ checkpoint.pt
β”‚   β”œβ”€β”€ prepared/
β”‚   β”œβ”€β”€ query/
β”‚   β”œβ”€β”€ index/
β”‚   β”œβ”€β”€ lemmas.jsonl
β”‚   └── declarations.json
└── config/
    β”œβ”€β”€ rl.json
    └── service.json
```

The `mcts` directory is the deployment format's fixed namespace. It can contain
a release configured for either PUCT or best-first search.

The bundle includes:

| Component | Purpose |
| --- | --- |
| Actor–critic checkpoint | Trained policy and critic parameters, with any retained checkpoint metadata |
| Prepared metadata | Matching graph representation and node/tactic vocabularies |
| Query artifact | Exported query encoder, tokenizer, and configuration |
| Lemma index | FAISS index, vectors, lemma IDs/names, and identity manifests |
| Lemma corpus | Matched external-premise records |
| Declaration inventory | Available Lean declarations, exclusions, and environment identity |
| Serving configuration | Container paths and service/search configuration |
| Release manifest | File sizes, SHA-256 checksums, artifact bindings, and recorded provenance |

Compiled Lean/Mathlib, the custom REPL, Python dependencies, and the PLN runtime
are supplied separately by the compatible application runtime or Docker image.

## Download and verify a release

Use the downloader from the compatible application checkout:

```bash
python -m maths_ai.gnn_inference.scripts.fetch_mcts_deployment \
  --repo iCogLabs-Dev/Lean-Proof-Search-Checkpoints \
  --revision FULL_HUGGING_FACE_RELEASE_COMMIT \
  --version v1.0.0 \
  --manifest-sha256 RELEASE_JSON_SHA256 \
  --output "$HOME/mcts-deployments/v1.0.0"
```

Replace the commit, version, and manifest checksum with the identifiers provided
by the release publisher. Pin the full immutable Hugging Face commit for
reproducible deployment.

The downloader verifies file hashes and model/retrieval bindings. The application
also checks Lean environment compatibility at startup.

A private repository requires Hugging Face authentication with read access.

The downloaded output is a symlink to a persistent sibling backing directory.
Retain both; deleting the backing directory breaks the deployment.

## Serving and evaluation

The application's FastAPI service exposes single-goal proving, dataset
evaluation jobs, and health/readiness checks.

Search profiles select PUCT or best-first search and may enable PLN. Proposal
generation supports greedy or sampled modes where configured.

Docker deployment mounts the verified bundle's `artifacts/` directory at
`/artifacts` and its `config/` directory at `/config`.

See the application deployment guides:

- https://github.com/iCog-Labs-Dev/Mathematics-ai-atp/blob/MCTS-AC-branch/docker/HUGGING_FACE_DEPLOYMENT.md
- https://github.com/iCog-Labs-Dev/Mathematics-ai-atp/blob/MCTS-AC-branch/maths_ai/gnn_inference/docs/mcts_hugging_face_deployment.md

PLN-enabled profiles additionally require the provisioned PeTTa/SWI-Prolog
runtime. PLN scores guide search; they do not replace Lean proof checking.

## Evaluation and interpretation

No aggregate proof-rate improvement is asserted by this model card.

Meaningful comparisons should report:

- Evaluation dataset and exact theorem cohort.
- Base and RL checkpoint identities.
- Search algorithm and proposal mode.
- PLN setting.
- Time, node, depth, simulation, and memory budgets.
- Random seeds.
- Kernel-certified successes and operational failures.

Results from different theorem cohorts or search budgets do not establish a
controlled comparison. Training solve rates should be distinguished from
held-out evaluation results.

## Limitations

- Search is bounded and may fail to find an existing proof.
- Dataset starting states require sufficient Lean context for reconstruction.
- Tactic and argument proposals can be invalid or unsupported.
- Retrieval depends on the supplied corpus and deployed Lean environment.
- A model prediction or graph-level solved candidate is not itself a certified
  proof.
- Certification establishes a proof of the admitted Lean starting statement;
  it does not independently establish that dataset reconstruction preserved the
  intended original theorem.
- Matching runtime artifacts are required; arbitrary REPL or Mathlib replacements
  may invalidate the deployment binding.
- The serving bundle is not a complete training-resume archive.
- Checkpoints may contain optimizer state and other retained training metadata.
  PyTorch checkpoint loading can execute pickle content; load only trusted files.

<!-- deployment-v1.0.2-start -->
## Deployment: v1.0.2

Selected best.pt from PUCT+PLN training run 20261108-083020.
This is a serving bundle, not a complete training-resume archive.

| Identifier | Value |
|---|---|
| Repository | `iCogLabs-Dev/Lean-Proof-Search-Checkpoints` |
| Version | `v1.0.2` |
| Artifact commit | `264df74f6abb33e19a5467664699ad07eb955d89` |
| Manifest SHA-256 | `ed08e144022c6faf6a565d8e706371a8539bf406f9a756553e6ac42682033fa5` |
| Application commit | `2271bdb346d05b749bce773e55a962a6c810acb7` |

[Browse the pinned release](https://huggingface.co/iCogLabs-Dev/Lean-Proof-Search-Checkpoints/tree/264df74f6abb33e19a5467664699ad07eb955d89/deployments/mcts/v1.0.2).

### Compatible runtime

Use application commit `2271bdb346d05b749bce773e55a962a6c810acb7` and its Dockerfile and locked dependencies.
The image supplies Lean, the custom Pantograph REPL/client, Mathlib, and PLN.
The REPL source identity and compiled Mathlib must match the declaration inventory.

[Docker deployment guide](https://github.com/iCog-Labs-Dev/Mathematics-ai-atp/blob/2271bdb346d05b749bce773e55a962a6c810acb7/docker/HUGGING_FACE_DEPLOYMENT.md).

### Download and verify

From that application checkout, in its installed Python environment:

    python -m maths_ai.gnn_inference.scripts.fetch_mcts_deployment \
      --repo iCogLabs-Dev/Lean-Proof-Search-Checkpoints \
      --revision 264df74f6abb33e19a5467664699ad07eb955d89 \
      --version v1.0.2 \
      --manifest-sha256 ed08e144022c6faf6a565d8e706371a8539bf406f9a756553e6ac42682033fa5 \
      --output "$HOME/mcts-deployments/v1.0.2"

Keep both the downloaded directory symlink and its hidden sibling backing directory.

### CPU or GPU serving

After building the matching image, mount the downloaded directories:

    export MATHS_AI_ARTIFACTS="$HOME/mcts-deployments/v1.0.2/artifacts"
    export MATHS_AI_CONFIG="$HOME/mcts-deployments/v1.0.2/config"

For CPU:

    MATHS_AI_DEVICE=cpu docker compose up -d mcts-api

Alternatively, on an NVIDIA-capable Docker host:

    MATHS_AI_DEVICE=cuda:0 docker compose --profile gpu up -d mcts-api-gpu

Choose one service. Both use the same artifacts.
Mount paths must be accessible to the Docker daemon.

Verify /ready and a kernel-certified /prove result after startup.
Successful upload does not establish successful Docker or GPU execution.
<!-- deployment-v1.0.2-end -->

<!-- deployment-v1.0.3-start -->
## Deployment release: v1.0.3

This serving release contains the selected `best.pt` from the 100-round
PUCT/no-PLN training run `20261112-143713`.

Publisher-reported miniF2F validation result: **63/244 (25.82%)**, using
PUCT with 512 simulations, a 512-node limit, and PLN disabled.
This is an evaluation of the selected checkpoint, not an additional
training update.

| Identifier | Value |
|---|---|
| Artifact repository | `iCogLabs-Dev/Lean-Proof-Search-Checkpoints` |
| Release version | `v1.0.3` |
| Immutable artifact commit | `1a48c749c9b2ec4b0f20d087998569243198db92` |
| SHA-256 of release.json | `bafeb8c930ac1d6837e12afc5dc3f06ccfc589bc3efaa9c7605028cdc04e1223` |
| Application Git commit | `60e4d2bc854c60abdf2a9d0928e902a1c21f0aef` |
| Custom client version | `0.7.0` |
| Custom REPL source commit | `46a33e1c4e311cdc03ff1a2baa8eaeb36a69ff40` |

[Browse the pinned release](https://huggingface.co/iCogLabs-Dev/Lean-Proof-Search-Checkpoints/tree/1a48c749c9b2ec4b0f20d087998569243198db92/deployments/mcts/v1.0.3).

### Compatible runtime

Use the application commit above and its pinned dependencies and Dockerfile.
The runtime must match the release's declaration inventory and environment
bindings. Downloading the artifacts does not install the runtime.

[Docker deployment instructions](https://github.com/iCog-Labs-Dev/Mathematics-ai-atp/blob/60e4d2bc854c60abdf2a9d0928e902a1c21f0aef/docker/HUGGING_FACE_DEPLOYMENT.md).

### Download and verify

From the compatible application checkout, with its dependencies installed:

```bash
python -m maths_ai.gnn_inference.scripts.fetch_mcts_deployment \
  --repo iCogLabs-Dev/Lean-Proof-Search-Checkpoints \
  --revision 1a48c749c9b2ec4b0f20d087998569243198db92 \
  --version v1.0.3 \
  --manifest-sha256 bafeb8c930ac1d6837e12afc5dc3f06ccfc589bc3efaa9c7605028cdc04e1223 \
  --output "$HOME/mcts-deployments/v1.0.3"
```

The downloader verifies the complete file hashes. The uploader checked
manifest bytes and remote file sizes. Upload completion does not establish
that a Docker or GPU deployment has passed a smoke test.

This is a serving bundle, not a complete training-resume archive.
<!-- deployment-v1.0.3-end -->