Math Operation Embeddings for Open-ended Solution Analysis and Feedback

Mengxue Zhang, Zichao Wang, Richard G. Baraniuk, Andrew S. Lan

Introduction

Providing personalized feedback in math education is highly effective but notoriously difficult to scale. Traditional Intelligent Tutoring Systems (ITS) rely on "top-down" cognitive models where domain experts manually map every possible correct path and anticipate every "buggy" rule or common mistake. This creates an "expert bottleneck," making it labor-intensive to apply to the millions of math problems found in textbooks and online forums. This research proposes a "bottom-up," data-driven method that learns to recognize math operations and errors directly from student data, allowing automated feedback to generalize across different problem types.

Methodology

The core innovation is treating a math operation as a transformation that moves a math expression from one point to another in a high-dimensional embedding space.

Math Expression Encoding

Instead of treating math as simple text strings, the authors use a tree-structured encoder. Math expressions are parsed into operator trees where nodes represent operators (e.g., $+$, $\times$) and leaves represent numbers or variables. This captures the inherent hierarchical structure of mathematics.

Tree-based encoding process from expression to embedding.

Embedding Models

The researchers explored several representation techniques:

  • Implicit Representations: Classifiers (GRU, CNN, and Tree-based) were trained to predict the operation performed between two consecutive steps.
  • Explicit Representations (TransE and TransR): TransE assumes operations are linear translations ($e_2 \approx e_1 + h_z$). TransR projects expressions into a specific "relation space" for each operation, acknowledging that different operations transform expressions in fundamentally different ways.

To overcome the scarcity of labeled student data, a synthetic generator created millions of equation-solving steps to pre-train these models.

Datasets

The models were evaluated using two primary sources:

  1. CogTutor 2010 Dataset: Real-world data containing over 50,000 steps from students using the Cognitive Tutor system for Algebra I, labeled as correct (OK), buggy (BUG), or general error (ERROR).
  2. Synthetic Dataset: 7,000 steps generated by applying standard algebraic operations to random expressions to test generalization from "perfect" data to messy student input.

Key Results and Insights

The study revealed that tree-based embeddings significantly outperform sequence-based models like GRUs or CNNs. This confirms that math is inherently structural; a tree-based model understands that $3(x+2)$ is a single unit being transformed.

Example of predicted math operations and feedback for student steps.

Key performance metrics include:

  • Operation Classification: The Tree-Embedding (TE+C) model achieved 99.8% accuracy on correct student steps.
  • Generalization to Errors: When students made mistakes, the model still identified the intended operation with approximately 95% accuracy.
  • Feedback Prediction: The system predicted specific human-expert feedback messages with 78.7% accuracy.
  • Cross-Distribution Success: When trained on synthetic data and tested on real student data, the tree-based model maintained ~83% accuracy, whereas standard NLP models dropped to ~62%.

Conclusion and Future Work

By modeling math as "motion" in a vector space, this approach allows systems to calculate student intent even during incorrect execution. However, current models focus on single steps rather than multi-step strategies. Future work aims to extend this to geometry and calculus, integrate natural language feedback, and use these representations within reinforcement learning frameworks to discover optimal tutoring strategies autonomously.

Summary updated

BibTeX
@inproceedings{zhang2021math,
  author = {Mengxue Zhang and Zichao Wang and Richard G. Baraniuk and Andrew S. Lan},
  title = {{Math Operation Embeddings for Open-ended Solution Analysis and Feedback}},
  booktitle = {EDM},
  year = {2021},
  url = {https://openreview.net/forum?id=ZROvm9SrTWH},
}
Figure