Research · Results · Report
Abstract proof concepts in a frozen prover.
The written interpretability report for Pythagoras-Prover-4B: what is linearly readable in its activations, where, how strongly, and against which baselines.
Question
What we asked.
Whether a trained prover's internal activations make abstract proof concepts linearly readable — math domain (topical) and tactic (proof structure) — where in the network, how strongly, and whether that beats a general text encoder.
The model is Pythagoras-Prover-4B, a Qwen3-4B derivative with 36 layers and hidden size 2560, run dense at a pinned revision. The method is read-only: probe, classify and complete a concept family on frozen activations, with no gradient and no generation. The probe corpus is the QED Lean-proof corpus.
Every readout is leave-one-out. Chance is measured by a shuffled-label control. The surface literal baseline is reported first. The whitened head fits its dimensionality reduction and its single mean inside each fold, so the held-out row never touches the basis.
Headline findings
Five findings.
- Abstract proof concepts are readable off the frozen prover, with no training. Math domain classifies at 0.95 (6 classes, chance 0.167); tactic from the statement at 0.73 (5 classes, chance 0.20). Both sit far above the surface literal baseline (0.79 and 0.54) and a shuffled-label control at chance.
- On statement properties the prover has only a small edge over a general encoder; on the tactic decision it has a large one. Domain: prover 0.950 against 0.908. Tactic read from the statement: 0.729 against 0.679 — but that is the wrong probe. Read at the mid-proof decision state, the prover predicts its next tactic at 0.867 against 0.643 for a general encoder of the same proof-so-far, an edge of +0.224.
- Concepts sit at modestly different depths, with different shapes. Domain peaks sharply at layer 10 (0.950) and declines to 0.796 by layer 35. Tactic peaks at layer 14 (0.741) as a broad plateau, 0.70–0.74 across layers 12–20. Proof structure is read a little deeper than topic and is more diffuse over depth.
- The representation is a graded continuum, not a hard partition. Same-class rank-fraction is about 0.40–0.43 against a chance of 0.5: local and graded. Classify with a global whitened head and retrieve by graded nearest neighbours; do not carve a partition.
- Distributed, not localized. Domain reads at about 0.93–0.95 across attention, MLP, gate and activated-gate sites at the early-mid block. There is no single magic site.
The central result
Goal versus decision.
Teacher-force each winning Lean proof. At each tactic line, capture the activation at the position that predicts the tactic token — the state before it is emitted, when the model has not yet seen the tactic. That gives 750 balanced decision points across five tactics (apply, rw, exact, simp, intro) from 351 proofs, read at the activated-gate site.
| Probe | Prover | General encoder, same text | Surface literal | Chance |
|---|---|---|---|---|
| Tactic from the statement (the flawed proxy) | 0.729 | 0.679 | 0.535 | 0.20 |
| Tactic from the mid-proof decision state | 0.867 (layer 20) | 0.643 | 0.483 | 0.20 |
Decision-state accuracy by layer: 0.829 at layer 8, 0.825 at 10, 0.839 at 12, 0.833 at 14, 0.848 at 16, and 0.867 at 20 — rising with depth, while the graded rank-fraction tightens from 0.38 to 0.31. The control stays at 0.21. Layers 24–35 were deliberately not probed, to stay out of the near-tautological regime next to the output head.
A model beating a text encoder at predicting its own next tactic is partly expected, because the model is what generates it. The interpretability content is that the decision is linear and mid-network, +0.224 above the surface. See it drawn, with the raw activations →
Statement properties
The dissociation table, with one consistent baseline.
| Concept | Pythagoras | BGE, general encoder | Surface literal | Chance | Prover edge |
|---|---|---|---|---|---|
| Domain (topical) | 0.950 | 0.908 | 0.794 | 0.167 | +0.042 |
| Tactic read from the statement | 0.729 | 0.679 | 0.535 | 0.200 | +0.050 |
Robustness: domain reads 0.950 on seed 0 and 0.929 on a fresh sample (seed 1), a difference of 0.021. Against the QED corpus's own specialised embedding the prover is at parity on domain (0.950 against 0.961).
Depth map
Leakage-free whitened accuracy by layer at the activated-gate site.
| Layer | 0 | 4 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 35 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Domain (chance 0.167, BGE 0.908) | .78 | .82 | .90 | .95 | .94 | .93 | .90 | .90 | .86 | .92 | .86 | .80 |
| Tactic from statement (chance 0.200, BGE 0.679) | .71 | .69 | .69 | .70 | .71 | .74 | .73 | .72 | .72 | .70 | .68 | .68 |
Most readable cells for domain
| Site | Layer | Whitened, leakage-free |
|---|---|---|
| Activated gate | 9 | 0.950 |
| Attention output | 24 | 0.946 |
| Gate | 9 | 0.946 |
| Attention output | 9 | 0.942 |
| MLP output | 10 | 0.940 |
| Residual stream | 12 | 0.938 |
| Post-attention | 32 | 0.825 |
An earlier gap between MLP output (0.858) and attention output (0.929) was sample size — 360 against 480 prompts — not site. With matched data they tie. The fast nearest-centroid grid also mis-ranks cells; it is used only to shortlist, and the whitened head is the readout.
Corrections
Two headlines that did not survive.
Both were published inside this line of work and then withdrawn. They stay in the report because a process that only shows its wins cannot be audited.
Claimed: the prover separates tactic (+0.194 over its baseline) where it does not separate domain — a proof-structure specialisation.
What was wrong: domain had been compared with the corpus's own specialised embedding (0.961), and tactic with a surface literal baseline (0.535). With one general encoder on both, the edge is the same small margin: +0.042 on domain, +0.050 on tactic. The dissociation dissolved. Lesson logged: compare against one consistent, strong baseline before claiming a dissociation.
What was wrong: the whole tactic tranche fed the theorem statement and read its activation, so it measured statement-to-tactic prediction — a property of the goal — and not the model's representation of the tactic. The general encoder's 0.679 confirms it: the statement's math already predicts the tactic.
What replaced it: the decision-state probe above, which reads the model mid-proof at the position that predicts the tactic. That probe flipped the conclusion: the prover does represent proof-relevant tactic structure, and you must read the decision to see it.
Causal check
One direction steers the choice.
Adding a single mass-mean direction to the residual stream at layer 16, at one position, with the dose scaled to the norm of the hidden state. Δp is the mean change in the model's own next-token probability for the target; "flip" is the share of lines whose top token becomes the target. 60 proofs, 285 decision lines, 101 steered lines. Nulls are three equal-energy directions (random, shuffled, orthogonal) at dose 2.
| Target | Dose 1 | Dose 2 | Dose 3 | Nulls at dose 2 |
|---|---|---|---|---|
exact | +0.59 (89%) | +0.74 (99%) | +0.31 (59%) | −0.03 to −0.06 (16–18%) |
simp | +0.14 (40%) | +0.34 (61%) | +0.49 (75%) | −0.02 to −0.03 (18–19%) |
have | +0.26 (50%) | +0.32 (58%) | −0.00 (41%) | −0.01 to +0.04 (24–31%) |
apply | +0.02 (5%) | +0.03 (7%) | +0.00 (11%) | −0.01 to −0.02 (2%) |
rw | +0.04 (8%) | +0.02 (7%) | −0.04 (0%) | −0.02 (1–2%) |
The direction causally steers exact, simp and have well above the nulls, with an inverted-U dose response: past the ceiling the top token degenerates and the model loses the plot. It does not steer apply or rw — the lemma-name family the whitened reading also confuses (apply↔exact 28, rw↔apply 30, simp↔rw 21 of 750). "Next comes a lemma name" appears to be shared between them. Every steered line is on the proof reader →
The proofs
57 recognisable theorems, all proved by the model.
The proof reader shows only proofs the prover wrote and Lean compiled. 47 were selected from the solved ledger for being recognisable: Wilson's theorem, the freshman's dream in ZMod p, Euclid's lemma, Gauss's Σ φ(d) = n, the triangle inequality, the geometric series, the chain rule, Hahn–Banach, and others.
Classics missing from the ledger were then attempted directly: 22 statements in Lean 4 with Mathlib, several heads per target, each head certified by compiling it and checking that its axioms do not include sorryAx.
| Batch | Configuration | Certified |
|---|---|---|
| T1 | Pass@4, no retrieval | 1 of 8 |
| T2 | Pass@6, declaration retrieval | 5 of 7 |
| T3 | Pass@6, declaration retrieval | 4 of 7 |
| Total | 10 of 22 |
Certified: √2 is not a ratio of integers, both De Morgan laws, the contrapositive, Cauchy–Schwarz in two dimensions, AM–GM in squared form, Fermat's little theorem, gcd·lcm = a·b, the pigeonhole principle, and |𝒫(s)| = 2ⁿ — all multi-step, 5 to 22 tactic lines.
Still missing, and reported as such: √2 irrational in statement form, both infinitude-of-primes forms, the Gauss sums, the sum of odd numbers, the geometric sum, AM–GM with a square root, the triangle inequality for |·|, Bernoulli's inequality, the binomial theorem, and "n² even implies n even". These are real prover misses at this sampling budget, not pipeline failures. Retrieval plus six heads lifted the rate from 12% to 71%.
Certification and limits
Auditable, and bounded.
At the located sites (activated gate, domain at layer 9 and tactic at layer 16) the canonical frame fits at 100% energy with reconstruction error near 1e-14, quantises on q = (3, 5, 7, 11), and passes the byte-equal replay gate with a tamper-evident certificate: a doctored bin is rejected. The read is auditable, not just accurate.
See the findings in the activations themselves.
Probe the decision