TL;DR
While modern generative models excel at textual mathematical reasoning, a new benchmark called MathGen reveals they suffer from a severe "illusion of competence" when required to render math visually. By introducing a deterministic, script-based evaluation protocol across 420 problems, the authors show that even the best proprietary text-to-image (T2I) models top out at 53.7% accuracy, while open-source alternatives frequently drop to near 0% on precise geometric and functional tasks.
What Problem Does This Paper Address?
Large Language Models (LLMs) can routinely solve competition-level math problems in text, and text-to-image (T2I) diffusion models can generate breathtakingly realistic artwork. However, this paper investigates a critical blind spot at the intersection of these capabilities: Can generative models accurately render mathematical concepts visually?
In textbooks, research papers, and engineering designs, math isn't just text—it relies on precise visual structures like Venn diagrams, geometric proofs, and function plots. Standard T2I evaluation metrics (like CLIP-score or FID) only measure semantic similarity or visual realism, completely missing whether a geometric angle is exactly 45 degrees or if a plot contains the correct number of tick marks. Furthermore, using Vision-Language Models (VLMs) as judges introduces hallucination and unreliability. MathGen addresses this by establishing a rigorous, automated framework to evaluate exact structural and numerical validity.
Methods
To eliminate the subjectivity of human or VLM evaluation, the authors developed a Script-as-a-Judge framework.
Instead of guessing if an image is correct, the evaluation pipeline uses classical computer vision tools and libraries (such as OpenCV, Pillow, EasyOCR, and NumPy) to programmatically verify pixel-level constraints:
- Contour analysis for shape extraction and set topology checks.
- Hough transforms for detecting line intersections in geometry.
- Optical Character Recognition (OCR) to verify axis labels and text placement.
- Object detection (RT-DETR) to ensure exact counts for discrete items.
An image is only marked as correct if it simultaneously satisfies every single deterministic constraint defined for that problem.
Datasets
The authors introduced the MathGen benchmark, which consists of 420 curated problems split into two main settings:
- Clean-Scene Set (350 problems): 50 problems per domain across seven core mathematical dimensions: Counting, Angles, Fractions, Plane Geometry, Functions, Sets, and Solid Geometry. These focus on pure, textbook-style diagrammatic reasoning.
- Open-Scene Set (70 problems): 10 problems per domain, paired directly with Clean-Scene counterparts. These embed the exact same mathematical constraints into complex, real-world contexts (e.g., counting apples on a tree instead of dots on a page) to test how background noise affects performance.
Key Insights and Ideas
- Visual Plausibility $\neq$ Mathematical Fidelity: Models are highly adept at creating images that look like math diagrams at a glance, but completely fail under strict logical scrutiny. They generate the "vibe" of a function plot without drawing the actual mathematical truth.
- The Quantitative Bottleneck: Error analysis shows that models generally understand qualitative concepts (e.g., they know to draw a pie chart or a group of oranges), but they fail catastrophically at quantitative precision (e.g., drawing exactly 18 oranges or making a slice exactly $1/7$th of a circle).
- Asymmetric Domain Mastery: Plane geometry is relatively tractable for modern models, likely due to an abundance of simple shapes in training data. Conversely, rendering exact angles and continuous function plots remains incredibly difficult because they require precise coordinate mapping.
Key Results
The benchmark revealed a massive performance gap between proprietary and open-source models, though none achieved reliable competence:
- Closed-Source Performance: Nano Banana Pro led the field with a modest 53.7% overall accuracy, followed by GPT-Image-1.5 at 39.1%.
- Open-Source Performance: Most open-source models failed entirely, staying below 10% overall accuracy. FLUX-2 was the strongest open-source contender at 11.1%.
- Domain Breakdowns: On highly structured tasks like Functions and Angles, open-source models frequently scored 0%. Even the advanced GPT-Image-1.5 dropped from 70% on Plane Geometry down to just 20% on Sets and 24% on Angles.
- Scene Complexity Penalty: Moving from Clean-Scene to Open-Scene caused a sharp drop in accuracy for the best models (e.g., GPT-Image-1.5 plummeted from 38.6% to 18.6%), proving that realistic backgrounds severely interfere with a model's ability to maintain mathematical constraints.
Limitations and Future Work
The authors note that current T2I architectures are fundamentally limited by their continuous diffusion or autoregressive pixel-generation paradigms, which lack explicit mechanisms to handle discrete numerical and geometric constraints.
To bridge this gap, they suggest that future text-to-image systems should integrate autoregressive layout planning or test-time verification loops—essentially giving the model a way to plan the mathematical structure of an image before rendering the pixels.
Summary updated