Abstract
Solving geometry problems remains a significant challenge for Large Vision Language Models (LVLMs), which often struggle with diagram interpretation and numerical precision. We present GF-Reasoner (Geometric Formal Reasoner), a framework that integrates natural language Chain-of-Thought (CoT) with executable formal geometric code. By utilizing a bidirectional data synthesis method and solver-integrated Reinforcement Learning (RL), GF-Reasoner achieves state-of-the-art performance on geometry benchmarks. Notably, our 7B model outperforms models ten times its size, such as Qwen2.5-VL-72B, while maintaining high interpretability and token efficiency.
Introduction
Geometry Problem Solving (GPS) requires a unique combination of visual perception, logical deduction, and algebraic calculation. Current LVLMs typically follow one of two paths: natural language reasoning, which is flexible but prone to calculation errors, or pure formal language generation, which is precise but lacks the robustness and interpretability of human-like reasoning.
As shown in the comparison above, pure natural language models often fall into repetitive loops or hallucinations, while pure formal solvers can fail if a single intermediate step is missing. GF-Reasoner addresses this by interleaving natural language "thoughts" with formal "operators" that a symbolic solver can execute, ensuring both logical flow and numerical accuracy.
Methodology
GF-Reasoner is built upon the Qwen2.5-VL-7B architecture and trained through a specialized three-stage pipeline designed to harmonize symbolic precision with linguistic flexibility.
Formal-Integrated CoT (FI-CoT) Synthesis
To overcome the scarcity of high-quality interleaved data, we employed a Bidirectional Synthesis strategy. While "Forward Synthesis" prompts models to solve problems from scratch, "Backward Synthesis" starts with a verified formal program and tasks the model with reconstructing the natural language reasoning path. This ensures the resulting training data is both logically sound and grounded in executable code.
Moderate Supervised Fine-Tuning (SFT)
The model is first fine-tuned on 11,000 synthetic FI-CoT samples. A key finding of our research is the Moderate SFT Principle: excessive fine-tuning (e.g., 8 epochs) can collapse the model's output distribution, hindering its ability to explore diverse reasoning paths during subsequent reinforcement learning. We found that 2 epochs provide the optimal balance, teaching the model the formal syntax (comprising 34 operators and 55 operand types) without sacrificing creativity.
Solver-Integrated Reinforcement Learning
The core of GF-Reasoner's precision comes from Solver-Integrated RL using the Group Relative Policy Optimization (GRPO) algorithm. During this phase, the model explores various reasoning traces. A symbolic solver (based on SymPy) executes the generated formal code; if the output matches the ground truth, the model receives a positive reward. This "solver-in-the-loop" mechanism forces the model to refine its internal logic to produce executable, correct solutions.
Key Results and Insights
GF-Reasoner demonstrates significant improvements across standard GPS benchmarks, including PGPS9k and UniGeo.
- Superior Performance at Scale: The 7B GF-Reasoner achieved 68.7% accuracy on PGPS9k, significantly outperforming the Qwen2.5-VL-72B baseline (53.3%).
- Zero Calculation Errors: By offloading complex trigonometry and arithmetic to a symbolic solver via formal operators (e.g.,
Cos_Law), the model effectively eliminates the computation errors that typically plague LLMs. - Token Efficiency: Formal language is inherently dense. GF-Reasoner achieves higher accuracy with significantly shorter output lengths compared to "thinking" models like Vision-R1, making it more efficient for real-world deployment.
Conclusion and Future Work
GF-Reasoner successfully bridges the gap between the intuitive reasoning of natural language and the rigorous precision of formal systems. While the current framework excels at calculation-heavy geometry, future iterations will focus on enabling the model to propose auxiliary constructions and implementing multi-turn interactions where the model can adjust its strategy based on intermediate feedback from the solver.
Paper Link: https://github.com/TianyunYoung/GF-Reasoner
Summary updated