NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solving

Tianyun Yang, Yunwen Li, Ziniu Li, Zhihang Lin, Ruoyu Sun, Tian Ding · Submission to ICLR 2026 · Desk rejected

TL;DR

Current multimodal models struggle with geometry problems due to clumsy arithmetic and hallucinated reasoning, while symbolic solvers lack intermediate thinking steps. GF-Reasoner bridges this divide by interleaving natural language chain-of-thought (CoT) with domain-specific formal operators that offload execution to a symbolic geometry solver. By pairing a synthetic 11K dataset with solver-in-the-loop reinforcement learning (RL), a 7B model outperforms specialized geometry systems and frontier models like Qwen2.5-VL-72B and Claude-3.7 Sonnet—while using far fewer tokens.

What Problem Does This Paper Address?

Solving olympiad- or textbook-level geometry problems (Geometry Problem Solving, or GPS) requires visual diagram parsing, theorem selection, and exact algebraic computation. Today’s approaches fall into two flawed extremes:

  1. Pure Natural Language CoT: Vision-language models (LVLMs) hallucinate invalid theorem steps, produce repetitive reasoning loops, and botch numerical arithmetic or cumulative roundings (e.g., approximating $\sqrt{3} \approx 1.732$).
  2. Direct Program Generation: Specialist neural solvers parse problems directly into solver-executable programs. However, jumping straight to code without intermediate scratchpads makes decision-making brittle and opaque, while demanding rigid, pre-formatted problem templates.

Because base models have virtually zero native pre-training exposure to domain-specific geometric domain-specific languages (DSLs), simply zero-shot prompting them to output formal operations fails.

Methods

The authors propose GF-Reasoner, a hybrid reasoning architecture built on top of Qwen2.5-VL-7B-Instruct:

[Diagram + Question] 
   ──> Natural Language Planning & Auto-Formalization (bind variables: N0=7, N1=15)
   ──> Interleaved Operator Invocations (e.g., Gougu V0 N2 N1, Para_Area N0 V0 V1)
   ──> Final Formal Program Block
   ──> SymPy-Based Symbolic Solver ──> Ground-Truth Verification
  1. Auto-Formalization & Interleaved Reasoning: Natural language handles diagram understanding and step-by-step strategy, while explicit formal operators (drawn from a 34-operator geometry DSL) encapsulate geometric theorems (e.g., Gougu for the Pythagorean theorem, RNgon_L_Area for regular polygons). Intermediate states are bound to process variables ($V$) and input values ($N$).
  2. Bidirectional Synthetic Data Generation:
  3. Forward Synthesis: For datasets lacking ground-truth formal programs, strong LVLMs generate interleaved trajectories guided by specifications and demonstrations, filtered by solver execution.
  4. Backward Synthesis: For datasets annotated with final programs, the prompt includes the ground-truth program, and the model reconstructs the rationalizing chain-of-thought backwards.
  5. Two-Stage Training Recipe:
  6. Stage 1 (Cold-Start SFT): Supervised fine-tuning on 11k synthetic trajectories teaches syntax, operand binding, and interleaving grammar.
  7. Stage 2 (Solver-in-the-Loop RL): Models are optimized using Group Relative Policy Optimization (GRPO) with a binary outcome reward (+1 if the symbolic solver evaluates the emitted code to the correct numerical answer, 0 otherwise).

Datasets

  • Training Sets: SFT uses 11k synthetic chains (5k from PGPS9K, 2.2k from UniGEO, and 3.8k from Geo170k). RL post-training leverages 19.5k problems (8k PGPS9k, 3.5k UniGEO, 8k Geo170k).
  • Evaluation Benchmarks: Evaluated on the test splits of PGPS9K and UniGEO, along with cross-domain visual math benchmarks: the plane geometry subsets of MathVista and MathVerse (testmini splits converted to free-form generation to remove multiple-choice bias).

Key Insights and Ideas

  • Interleaving Enables Test-Time Search: Passing intermediate variables through natural-language context enables local knowledge chaining. Interleaved CoT matches non-CoT formal generation on Pass@1, but beats it on Pass@8 by a wide margin, demonstrating far superior solution-space exploration.
  • Conciseness via Symbolic Offloading: Rather than describing multi-step polygon decomposition in dozens of tokens, calling a single domain operator (like RNgon_L_Area) collapses lengthy derivations into compact expressions, drastically lowering token consumption compared to long-thinking models.
  • Moderate SFT Unlocks RL Potential: Over-training during the SFT phase (e.g., 8 epochs) collapses policy entropy and kills response diversity, stunting later RL progress. A brief 2-epoch cold start gives the highest downstream RL performance (+26% Pass@1 gain over SFT alone).
  • Binary Outcome Rewards are Sufficient: Adding a process reward that checks formal syntax validity provided no measurable benefit over binary execution rewards, as multi-sample GRPO already provides implicit partial credit.

Key Results

  • Dominating Specialists and Generalists: GF-Reasoner (7B) achieves 68.7% on PGPS9K and 72.7% on UniGEO, outperforming specialized baselines (GeoX at 52.7% / 54.4%, PGPSNet at 44.4%) and larger general models (Qwen2.5-VL-72B at 53.3% / 67.9%, Claude-3.7 Sonnet at 53.7% / 47.2%, GPT-4o at 50.9% / 43.9%).
  • Scaling Up: Scaling the base model to Qwen2.5-VL-32B yields 82.1% on PGPS9K, closing in on frontier closed models like GPT-5 (85.8%) and Gemini 2.5 Pro (83.3%).
  • Error Reductions: Compared to pure natural language reasoning, interleaved formal CoT drops reasoning errors from 23.0% to 14.3% and virtually eliminates numerical calculation errors (dropping from 1.7% to 0.3%).

Limitations and Future Work

  • Auxiliary Line Construction: The framework currently cannot perform diagrammatic alterations (e.g., drawing auxiliary lines or geometric projections).
  • Single-Turn Execution: Training relies strictly on post-generation terminal execution; it lacks multi-turn interactive execution feedback, environment rollbacks, or test-time dynamic error correction.
  • Visual Resolution Bottlenecks: Tiny diagram annotations still trigger visual perception failures, though the authors note simple 2× digital zooming reduces perception errors from 8.0% to 6.0%.

Summary updated

BibTeX
@misc{yang2025bridging,
  author = {Tianyun Yang and Yunwen Li and Ziniu Li and Zhihang Lin and Ruoyu Sun and Tian Ding},
  title = {{Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solving}},
  year = {2025},
  eprint = {2508.09099},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.09099},
}
Figure