GuoxinChen commited on
Commit
d0f4968
·
verified ·
1 Parent(s): 5519623

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -3
README.md CHANGED
@@ -1,3 +1,74 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - Qwen/Qwen3-8B
7
+ ---
8
+ <div align="center">
9
+
10
+ # 🧩 ReForm: Reflective Autoformalization with Prospective Bounded Sequence Optimization
11
+
12
+ <a href="https://arxiv.org/pdf/2502.06205"><img src="https://img.shields.io/badge/Paper-arXiv-d63031?logo=arxiv&logoColor=white"></a>
13
+ <a href="https://huggingface.co/collections/GuoxinChen/reform"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-0984e3"></a>
14
+ <a href="https://github.com/Chen-GX/ReForm"><img src="https://img.shields.io/badge/GitHub-ReForm-black?logo=github"></a>
15
+
16
+ </div>
17
+
18
+ **ReForm** is a reflective **Autoformalization** framework that enables large language models to *generate → verify → refine* formal mathematical statements in an integrated self-corrective loop.
19
+ It introduces **Prospective Bounded Sequence Optimization (PBSO)** — a novel reinforcement learning algorithm designed for heterogeneous rewards at different sequence positions — enabling stable, reflective training and substantial gains in semantic fidelity.
20
+
21
+ ---
22
+
23
+ ## 🚀 Highlights
24
+
25
+ - 🪞 **Reflective Autoformalization Paradigm**
26
+ Turns single-pass translation into an iterative “generate–validate–refine” cycle, allowing the model to autonomously detect and correct semantic errors.
27
+
28
+ - ⚖️ **Prospective Bounded Sequence Optimization (PBSO)**
29
+ A reinforcement learning algorithm with position-specific rewards for both task accuracy and critique quality, ensuring stable and interpretable optimization.
30
+
31
+ - 📈 **State-of-the-art Semantic Consistency**
32
+ ReForm achieves an **average +17.2pp improvement** over the strongest baseline across four formalization benchmarks (miniF2F, ProofNet, Putnam, and AIME 2025).
33
+
34
+ ---
35
+
36
+ <div align="center">
37
+ <img src="https://github.com/Chen-GX/ReForm/raw/main/images/benchmark_comparison.png" width="100%">
38
+ <br>
39
+ <sub><b>Figure:</b> ReForm consistently outperforms Goedel-V2 and Kimina-Autoformalizer on all benchmarks.</sub>
40
+ </div>
41
+
42
+ ---
43
+
44
+ ## 💡 Quick Start
45
+
46
+ ```python
47
+ from transformers import AutoTokenizer, AutoModelForCausalLM
48
+
49
+ model_name = "GuoxinChen/ReForm-8B" # or "GuoxinChen/ReForm-32B"
50
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
51
+ model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
52
+
53
+ prompt = "Think step by step to translate the mathematical problem in natural language to Lean 4, and verify the consistency.\nLet $a_1, a_2,\\cdots, a_n$ be real constants, $x$ a real variable, and $f(x)=\\cos(a_1+x)+\\frac{1}{2}\\cos(a_2+x)+\\frac{1}{4}\\cos(a_3+x)+\\cdots+\\frac{1}{2^{n-1}}\\cos(a_n+x).$ Given that $f(x_1)=f(x_2)=0,$ prove that $x_2-x_1=m\\pi$ for some integer $m.$"
54
+
55
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
56
+ outputs = model.generate(**inputs, max_new_tokens=512)
57
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
58
+ ```
59
+
60
+
61
+ More Details please refer to our [Github Repo](https://github.com/Chen-GX/ReForm).
62
+
63
+ # 📚 Citation
64
+
65
+ If you find ReForm useful for your research, please cite:
66
+
67
+ ```bibtex
68
+ @article{chen2025reform,
69
+ title={ReForm: Reflective Autoformalization with Prospective Bounded Sequence Optimization},
70
+ author={Chen, Guoxin and Wu, Jing and Chen, Xinjie and Zhao, Wayne Xin and Song, Ruihua and Li, Chengxi and Fan, Kai and Liu, Dayiheng and Liao, Minpeng},
71
+ journal={arXiv preprint arXiv:2502.06205},
72
+ year={2025}
73
+ }
74
+ ```