Table of Contents
Fetching ...

GeoSDF: Plane Geometry Diagram Synthesis via Signed Distance Field

Chengrui Zhang, Maizhen Ning, Tianyi Liu, Zihao Zhou, Jie Sun, Qiufeng Wang, Kaizhu Huang

TL;DR

GeoSDF presents a solve-by-construction framework for plane geometry diagram synthesis using Signed Distance Fields (SDFs). It translates natural language problem descriptions into symbolic geometric elements and constraints via an LLM, optimizes a differentiable SDF field to satisfy those constraints with crowd regularization, and renders accurate diagrams with self-verification. The approach achieves state-of-the-art performance on GeoQA with 95.9% accuracy and high IMO diagram fidelity (88.67% human-evaluated equivalence), and supports large-scale batch synthesis (up to 224k diagrams). This work bridges computational geometry and AI-based reasoning, enabling precise, verifiable geometry diagrams for education and research, with potential extensions to broader geometry domains.

Abstract

Plane Geometry Diagram Synthesis has been a crucial task in computer graphics, with applications ranging from educational tools to AI-driven mathematical reasoning. Traditionally, we rely on manual tools (e.g., Matplotlib and GeoGebra) to generate precise diagrams, but this usually requires huge, complicated calculations. Recently, researchers start to work on model-based methods (e.g., Stable Diffusion and GPT5) to automatically generate diagrams, saving operational cost but usually suffering from limited realism and insufficient accuracy. In this paper, we propose a novel framework GeoSDF, to automatically generate diagrams efficiently and accurately with Signed Distance Field (SDF). Specifically, we first represent geometric elements (e.g., points, segments, and circles) in the SDF, then construct a series of constraint functions to represent geometric relationships. Next, we optimize those constructed constraint functions to get an optimized field of both elements and constraints. Finally, by rendering the optimized field, we can obtain the synthesized diagram. In our GeoSDF, we define a symbolic language to represent geometric elements and constraints, and our synthesized geometry diagrams can be self-verified in the SDF, ensuring both mathematical accuracy and visual plausibility. In experiments, through both qualitative and quantitative analysis, GeoSDF synthesized both normal high-school level and IMO-level geometry diagrams. We achieve 88.67\% synthesis accuracy by human evaluation in the IMO problem set. Furthermore, we obtain a very high accuracy of solving geometry problems (over 95\% while the current SOTA accuracy is around 75%) by leveraging our self-verification property. All of these demonstrate the advantage of GeoSDF, paving the way for more sophisticated, accurate, and flexible generation of geometric diagrams for a wide array of applications.

GeoSDF: Plane Geometry Diagram Synthesis via Signed Distance Field

TL;DR

GeoSDF presents a solve-by-construction framework for plane geometry diagram synthesis using Signed Distance Fields (SDFs). It translates natural language problem descriptions into symbolic geometric elements and constraints via an LLM, optimizes a differentiable SDF field to satisfy those constraints with crowd regularization, and renders accurate diagrams with self-verification. The approach achieves state-of-the-art performance on GeoQA with 95.9% accuracy and high IMO diagram fidelity (88.67% human-evaluated equivalence), and supports large-scale batch synthesis (up to 224k diagrams). This work bridges computational geometry and AI-based reasoning, enabling precise, verifiable geometry diagrams for education and research, with potential extensions to broader geometry domains.

Abstract

Plane Geometry Diagram Synthesis has been a crucial task in computer graphics, with applications ranging from educational tools to AI-driven mathematical reasoning. Traditionally, we rely on manual tools (e.g., Matplotlib and GeoGebra) to generate precise diagrams, but this usually requires huge, complicated calculations. Recently, researchers start to work on model-based methods (e.g., Stable Diffusion and GPT5) to automatically generate diagrams, saving operational cost but usually suffering from limited realism and insufficient accuracy. In this paper, we propose a novel framework GeoSDF, to automatically generate diagrams efficiently and accurately with Signed Distance Field (SDF). Specifically, we first represent geometric elements (e.g., points, segments, and circles) in the SDF, then construct a series of constraint functions to represent geometric relationships. Next, we optimize those constructed constraint functions to get an optimized field of both elements and constraints. Finally, by rendering the optimized field, we can obtain the synthesized diagram. In our GeoSDF, we define a symbolic language to represent geometric elements and constraints, and our synthesized geometry diagrams can be self-verified in the SDF, ensuring both mathematical accuracy and visual plausibility. In experiments, through both qualitative and quantitative analysis, GeoSDF synthesized both normal high-school level and IMO-level geometry diagrams. We achieve 88.67\% synthesis accuracy by human evaluation in the IMO problem set. Furthermore, we obtain a very high accuracy of solving geometry problems (over 95\% while the current SOTA accuracy is around 75%) by leveraging our self-verification property. All of these demonstrate the advantage of GeoSDF, paving the way for more sophisticated, accurate, and flexible generation of geometric diagrams for a wide array of applications.

Paper Structure

This paper contains 33 sections, 27 equations, 12 figures, 4 tables.

Figures (12)

  • Figure 1: Comparison of geometric diagram synthesis methods for IMO 2022, Problem 4. (a) Rule-based systems, such as R-COT, rely on predefined templates and fail to produce diagrams when faced with non-predefined geometric constraints. (b) General model-based systems, including Gemini, DALL-E 3, and GPT-4o, often lack the precision for accurate mathematical synthesis, resulting in geometrically inconsistent figures. (c) In contrast, our proposed method accurately constructs the diagram by interpreting the fundamental geometric elements and constraints directly from the problem description.
  • Figure 2: The GeoSDF Pipeline with an example IMO diagram synthesis process. (a) Parsing text description in natural language to geometric Elements and Constraints in symbolic language. (b) The elements and constraints are represented using SDF representations. (c) The optimization process from the initialized field to satisfy all the specified constraints forms the optimized Fields. (d) The final optimized fields are rendered to Diagrams that visualize the geometric problem.
  • Figure 3: Qualitative results. Left: Synthesis on the FormalGeo7k dataset with diversity yet geometrically consistent (first row: ground truth). Middle: Synthesised with detailed annotations. Right: Synthesised IMO geometric problems with annotations.
  • Figure 4: The example of quantifiability of GeoSDF. Our method is able to measure all the values in the diagram (e.g. degree, area), where the left diagram is the original diagram and the right one is synthesised by GeoSDF.
  • Figure 5: The visualization of the optimization process. We first randomly initialize the geometry elements and then optimize the SDF by geometry constraints to the synthesized geometry diagram. The upper two examples are selected from FormalGeo-IMO zhang2023formalgeo, and the lower two examples are from IMO 1959 Question 5 and IMO 2021 Question 4.
  • ...and 7 more figures