This repository contains the implementation of the Explicit Feature Extraction (EFE) Reasoner, a model designed to improve reasoning about numerical magnitudes in math word problems. The method extends the Deductive-Reasoner architecture by explicitly providing token embeddings for numbers, enabling the model to capture ordering relationships between quantities.
The approach is described in the paper "Explicit Feature Extraction(EFE) Reasoner: A model for Understanding the Relationship between Numbers by Size".
- Adds explicit number features to the Deductive-Reasoner framework
- Uses pre-trained language models such as RoBERTa to embed problem text
- Demonstrated accuracy gains on the SVAMP dataset
Install the required Python packages:
pip install -r requirements.txt
Run training with the default configuration:
python main.py \
--wandb 0 \
--data_path data/processed/svamp \
--bert_model roberta-base
Hyperparameters can be adjusted in main.py
via the get_*_args
functions.
The repository expects preprocessed SVAMP-style datasets in the data/
directory. Prepare the dataset separately before running the code.
datasets/
– dataset loading utilitiesmodel/
– EFE Reasoner implementation (wrapper_model.py
etc.)main.py
– training and evaluation script
This project is licensed under the MIT License. See LICENSE
for details.