Table of Contents
Fetching ...

GeoLoom: High-quality Geometric Diagram Generation from Textual Input

Xiaojing Wei, Ting Zhang, Wei He, Jingdong Wang, Hua Huang

TL;DR

GeoLoom introduces a two-stage framework that translates natural language into a geometry-aware formal language (GeoLingua) and then optimizes point coordinates via a Monte Carlo solver to produce high-precision geometric diagrams. A paired NL–formal dataset (GeoNF) and a constraint-based evaluation metric underpin training and assessment, yielding superior structural fidelity over baselines while maintaining efficiency. The approach advances interpretable, scalable diagram generation in geometry, with strong potential for educational and design contexts. Limitations include 2D Euclidean scope and residual local minima, guiding future work toward broader geometry domains and robustness to linguistic variation.

Abstract

High-quality geometric diagram generation presents both a challenge and an opportunity: it demands strict spatial accuracy while offering well-defined constraints to guide generation. Inspired by recent advances in geometry problem solving that employ formal languages and symbolic solvers for enhanced correctness and interpretability, we propose GeoLoom, a novel framework for text-to-diagram generation in geometric domains. GeoLoom comprises two core components: an autoformalization module that translates natural language into a specifically designed generation-oriented formal language GeoLingua, and a coordinate solver that maps formal constraints to precise coordinates using the efficient Monte Carlo optimization. To support this framework, we introduce GeoNF, a dataset aligning natural language geometric descriptions with formal GeoLingua descriptions. We further propose a constraint-based evaluation metric that quantifies structural deviation, offering mathematically grounded supervision for iterative refinement. Empirical results demonstrate that GeoLoom significantly outperforms state-of-the-art baselines in structural fidelity, providing a principled foundation for interpretable and scalable diagram generation.

GeoLoom: High-quality Geometric Diagram Generation from Textual Input

TL;DR

GeoLoom introduces a two-stage framework that translates natural language into a geometry-aware formal language (GeoLingua) and then optimizes point coordinates via a Monte Carlo solver to produce high-precision geometric diagrams. A paired NL–formal dataset (GeoNF) and a constraint-based evaluation metric underpin training and assessment, yielding superior structural fidelity over baselines while maintaining efficiency. The approach advances interpretable, scalable diagram generation in geometry, with strong potential for educational and design contexts. Limitations include 2D Euclidean scope and residual local minima, guiding future work toward broader geometry domains and robustness to linguistic variation.

Abstract

High-quality geometric diagram generation presents both a challenge and an opportunity: it demands strict spatial accuracy while offering well-defined constraints to guide generation. Inspired by recent advances in geometry problem solving that employ formal languages and symbolic solvers for enhanced correctness and interpretability, we propose GeoLoom, a novel framework for text-to-diagram generation in geometric domains. GeoLoom comprises two core components: an autoformalization module that translates natural language into a specifically designed generation-oriented formal language GeoLingua, and a coordinate solver that maps formal constraints to precise coordinates using the efficient Monte Carlo optimization. To support this framework, we introduce GeoNF, a dataset aligning natural language geometric descriptions with formal GeoLingua descriptions. We further propose a constraint-based evaluation metric that quantifies structural deviation, offering mathematically grounded supervision for iterative refinement. Empirical results demonstrate that GeoLoom significantly outperforms state-of-the-art baselines in structural fidelity, providing a principled foundation for interpretable and scalable diagram generation.

Paper Structure

This paper contains 28 sections, 4 equations, 17 figures, 9 tables, 2 algorithms.

Figures (17)

  • Figure 1: An overview of the analogy between geometry problem solving and geometric diagram generation, highlighting the central role of formal language in ensuring geometric correctness.
  • Figure 2: Illustrating GeoLoom framework: an autoformalization module and a coordinate solver.
  • Figure 3: Geometric relations and geometric shape distributions in the GeoNF dataset.
  • Figure 4: Qualitative comparison with AutomaTikz (based on LLaMa7b) and SeeDream model. (The corresponding formal language and the more results can be found in Appendix \ref{['appendixD']}.)
  • Figure 5: Complex examples and comparisons with Penrose and GeoGebra. GeoLoom, Penrose, and GeoGebra results arranged top to bottom. Natural language inputs appear in Appendix \ref{['appendixD']}.
  • ...and 12 more figures