Skip to content
/ REAL2 Public

Code for NIPS2021 Paper on MATHAI4ED Workshop: "REAL2: An End-to-end Memory-augmented Solver for Math Word Problems".

Notifications You must be signed in to change notification settings

sfeng-m/REAL2

Repository files navigation

REAL2

Code for NIPS2021 Paper on MATHAI4ED Workshop: "REAL2: An End-to-end Memory-augmented Solver for Math Word Problems".

REAL2: improve the effectiveness of REAL model to solve math work problems(MWP) by optimizing the memory module.

environment

python3.6, pytorch1.2
You can install related packages directly through "pip install requirements.txt"

preprocess data

python3 memory_module.py

train:

 python3 run.py --is_train --num_train_epochs 50 \
    --start_lr_decay_epoch 25 --dataset math23k \
    --retrieve_model_name cnn --retrieve_topn 10 --topk 3 

test:

python3 run.py --dataset math23k  \
    --retrieve_model_name cnn --retrieve_topn 10 --topk 3 

framework

result

To investigate the effectiveness of the trainable memory module, we implemented our framework follows the settings of REAL and only modified the framework of stage 1 part. In particular, we compare different backbone of memory module that involves TextCNN, TextRCNN, Transformer, and BERT model.

Acknowledgments

Our code is based on unilm . We thank the authors for their wonderful open-source efforts. We use the same license as unilm.

About

Code for NIPS2021 Paper on MATHAI4ED Workshop: "REAL2: An End-to-end Memory-augmented Solver for Math Word Problems".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages