Causal interpretability of Lean 4 provers across Base, SFT, RL, and multi-turn compiler repair, using Lean's kernel for exact counterfactuals.
I am requesting $30,000 (minimum $8,000) for a 6-month independent research sprint in Shanghai studying how formal theorem provers in Lean 4 represent proof states, consume compiler feedback during multi-turn repair, and change across Base, SFT, and RL training.
Pre-publication note: To protect priority before arXiv submission, specific unpublished pilot measurements, effect sizes, and split diagnostics are withheld from this public page. Vetted Manifund regrantors and donors can email vvauted@gmail.com for private read access to the full audit ledger, pre-registered protocols, and preliminary findings.
In discrete board games like Othello or chess, moves are atomic and there is no external solver. If a sequence model predicts legal moves reliably over long horizons, it has little choice except to track board state in its hidden activations.
Lean 4 provers do not face that constraint. In practice, open-weight provers have two shortcuts that bypass internal kernel simulation:
Outsourcing algebra and logic to decision procedures: Lean tactics like ring, linarith, nlinarith, omega, and simp act as symbolic solvers. For routine subgoals, surface syntax routing is often enough. On harder goals, the real bottleneck is guessing nonlinear witnesses or lemma arguments rather than simulating internal reduction rules.
Externalizing state via explicit have blocks: In step-level search, the REPL prints the updated state back into context. Even in whole-proof generation without compiler echoes, provers heavily emit "have h : T := by ...", writing the intermediate proposition back into the text context so later steps can attend to explicit tokens instead of tracking hidden state across rewrites.
As a result, "formal world modeling" splits into two distinct questions:
A compiler-transition model: tracking variable bindings, hypothesis scope, rewrite effects, and tactic feasibility when intermediate states are not rewritten as explicit have anchors.
A mathematical planning model: deciding which intermediate subgoals advance a proof rather than burning search budget on valid but unhelpful lemmas, and recognizing compiler feedback during multi-turn repair.
Tactic prediction is not a single-label classification problem: tactic arguments, witness instantiation, and dependency structure matter at least as much as the tactic head. Over 180+ pilot experiments and an internal confound-audit ledger across open-weight provers (1.7B to 27B), I found several ways standard mechanistic interpretability methods produce false positives on formal provers:
Search-stopping bias: Logging search trees that stop at the first closing proof puts closing candidates last by construction, creating artificial anti-correlations between policy likelihood and proof closure unless full unpruned candidate pools are evaluated.
Surface and length confounders in supervised probes: Linear probes that look impressive against raw unnormalized log-probabilities often lose their edge once matched against text baselines that include token length, line counts, and multi-line formatting flags, or fail completely when holding out a tactic family like nlinarith.
Protocol and decoding mismatches: Chat vs completion formatting, piecewise UTF-8 decoding bugs on subscripts and Unicode symbols, half-precision (bf16) numerical drift, and unverified checkpoint lineages (mistaking sibling releases from the same base for a parent-child RL pair) can easily fabricate fake stage gaps.
Our public and internal audit work strips out these artifacts by enforcing official model toolchains, deterministic SHA-256 explore/confirm theorem splits (zero cross-split leakage of isomorphic or renamed theorems), fp32 causal checks, and Lean kernel replay as the ground-truth arbiter.
This grant funds systematic confirmatory runs and mechanistic interventions across weight-verified Base, SFT, and RL prover chains (7B to 27B) and multi-turn repair loops, organized around five core questions:
How do provers internally represent Lean state transitions and tactic feasibility, as distinct from surface prompt cues?
What does SFT and RL actually change internally, versus simply shifting sampling distributions and formatting?
What predictive signals exist in activations, sampling consistency, or compiler diagnostics that standard SFT/RL training fails to use?
Can causal interventions on targeted representations or attention paths rescue genuine failure modes?
Can these findings be made training-effective, improving end-to-end proof rates under matched training compute and Lean-verification budgets?
Milestones:
Months 1-2 (Confirmatory Behavioral & Counterfactual Controls): Run pre-registered, Lean-verified counterfactual experiments on our sealed confirm splits covering multi-turn compiler feedback utilization and in-place parameterized tactic feasibility transplantation (with matched shuffle and placebo controls).
Months 3-4 (Cross-Family Mechanistic Localization): Run 4x/8x H100 activation caching, KV-prefix interventions, attention-knockout checks, and weight-diff spectral attribution across 7B to 27B Base, SFT, and RL checkpoints.
Months 5-6 (Training-Time Tests & Open Release): Test whether mechanistic signals translate into equal-budget training improvements on held-out theorems, post an arXiv preprint and LessWrong technical report covering both positive and negative results, and open-source the Lean counterfactual harness and evaluation splits.
Pre-registered empirical rigor: Every reported claim must pass strict explore/confirm separation, matched lexical/random controls, and causal Lean-kernel verification (not probe AUROC alone).
Transparent null reporting: Confirmed negative and methodological confound findings will be published alongside positive mechanisms.
Open infrastructure: Public release of the Lean 4 counterfactual prefix/feedback replay toolkit and evaluation scripts upon arXiv posting.
Working independently in Shanghai keeps living expenses low with zero institutional overhead, putting 64% of the target budget directly into H100 compute:
Living stipend (6 months, Shanghai rent, food, health, local costs at $1,800/mo x 6): $10,800
Cloud GPU compute (4x/8x H100 for 7B-27B activation caching, patching, and confirmatory RL runs at ~$3,200/mo x 6): $19,200
Target funding total (6 months): $30,000
Minimum viable goal (3 months): $8,000 ($5,400 living for 3 months + $2,600 GPU compute to finish confirmatory controls and submit the initial preprint)
I am Shiyuan Zhang (vvauted@gmail.com, https://github.com/Vvauted), an 18+ high-school graduate taking a full-time research gap year in China (NOIP 2023 First Prize).
SphereLab, SLAI (Research Intern, Mar 2026 - Present): Lean 4 and formal-methods specialist working on formal benchmarks, math reasoning training, and prover training; solely led FormalCP (an unpublished 100-problem dual-track Lean 4 competitive-programming and complexity benchmark); co-author of a paper under review at ICLR 2027.
Public Lean 4 projects: Author of Complexity (https://github.com/Vvauted/Complexity, computational-model and certified Word-RAM running-time DSL in Lean 4 + mathlib) and OpLean (https://github.com/Vvauted/OpLean, Zero-TCB Lean 4 verification DSL extending Complexity to GPU operators, auditing 1,506 ROCm/aiter kernels with 5 filed upstream bugs #8890-#8894, 1 decoder crash #11, and 10 Lean-refuted bugs across vLLM, Unsloth, SGLang, FlagGems, and FlashInfer). Also 24 merged PRs in cslib-community/cslib-frontier (Nov 2026) formalizing optimal minimum-spanning-forest components on Word-RAM.
Conflict-of-interest & concurrent grants disclosure: No family or close associates receive funds from this grant. I have concurrent applications with EA Funds (for OpLean and a private unredacted track for formal-interp) and plan a separate Ethereum Foundation ESP proposal (zkVM verification). I commit strictly to zero double-funding of living stipends or compute: if multiple grants succeed, I will sequence work periods sequentially or reduce overlapping budgets. References are available upon request (SLAI SphereLab ICLR 2027 collaborator and cslib-frontier maintainer).
There are no bids on this project.
Comments
No comments yet. Sign in to create one!