File size: 5,772 Bytes
122bb05
49e8ac9
122bb05
49e8ac9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122bb05
49e8ac9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
pretty_name: MathGen
license: mit
language:
- en
task_categories:
- text-to-image
tags:
- mathematics
- text-to-image
- image-generation
- benchmark
- script-as-a-judge
- mathematical-reasoning
size_categories:
- n<1K
configs:
- config_name: default
  data_files:
  - split: clean_scene
    path: data/clean_scene.jsonl
  - split: open_scene
    path: data/open_scene.jsonl
---

<h1 align="center">
  MathGen
</h1>

<p align="center">
  <b>Revealing the Illusion of Mathematical Competence through Text-to-Image Generation</b>
</p>

<p align="center">
  <a href="https://arxiv.org/abs/2603.27959"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2603.27959-b31b1b"></a>
  <a href="https://github.com/Liuruiyao/MathGen"><img alt="Code" src="https://img.shields.io/badge/GitHub-Code-black"></a>
  <a href="https://mathgen-t2i.github.io/"><img alt="Project Page" src="https://img.shields.io/badge/Project-Page-blue"></a>
</p>

## Introduction

MathGen is a benchmark for evaluating mathematical correctness in text-to-image generation. It contains **420 problems** across seven core mathematical domains: counting, angle, fraction, function, plane geometry, set, and solid geometry.

The benchmark includes a **350-problem Clean-Scene set** and a **70-problem Open-Scene set** with paired mathematical constraints. Each problem is evaluated with deterministic, prompt-conditioned verification scripts rather than subjective visual preference.

<p align="center">
  <img src="assets/7domains.png" width="82%" alt="MathGen seven mathematical domains">
</p>

## Dataset Structure

This repository provides two splits:

| Split | Rows | Description |
| --- | ---: | --- |
| `clean_scene` | 350 | Controlled mathematical diagram prompts across seven domains. |
| `open_scene` | 70 | Realistic-scene prompts paired with Clean-Scene mathematical constraints. |

Each row contains:

| Column | Description |
| --- | --- |
| `id` | Stable problem id. |
| `split` | `clean_scene` or `open_scene`. |
| `topic` | Mathematical domain or open-scene category. |
| `subtopic` | Fine-grained task type. |
| `prompt` | Text-to-image prompt. |
| `original_id` | Original local problem id. |
| `source_topic` | Source mathematical domain. |

## Evaluation Pipeline

<p align="center">
  <img src="assets/introduction.png" width="95%" alt="MathGen benchmark and evaluation pipeline">
</p>

MathGen uses a Script-as-a-Judge protocol. Generated images are checked by deterministic verification scripts for numerical, geometric, topological, symbolic, and functional constraints.

## Leaderboard

Main results on the **350-problem Clean-Scene set**. Accuracy is reported across seven mathematical domains, with 50 problems per domain. Best results are shown in **bold**, and second-best results are shown with <u>underline</u>.

| Model | Counting | Angle | Fraction | Function | Plane | Set | Solid | Overall |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| SD-3-Medium | 0.0 | 0.0 | 0.0 | 0.0 | 6.0 | 0.0 | 6.0 | 1.7 |
| SD-3.5-Medium | 4.0 | 0.0 | 0.0 | 0.0 | 12.0 | 2.0 | 6.0 | 3.4 |
| SD-3.5-Large | 12.0 | 0.0 | 2.0 | 0.0 | 12.0 | 2.0 | 4.0 | 4.6 |
| FLUX-2 | 8.0 | 2.0 | 8.0 | 2.0 | 42.0 | 8.0 | 8.0 | 11.1 |
| PixArt-Sigma | 10.0 | 0.0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 | 0.0 | 24.0 | 6.0 | 8.0 | 7.7 |
| Seedream 4.0 | 20.0 | 0.0 | 6.0 | 10.0 | 36.0 | 6.0 | 14.0 | 13.1 |
| Ideogram v3 Turbo | 10.0 | 2.0 | 0.0 | 0.0 | 20.0 | 2.0 | 8.0 | 6.0 |
| Nano Banana | 20.0 | 8.0 | 24.0 | 10.0 | 64.0 | 10.0 | 24.0 | 22.9 |
| Nano Banana Pro | <u>48.0</u> | **54.0** | <u>50.0</u> | **70.0** | **72.0** | **42.0** | **40.0** | **53.7** |
| Imagen 4 | 12.0 | 2.0 | 2.0 | 2.0 | 12.0 | 0.0 | 12.0 | 6.0 |
| Imagen 4 Ultra | 20.0 | 6.0 | 16.0 | 4.0 | 42.0 | 8.0 | 16.0 | 16.0 |
| GPT-Image-1 | 32.0 | 12.0 | 44.0 | 16.0 | 68.0 | <u>20.0</u> | 24.0 | 30.9 |
| GPT-Image-1.5 | **56.0** | <u>24.0</u> | **54.0** | <u>22.0</u> | <u>70.0</u> | <u>20.0</u> | <u>28.0</u> | <u>39.1</u> |

## Examples

<p align="center">
  <img src="assets/case_study.png" width="95%" alt="MathGen qualitative examples">
</p>

## Citation

```bibtex
@misc{liu2026mathgen,
  title={MathGen: Revealing the Illusion of Mathematical Competence through Text-to-Image Generation},
  author={Liu, Ruiyao and Shen, Hui and Zhang, Ping and Hsieh, Yunta and Zhang, Yifan and Xu, Jing and Han, Qi and Li, Junchen and Lu, Jiawei and Ma, Jianing and Mo, Jiaqi and Chen, Sicheng and Zhang, Zhen and Wan, Zhongwei and Xiong, Jing and Wang, Xin and Liu, Ziyuan and Cao, Hangrui and Wong, Ngai},
  year={2026},
  eprint={2603.27959},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2603.27959}
}
```