Interpretable Math Word Problem Solution Generation via Step-by-step Planning

Mengxue Zhang, Zichao Wang, Zhichao Yang, Weiqi Feng, Andrew S. Lan

Introduction

Large Language Models (LLMs) have demonstrated impressive capabilities in solving mathematical word problems (MWPs). However, they often lack interpretability, frequently producing "Chain-of-Thought" (CoT) explanations that are incoherent or mathematically inconsistent with the final answer. This "hallucination" of reasoning paths poses a significant challenge, particularly in educational contexts where the process is as important as the result.

To address this, researchers presented Planning-LM at ACL 2023. This framework forces models to predict a high-level mathematical operation—a "plan"—before generating each natural language solution step. This structured approach improves both accuracy and interpretability, even for smaller models.

Methods: Step-by-Step Planning

The core of Planning-LM is a two-stage iterative process for each step of the solution:

  1. Operation Prediction: Given the problem and previous steps, the model predicts the next required mathematical operation (e.g., [n+n]). This is handled as a classification task using the hidden state of the LM.
  2. Controllable Step Generation: The predicted operation serves as a prompt. The model then generates the natural language explanation and the specific calculation, constrained by this plan.
The step-by-step planning process, alternating between operation prediction (O) and step generation (S).

Technical Innovations

  • Infix Prompting: The researchers found that placing the operation prompt after the problem history (infix) is more effective than placing it at the beginning (prefix), likely because it keeps the problem context more accessible to the model's attention mechanism.
  • Unified Architecture: The framework uses the same underlying LM (e.g., GPT-2 or T5) for both planning and generation, requiring only a minimal increase in parameters (0.02%) for the operation classifier.
  • Asynchronous Optimization: Training is stabilized by first training the generator, then the planner, and finally iterating between the two.

Key Results and Insights

Evaluated on the GSM8K dataset—a benchmark of 8.5K grade-school math problems—Planning-LM showed significant improvements over standard CoT methods.

  • Efficiency: A small GPT-2 model (117M parameters) using Planning-LM achieved a solve rate of 14.1%, nearly doubling the 8.1% rate of a standard CoT-tuned version. It even rivaled the performance of a much larger GPT-2 Medium (345M parameters).
  • Consistency: The "ACC-eq" metric, measuring the correctness of generated equations, improved across all model sizes, indicating higher mathematical consistency.
  • Human Preference: In blind evaluations, humans preferred Planning-LM solutions 55.4% of the time, citing clearer explanations and better reasoning strategies.
Human evaluation results comparing Planning-LM to standard Chain-of-Thought across overall quality, reasoning strategy, and explanation clarity.

Strategy Control and Scalability

One unique advantage of Planning-LM is strategy control. By manually overriding the operation prompt, users can force the model to adopt specific problem-solving strategies. Furthermore, the approach scales; when applied to GPT-3 (text-davinci-003) via few-shot prompting, the planning method achieved a 72.3% solve rate, outperforming standard CoT (68.5%).

Limitations and Future Work

Currently, the model relies on a finite set of 20 hand-crafted operation classes, which may limit its application to more complex domains like calculus. Future work aims to transition from a fixed classifier to an operation generator for greater flexibility and to incorporate a "verifier" to assess plan reliability before execution.

Summary updated

BibTeX
@inproceedings{zhang2023interpretable,
  author = {Mengxue Zhang and Zichao Wang and Zhichao Yang and Weiqi Feng and Andrew S. Lan},
  title = {{Interpretable Math Word Problem Solution Generation via Step-by-step Planning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=goSvX_rfiC},
}
Figure