GeoGramBench: Benchmarking the Geometric Program Reasoning in Modern LLMs
Shixian Luo, Zezhou Zhu, Yu Yuan, Yuncheng Yang, Lianlei Shan, Yong Wu
TL;DR
GeoGramBench formalizes Program-to-Geometry, introducing a dataset of $500$ geometry problems with explicit procedural drawing code to probe LLMs' ability to translate code into geometric representations and perform spatial reasoning. Across $17$ frontier models, results show strong performance on simple primitives but sharp declines for local relations and global abstractions, with the best global abstraction accuracy around $43.35\%$ and no model exceeding $50\%$. The authors implement a leakage-mitigated data collection and three-level taxonomy to enable fine-grained analysis and demonstrate drawing language (Asymptote vs Matplotlib) has negligible impact on performance. They propose a multi-stage internal geometry reasoning process and highlight the need for architecture and training strategies that enhance symbolic-to-geometric abstraction. GeoGramBench thus provides a robust, reusable benchmark to drive progress in symbolic-to-geometric understanding in LLMs.
Abstract
Geometric spatial reasoning forms the foundation of many applications in artificial intelligence, yet the ability of large language models (LLMs) to operate over geometric spatial information expressed in procedural code remains underexplored. In this paper, we address this gap by formalizing the Program-to-Geometry task, which challenges models to translate programmatic drawing code into accurate and abstract geometric reasoning. To evaluate this capability, we present GeoGramBench, a benchmark of 500 carefully refined problems organized by a tailored three-level taxonomy that considers geometric complexity rather than traditional mathematical reasoning complexity. Our comprehensive evaluation of 17 frontier LLMs reveals consistent and pronounced deficiencies: even the most advanced models achieve less than 50% accuracy at the highest abstraction level. These results highlight the unique challenges posed by program-driven spatial reasoning and establish GeoGramBench as a valuable resource for advancing research in symbolic-to-spatial geometric reasoning. Project page: https://github.com/LiAuto-DSR/GeoGramBench.
