Scalable and Explainable Automated Scoring for Open-Ended Constructed Response Math Word Problems (2023)

Abstract: Open-ended constructed response math word problems (“math plus text”, or MPT) are a powerful tool in the assessment of students’ abilities to engage in mathematical reasoning and creative thinking. Such problems ask the student to compute a value or construct an expression and then explain, potentially in prose, what steps they took and why they took them. MPT items can be scored against highly structured rubrics, and we develop a novel technique for the automated scoring of MPT items that leverages these rubrics to provide explainable scoring. We show that our approach can be trained automatically and performs well on a large dataset of 34,417 responses across 14 MPT items.

## introduction math word problems are a common question type in both formative and summative mathematics assessment. in a math word problem, the prompt describes a scenario and asks the student to calculate some value or construct some mathematical expression pertaining to that scenario. such problems assess both the student's ability to carry out mathematical computation and reasoning as well as their ability to apply their knowledge in determining how to solve a mathematical problem. automated assessment of closed constructedresponse (cr) math problems is straightforward, although complexities arise due to the variety of possible representations for a given mathematical expression. examples of automated assessment systems for closed cr items include m-rater @xcite and mathquery @xcite . in contrast, open-ended cr math problems are difficult to automatically score, since responses to open cr items combine mathematical expressions with prose explanations. and if a problem asks students to both compute a value and explain their computation, that introduces the complexity of partial credit; in the dataset we consider in this work, score ranges for items vary between 0-2 and 0-4. even for humans, these sorts of items, with partial credit and open-ended responses, are time-consuming to score @xcite . automated assessment of cr items outside of mathematics is now common, thanks to the achievements of researchers in the areas of automated essay scoring (aes) and automated short answer scoring (sas). the reliability of aes systems is often comparable to that of humans @xcite , and the same is true for sas systems @xcite . given that mpt items are themselves cr items, this suggests that such approaches could also be used for mpt; research in this area is promising, but sparse @xcite . how mathematical expressions are encoded in response text is a key attribute of a given mpt dataset. in this work, we use data generated by a writing environment that allows students to enter mathematics using a math editor tool. any math written in this tool is represented in the final response text as content mathml (an xml-based specification for the representation of mathematics). as students can also write math outside of the math editor, the dataset that we consider in this work contains math represented both in mathml and in plain text, often within the same response. given this set of challenges, our interest is in creating an explainable predictive model for mpt. such a model would be able to differentiate, for example, between a response that received a 1 out of 3 because it contained the correct final answer without showing work, and a response that received a 1 out of 3 because it contained correct reasoning but incorrect computations. a model that successfully achieved this would be useful both for students, as they would better understand why their responses received their assigned scores, as well as for test administrators, as the explanations would build trust in the validity of the model's scoring. this paper is structured as follows. we begin with a discussion of related work and a detailed description of our task. we introduce a novel scoring model that uses the rubric's structure to provide explainable scoring for mpt, and show how our model can be automatically trained. we then present experimental results that show the effectiveness of our approach, and conclude with a discussion of the present and future work. ## related work there is a substantial literature around the automated scoring of non-mathematical cr items. work on aes dates back to the 1960s @xcite , and modern-day aes systems involve a wide variety of approaches, including linear regression @xcite , random forests @xcite , and neural networks @xcite @xcite ). short answer scoring is also relevant, as our mpt responses tend to be only a few hundred characters long. for sas, many systems involve paraphrase detection, or some similar notion of semantic similarity to reference answers @xcite @xcite . while much work has been done on aes and sas, as well as around the automated solving of math word problems (e.g. @xcite @xcite , work around the automated scoring of math word problems is more limited. livne et al. demonstrate a system that successfully uses instructorprovided reference answers to automatically score responses to closed cr math word problems @xcite . lan et al. present a system that predicts scores by embedding multi-step math responses using a bag-of-expressions model, a bagof-words approach designed to capture mathematical features @xcite . once embedded, they use a combination of clustering and limited human scoring to score all responses. however, while their items were open cr math word problems, any prose in student responses was ignored by the scoring system. some systems do attempt to grapple with the full complexity of open cr math word problems. @xcite a system that can score cr math word problems for summative assessments whose responses contain both prose and math @xcite . their system assumes that all math is encoded as mathml, and prose is handled by estimating the semantic similarity of response phrases to known reference phrases. @xcite investigated the effectiveness of random forests, xgboost, and lstms for scoring formative open cr math problems with only plain text responses, and follow-up work has shown that transformer-based approaches can also perform well on this task @xcite . as mentioned above, we expect that many realworld mpt datasets will include responses that contain math represented both as plain text and as mathml. to the best of our knowledge, @xcite is the only published work that attempts to score these sorts of responses @xcite . in their work, they extract plain text math from student responses using regular expressions, and then use the m-rater (fife, 2017) math scoring system to evaluate the correctness of this extracted math. they then build a feature space that includes binary features indicating whether certain rubric elements were covered by the student response. by training machine learning models on this feature space, they create models with interpretable features. this process requires knowledge of the rubric during training. our work differs from @xcite in that the model that we introduce relies only on features that are aligned with the rubric, and produces scores that are inherently explainable. furthermore, it requires no knowledge of the rubric during training. we also evaluate our approach across a wider variety of items with more responses per item. ## open constructed response math word problems the dataset we use in this work is proprietary, so we have adapted an item from the gsm8k dataset foot_0 @xcite as an illustrative example, shown in finally, the example response shows a typical mixing of mathml and prose. example prompt albert is wondering how much pizza he can eat in one day. he buys 2 large pizzas and 2 small pizzas. a large pizza has 16 slices and a small pizza has 8 slices. if he eats it all, how many pieces does he eat that day? example rubric 1 point for correct computation (48 pieces). 1 point for correct modeling of the number of slices for the large pizza (2 * 16) and the small pizza (2 * 8). 1 point for correct modeling of the total number of slices (32 + 16). example response he eats 32 from the largest pizzas @xmath0. he eats 16 from the small pizza @xmath1. he eats 48 pieces @xmath2. normalized response he eats 32 from the largest pizzas because 2*15=32. he eats 16 from the small pizza because 2*8=16. he eats 48 pieces because 32+16=48. we are focused on word problems that ask the student to construct some mathematical equation and/or compute some number, as well as to provide the work and reasoning that they used in coming to their answer. for some items, this explanation is required to be prose, while for others the chain of mathematical expressions that led to the answer can suffice. each item has a rubric composed of some number of computation, modeling, and reasoning components, each of which is worth one point. computation components generally refer to the presence of a correct final answer, modeling components to showing the correct mathematical derivation of the final result, and reasoning components to an explanation of why those steps were taken. a given rubric may not include all three of these components, and may also define multiple components of a given kind. the final score of a response is the sum of these binary component scores. note that even if a rubric does not require a prose explanation, the student may still include prose in their final response. the characteristics of the dataset used in this work are shown in student responses are written in an environment that supports the entry of both plain text in a conventional text field and of math via a math editor. critically, arbitrary text input is allowed in the math editor, to support the presence of variables in the student answer. while the expectation is that students will use this math editor to write the relevant mathematical expressions, and write the rest of the response outside of the math editor, in practice students often write prose inside of the math editor and math expressions outside of the math editor. thus, we cannot look only at the mathml in a response to identify the mathematical statements produced by the student, and we cannot look only at the plain text to identify their explanations and supporting arguments. because of this, we believe the best way to score mpt responses is by converting them to a normalized form. this normalization process consists of three steps: first, we convert mathematical terms in the response into their symbolic equivalents, e.g. "eight" to "8", or "plus" to "+". next, we need to account for prose written in the math editor. we identify mathml containing chains of variables being multiplied together that appear to spell out english words. when such a chain is found, it is removed from the mathml and converted to plain text by preserving the order of the variables and removing the multiplication operators. this replaces the variables in the mathml by their corresponding plain text word. finally, we transform all remaining mathml into plain text by taking the in-order traversal of the expression tree defined by the mathml. ## explainable scoring as outlined in section 3, the rubrics for our mpt items are highly structured. we leverage this structure to create a new approach to the automated scoring of mpt items by essentially codifying the rubric in a machine-understandable way. the close alignment of our model with the rubric produces predictions that are inherently explainable. rules form the core building block of our approach. rules encode short mathematical expressions and the transformations required to convert them into other lexically distinct but semantically identical forms. for example, a rule encoding "2 + 3" could generate "3.0 + 2" as an alternative form. these alternate forms account for different mathematical properties, principally commutativity and conversion between floats and integers (for whole numbers). to account for variables, we also allow single letters to serve as operands in our expressions. to determine if a rule is present in a student response, we first extract all mathematical text from the normalized text of the response. this is to prevent superfluous words from obscuring the underlying mathematics. see figure 1b for an example. then, if any of the forms of a rule are present as a substring of the extracted math, that rule is considered to be present in the response. the amount of prose in a response is highly itemdependent. to account for items where prose is important, we also include the ability to write regu-lar expressions as rules. such a rule is found in a response if its constituent regular expression has at least one match in the response. assembling these rules into a form that can automatically score responses is done as follows. we define a group to be a list of rules, and we consider a group to be present in a response if any of its constituent rules are present. this allows us to capture mathematics that are equivalent under the rubric but not captured by the lexical transformations of our rules, for instance, "2 * 16" and "16 + 16" could be two valid ways of writing an expected expression. we then create evidence out of these groups. evidence is a list of groups, and we consider evidence to be present in a response if all of its constituent groups are in the response. this allows us to capture rubric elements that require the student to cover multiple areas. for example, if a student needs to show two distinct values to achieve a computation component, we can capture this notion by constructing evidence with two groups, one for each of those two distinct values. finally, to mirror the structure of the rubric components, we collect evidence into scorable traits. a scorable trait contains lists of positive and negative evidence. if any positive evidence and no negative evidence is present in a response, then the scorable trait scores a 1. otherwise, it scores a 0. we include this concept of negative evidence to account for misconceptions and other incorrect mathemat1a . this scorable trait captures a modeling component from the example shown in we construct a number of scorable traits corresponding to the number of components in the rubric, and the final predicted score for a response is the sum of the individual binary trait scores. because we know exactly which rules, groups, evidence, and scorable traits were found or not found when scoring, we can automatically construct an explanation of our predicted scores. see figure 1 for an example of a scorable trait and the score and explanation it produces. ## automated discovery of rules given the hierarchy of rules, groups, evidence, and scorable traits described above, one approach to developing a scoring model would be to define all of these elements manually. while manually constructed models perform well (per our experiments below), requiring manual effort to construct a scoring model prevents the adoption of this approach at any scale larger than a small handful of items. thus, we would like to automate this process. however, our model is not differentiable, so approaches such as stochastic gradient descent can not be used. simulated annealing is a highly flexible opti-mization technique that makes few assumptions about the objective function being optimized @xcite . when applied to our modeling task, simulated annealing maximizes the performance of a model by iteratively adding or removing rules. if a change increases the model's training set performance, we keep it. otherwise, the change is stochastically accepted with a probability based on a temperature variable and the difference in performance between the new and previous states. as the procedure continues over many iterations, the temperature is slowly reduced according to a cooling schedule. the result of this is a process that initially makes many random changes, but that tends towards only making changes that maximize the performance of the model as the temperature decreases. in practice, we evaluate the performance of our models using both accuracy and the unweighted average recall (uar), and so we optimize against both of these metrics during the annealing process. that is, our goal is to maximize the following function: to use simulated annealing, we must define the ways in which an existing model can be altered to generate a new model. we begin by building a set of candidate rules. candidate math expressions are generated by identifying sequences of alternating operands and operators in the math extracted from a response. in this work, we consider sequences of up to six operands. once these expressions have been identified, we rank them according to their information gain. we keep the top n expressions as our set of candidate rules for use in annealing. when humans craft manual rules, they are able to write regular expressions. automatically determining useful regular expressions in full generality is beyond the scope of this work, but providing our automated rules with some ability to reason about prose writing is important. for this reason, we consider all words in the responses, again rank by information gain, and then keep the top m as regular expression rules (that ultimately will match if the given word is present in the response). when annealing our rules, we allow for four transformations: ## experiments to the best of our knowledge, there is no publicly available dataset that features open cr math word problems with a large number of student responses per item. for example, the gsm8k dataset used in our primary goal is to evaluate the performance of our rules-based model, both with manually crafted rules and automatically learned rules. the manual rules used in these experiments were crafted by human experts, who were allowed to view only a randomly sampled subset of the responses for each item. responses used in this way during rule creation were also used for hyperparameter search for the simulated annealing approach, but were excluded from the dataset used in the final experiments. the response counts in we perform a grid search for the cooling rate, number of iterations to run annealing for, and the overall regularization strength γ. our pool of candidate rules consists of the top 500 expressions and top 50 words. we spend 1000 iterations at each temperature, create 3 positive evidences and 1 negative evidence for each trait, allow up to 10 groups per evidence, and set α = 0.0025, and β = 0.01. we use a geometric cooling schedule, and perform 5 random restarts. these settings are based on values that were found to work well during initial development. we use 5 stratified and randomized train/test splits when performing this hyperparameter search, with 25% of the data in the test split. prior work has found that traditional aes approaches can work well for mpt, such as random forests @xcite and recurrent neural networks @xcite . for this reason, we compare our rules-based scoring to three other conventional approaches: fine-tuned distil-bert @xcite , character n-gram random forests, and word n-gram random forests. for both random forest models, we use regression random forests with 100 trees, and 33% of the features considered at each split. we keep all n-grams that occur in more than 5% of documents at various regularization strengths and cooling rates at 25,000 annealing iterations. we also evaluated performance at 50,000 and 75,000 iterations, but performance across all three settings was similar, so we show only the results for 25,000 for clarity. error bars are 95% bootstrap confidence intervals. and in fewer than 95% of documents. for character n-grams, we consider n-grams ranging from 3 to 6 characters long. for word n-grams, we consider n-grams ranging from 1 to 4 words. we use scikit-learn's implementations of random forests and count vectorizers @xcite . for the distilbert model, we finetune all layers using the adam optimizer. we use a learning rate of 2e-5, a weight decay of 0.01, and train for 4 epochs. the training data is further split into a final training set and an evaluation set; we evaluate model performance on the evaluation set after each epoch, and we evaluate our final test-set performance on the model that achieved the best evaluation set performance. distilbert uses wordpiece tokens @xcite with a 512 token context window. all of our responses fit within this window; the longest response in our dataset is 501 tokens long. our dis-tilbert fine-tuning utilizes hugging face @xcite . for both random forests and distilbert finetuning, all hyperparameters not mentioned here were left at their default values. for each item, we create 30 stratified and randomized train/test splits, with 25% of the data in the test split, and train and evaluate all models on these splits. we evaluate model performance using both accuracy and the unweighted average recall (uar). in our operational scoring, poor performance at any scorepoint can rule out the use of a model, and uar captures this by considering the impact of poor performance at rare and common scorepoints to be equivalent. for all regression models, we generate final score predictions by rounding the model output to the nearest whole number. ## results and discussion the results of our hyperparameter grid search for simulated annealing are shown in figure 2 . we see that performance is quite robust across all hyperparameter settings tested. best performance is achieved by annealing for 25,000 iterations, with a cooling rate of 0.7 and a regularization strength of 0.5. these are the settings that we use for simulated annealing in the other experiments described in this section. the mean uar and accuracy of each model, averaging over all items and folds, is shown in figure 3 . focusing on uar, we see that the random forest using word n-grams performs noticeably worse than the other approaches. character n-gram random forests and manually crafted rules perform well. finally, we see that our annealing-based approach to automatically constructing rules performs slightly worse than the manually crafted rules, but slightly better than the distilbert model. when we compare accuracy trends, we see that our rules-based approaches perform no better than distilbert. this is due to performance at the lowest scorepoints -these tend to be common (and thus prominent in the calculation of accuracy), but the rules-based approaches tend to have slightly lower recall at the lowest scorepoint. this is not seen in the uar figures because the rules-based models tend to perform slightly better on the higher (and rarer) scorepoints. in figure 4 , we show the mean uar of each model for all items. our discussion here will focus on items 2 and 10; these items were chosen as examples where the annealing approach performs very well and very poorly, respectively. for item 2, our annealing approach performs the best out of all models. this item describes the improvement in average speed of two athletes over the course of a training regimen, and asks the students to calculate at what week of training their average speeds will be equal. the rubric contains a computation component, requiring the students to calculate the correct week, and a modeling component, requiring students to show their work in calculating their answer. the annealing process successfully constructs evidence both for identifying when the correct answer is present, and for identifying work that supports that correct answer. in contrast, for item 10, the annealing process performs quite badly. item 10 asks students to calculate the speed of a real car based on the performance of a scale model of that car. the rubric contains one computation component, for the correct final speed, as well as two modeling components, one for proper unit conversion and one for correctly scaling the speed to the full-size car. the manually crafted rules perform comparably to the character n-gram random forest for item 10, indicating that is possible for our rules-based approach to perform relatively well on this item. however, our manual rules for this item make extensive use of regular expressions, both to capture information about units and to capture notions such as the student stating in prose that they multiplied by the scaling factor. these sorts of sophisticated regular expressions are not captured by our current candidate rule generation process. the relatively lackluster performance of the distilbert model is surprising, given the dominance of transformer-based approaches in many areas of nlp. however, there is a substantial literature detailing how both recurrent and transformerbased neural models can struggle with mathematics @xcite @xcite . this literature, in combination with our results here, suggests that fine-tuning off-theshelf neural models is not a particularly powerful approach for mpt scoring. in light of these results, we conclude that our rules-based approach enables explainable automated scoring of mpt items without sacrificing performance, at the cost of requiring manual effort in designing the rules. however, we also have found that a simulated annealing-based approach to automatic rule creation can produce explainable models that are almost as effective as manually crafted rules, allowing for scalable and explainable mpt scoring. ## conclusion and future work we have presented a novel, explainable approach to scoring mpt items via handcrafted rules that performs well, and have shown that such rules can be automatically discovered through simulated annealing. while our model is able to provide explanations of its scores, generating explanations is only the first step in the full explainability process. explanations are of limited utility without the ability to convey model explanations to stakeholders such as test takers or test administrators. determining how best to use the explanations produced by our models is an important area of future work. our approach is heavily reliant on the assumption that the final score of a response is the sum of multiple binary components. for mpt items that are not structured in this way, it is unlikely that our approach would work well on its own, although it could possibly be combined with other approaches. we are actively investigating how best to extend our approach to more rubric types. the success of our annealing process ultimately relies on our ability to generate useful candidate rules. while our current process works well, we have seen that for some items, we need to be able to construct more sophisticated rules. determining how to improve the generation of our candidate pool is another promising area for future work. the dataset we used in this work is mainly composed of algebra problems. while we do have some geometry and arithmetic items, how well our approach can generalize to other mpt item types is an area of future work. in particular, our items do not cover calculus, trigonometry, or other areas that require students to extensively reason about functions.