[Paper Review] MWPToolkit: An Open-Source Framework for Deep Learning-Based Math Word Problem Solvers
MWPToolkit is an open-source, modular framework for deep learning-based math word problem (MWP) solvers, decomposing MWP pipelines into reusable components (config, data, model, evaluation) and enabling standardized benchmarking. It supports 17 models across 6 datasets, including both single- and multiple-equation generation tasks, with built-in hyper-parameter search, achieving state-of-the-art performance on HMWP (GPT-2: 49.0% answer accuracy) and Draw1K (LSTMVAE: 45.9% answer accuracy).
Developing automatic Math Word Problem (MWP) solvers has been an interest of NLP researchers since the 1960s. Over the last few years, there are a growing number of datasets and deep learning-based methods proposed for effectively solving MWPs. However, most existing methods are benchmarked soly on one or two datasets, varying in different configurations, which leads to a lack of unified, standardized, fair, and comprehensive comparison between methods. This paper presents MWPToolkit, the first open-source framework for solving MWPs. In MWPToolkit, we decompose the procedure of existing MWP solvers into multiple core components and decouple their models into highly reusable modules. We also provide a hyper-parameter search function to boost the performance. In total, we implement and compare 17 MWP solvers on 4 widely-used single equation generation benchmarks and 2 multiple equations generation benchmarks. These features enable our MWPToolkit to be suitable for researchers to reproduce advanced baseline models and develop new MWP solvers quickly. Code and documents are available at https://github.com/LYH-YF/MWPToolkit.
Motivation & Objective
- Address the lack of standardized, fair, and comprehensive comparison among MWP solvers due to inconsistent evaluation settings and dataset splits.
- Provide a unified, modular, and extensible framework to streamline the development and reproduction of MWP solvers.
- Enable researchers to easily compare, reproduce, and extend existing MWP models through reusable components and standardized evaluation protocols.
- Support both single- and multiple-equation generation tasks with comprehensive benchmark datasets and model implementations.
- Facilitate fair performance comparison via built-in hyper-parameter search and consistent k-fold cross-validation across all models and datasets.
Proposed method
- Decompose MWP solving into four core components: config (hyperparameter management), data (dataset preprocessing), model (architecture implementation), and evaluation (metric calculation).
- Decouple models into highly reusable modules, allowing flexible combination and replacement of components to build new models.
- Implement a built-in hyper-parameter search function to optimize model performance and reduce bias from suboptimal configurations.
- Support multiple model architectures including Seq2Seq, Seq2Tree, Graph2Tree, and pre-trained models (GPT-2, BERTGen, RoBERTaGen) and non-pretrained models (LSTMVAE, Transformer).
- Standardize evaluation using equation accuracy and answer accuracy across 4 single-equation and 2 multiple-equation generation benchmarks.
- Ensure reproducibility by matching original hyperparameters and reporting results consistent with published baselines.
Experimental results
Research questions
- RQ1How can a unified, modular framework improve reproducibility and fair comparison across diverse MWP solvers?
- RQ2What performance gains can be achieved through systematic hyper-parameter search across multiple MWP models and datasets?
- RQ3How do different model architectures (e.g., Seq2Seq, Graph2Tree, pre-trained models) compare on both single- and multiple-equation MWP benchmarks?
- RQ4Why is the multiple-equation generation task underexplored, and how can standardized benchmarks help advance research in this area?
- RQ5To what extent can a modular, open-source toolkit accelerate the development and evaluation of new MWP solving methods?
Key findings
- LSTMVAE achieved the highest answer accuracy (45.9%) on the Draw1K dataset for multiple-equation generation, outperforming other models including GPT-2 and RoBERTaGen.
- GPT-2 achieved the best answer accuracy (49.0%) on the HMWP dataset for multiple-equation generation, indicating strong performance in complex equation reasoning.
- Transformer and TRNN models underperformed across most benchmarks, with answer accuracy below 30% on multiple-equation tasks, highlighting architectural limitations.
- BERTGen and RoBERTaGen showed moderate performance on multiple-equation tasks (39.5% and 41.0% answer accuracy, respectively), suggesting limited effectiveness for complex equation generation.
- The framework successfully reproduced baseline results within acceptable variance of original publications, validating its reliability and reproducibility.
- The comprehensive comparison revealed that pre-trained models like GPT-2 and LSTMVAE are particularly effective for multiple-equation generation, suggesting a need for more research in this area.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.