Multimodal geometry reasoning requires models to jointly understand visual diagrams and perform structured symbolic inference, yet current vision--language models struggle with complex geometric constructions due to limited training data and weak visual--symbolic alignment. We propose a pipeline for synthesizing complex multimodal geometry problems from scratch and construct a dataset named GeoCode, which decouples problem generation into symbolic seed construction, grounded instantiation with verification, and code-based diagram rendering, ensuring consistency across structure, text, reasoning, and images. Leveraging the plotting code provided in GeoCode, we further introduce code prediction as an explicit alignment objective, transforming visual understanding into a supervised structured prediction task. GeoCode exhibits substantially higher structural complexity and reasoning difficulty than existing benchmarks, while maintaining mathematical correctness through multi-stage validation. Extensive experiments show that models trained on GeoCode achieve consistent improvements on multiple geometry benchmarks, demonstrating both the effectiveness of the dataset and the proposed alignment strategy. The code will be available at https://github.com/would1920/GeoCode.
Figures & tables
Figure 1: Motivation of our work. We address the limitations of implicit visual–symbolic alignment and low structural diversity and low problem difficulty in current geometry datasets by synthesizing problems from scratch and supervising models with plotting code for explicit structural grounding.
Figure 2: Overview of the data generation pipeline. Our framework factorizes synthesis into three verifiable stages: (1) Seed Generation for symbolic relational structures, (2) Instantiation for numerical grounding and meta-code generation, and (3) Visualization for diagram rendering and textual debiasing.
Figure 3: Plotting code as explicit alignment. Instead of relying on lossy linguistic descriptions, we utilize structured plotting code as an intermediate representation to couple visual perception with symbolic reasoning.
Figure 4: Exemplary data generation and model inference. The left panel illustrates the end-to-end synthesis process: from Symbolic Seed to Template-based Translation, followed by the Numerical Question, its corresponding Plotting Code, the Debiased Problem statement, and the finally rendered Diagram. The right panel showcases a real-world Inference Example, demonstrating the model’s ability to perform structured reasoning and code-based grounding during testing.
Segments
Annotations
Circles
Proof
15.03
1.94
0.14
Solution
14.09
3.24
0.19
Table 1: Structural statistics of proof-based and solution-based geometry problems.
Benchmark
Gemini-2.5-Pro
GPT-5
Qwen3-VL
Geometry3K
77.04
79.03
68.89
GeoQA
92.04
91.91
86.60
OlympiadBench
75.22
75.50
54.46
Test-mini
40.67
42.16
31.72
Table 2: Performance comparison of models on geometry benchmarks. Qwen3-VL stands for Qwen3-VL-32B-Thinking.
Model
Setting
Geometry3K
MathVerse
MathVista
GeoQA
OlympiadBench
Test-mini
Qwen3-VL-7B-Instruct
Baseline
58.57
63.33
83.19
83.16
45.82
17.91
Ours
60.07
65.10
84.45
84.21
57.34
26.49
Δ
+1.50
+1.77
+1.26
+1.05
+11.52
+8.58
Qwen2.5-VL-7B-Instruct
Baseline
33.90
37.64
60.92
62.60
5.76
4.48
Ours
40.09
46.08
57.56
66.44
6.63
13.06
Δ
+6.19
+8.44
-3.36
+3.84
+0.87
+8.58
Table 3: Benchmark performance (%) of Instruct models before and after training on our dataset. Δ denotes absolute improvement of Ours over the original baseline.
Model
Base
+SFT
+GRPO
Qwen3-VL
48 (17.91)
71 (26.49)
101 (37.68)
Qwen2.5-VL
12 (4.48)
35 (13.06)
55 (20.52)
Table 4: Accuracy on the held-out Test-mini set. Models are evaluated under three training stages: original pretrained backbones (Base), SFT on our synthetic dataset, and reinforcement learning with standard GRPO built upon the SFT models.
Stage
Rejected Samples
Semantic validation
10,510
Geometric verification
4,171
Plotting execution
2,017
Image quality filter
423
Total rejected
17,121
Final retained
18,176
Table 5: Detailed rejection statistics during the multi-stage validation pipeline.
Alignment Setting
Test-mini (%)
Geometry3K (%)
A. None
17.91
58.57
B. Caption
19.78
58.74
C. Caption + Debias
20.52
59.07
D. Code
22.01
59.57
E. Code + Debias
26.49
60.07
Table 6: Comparative analysis of alignment supervision strategies.
Figure 5: Solving accuracy and segment-level structural recovery quality on Test-mini. Samples are grouped into four equal-sized bins according to segment-level F1 between predicted and ground-truth plotting code.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: Diagnostic analysis of code-based alignment quality on Test-mini. Left: Successful execution (parsing) of plotting code shows little correlation with final solving accuracy. Right: Structural correctness of predicted annotation is strongly correlated with solving performance, indicating that faithful geometric reconstruction is the key factor affecting downstream reasoning.
Dataset
Test Set Size
Geometry3K
601
GeoQA
754
OlympiadBench
347
MathVerse
510
MathVista
238
Appendix
Table 7: Test set sizes for geometry-focused subsets extracted from each benchmark.
Figure 7: GRPO reward curves for different backbones. Qwen2.5-VL [ 40 ] (left) exhibits slower reward growth with larger fluctuations, while Qwen3-VL [ 36 ] (right) shows a more stable and monotonic improvement, indicating stronger geometric reasoning ability and better alignment with our hard, structurally complex data.
Model
Baseline
OOD
Ours
Δ (Ours–OOD)
Qwen3-VL-Instruct
83.16
84.21
89.66
+5.45
Qwen2.5-VL-Instruct
62.60
66.44
68.83
+2.39
Appendix
Table 8: Extending our pipeline with text-seeded synthetic data on GeoQA. “Baseline” denotes the original pretrained backbones, “OOD” denotes training only on our synthetic dataset, and “Ours” further augments training with data synthesized by feeding real textual problem statements into our instantiation and visualization stages. The extended pipeline yields consistent gains for both backbones, indicating that our method can effectively adapt to existing geometry corpora and narrow the domain gap.
Figure 8: Predicate statistics of generated geometry problems: predicate frequency (left) and predicate count per problem (right).
Figure 9: Example diagrams from our fully synthetic pipeline. These 20 examples illustrate the geometric structures generated by our solver-driven pipeline, featuring dense relational constraints, multi-step constructions, and non-trivial geometric configurations. Each diagram exhibits rich structural complexity with multiple geometric entities, intricate spatial relationships, and sophisticated reasoning patterns.
Figure 10: Example diagrams from text-seeded synthesis (Appendix E). These 20 examples illustrate the geometric structures generated by feeding existing textual problem statements into our instantiation and visualization stages.