Math Word Problems (MWPs) serve as a critical benchmark for evaluating the reasoning capabilities of artificial intelligence. Solving these problems requires a model to parse natural language descriptions and translate them into structured mathematical expressions. Historically, research has diverged into two main paradigms: generation-based methods, which treat the equation as a sequence or tree to be generated, and deductive methods, which construct solutions incrementally by combining known quantities.
However, both approaches suffer from significant limitations. Generation-based methods often lack efficiency, repeatedly generating identical sub-expressions without a mechanism for reuse. Deductive methods, while better at reusing intermediate results, are typically restricted to simple binary operators ($+, -, \times, \div$) and rely on computationally expensive exhaustive searches.
In their EMNLP 2023 paper, Yuxuan Hu and colleagues propose GeDe (Generation-based Deductive method), a hybrid framework that leverages a novel graph structure to address these "fatal flaws."
The Multivariate Directed Acyclic Graph (mDAG)
The core innovation of this work is the multivariate Directed Acyclic Graph (mDAG). Unlike traditional binary expression trees, which can become excessively deep and redundant, the mDAG allows for the reuse of intermediate results and the inclusion of "advanced operators."
As shown in Figure 1, the mDAG representation significantly simplifies the reasoning path. For instance, a single node can represent a "linear equation solver" that takes multiple inputs and produces multiple outputs (e.g., $q_0, q_1$). This abstraction mimics human problem-solving, where complex sub-problems are solved as single units rather than a long string of basic arithmetic steps.
The GeDe Model Architecture
The GeDe model implements a recursive reasoning process designed to navigate the mDAG structure. It consists of two primary components: a re-encoder and a decoder.
Iterative Reasoning and Re-encoding
At each reasoning step, the model doesn't just look at the original problem; it considers the entire state of the solution. The Re-Encoder (based on a Pre-trained Language Model like RoBERTa) takes the original problem text and appends the mathematical operations generated in previous steps. This "dynamic context" allows the model to update its understanding of the problem as new quantities are derived.
Decoding and Search
A GRU-based decoder then generates the next operation. To ensure high-quality outputs, the authors employ a Hierarchical Beam Search. This involves an "inner" search to construct individual operations and an "outer" search to maintain the most promising overall reasoning sequences.
Evaluation and Key Insights
The researchers evaluated GeDe across four standard benchmarks (Math23k, MAWPS, MathQA, and SVAMP) and a newly created synthetic dataset, CMWPA (Complex Math Word Problems with Advanced operators).
Performance on MathQA
GeDe achieved a new state-of-the-art accuracy of 81.5% on the challenging MathQA dataset, outperforming the previous leader (RoBERTa-DR) by 2.9%. Notably, GeDe's performance advantage was most pronounced on problems requiring five or more operations, demonstrating its superior ability to handle long-term reasoning.
The Power of Abstraction
The CMWPA dataset highlighted the impact of advanced operators. By using multivariate operators for tasks like solving systems of equations or finding integrals, the average reasoning depth was reduced from approximately 35 steps to just 3. This reduction led to a dramatic accuracy increase from 32% to 95%, proving that structural abstraction is a powerful tool for complex math.
Efficiency and Robustness
Despite having only 126 million parameters, GeDe performed on par with or better than models nearly five times its size. This suggests that architectural inductive biases—specifically the mDAG and iterative re-encoding—can be more effective than simple parameter scaling. Furthermore, the model's success across both English and Chinese datasets indicates that the underlying logic of mDAG is language-agnostic.
Limitations and Future Directions
While GeDe represents a significant step forward, it faces two primary challenges:
- Computational Overhead: Re-encoding the entire input sequence at every step increases computational costs as the reasoning path grows.
- Context Constraints: The concatenation of problem text and operations can eventually exceed the transformer's maximum input length (typically 512 tokens).
Future research will likely explore input compression techniques to summarize previous reasoning steps, enabling the model to tackle even more extensive and complex mathematical problems.
Summary updated