Predicting the Next State Is Not Enough: JEPA Representations for Lean Theorem Proving
Organizations: University of California, Los Angeles
Abstract
Neural theorem provers must both propose tactics and decide which valid successor states to explore. We study whether one-step Lean transitions provide a self-supervised signal for branch ordering. A JEPA-style model predicts latent successor representations and scores only kernel-validated, nonterminal successors generated by a fixed pretrained ByT5 proposer. JEPA achieves higher Top-1 than matched InfoNCE on a same-theorem ranking diagnostic(50.18% versus 31.55%), but averages 282.3 of 987 solved theorems across three seeds versus 308 for proposer ordering, while requiring more tactic checks. In this setting, accurate one-step transition ranking is therefore insufficient as a long-horizon search value. The controlled evaluation separates representation from proposal quality and treats kernel-checked proof completion as the primary endpoint.
Figures & tables
| Same theorem (16) | Cross theorem (64) | |||
|---|---|---|---|---|
| Objective | Top-1 | MRR | Top-1 | MRR |
| Untrained | 0.0708 | 0.1985 | 0.0200 | 0.0825 |
| JEPA | 0.5018 | 0.6423 | 0.7837 | 0.8057 |
| InfoNCE | 0.3155 | 0.4754 | 0.8105 | 0.8422 |
| Search order | Solved | Checks | Wall (s) |
|---|---|---|---|
| Proposer score | 308/987 | 349.92 | 64.62 |
| Progress | 304/987 | 352.99 | 65.31 |
| Untrained | /987 | ||
| InfoNCE | /987 | ||
| JEPA | /987 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Learn predict the recorded successor latent | Audit remove split and retrieval shortcuts | Ablate remove the low-weight contrastive auxiliary | Test allocate a fixed Lean-kernel budget |
| state + tactic train-only byte-BPE | context encoder 6 layers, width 512 | predictor 3 layers, width 768 | predicted latent |
| recorded Lean successor | target encoder EMA, | stop-gradient target | |
| Fixed-budget inference | |||
| pinned ByT5 up to 64 tactics | Lean execution invalid tactics discarded | real successors or completed proof | cosine branch score beam 8, depth 16 |
| Setting | Value | Setting | Value |
|---|---|---|---|
| Tokenizer | byte-BPE, train only | Maximum length | 1,024 |
| Vocabulary / min. frequency | 16,000 / 2 | Encoder layers / heads | 6 / 8 |
| Hidden / feed-forward width | 512 / 1,024 | Projection / predictor width | 384 / 768 |
| Predictor layers / dropout | 3 / 0.15 | Trainable / EMA parameters | 22.7M / 21.5M |
| Epochs / seeds | 10 / 7, 17, 37 | Physical / effective batch | 32 / 512 |
| Learning rate / weight decay | / | Gradient clip / accumulation | 1.0 / 16 |
| Stage | Objective / split | Negatives | Top-1 | MRR | Margin |
|---|---|---|---|---|---|
| Initial large model | cosine, artifact split | 16 | 0.0550 | 0.2027 | |
| Stabilized model | cosine + var. + NCE, artifact split | 16 | 0.8944 | 0.9168 | 0.3054 |
| Clean JEPA | same loss, theorem split | 16 | 0.8862 | 0.9092 | 0.3620 |
| Clean InfoNCE | direct contrastive, theorem split | 16 | 0.9220 | 0.9548 | 0.2874 |
| Split | Transitions | Theorem keys | Either side over 1,024 tokens |
|---|---|---|---|
| Train | 250,814 | 59,557 | 0.38% |
| Validation | 4,260 | 995 | 0.35% |
| Test | 4,506 | 992 | 0.31% |
| Negative scope | Objective | Top-1 | MRR | True cosine | Neg. cosine | Margin |
|---|---|---|---|---|---|---|
| Cross-theorem, 64 | Untrained | |||||
| Cross-theorem, 64 | JEPA | |||||
| Cross-theorem, 64 | InfoNCE | |||||
| Same-theorem, 16 | Untrained | |||||
| Same-theorem, 16 | JEPA | |||||
| Same-theorem, 16 | InfoNCE |
| Objective | Cross Top-1@64 | Cross MRR@64 | Same Top-1@16 | Same MRR@16 |
|---|---|---|---|---|
| JEPA, | ||||
| JEPA, |
| Search order | Solved | Step success | Checks/thm. | Wall s/thm. | Timeouts | Errors |
|---|---|---|---|---|---|---|
| Proposer score | 308/987 | 26.59% | 349.92 | 64.62 | 83 | 0 |
| Progress | 304/987 | 28.26% | 352.99 | 65.31 | 89 | 0 |
| Untrained seed 7 | 294/987 | 25.90% | 353.52 | 66.23 | 90 | 0 |
| Untrained seed 17 | 307/987 | 26.40% | 351.65 | 66.08 | 91 | 0 |
| Untrained seed 37 | 310/987 | 26.16% | 347.91 | 65.65 | 93 | 0 |
| JEPA seed 7 | 284/987 | 25.16% | 364.61 | 66.52 | 84 | 0 |
| Comparator | JEPA solves | success (points) | 95% interval | Wins/losses/ties |
|---|---|---|---|---|
| Proposer score | 6/36/945 | |||
| Progress | 13/35/939 | |||
| Untrained | 12/49/926 | |||
| InfoNCE | 6/20/961 |
| Cross-theorem ranking InfoNCE 81.05% JEPA 78.37% InfoNCE wins | Same-theorem ranking JEPA 50.18% InfoNCE 31.55% JEPA wins | Kernel completion proposer 31.21% JEPA 28.61% proposer wins |
| Gate | Failure condition | Accepted evidence |
|---|---|---|
| Data | split overlap, empty state, source mismatch | 259,580/259,580 exact pairs |
| Ranking | incomplete matrix or negative-pool drift | nine linked checkpoints |
| Kernel | missing key, budget drift, malformed error | 11 conditions, 992 keys each |
| Pairing | unmatched theorem set or seed as sample | theorem-clustered comparison |
| Proof validity | sorry , metavariable, declaration failure | kernel-checked completion |
| Manuscript | placeholder, identifier, unembedded font, cell drift | exact result handoff |
Lean Theorem Proving
Lean theorem proving uses the Lean proof assistant to construct machine-checked mathematical proofs, often with automated search and language models.
See all 123 papers