FGeo-HyperGNet: Geometric Problem Solving Integrating FormalGeo Symbolic System and Hypergraph Neural Network

Xiaokai Zhang, Yang Li, Na Zhu, Cheng Qin, Zhenbing Zeng, Tuo LengIJCAI 2025 · DOI

TL;DR

This paper introduces FGeo-HyperGNet, a novel neuro-symbolic system for automatically solving plane geometry problems. By integrating a formal symbolic system (FormalGeo) with a hypergraph neural network (HyperGNet), it achieves human-like, traceable, and verifiable solutions, setting a new state-of-the-art on the FormalGeo7K dataset.

What Problem Does This Paper Address?

Geometric Problem Solving (GPS) is a long-standing challenge in AI due to its reliance on both symbolic reasoning and numerical computation, often involving cross-modal information like diagrams and text. Existing approaches fall into several categories: synthesis methods (backward/forward chaining), algebraic methods (Wu's method, Gröbner bases), and point elimination methods. While AI has offered new perspectives, current neural-symbolic methods often struggle with:

  • Scalability of formal systems: Modifying solvers to incorporate new theorems requires code changes.
  • Traceability and redundancy: Deductive database methods can be non-traceable, and heuristic searches may apply redundant theorems.
  • Readability and correctness: Pure neural methods can lack human-like problem-solving processes, have low readability, and don't guarantee correctness.
  • Integration of computation and reasoning: Many methods focus on one aspect, struggling to unify them.
  • Formal language embedding: Representing formal languages (often as 3D matrices) is challenging for standard neural networks.

This paper aims to bridge these gaps by creating a system that can ingest raw geometric problems (images and text), produce human-like solutions, and ensure correctness through a unified neuro-symbolic framework.

Methods

The core of the proposed solution is the FGeo-HyperGNet system, which comprises two main components:

  1. FormalGeo Symbolic System: This component formalizes geometric problems and their solutions. It uses a Geometry Definition Language and Condition Declaration Language to represent conditions as "hypernodes" and theorems as "hyperedges" in a directed hypergraph. This system handles geometric relational reasoning and algebraic equation solving, ensuring mathematical rigor and traceability. It also updates the hypergraph state as theorems are applied.
  2. HyperGNet Neural Network: This is a hypergraph neural network designed for theorem prediction.
  3. Hypernode Encoder: This module embeds the semantic and structural information of hypernodes and their neighboring hyperedges into fixed-length vectors. It's built upon a Transformer architecture and uses a self-supervised approach to learn rich representations.
  4. Theorem Predictor: This component uses an encoder-decoder architecture. It takes the hypergraph encoding and a goal encoding to predict the most relevant theorems for solving the problem. It formulates theorem prediction as a multi-class classification task.

These two components interact in a Predict-Apply Cycle (PAC): HyperGNet predicts a theorem, and FormalGeo applies it, updates the hypergraph, and provides the new state back to HyperGNet. This iterative process continues until the problem is solved. The system also utilizes FGeo-Parser to convert raw problem inputs into formalized language and a Solution Generator to produce human-readable solutions.

Datasets

  • FormalGeo7K: Used for training and evaluation. This dataset appears to be a benchmark specifically designed for formalizing and solving plane geometry problems.
  • Geometry3K: Used for evaluation.
  • GeoQA: Used for evaluation.

The paper describes how these datasets were processed to create training, validation, and test sets, and how theorem DAGs were used to generate problem-state/theorem-applicability pairs.

Key Insights and Ideas

  • Hypergraphs for Geometric Reasoning: Representing geometric problem-solving as a hypergraph, where conditions are nodes and theorems are hyperedges, provides a powerful structured way to model the problem-solving process.
  • Neuro-Symbolic Synergy: The tight integration of a neural network for theorem prediction and a symbolic system for reasoning and validation is crucial. The neural component guides the symbolic system, while the symbolic system ensures correctness and provides feedback.
  • Importance of Formal Language Embedding: Standard NLP techniques are insufficient for formal languages. The paper highlights the need for specialized tokenization and encoding methods (like the FormalGeo tokenizer) to preserve the semantic meaning of geometric statements.
  • Predict-Apply Cycle (PAC): This iterative interaction between prediction and application is key to achieving a step-by-step, traceable solution process.
  • Self-Supervised Pre-training: Pre-training the hypernode encoder is vital for it to effectively capture semantic information from geometric conditions.

Key Results

  • State-of-the-Art Performance: FGeo-HyperGNet achieved a Theorem Prediction Accuracy (TPA) of 93.50% and a Problem-Solving Success Rate (PSSR) of 88.36% on the FormalGeo7K dataset, outperforming existing methods.
  • Robustness Across Difficulty Levels: The system demonstrated strong performance even on more complex problems (L6), achieving 56.67% PSSR compared to 36.59% for the next best method.
  • Efficiency: The proposed system has significantly fewer parameters (20.38 million) compared to some other methods.
  • Ablation Studies: Experiments confirmed the importance of pretraining, hypergraph structure, and structural encoding for HyperGNet's performance.

Limitations and Future Work

  • Equation-Solving Timeouts: The system sometimes faces timeouts when solving complex systems of equations, especially those involving trigonometric functions.
  • Rare Problem Types: For very rare problem types, the model struggles to learn adequate solution methods due to insufficient training data.
  • Future Directions: The authors plan to integrate reinforcement learning into the neural component and auxiliary construction into the symbolic component to achieve automatic IMO-level GPS without human supervision.

Summary updated

BibTeX
@inproceedings{zhang2025fgeo,
  author = {Xiaokai Zhang and Yang Li and Na Zhu and Cheng Qin and Zhenbing Zeng and Tuo Leng},
  title = {{FGeo-HyperGNet: Geometric Problem Solving Integrating FormalGeo Symbolic System and Hypergraph Neural Network}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/527},
}
Figure