Skip to content

chen-judge/UniGeo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UniGeo

Jiaqi Chen, Tong Li, Jinghui Qin, Pan Lu, Liang Lin, Chongyu Chen, Xiaodan Liang. "UniGeo: Unifying Geometry Logical Reasoning via Reformulating Mathematical Expression". Conference on Empirical Methods in Natural Language Processing (EMNLP 2022)

We construct a large-scale Unified Geometry problem benchmark, UniGeo, which contains 4,998 calculation problems and 9,543 proving problems. We also present a unified multitask Geometric Transformer framework, Geoformer, to tackle calculation and proving problems simultaneously in the form of sequence generation, which finally shows the reasoning ability can be improved on both two tasks by unifying formulation.

If you have any questions, please contact me by email: jadgechen@gmail.com

Datasets

Download the UniGeo dataset from Google Drive.

Create a path datasets and move the UniGeo into it.

The code structure is shown below:

./datasets
    UniGeo/ 
        proving_test.pk  
        proving_train.pk  
        proving_val.pk  
        ...
        
./Geoformer
    scripts/
    snap/
    src/
    ...

Setup

# Create python environment
conda create -n unigeo python=3.7
source activate unigeo

# Install python dependencies
pip install -r requirements.txt

# Download T5 backbone checkpoint
python download_backbones.py

Unified Training

Execute this script to train the model.

cd Geoformer
bash scripts/train.sh 1

The pretrained checkpoint can be founded here (pretrained.pth). You can modify the following argument to change the path to pre-trained model.

--load snap/pretrained

Pre-training

You can also execute this script to pre-train a new model.

cd Geoformer
bash scripts/pretrain.sh 1

Evaluation

Execute this script to evaluate the model.

cd Geoformer
bash scripts/evaluate.sh 1

The model checkpoint of the reported Geoformer + Pretraining can be founded here (geoformer.pth). You can modify the following argument to test geoformer.pth or your trained model.

--load snap/geoformer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published