Abstract
Providing personalized feedback for open-response mathematical questions is a significant challenge in educational technology. This paper explores the use of character-level Long Short-Term Memory (LSTM) networks to model mathematical problem-solving as a sequence-to-sequence task. By training on synthetic step-by-step polynomial factorization data, the model learns to identify student errors and suggest hints based on the predictive likelihood of character sequences. While the system demonstrates high accuracy for lower-order polynomials, it reveals limitations in handling the logical depth required for complex multi-step problems.
Introduction
Personalized learning remains a primary goal in modern education, yet its implementation is hindered by the lack of scalable resources for providing bespoke feedback. While automated grading for multiple-choice questions is widespread, open-response mathematical questions require a deeper "understanding" of logic. Existing tools often fall into two categories: rule-based systems like Wolfram Alpha, which are powerful but rigid and require manual coding for every domain, and Mathematical Language Processing (MLP) frameworks, which can grade responses but often fail to provide meaningful feedback. This research investigates whether deep learning can bridge this gap by learning mathematical operations directly from data.
Methodology
The researchers treated mathematical derivation as a sequence-to-sequence task, employing a Long Short-Term Memory (LSTM) network to handle long-range dependencies in sequential data.
Character-Level Processing and Curriculum Learning
Unlike traditional models that treat equations as single tokens, this architecture processes responses character-by-character (e.g., x, ^, 2). To improve training efficiency, the authors utilized "curriculum learning," where the model was first trained on simple first-order polynomials before gradually introducing more complex second- and third-order equations.
Dataset Generation
Due to the scarcity of real-world step-by-step student data, a synthetic dataset was created using the Wolfram Alpha API. This dataset comprised 200,000 step-by-step solutions for polynomial factorization, including both mathematical expressions and concise natural language explanations. The scope was limited to single-variable polynomials with coefficients less than 10.
Automated Feedback via Predictive Likelihood
A core innovation of this approach is the use of "predictive likelihood" as a grading metric. Because the LSTM predicts the next character in a sequence, it can assign a probability to the student's actual input. If a student provides a character with a very low predictive likelihood, the system flags that specific point as a likely error.
As shown in the figure above, this allows the system to automatically point students to the exact location where their logic diverged from the correct path, providing a foundation for automated, personalized hints.
Experimental Results
The performance of the model was evaluated across nine different configurations, varying the number of hidden units and layers.
As detailed in the table above, the best-performing model (512 hidden units, 2 layers) achieved a character-level error rate of 8.21%. However, predicting entire mathematical expressions correctly proved significantly more difficult, with the best model yielding an expression-level error rate of 38.95%.
Performance was highly dependent on problem complexity. The model was nearly perfect on first-order polynomials and maintained strong performance on second-order problems (15% error). However, it failed completely on third-order polynomials (100% error), which require the intermediate step of factoring out a second-order polynomial—a level of logical depth the current character-level LSTM could not capture.
Discussion and Limitations
The results suggest that while mathematical derivation can be modeled similarly to natural language, there is a "complexity ceiling" for character-level LSTMs. The failure on third-order polynomials indicates that multi-step logic requires more robust architectural considerations. Furthermore, the reliance on synthetic data means the model has yet to be tested against the "messiness" of real student responses, which include typos and non-standard notation. Future work will focus on scaling the architecture for higher-order logic and incorporating real-world student data to improve robustness across diverse algebraic domains.
Summary updated