The Challenge of Linguistic Shortcuts
Traditional machine learning models for math word problems often rely on shallow pattern matching. For instance, a model might learn that the word "gave" implies subtraction. However, this heuristic fails when the context changes (e.g., "Bob gave Alice 2 apples; Alice now has 5. How many did she start with?"). To address this, researchers have developed a solver that moves beyond simple vocabulary biases by mapping natural language to structured mathematical concepts—termed "declarative knowledge."
Bridging Language and Logic: Declarative Knowledge
The proposed framework organizes mathematical reasoning into a hierarchy of Concepts and Declarative Rules.
- Concepts: Broad categories like Transfer (moving items), Dimensional Analysis (unit matching), and Part-Whole Relations.
- Declarative Rules: Specific logical conditions that dictate operations. For example, a transfer rule might state that if one person "has" an amount and another "gives" them more, the operation is addition.
By forcing the model to select a specific rule, the system ensures that the resulting equation is grounded in logic rather than vocabulary association. This approach makes the model's reasoning process explicit and interpretable.
Learning from Latent Variables
A major hurdle in training such models is the cost of annotating every intermediate reasoning step. The researchers overcame this by treating rule selection as a latent variable. During training, the model is only provided with the problem text and the final answer. It uses a two-stage learning process based on Structured Support Vector Machines (SVM) to "discover" the most likely sequence of rules that lead to the correct solution.
For inference, the system uses beam search to explore different combinations of numbers and rules, eventually selecting the derivation with the highest score.
Proving Robustness: The Perturb Dataset
To test the system's resilience against linguistic tricks, the authors created the Perturb Dataset. This dataset consists of problems that were minimally modified to flip the required operation (e.g., changing a "plus" problem to a "minus" problem while keeping the vocabulary similar).
While standard models often fail these tests due to their reliance on word associations, the KNOWLEDGE system remains robust. In unbiased scenarios, it achieved 65.66% accuracy on the Perturb dataset, outperforming the next best system (46.29%) by a significant margin.
Results and Interpretability
The KNOWLEDGE system significantly outperformed existing state-of-the-art solvers across several benchmarks. On the "AggregateLex" dataset, which features low lexical overlap between training and testing, KNOWLEDGE outperformed competitors by approximately 9%. This confirms that the model understands the underlying math concepts rather than just memorizing word-to-operator mappings.
Furthermore, because the model must explicitly select a rule like "Part-Whole Relationship" to perform an operation, the output isn't just a number—it’s an explanation. Users can see exactly why the model chose a specific operation.
Limitations and Future Work
Currently, the system is limited by its rule coverage, missing specific formulas like area or interest. It also depends on the accuracy of upstream NLP tools like dependency parsers; if a parser fails to identify a subject or verb correctly, the declarative rule cannot fire. Future work aims to extend this declarative mapping to more complex domains, such as financial reports or algebraic problems with implicit variables.
Summary updated