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.
python3.6, pytorch1.2
You can install related packages directly through "pip install requirements.txt"
python3 memory_module.py
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
python3 run.py --dataset math23k \
--retrieve_model_name cnn --retrieve_topn 10 --topk 3
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.
Our code is based on unilm . We thank the authors for their wonderful open-source efforts. We use the same license as unilm.