Hostname: page-component-77f85d65b8-8v9h9 Total loading time: 0 Render date: 2026-03-29T10:40:22.894Z Has data issue: false hasContentIssue false

KLAUS-Tr: Knowledge & learning-based unit focused arithmetic word problem solver for transfer cases

Published online by Cambridge University Press:  22 December 2022

Suresh Kumar*
Affiliation:
Department of Computer Science Engineering, IIT Madras, Chennai, India
P. Sreenivasa Kumar
Affiliation:
Department of Computer Science Engineering, IIT Madras, Chennai, India
*
*Corresponding author. E-mails: cs18d007@cse.iitm.ac.in, schoudhary.acad@gmail.com
Rights & Permissions [Opens in a new window]

Abstract

Solving the Arithmetic Word Problems (AWPs) using AI techniques has attracted much attention in recent years. We feel that the current AWP solvers are under-utilizing the relevant domain knowledge. We present a knowledge- and learning-based system that effectively solves AWPs of a specific type—those that involve transfer of objects from one agent to another (Transfer Cases (TC)). We represent the knowledge relevant to these problems as TC Ontology. The sentences in TC-AWPs contain information of essentially four types: before-transfer, transfer, after-transfer, and query. Our system (KLAUS-Tr) uses statistical classifier to recognize the types of sentences. The sentence types guide the information extraction process used to identify the agents, quantities, units, types of objects, and the direction of transfer from the AWP text. The extracted information is represented as an RDF graph that utilizes the TC Ontology terminology. To solve the given AWP, we utilize semantic web rule language (SWRL) rules that capture the knowledge about how object transfer affects the RDF graph of the AWP. Using the TC ontology, we also analyze if the given problem is consistent or otherwise. The different ways in which TC-AWPs can be inconsistent are encoded as SWRL rules. Thus, KLAUS-Tr can identify if the given AWP is invalid and accordingly notify the user. Since the existing datasets do not have inconsistent AWPs, we create AWPs of this type and augment the datasets. We have implemented KLAUS-Tr and tested it on TC-type AWPs drawn from the All-Arith and other datasets. We find that TC-AWPs constitute about 40% of the AWPs in a typical dataset like All-Arith. Our system achieves an impressive accuracy of 92%, thus improving the state-of-the-art significantly. We plan to extend the system to handle AWPs that contain multiple transfers of objects and also offer explanations of the solutions.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Figure 1. Example transfer case (TC) AWPs.

Figure 1

Figure 2. Existing systems (Wolfram-Alpha, Illinois Math Solver—access links at page-2 footnotes) couldn’t generate correct answers as per the query, for Example-3 (shown in part a) and Example-4 (shown in part b). However, here, we only show results of Wolfram-Alpha.

Figure 2

Figure 3. Inconsistent word problems.

Figure 3

Table 1. Comparing KLAUS-Tr against other AWP solvers; K: knowledge, L: learning, R: reasoning, I: inferences

Figure 4

Table 2. Essential axioms of TC ontology

Figure 5

Figure 4. SPARQL query searches for the creator of python programming language.

Figure 6

Figure 5. A typical example of the TC word problem and categorical representation of the sentences.

Figure 7

Figure 6. RDF representation of a good word problem using proposed vocabulary (highlighted boxes represent the inferred information).

Figure 8

Figure 7. System diagram: highlighted components refer to our key contributions.

Figure 9

Figure 8. Conceptual illustration of an example TC word problem using current modeling.

Figure 10

Algorithm 1. Pop-Onto()

Figure 11

Figure 9. Examples showing direction cases for transfer case word problems.

Figure 12

Figure 10. The $\text{R1}_{\text{i}}$ rule (above) and its explanation (below).

Figure 13

Figure 11. The $\text{R2}_{\text{i}}$ rule (left) and its explanation (right).

Figure 14

Figure 12. The $\text{R3}_{\text{i}}$ rule (above: left), an example to analyze the rule (above: right), and its explanation (below).

Figure 15

Algorithm 2. TC-AWP Solver

Figure 16

Figure 13. The $\text{R1}_{\text{c}}$ rule (left) and its explanation (right).

Figure 17

Figure 14. The $\text{R2}_{\text{c}}$ rule (above) and its explanation (below).

Figure 18

Figure 15. SPARQL query to retrieve the answer of the posed question (WP1).

Figure 19

Table 3. Sentence classification results on test data

Figure 20

Table 4. Effect of feature engineering (refer to Section 4.3 for “Custom-Features (BoW $+$ N-grams $+$ positional scores of sentences)”)

Figure 21

Table 5. Percentage of transfer cases in AWP datasets

Figure 22

Table 6. Experimental analysis of KLAUS-Tr on various datasets. All the results are on $\%$ scale