Introduction
Solving Math Word Problems (MWPs) represents a significant challenge for Natural Language Processing, requiring a model to act as both a linguist and a mathematician. To succeed, a solver must navigate the narrative "story" (semantics) while simultaneously tracking the underlying mathematical "logic" (quantities). Current solvers typically rely on a single, joint representation; however, research suggests that a unified modal approach often fails to capture the nuances of both domains effectively.
The core challenge in MWP solving is generalization across diverse problem types:
- Story Problems: Rich in background information and character behaviors.
- Algebra Problems: Focused on formal notations and elementary concepts.
- Knowledge Problems: Require external logic, such as geometry or number sequences.
Existing models often exhibit "uni-modal bias," where optimizing for complex quantity relationships can degrade semantic understanding, and vice versa.
The C-MWP Architecture
To address these limitations, researchers have developed the Compositional Math Word Problem Solver (C-MWP). This bi-modal architecture disentangles semantic text processing from mathematical quantity logic, allowing for a more specialized and robust representation.
The heart of the system is the CMEncoder, which comprises three primary components:
- Semantic Encoder: Utilizes a BiGRU or a pre-trained language model (e.g., MWP-BERT) to extract context and objectives from the problem text.
- Quantity Encoder: Employs a Graph Transformer to process "Quantity Comparison" and "Quantity Cell" graphs, mapping relationships between numbers and their textual context.
- Dynamic Fusion Block: Facilitates interaction between modalities through cross-modal attention, allowing the model to balance semantic and quantity features based on the specific problem type.
A key innovation is the ability to stack these CMEncoder blocks. By iteratively updating representations through multiple layers of encoding and fusion, the model mimics a human's "multiple glimpses" at a problem to refine understanding.
Experimental Results and Insights
C-MWP was evaluated on major benchmarks, including Math23k (Chinese) and MAWPS (English). The model achieved state-of-the-art (SOTA) performance, with the PLM-backed version reaching 86.1% accuracy on Math23k and 89.1% on MAWPS. Notably, the RNN-based variant became the first of its kind to surpass the 80% accuracy threshold on Math23k while maintaining a compact parameter footprint (7.6M).
The disentangled approach proved particularly effective for "Knowledge Problems," where C-MWP showed a significant performance jump (from 57.1% to 66.7% for RNNs). This suggests that better grounding between semantics and quantities enables the model to reason through problems where the mathematical logic is less explicit.
Ablation studies confirmed that both the compositional structure and the dynamic fusion mechanism are critical, as removing either component led to a 2-3% drop in accuracy.
Conclusion and Future Work
C-MWP demonstrates that disentangling and then dynamically fusing semantic and mathematical modalities is a powerful strategy for MWP solving. While the model excels at generating correct executable equations, a remaining challenge is explainability. Future research aims to make these compositional encodings more interpretable, paving the way for AI tutors capable of providing step-by-step reasoning for students.
Summary updated