Multimodal Large Language Models (MLLMs) have recently demonstrated remarkable perceptual and reasoning abilities. However, they struggle to perceive fine-grained geometric structures, constraining their ability of geometric understanding and visual reasoning. To address this, we propose GeoTikzBridge, a framework that enhances local geometric perception and visual reasoning through tikz-based code generation. Within this framework, we build two models supported by two complementary datasets. The GeoTikzBridge-Base model is trained on GeoTikz-Base dataset, the largest image-to-tikz dataset to date with 2.5M pairs (16 × larger than existing open-sourced datasets). This process is achieved via iterative data expansion and a localized geometric transformation strategy. Subsequently, GeoTikzBridge-Instruct is fine-tuned on GeoTikz-Instruct dataset which is the first instruction-augmented tikz dataset supporting visual reasoning. Extensive experimental results demonstrate that our models achieve state-of-the-art performance among open-sourced MLLMs. Furthermore, GeoTikzBridge models can serve as plug-and-play reasoning modules for any MLLM(LLM), enhancing reasoning performance in geometric problem-solving. Datasets and codes are publicly available at: https://github.com/sjy-1995/GeoTikzBridge.
Figures & tables
Figure 1: GeoTikzBridge demonstrates advantages in geometric perception and mathematical reasoning. (1) GeoTikzBridge-Base achieves the most accurate reconstruction of local geometric structures compared to existing approaches. (2) The generated tikz representations enhance MLLMs’ mathematical and visual geometric reasoning.
Figure 2: Framework of the proposed iterative self-refinement for GeoTikz-Base dataset and GeoTikzBridge-Base model. It iteratively conducts three steps: dataset construction and sample generation, localized geometric transformation, and model optimization.
Figure 3: Distribution of the 2.5M GeoTikz-Base dataset.
Method
DaTikZ
MathVista-GPS
GAOKAO-MM-Math
EDUBenchmark
CLIP-S ↑
FID ↓
CSR ↑
CLIP-S ↑
FID ↓
CSR ↑
CLIP-S ↑
FID ↓
CSR ↑
CLIP-S ↑
FID ↓
CSR ↑
Open-sourced VLMs
Qwen2.5-VL-32B [ 4 ]
0.788
77.2
80.6%
0.832
61.0
97.6%
0.808
92.2
94.4%
0.748
87.0
81.2%
Qwen2.5-VL-72B [ 4 ]
0.795
49.8
81.5%
0.858
46.9
98.1%
0.854
61.3
90.1%
0.781
60.5
81.8%
Qwen3-VL-30B-A3B [ 40 ]
0.672
174.4
89.1%
0.802
65.7
81.0%
0.826
107.9
95.2%
0.748
95.9
80.2%
InternVL3-78B [ 57 ]
0.747
62.7
78.8%
0.860
47.9
92.3%
0.871
55.4
93.7%
0.801
58.3
81.5%
Table 1: Performance comparison of image-to-tikz methods across four datasets. The best and second-best results are marked with bold and underlines, respectively.
Method
MathVista
GAOKAO-MM
RBench-M
RBench-V
RBench-V
(GPS)
(Math)
(en)
(Math)
(Overall)
Closed-sourced VLMs
GPT-4V [ 29 ]
0.505
0.450
-
-
-
GPT-4-turbo [ 1 ]
0.583
0.500
-
-
-
GPT-4o [ 19 ]
0.647
-
0.334
0.244
0.141
Claude3.5-Sonnet [ 3 ]
0.644
-
0.397
-
-
Table 2: Performance comparison of downstream mathematical reasoning across five benchmarks. The best and second-best results are marked with bold and underlines, respectively.
Method
MSE ↓
SSIM ↑
PSNR ↑
CLIP Score ↑
FID ↓
CSR ↑
FigCodifier [ 42 ]
1435.9
0.135
17.6dB
0.936
9.798
88.0%
GeoTikzBridge-Base-8B
692.6
0.549
23.1dB
0.967
5.476
95.4%
GeoTikzBridge-Instruct
211.7
0.844
89.6dB
0.992
1.158
96.7%
Table 3: Performance comparison of instructed code generation in the downstream auxiliary line generation task. The best results are marked with bold.
Exp ID
I
II
III
IV
Problem Text
✓
✓
✓
✓
Raw Geometric Image
✓
✓
✓
✓
Tikz Code With Aux. Line Added
×
×
✓
✓
Image With Aux. Line Added
×
✓
×
✓
Answer Accuracy
0.688
0.697
0.707
0.736
Table 4: Performance comparison of four different visual reasoning formats on the MathVista-GPS benchmark. The baseline model is InternVL3.5-38B.
Figure 4: Ablation study of geometric representation on the MathVista-GPS benchmark. The baseline model is Qwen3-VL-30B-A3B.
Figure 5: Ablation study of localized geometric transformation strategies for GeoTikzBridge-Base-8B, evaluated on the MathVista-GPS benchmark.
Figure 6: Visualization results of tikz codes generated by GeoTikzBridge-Base compared with GPT-5.0 [ 30 ] , each figure shows the input image (either geometric or non-geometric) and the corresponding image rendered from our predicted tikz code.
Figure 7: Visualization results of instruction-driven auxiliary line generation compared with GPT-5.0 [ 30 ] , each figure shows the input geometric image, the natural language instruction for auxiliary line addition, and the rendered image from the generated tikz code.
Figure S1 : Prompt input to Doubao for filtering unreliable instruction annotations in the GeoTikz-Instruct dataset construction.
Figure S2 : Ablation study of different values of self-refinement K for GeoTikzBridge-Base-8B, evaluated on the MathVista-GPS benchmark.
Figure S3 : Ablation study of different values of CLIP score based filtering threshold τ for GeoTikzBridge-Base-8B, evaluated on the MathVista-GPS benchmark.
Figure S4 : FID, SigLip/DINO scores of Base-8B model (up) and Instruct-8B model (bottom) across different geometric structures.
Figure S5 : Average failure rate distributions of InternVL3.5-38B+GeoTikzBridge-Base-8B across different geometric structures (up) and mathematical domains (bottom).
Figure S6 : Failure cases of InternVL3.5-38B with tikz code input.
Method
CLIP
SigLip
DINO
FigCodifier
0.936
0.940
0.957
ours-Base-8B
0.967
0.970
0.978
ours-Instruct-8B
0.992
0.992
0.995
Table S5 : Performance comparison of instructed code generation methods across CLIP, SigLip, and DINO model metrics.
Method
DaTikZ
MathVista-GPS
ClIP
SigLip
DINO
ClIP
SigLip
DINO
Qwen2.5-VL-72B
0.795
0.803
0.832
0.858
0.880
0.911
Qwen3-VL-30B
0.672
0.696
0.758
0.802
0.839
0.893
InternVL3.5-38B
0.733
0.752
0.786
0.786
0.793
0.855
GLM4.5V-106B
0.806
0.812
0.834
0.769
0.773
0.838
FigCodifier
0.785
0.791
0.819
0.884
0.906
0.922
Table S6 : Performance comparison of image-to-tikz methods across CLIP, SigLip, and DINO model metrics.
Method
FID ↓
CSR ↑
CLIP ↑
SigLip ↑
DINO ↑
GPT-5.0
44.8
96.9%
0.880
0.903
0.921
ours-Base-8B
36.0
97.1%
0.895
0.919
0.937
Table S7 : Performance comparison of image-to-tikz methods with GPT-5.0 on the MathVista-GPS benchmark across five metrics.
Method
Accuracy (Base/+Ours)
GPT-5.0
0.891/ 0.937
Claude-4.5-Sonnect
0.774/ 0.846
Gemini-3-Pro
0.779/ 0.923
Table S8 : Mathematical reasoning performance of latest closed-source models on the MathVista-GPS benchmark. Scores are reported as original model / model + GeoTikzBridge-Base-8B.
Figure S7 : Visualization results of tikz codes generated by GeoTikzBridge-Base, consisting of input images (either geometric or non-geometric) and the corresponding figures rendered from our predicted tikz codes.
Figure S8 : Visualization results of instruction-driven auxiliary line generation, including the input geometric images, the natural language instructions for auxiliary line addition, and the rendered figures from the generated tikz codes.
Figure S9 : Example I: Angle calculation problem solving comparison with and without tikz code. Tikz clarifies geometric relationships to avoid perceptual errors in angle reasoning.
Figure S10 : Example II: Segment length problem solving comparison with and without tikz code. Tikz facilitates accurate proportion and theorem application for length reasoning.
Figure S11 : Example III (1/2): Auxiliary line instruction (connecting circle center and tangent points) and tikz code generation. The line manifests radius-tangent perpendicularity.
Figure S12 : Example III (2/2): Problem solving comparison under different forms, with incorrect analysis/answers highlighted in red and key correct ones in green. Both auxiliary line image and its tikz combination enable correct reasoning via explicit perpendicularity recognition.
Figure S13 : Example IV (1/2): Auxiliary line instruction (extending midpoint connection) and tikz code generation. The line constructs a key right triangle by forming intersection Q .
Figure S14 : Example IV (2/2): Problem solving comparison under different forms, with incorrect analysis/answers highlighted in red and key correct ones in green. The auxiliary line image provides a visual foundation for constructing the right triangle △ NPQ. Its combination with tikz code achieves correct reasoning, since tikz explicitly encodes the spatial structure of the constructed right triangle.
College of Computer Science and Artificial Intelligence, Fudan University · School of ECE, Peking University · School of Software and Microelectronics, Peking University +1