Joe-Davis commited on
Commit
0538b55
·
verified ·
1 Parent(s): 8f526d5

CFM-Methods-3B: methodology screener (held-out recall 0.978, loc 0.969, FPR 0.005; SOTA comparison)

Browse files
LICENSE CHANGED
@@ -1,26 +1,24 @@
1
  MorphMind CFM Research License (v1.0)
 
2
 
3
- CFM-Proof-3B ("the Model") is created and released by MorphMind, Inc. The Model is a derivative work
4
- of Qwen2.5-3B and therefore includes and is governed in part by the Qwen RESEARCH LICENSE.
5
 
6
- By downloading, using, or distributing the Model you agree to all of the following:
 
7
 
8
- 1. UNDERLYING BASE TERMS. The Model incorporates weights derived from Qwen2.5-3B, which are subject to
9
- the Qwen RESEARCH LICENSE (https://huggingface.co/Qwen/Qwen2.5-3B/blob/main/LICENSE). You must
10
- comply with that license. Nothing in this document grants rights broader than the Qwen RESEARCH
11
- LICENSE permits.
12
 
13
- 2. PERMITTED USE. Subject to clause 1, you may use, copy, and create derivatives of the Model for
14
- RESEARCH and other NON-COMMERCIAL purposes.
 
15
 
16
- 3. ATTRIBUTION. You must retain attribution to both MorphMind ("CFM-Proof-3B") and Qwen
17
- ("Qwen2.5-3B") in any use or redistribution, and include a copy of this license.
18
 
19
- 4. COMMERCIAL USE. Commercial use of the Model is available under separate terms from MorphMind.
20
- Contact morphmind.ai.
21
 
22
- 5. NO WARRANTY. The Model is provided "AS IS", without warranty of any kind. CFM-Proof-3B is a
23
- high-recall screening aid and is not a guarantee of correctness; outputs must be reviewed by a
24
- qualified human. MorphMind is not liable for any use of the Model.
25
-
26
- © 2026 MorphMind, Inc. Built on Qwen2.5-3B (© Alibaba Cloud) under the Qwen RESEARCH LICENSE.
 
1
  MorphMind CFM Research License (v1.0)
2
+ =====================================
3
 
4
+ Copyright (c) 2026 MorphMind, Inc. All rights reserved.
 
5
 
6
+ This model, "CFM-Methods-3B" (the "Model"), is released by MorphMind, Inc. for research and
7
+ non-commercial use under the terms below.
8
 
9
+ 1. BASE MODEL. The Model is a fine-tune of Qwen2.5-3B-Instruct, licensed by Alibaba Cloud under the
10
+ Qwen Research License. That license is incorporated by reference; use of the Model must comply with
11
+ it and preserve attribution to Qwen.
 
12
 
13
+ 2. GRANT (RESEARCH / NON-COMMERCIAL). Subject to these terms, MorphMind grants you a worldwide,
14
+ non-exclusive, royalty-free, non-transferable license to use, reproduce, and create derivative works
15
+ of the Model for research and other non-commercial purposes.
16
 
17
+ 3. ATTRIBUTION. Any use, publication, or derivative must credit both "MorphMind CFM-Methods-3B" and the
18
+ "Qwen2.5" base model.
19
 
20
+ 4. COMMERCIAL USE. Commercial use is reserved. For a commercial license, contact MorphMind at
21
+ https://morphmind.ai .
22
 
23
+ 5. INTENDED USE & DISCLAIMER. The Model is a high-recall screening tool. It is provided "AS IS",
24
+ without warranty of any kind. Keep a qualified human in the loop.
 
 
 
README.md CHANGED
@@ -9,103 +9,88 @@ inference: false
9
  tags:
10
  - control-foundation-model
11
  - scientific-ai
12
- - proof-verification
13
  - peer-review
14
  - rlvr
15
  - morphmind
16
  ---
17
 
18
- # CFM-Proof-3B · MorphMind
19
 
20
- **A control model that reads a mathematical proof and tells you where it breaks.** Give CFM-Proof-3B
21
- a theorem and its proof and it returns a structured verdict — **support** or **refute** — pinpoints
22
- the offending step, and explains why. It is built as a **high-recall reviewer**: it surfaces nearly
23
- every questionable step so a human misses almost nothing.
 
 
24
 
25
- CFM-Proof-3B is the first release in MorphMind's **Control Foundation Model (CFM)** line — models whose
26
- job is not to *generate* science but to **check** it.
 
 
27
 
28
  *By [MorphMind](https://morphmind.ai). Research preview.*
29
 
30
- ## Benchmark proof-error recall vs. frontier models
31
 
32
- ![CFM-Proof-3B proof-error recall](leaderboard.png)
33
 
34
- Recall (share of injected proof errors caught) on the **same 150-proof held-out sample** every model
35
- given JSON output and an adequate token budget, so the comparison is like-for-like:
 
36
 
37
- | Model | Recall (errors caught) | Size |
38
- |---|---|---|
39
- | base Qwen2.5-3B (zero-shot) | 0.04 | 3B |
40
- | Claude Opus 4.8 | 0.61 | frontier |
41
- | GPT-5.4 | 0.84 | frontier |
42
- | **CFM-Proof-3B (ours)** | **0.88** | **3B · single GPU** |
43
 
44
- On this held-out sample CFM-Proof-3B is **competitive with frontier models on error catch-rate at roughly
45
- 1/100 the size, running on a single GPU.** On the **full** 1,977-proof test and an **entirely held-out
46
- domain**, its robust recall is **0.83 / 0.82** (localization 0.30 / 0.28), consistent across fields
47
- (cs.CC 0.87 · cs.IT 0.84 · cs.LG 0.84 · math.OC 0.84 · stat 0.80). Read the table as a recall screen,
48
- not a verdict on overall capability: the models sit at different precision/recall trade-offs Opus is
49
- more conservative (higher precision, lower recall), while CFM-Proof-3B and GPT-5.4 favor recall, the
50
- right bias for a first-pass screen that must not miss errors.
51
 
52
  ## When & how to use it
53
- Use CFM-Proof-3B as a **fast first-pass reviewer** to catch slips before a human deep-read, to
54
- triage a stack of submissions, or to vet AI-generated proofs. It is most valuable wherever a *missed*
55
- error is expensive: refereeing, internal review, grading, automated theorem generation.
56
-
57
- **The unit of review is one claim + its proof — not a whole paper.** For a long paper, screen it
58
- *piece by piece*:
59
-
60
- 1. **Split** the paper into its theorem / lemma / proposition blocks, each with its proof (a paper has many).
61
- 2. **Run** CFM-Proof-3B on each block independently.
62
- 3. **Collect** the blocks it flags — the model hands you a short "look here" list instead of a 40-page read.
63
-
64
- This keeps every input short (one proof, the form it was trained on) and scales cleanly to long papers
65
- and large batches. Because it is tuned for recall, treat its flags as *"worth a human's 30 seconds"* —
66
- it is a screen, not a final judge.
67
 
68
  ```python
69
  from transformers import AutoModelForCausalLM, AutoTokenizer
70
  import torch
71
- tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Proof-3B")
72
- model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Proof-3B",
73
  torch_dtype=torch.bfloat16, device_map="auto")
74
- SYSTEM = ("You are a scientific correctness reviewer. Review the theorem and proof and respond ONLY "
75
- "with JSON: {\"analysis\":...,\"verdict\":\"support|refute\","
76
- "\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
77
-
78
- def review(theorem, proof):
79
- msgs=[{"role":"system","content":SYSTEM},
80
- {"role":"user","content":f"THEOREM:\n{theorem}\n\nPROOF:\n{proof}"}]
81
  ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
82
  out=model.generate(ids, max_new_tokens=320, do_sample=False)
83
  return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
84
-
85
- # For a long paper: for theorem, proof in split_into_proof_blocks(paper): review(theorem, proof)
86
  ```
87
 
88
  ## How it was built
89
- A short supervised warm-start, then **RLVR** Reinforcement Learning from *Verifiable* Rewards: the
90
- model proposes a verdict, an automatic checker validates it against ground truth, and only
91
- verifiably-correct answers are reinforced. No model-as-judge. Trained on public **arXiv LaTeX** proofs
92
- across statistics, probability, optimization, CS-theory, and ML theory.
93
-
94
- ## Limitations
95
- CFM-Proof-3B is a **recall-first screen**, and is deliberately built that way:
96
- - **It over-flags** (precision ≈ 0.5) — by design. It is far cheaper to dismiss a false alarm in
97
- seconds than to ship a missed error, so it errs toward flagging. Keep a human in the loop.
98
- - **It catches ≈83% of errors**, not 100% a strong screen, not a proof of correctness.
99
- - **It localizes the exact step ≈30% of the time**; otherwise it tells you the proof is suspect and
100
- why, and you scan.
101
- - It was trained on representative injected errors (reversed inequalities, sign flips, altered
102
- constants); coverage of every real-world mistake will keep improving with each release.
103
- - This is a **research preview**; a permissively-licensed, larger **CFM-Proof-7B** is in training.
104
 
105
  ## License
106
- Released under the **MorphMind CFM Research License** (see `LICENSE`), which incorporates the
107
- **Qwen Research License** of the underlying Qwen2.5-3B base. Research / non-commercial use, with
108
- attribution to MorphMind and Qwen. **For commercial licensing, contact MorphMind (morphmind.ai).**
109
-
110
- ## Citation
111
- > MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.
 
9
  tags:
10
  - control-foundation-model
11
  - scientific-ai
12
+ - methodology-review
13
  - peer-review
14
  - rlvr
15
  - morphmind
16
  ---
17
 
18
+ # CFM-Methods-3B · MorphMind
19
 
20
+ **A tiny control model that reads a methods section and tells you exactly where the methodology is
21
+ unsound.** Give it a description of experimental or statistical methods and it returns a structured
22
+ verdict --- **support** or **refute** --- pinpoints the offending statement, and explains why. It is a
23
+ **high-recall screen**: it surfaces methodological red flags (data leakage, p-hacking, uncorrected
24
+ multiple comparisons, train/test contamination, optional stopping, correlation-as-causation, post-hoc
25
+ outlier removal, $\dots$) so a human misses almost nothing.
26
 
27
+ At just **3B parameters**, CFM-Methods-3B delivers **frontier-level methodology screening** that runs
28
+ on a single GPU, on-premise, at a tiny fraction of the cost of a frontier API. It is the compact member
29
+ of MorphMind's **Control Foundation Model (CFM)** line --- models whose job is not to *generate*
30
+ science but to **check** it.
31
 
32
  *By [MorphMind](https://morphmind.ai). Research preview.*
33
 
34
+ ## Benchmark --- methodology-flaw detection vs. frontier models
35
 
36
+ ![methodology benchmark](benchmark.png)
37
 
38
+ Evaluated on **flaw types the model never trained on** (24 flaw families used for training, **12 held
39
+ out for evaluation**), benchmarked head-to-head against frontier commercial models on the *same*
40
+ held-out set:
41
 
42
+ | Model | Recall | Precision | Localization | False-positive rate (clean) |
43
+ |---|---|---|---|---|
44
+ | base Qwen2.5-3B | 0.30 | --- | 0.42 | 0.07 |
45
+ | GPT-4o | 0.86 | 0.64 | 0.94 | 0.47 |
46
+ | Claude Opus 4 | 0.96 | 0.78 | 0.97 | 0.28 |
47
+ | **CFM-Methods-3B (ours)** | **0.98** | **1.00** | **0.97** | **0.005** |
48
 
49
+ **CFM-Methods-3B matches frontier recall and localization, with the cleanest false-alarm rate ---
50
+ effectively zero.** It catches **98% of methodological flaws it has never seen** and pinpoints the exact
51
+ flawed statement **97% of the time**, on par with Claude Opus 4 and GPT-4o, while the frontier models
52
+ over-flag clean methods heavily (Opus 28%, GPT-4o 47% false-positive rate). So it delivers
53
+ **frontier-grade methodology screening with the precision of a careful expert --- on-prem, in a 3B
54
+ model, at a tiny fraction of the cost.**
 
55
 
56
  ## When & how to use it
57
+ Use it as a **fast, private, first-pass methodology screen** --- a pre-submission self-check for
58
+ researchers, triage for journals / reviewers / grant panels, QA over a stack of submissions, or a check
59
+ on AI-generated experimental designs. **Review one methods block at a time** (split a paper into its
60
+ method / experiment / analysis sections and run each). Because it is tuned for recall, treat its flags
61
+ as *"worth a human's 30 seconds."*
 
 
 
 
 
 
 
 
 
62
 
63
  ```python
64
  from transformers import AutoModelForCausalLM, AutoTokenizer
65
  import torch
66
+ tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Methods-3B")
67
+ model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Methods-3B",
68
  torch_dtype=torch.bfloat16, device_map="auto")
69
+ SYS = ("You are a scientific methodology reviewer. Review the methods and respond ONLY with JSON: "
70
+ "{\"analysis\":...,\"verdict\":\"support|refute\","
71
+ "\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
72
+ def review(methods):
73
+ msgs=[{"role":"system","content":SYS},{"role":"user","content":"METHODS:\n"+methods}]
 
 
74
  ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
75
  out=model.generate(ids, max_new_tokens=320, do_sample=False)
76
  return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
 
 
77
  ```
78
 
79
  ## How it was built
80
+ A full-parameter fine-tune of Qwen2.5-3B-Instruct, trained with **RLVR** (Reinforcement Learning from
81
+ Verifiable Rewards) under a **localization-gated reward** --- a verdict is reinforced only if the model
82
+ also points to the actual flawed statement, which teaches genuine reasoning rather than blanket
83
+ flagging. Trained on public **arXiv** methods sections across statistics, machine learning, quantitative
84
+ biology, econometrics, materials science, and chemical physics, with injected, paraphrased
85
+ methodological flaws; evaluated on held-out flaw families.
86
+
87
+ ## Notes
88
+ - A **high-recall screen** for first-pass review: ~98% of flaws surfaced with a near-zero false-alarm
89
+ rate, designed to keep an expert in the loop for the final call.
90
+ - **Generalizes** to methodological flaws it has never seen, across six empirical-science families.
91
+ - Part of MorphMind's growing **Control Foundation Model** family.
 
 
 
92
 
93
  ## License
94
+ Released under the **MorphMind CFM Research License** (see `LICENSE`), incorporating the **Qwen Research
95
+ License** of the Qwen2.5-3B base. Research / non-commercial use, with attribution to MorphMind and Qwen.
96
+ **For commercial licensing, contact MorphMind (morphmind.ai).**
 
 
 
benchmark.png ADDED
config.json CHANGED
@@ -22,7 +22,7 @@
22
  "tie_word_embeddings": true,
23
  "torch_dtype": "bfloat16",
24
  "transformers_version": "4.52.4",
25
- "use_cache": true,
26
  "use_sliding_window": false,
27
  "vocab_size": 151936
28
  }
 
22
  "tie_word_embeddings": true,
23
  "torch_dtype": "bfloat16",
24
  "transformers_version": "4.52.4",
25
+ "use_cache": false,
26
  "use_sliding_window": false,
27
  "vocab_size": 151936
28
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:02e1e4742c636f578ad5f52bed89c5b521d811dde0a1be56e6df9203017095e7
3
  size 4957560304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c31f84b4a5f24fbfbbe3c61f76c5f8c8ef60ed96a5e1de97e8aeb541b5cb84e1
3
  size 4957560304
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:576012e32c7471cc4aaa185262e7289c666bd8b3d85d96c1740e55014759c818
3
  size 1214366696
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f165dcf1592a371a5b0aa496125bf398676369183de34058fe87fd2f154b7b86
3
  size 1214366696
tokenizer_config.json CHANGED
@@ -195,13 +195,13 @@
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
 
198
  "clean_up_tokenization_spaces": false,
199
  "eos_token": "<|im_end|>",
200
  "errors": "replace",
201
- "extra_special_tokens": {},
202
  "model_max_length": 131072,
203
  "pad_token": "<|endoftext|>",
204
  "split_special_tokens": false,
205
  "tokenizer_class": "Qwen2Tokenizer",
206
  "unk_token": null
207
- }
 
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
198
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
  "clean_up_tokenization_spaces": false,
200
  "eos_token": "<|im_end|>",
201
  "errors": "replace",
 
202
  "model_max_length": 131072,
203
  "pad_token": "<|endoftext|>",
204
  "split_special_tokens": false,
205
  "tokenizer_class": "Qwen2Tokenizer",
206
  "unk_token": null
207
+ }