A Symbolic Character-Aware Model for Solving Geometry Problems

Maizhen Ning, Qiu-Feng Wang, Kaizhu Huang, Xiaowei Huang · DOI

Abstract

Solving geometry problems requires a sophisticated "bridge" between textual descriptions and visual diagrams. A critical component of this bridge is the use of symbolic characters (e.g., $\triangle ABC$) to link entities across modalities. However, standard models often fail by treating these symbols as sequences of isolated letters. This paper introduces SCA-GPS, a model designed to treat symbolic characters as holistic semantic units. By combining a novel alignment and merging strategy with a diagram encoder pre-trained specifically for geometric primitives, SCA-GPS achieves state-of-the-art results on major benchmarks.

Introduction

Geometry Problem Solving (GPS) is a notoriously difficult multimodal task. Unlike standard math word problems, GPS requires a model to simultaneously reason over natural language and geometric diagrams. A major flaw in current approaches is the reliance on standard tokenization. When a model encounters "Find the area of $\triangle ABC$," standard NLP encoders split "ABC" into three separate tokens ('A', 'B', 'C'), destroying the semantic relationship where "ABC" refers to a single, unified entity. Furthermore, standard computer vision models trained on natural images struggle with the sparse, line-heavy nature of geometry diagrams.

Methods

The proposed Symbolic Character-Aware (SCA) model addresses these issues through three main pillars:

1. Character-Aware Text Encoder

Instead of treating symbolic characters as isolated letters, the model uses a "Symbolic Character Align and Merge" module. It first aligns text tokens with visual features from the diagram using guided attention. Then, a Gated Recurrent Unit (GRU) merges consecutive characters into a single "holistic semantic unit" representing the geometric object.

2. Specialized Diagram Encoder

The authors employ a Vision Transformer (ViT) pre-trained using two auxiliary tasks to better capture geometric "grammar":

  • Masked Image Modeling (MIM): Reconstructing missing patches of the diagram to learn the structure of lines and shapes.
  • Multi-Label Classification (MLC): Predicting which symbolic characters appear in the diagram.

The paper proves that standard ViT configurations (16x16 patches) are too coarse for geometry. By moving to 8x8 patches and a lower mask ratio (0.2), the model captures the fine-grained details of thin lines and small character labels.

The overall architecture of the SCA-GPS model, highlighting the text and diagram encoders and the joint reasoning module.

3. Weak Supervision via SAM

To perform character detection without manual labels, the model leverages the Segment Anything Model (SAM). By detecting characters in the image and using the problem text as weak supervision, the model learns to associate visual labels with their textual counterparts.

Illustration of the weak supervision process using SAM for character detection and segmentation in geometry diagrams.

Evaluation and Results

The model was evaluated on two primary benchmarks: GeoQA (5,000 problems with noisy diagrams) and Geometry3K (3,002 problems with high-quality diagrams).

  • State-of-the-Art Performance: SCA-GPS achieved 64.1% accuracy on GeoQA, a significant improvement over the previous best of 60.0%.
  • Improved Efficiency: On Geometry3K, while accuracy gains were marginal (76.7% vs 76.3%), the model reduced the average number of reasoning steps from 6.9 to 6.0.
  • Robustness: The model significantly reduced "No Result" errors, indicating a more logical grasp of problem structures.

Conclusion

SCA-GPS demonstrates that treating symbolic characters as unified anchors is key to effective multimodal reasoning in geometry. While a gap remains compared to human performance (~92% on GeoQA), the integration of symbolic awareness and specialized visual pre-training marks a significant step forward. Future work will focus on integrating formal geometric theorems to handle complex, multi-step proofs.

Summary updated

BibTeX
@inproceedings{ning2023symbolic,
  author = {Maizhen Ning and Qiu-Feng Wang and Kaizhu Huang and Xiaowei Huang},
  title = {{A Symbolic Character-Aware Model for Solving Geometry Problems}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3612570},
}
Figure