It is a unified formal language framework designed to solve both plane and solid geometric problems through neural-symbolic reasoning. To bridge the gap in solid geometry reasoning, which involves complex 3D spatial diagrams, we introduce the Parse2Reason method.
This repository contains the implementation of the framework, including the reasoning engine, formal language definitions, and evaluation tools.
Geometric problem solving is a typical multimodal reasoning challenge. While significant progress has been made in plane geometry, solid geometry remains difficult due to 3D spatial diagrams and complex reasoning requirements.
- Unified Framework: The first unified formal language framework for solid geometry, featuring an extensive predicate library and a dedicated theorem bank.
- Parse2Reason Method:
- Parsing Step: Utilizes formal Language to formally represent both problem descriptions (natural text) and diagrams (visual images).
- Reasoning Step: Leverages formal language and the theorem bank to perform relational inference and algebraic computation, generating strictly correct, verifiable, and human-readable reasoning processes.
- Generalizability: Applicable to both plane and solid geometry.
- Neural-Symbolic Reasoning: Combines the perceptual power of neural models (for parsing) with the rigorous logic of symbolic engines (for reasoning).
- Parse2Reason Pipeline: A two-step approach ensuring high accuracy and interpretability.
- Extensive Datasets:
- SolidFGeo2k: A curated dataset of solid geometry problems with formal annotations.
- MathVerse-solid: A subset of MathVerse with formal annotations.
- PlaneFGeo3k: A dataset of plane geometry problems with formal annotations.
- SOTA Performance:
- 77.3% accuracy on SolidFGeo2k.
- 84.1% on MathVerse-Solid (subset), significantly outperforming leading MLLMs like Gemini-2.5-pro (54.2%) and GPT-5 (62.9%).
- 80.2% accuracy on PlaneFGeo3k.
The core implementation is located in the src/ directory.
├── src/fgps/
│ ├── search.py
│ ├── run.py
│ ├── enhanced_search.py
│ ├── utils.py
│ └── ******/
│ ├── problems/
│ ├── images/
│ └── gdl/
│
├── formalgeo/
└── gemini/
- Python 3.8+
- pip
# Install core dependencies
pip install -r requirements.txt
# Or install manually
pip install ****** psutil func-timeout sympyAll commands should be executed from the src/fgps directory.
Solve a specific problem by entering its ID (pid).
cd src/fgps
python run.py --func run --dataset_name Example input: <pid>: 113
Automatically attempt to solve all problems in the dataset to reproduce results.
cd src/fgps
python run.py --func auto_run --dataset_name Use search.py to customize search algorithms and parameters (e.g., for ablation studies).
cd src/fgps
python search.py \
--dataset_name ***\
--method fw \
--strategy bfs \
--max_depth xxx \
--timeout xxxArguments:
--method: Search direction.--strategy: Search algorithm.--max_depth: Maximum search depth.--timeout: Timeout in seconds per problem.--beam_size: Beam size.--process_count: Number of parallel processes.
The default dataset path is src/fgps. You can specify a custom path:
python run.py --path_datasets /path/to/datasetsLogs are saved in src/fgps by default. Change the log directory:
python search.py --path_logs /path/to/logsIf you find this work useful in your research, please cite our paper:
@article{xu2025,
title={Solving Solid Geometric Problems by Neural-Symbolic Reasoning},
author={Xu, Ruoran and Cheng, Haoyu and Dong, Bin and Wang, Qiufeng},
journal={Conference Submission},
year={2026}
}