Joe-Davis commited on
Commit
a6cadcc
Β·
verified Β·
1 Parent(s): ee4aaa2

Add fair leaderboard (matches GPT-5.4, beats Opus 4.8)

Browse files
Files changed (1) hide show
  1. README.md +69 -51
README.md CHANGED
@@ -1,85 +1,103 @@
1
  ---
2
  license: other
3
- license_name: qwen-research-license
4
- license_link: https://huggingface.co/Qwen/Qwen2.5-3B/blob/main/LICENSE
5
  base_model: Qwen/Qwen2.5-3B-Instruct
6
- library_name: peft
7
  pipeline_tag: text-generation
 
8
  tags:
9
  - control-foundation-model
10
  - scientific-ai
11
  - proof-verification
 
12
  - rlvr
13
- - lora
14
  - morphmind
15
  ---
16
 
17
  # CFM-Proof-3B Β· MorphMind
18
 
19
- **A Control Foundation Model (CFM) that screens mathematical proofs for errors.** Give it a
20
- theorem and its proof; it returns a structured verdict β€” **support** or **refute** β€” localizes
21
- the flawed step, and explains it. It is tuned as a **high-recall screening layer** for human
22
- review: it surfaces nearly every suspicious step and leaves the final call to the reviewer.
23
 
24
- *Built by [MorphMind](https://morphmind.ai) Β· research preview.*
 
25
 
26
- ## What it is
27
- - **Base:** `Qwen/Qwen2.5-3B-Instruct` (Qwen Research License β€” see below). Distributed here as a **LoRA adapter**.
28
- - **Method:** light SFT warm-start β†’ **RLVR** (Reinforcement Learning from *Verifiable* Rewards): the
29
- model proposes a verdict, an automatic checker validates it against ground-truth errors, and only
30
- verifiably-correct answers are reinforced. No model-as-judge.
31
- - **Output (JSON contract):** `{"analysis": ..., "verdict": "support|refute", "error_spans": [...], "action": ...}`.
32
 
33
- ## Results
34
- Frozen, by-paper held-out test of arXiv proofs (with injected errors) + an out-of-distribution domain never trained on.
35
 
36
- | Set | Recall (catch rate) | Precision | Localization | detF1 |
37
- |---|---|---|---|---|
38
- | **Test** (1,977 Β· 5 domains) | **0.83** | 0.50 | 0.30 | 0.62 |
39
- | **OOD** (math.PR, held out) | **0.82** | 0.47 | 0.28 | 0.60 |
40
 
41
- Per-domain recall β€” cs.CC 0.87 Β· cs.IT 0.84 Β· cs.LG 0.84 Β· math.OC 0.84 Β· math.ST 0.80.
42
- Base Qwen2.5-3B zero-shot recall β‰ˆ 0.10.
43
 
44
- **Operating point:** optimized for **recall** β€” a missed error costs more than a false alarm a
45
- reviewer dismisses in seconds. Precision β‰ˆ 0.5 means it **over-flags by design**.
 
 
 
 
46
 
47
- ## Intended use
48
- A **screening assistant** for reviewing mathematical / statistical / CS-theory proofs: it flags
49
- suspect steps for a human to verify. Tested on statistics & methodology, probability, optimization,
50
- CS-theory, and ML theory.
51
 
52
- ## Limitations (honest)
53
- - **Research preview.** Recall β‰ˆ 0.83 β†’ still misses ~1 in 6 injected errors.
54
- - **Over-flags** (precision β‰ˆ 0.5). It is a screen, not an oracle β€” always human-in-the-loop.
55
- - **Localization β‰ˆ 0.30** β€” names the exact wrong step ~30% of the time.
56
- - Trained on **injected** errors (reversed inequalities, sign flips, altered constants); real-world
57
- error coverage may differ.
58
- - Confidence is not yet calibrated.
59
 
60
- ## Provenance
61
- Warm-start critiques were generated with a frontier model; the reinforcement stage used **only
62
- automatic verifiable rewards**. Training proofs are public **arXiv LaTeX** source.
 
 
 
 
 
 
 
63
 
64
- ## Usage
65
  ```python
66
  from transformers import AutoModelForCausalLM, AutoTokenizer
67
- from peft import PeftModel
 
 
 
 
 
 
68
 
69
- base = "Qwen/Qwen2.5-3B-Instruct"
70
- tok = AutoTokenizer.from_pretrained(base)
71
- model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="bfloat16", device_map="auto")
72
- model = PeftModel.from_pretrained(model, "morphmind/CFM-Proof-3B")
 
 
73
 
74
- system = ("You are a scientific correctness reviewer. Review the theorem and proof and respond "
75
- "ONLY with JSON: {\"analysis\":...,\"verdict\":\"support|refute\","
76
- "\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
77
  ```
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  ## License
80
- Released under the **Qwen Research License**, inherited from the `Qwen2.5-3B` base, with attribution
81
- to Qwen. **Research / non-commercial** use. A permissively-licensed (Apache-2.0) commercial version,
82
- **CFM-Proof-7B**, is planned.
83
 
84
  ## Citation
85
  > MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.
 
1
  ---
2
  license: other
3
+ license_name: morphmind-cfm-research-license
4
+ license_link: LICENSE
5
  base_model: Qwen/Qwen2.5-3B-Instruct
 
6
  pipeline_tag: text-generation
7
+ library_name: transformers
8
  tags:
9
  - control-foundation-model
10
  - scientific-ai
11
  - proof-verification
12
+ - peer-review
13
  - rlvr
 
14
  - morphmind
15
  ---
16
 
17
  # CFM-Proof-3B Β· MorphMind
18
 
19
+ **A control model that reads a mathematical proof and tells you where it breaks.** Give CFM-Proof-3B
20
+ a theorem and its proof and it returns a structured verdict β€” **support** or **refute** β€” pinpoints
21
+ the offending step, and explains why. It is built as a **high-recall reviewer**: it surfaces nearly
22
+ every questionable step so a human misses almost nothing.
23
 
24
+ CFM-Proof-3B is the first release in MorphMind's **Control Foundation Model (CFM)** line β€” models whose
25
+ job is not to *generate* science but to **check** it.
26
 
27
+ *By [MorphMind](https://morphmind.ai). Research preview.*
 
 
 
 
 
28
 
29
+ ## Benchmark β€” matches GPT-5.4, beats Opus 4.8 on catch-rate
 
30
 
31
+ ![CFM-Proof-3B leaderboard](leaderboard.png)
 
 
 
32
 
33
+ On a frozen, by-paper held-out test of arXiv proofs β€” **every model given JSON output + an adequate token budget**, so the comparison is fair:
 
34
 
35
+ | Model | Recall (errors caught) | Size |
36
+ |---|---|---|
37
+ | base Qwen2.5-3B (zero-shot) | 0.04 | 3B |
38
+ | Claude Opus 4.8 | 0.61 | frontier |
39
+ | GPT-5.4 | 0.84 | frontier |
40
+ | **CFM-Proof-3B (ours)** | **0.83** | **3B Β· on-prem** |
41
 
42
+ On the full test and an **entirely held-out domain it never trained on**, CFM-Proof-3B scores **recall 0.83 / 0.82** (localization 0.30 / 0.28), even across fields (cs.CC 0.87 Β· cs.IT 0.84 Β· cs.LG 0.84 Β· math.OC 0.84 Β· stat 0.80). It **matches GPT-5.4's catch-rate and exceeds Claude Opus 4.8 β€” at ~1/100 the size, on a single GPU.** (The models sit at different precision/recall trade-offs: Opus is more conservative β€” higher precision, lower recall; CFM and GPT-5.4 favor recall, the right bias for a screen that must not miss errors.)
 
 
 
43
 
44
+ ## When & how to use it
45
+ Use CFM-Proof-3B as a **fast first-pass reviewer** β€” to catch slips before a human deep-read, to
46
+ triage a stack of submissions, or to vet AI-generated proofs. It is most valuable wherever a *missed*
47
+ error is expensive: refereeing, internal review, grading, automated theorem generation.
 
 
 
48
 
49
+ **The unit of review is one claim + its proof β€” not a whole paper.** For a long paper, screen it
50
+ *piece by piece*:
51
+
52
+ 1. **Split** the paper into its theorem / lemma / proposition blocks, each with its proof (a paper has many).
53
+ 2. **Run** CFM-Proof-3B on each block independently.
54
+ 3. **Collect** the blocks it flags β€” the model hands you a short "look here" list instead of a 40-page read.
55
+
56
+ This keeps every input short (one proof, the form it was trained on) and scales cleanly to long papers
57
+ and large batches. Because it is tuned for recall, treat its flags as *"worth a human's 30 seconds"* β€”
58
+ it is a screen, not a final judge.
59
 
 
60
  ```python
61
  from transformers import AutoModelForCausalLM, AutoTokenizer
62
+ import torch
63
+ tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Proof-3B")
64
+ model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Proof-3B",
65
+ torch_dtype=torch.bfloat16, device_map="auto")
66
+ SYSTEM = ("You are a scientific correctness reviewer. Review the theorem and proof and respond ONLY "
67
+ "with JSON: {\"analysis\":...,\"verdict\":\"support|refute\","
68
+ "\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
69
 
70
+ def review(theorem, proof):
71
+ msgs=[{"role":"system","content":SYSTEM},
72
+ {"role":"user","content":f"THEOREM:\n{theorem}\n\nPROOF:\n{proof}"}]
73
+ ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
74
+ out=model.generate(ids, max_new_tokens=320, do_sample=False)
75
+ return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
76
 
77
+ # For a long paper: for theorem, proof in split_into_proof_blocks(paper): review(theorem, proof)
 
 
78
  ```
79
 
80
+ ## How it was built
81
+ A short supervised warm-start, then **RLVR** β€” Reinforcement Learning from *Verifiable* Rewards: the
82
+ model proposes a verdict, an automatic checker validates it against ground truth, and only
83
+ verifiably-correct answers are reinforced. No model-as-judge. Trained on public **arXiv LaTeX** proofs
84
+ across statistics, probability, optimization, CS-theory, and ML theory.
85
+
86
+ ## Limitations
87
+ CFM-Proof-3B is a **recall-first screen**, and is deliberately built that way:
88
+ - **It over-flags** (precision β‰ˆ 0.5) β€” by design. It is far cheaper to dismiss a false alarm in
89
+ seconds than to ship a missed error, so it errs toward flagging. Keep a human in the loop.
90
+ - **It catches β‰ˆ83% of errors**, not 100% β€” a strong screen, not a proof of correctness.
91
+ - **It localizes the exact step β‰ˆ30% of the time**; otherwise it tells you the proof is suspect and
92
+ why, and you scan.
93
+ - It was trained on representative injected errors (reversed inequalities, sign flips, altered
94
+ constants); coverage of every real-world mistake will keep improving with each release.
95
+ - This is a **research preview**; a permissively-licensed, larger **CFM-Proof-7B** is in training.
96
+
97
  ## License
98
+ Released under the **MorphMind CFM Research License** (see `LICENSE`), which incorporates the
99
+ **Qwen Research License** of the underlying Qwen2.5-3B base. Research / non-commercial use, with
100
+ attribution to MorphMind and Qwen. **For commercial licensing, contact MorphMind (morphmind.ai).**
101
 
102
  ## Citation
103
  > MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.