What Makes Math Word Problems Challenging for LLMs?

Kv Aditya Srivatsa, Ekaterina KochmarNAACL 2024 · DOI

TL;DR

This paper delves into what makes math word problems (MWPs) difficult for Large Language Models (LLMs). By analyzing linguistic, mathematical, and real-world knowledge features, the authors identify specific problem characteristics that challenge LLMs and build classifiers to predict LLM performance based on these features. This work offers a crucial step towards understanding and improving LLM capabilities in complex reasoning tasks.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown remarkable progress in various NLP tasks, including solving mathematical puzzles. However, they still struggle with math word problems (MWPs), which require not just mathematical computation but also a deep understanding of natural language and real-world context. While previous research has focused on evaluating LLM performance or improving it through prompting techniques, there's a significant knowledge gap regarding why MWPs are challenging for LLMs. This paper aims to fill that gap by dissecting the inherent characteristics of MWPs that contribute to their difficulty for LLMs.

Methods

The researchers employed a feature-based approach to analyze MWPs. They extracted a comprehensive set of features from both the questions and their corresponding gold solutions, categorizing them into:

  • Linguistic Features: These capture the phrasing of the question, including token length, sentence length, vocabulary sophistication, syntactic complexity, and readability.
  • Mathematical Features: These focus on the mathematical operations, reasoning steps, and the number and diversity of operations required to solve the problem.
  • Real-world Knowledge & NLU-based Features: These assess the amount of external information or common-sense reasoning needed to solve the problem, such as understanding units of measurement or interpreting phrases like "half."

Using these features, they trained statistical classifiers (Logistic Regression, Decision Tree, and Random Forest) to predict whether an LLM would solve a given MWP correctly. They also conducted ablation studies to understand the impact of each feature type.

Datasets

The primary dataset used in this study is GSM8K (Cobbe et al., 2021). This dataset comprises high-quality, human-generated MWPs in English, known for its diversity and minimal templating, making it suitable for analyzing LLM performance variations. The dataset was split into training (7,473 instances) and testing (1,319 instances) sets.

Key Insights and Ideas

  • Mathematical Complexity is Key: The study strongly suggests that the number and diversity of mathematical operations, along with the use of infrequent numerical tokens, are significant contributors to MWP difficulty.
  • Linguistic Nuances Matter: Longer questions with lower readability scores and complex syntactic structures also pose challenges for LLMs. This highlights that natural language understanding is as crucial as mathematical computation.
  • Real-World Knowledge is a Hurdle: Problems requiring external knowledge (e.g., unit conversions) are often difficult for LLMs, indicating a limitation in their ability to integrate and apply common-sense reasoning.
  • Feature Combinations are Crucial: Interestingly, using all feature types (linguistic, mathematical, and world knowledge) did not always yield the best classification performance. The optimal feature set varied depending on the LLM, suggesting that different models might rely on different aspects of a problem.
  • Predicting LLM Performance is Possible: The feature-based classifiers demonstrated a reasonable ability to predict LLM performance, indicating that these extracted features effectively capture the essence of MWP difficulty.

Key Results

The study found that LLMs like MetaMath-13B, which is fine-tuned on math QA data, generally outperformed general-purpose models like Llama2 and Mistral-7B. For instance, MetaMath-13B achieved the highest success rate on the GSM8K test set.

The classification results showed that Random Forest classifiers performed best, achieving accuracy scores between 71.7% and 81.4%. The analysis of feature importance revealed that mathematical features like Gx_op_unique_count (number of unique math operations) and Gx_op_diversity (diversity of operations) were highly indicative of problem difficulty. Linguistic features such as Qx_np_count (number of noun phrases) and Qx_flesch_kinkaid_grade (readability) also played a significant role.

Ablation studies indicated that for some LLMs, mathematical features alone were sufficient for good classification, while for others, a combination of linguistic and mathematical features was optimal.

Limitations and Future Work

The authors acknowledge several limitations:

  • Limited LLM Set: The study tested a specific set of open-source LLMs. Future work plans to include a broader range of models.
  • Limited Classification Models: The use of traditional classifiers might limit the predictive power. More advanced models could potentially improve performance.
  • Single Dataset: The findings are based on the GSM8K dataset. Future work will involve applying the approach to other MWP datasets to verify the consistency of the findings.

Future work will focus on:

  • Informed Modifications: Using the identified features to modify MWPs and study the impact on LLM reasoning and performance.
  • Broader LLM and Dataset Coverage: Expanding the scope of tested LLMs and datasets.
  • More Powerful Classifiers: Exploring more sophisticated classification models.

Summary updated

BibTeX
@inproceedings{srivatsa2024what,
  author = {KV Aditya Srivatsa and Ekaterina Kochmar},
  title = {{What Makes Math Word Problems Challenging for LLMs?}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.72},
}
Figure