作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (7): 63-70. doi: 10.19678/j.issn.1000-3428.0069517

• 智慧教育 • 上一篇    下一篇

基于类比学习的数学应用题求解模型

林加艺1, 夏鸿斌1,2,*(), 刘渊1,2   

  1. 1. 江南大学人工智能与计算机学院, 江苏 无锡 214122
    2. 江苏省媒体设计与软件技术重点实验室, 江苏 无锡 214122
  • 收稿日期:2024-03-08 出版日期:2024-07-15 发布日期:2024-07-09
  • 通讯作者: 夏鸿斌
  • 基金资助:
    国家自然科学基金(61972182)

Math Word Problems Solving Model Based on Analogical Learning

Jiayi LIN1, Hongbin XIA1,2,*(), Yuan LIU1,2   

  1. 1. School of Artificial Intelligence and Computer, Jiangnan University, Wuxi 214122, Jiangsu, China
    2. Jiangsu Key Laboratory of Media Design and Software Technology, Wuxi 214122, Jiangsu, China
  • Received:2024-03-08 Online:2024-07-15 Published:2024-07-09
  • Contact: Hongbin XIA

摘要:

目前基于类比学习的数学应用题(MWP)求解的研究多从语义相似度或浅层逻辑来筛选样本, 存在样本匹配度不足以及样本选取局限于数据集的问题。针对以上问题, 提出一种新的基于类比学习的数学应用题求解(MWP-AL)模型。该模型主要从2个角度对数学应用题进行类比学习。从文本编码的角度进行样本筛选, 从余弦相似度、树解顶节点以及树深度3个维度对样本进行限制。该方法从语义层面以及深层逻辑方面对样本进行选取, 得到的样本与原题的匹配度更高。从解方程的角度进行样本构建, 从方程本身出发, 针对不同类型的方程在逻辑方面对其进行变体从而构建样本。该方法不局限于从数据集中选取样本, 具有较强的泛化性。通过计算交叉熵损失函数对这2种样本进行类比学习。实验结果表明, 在2个基线模型上加入MWP-AL模型后, 其在英文数据集MathQA和中文数据集Math23K上的准确率分别提升了1.8、2.5和2.8、1.3个百分点, 同时较其他基线模型均有所提升。

关键词: 类比学习, 数学应用题求解, 语义相似度, 样本筛选, 样本构建

Abstract:

Currently, research on Math Word Problems (MWP) based on analogical learning mostly selects samples according to semantic similarity or shallow logic. These studies suffer from issues of insufficient sample matching and limited sample selection within their datasets. To address these issues, this study proposes a novel MWP with Analogical Learning (MWP-AL) model. The model mainly performs analogical learning of MWP from two perspectives. From the perspective of text encoding, samples are selected by limiting them to three dimensions: cosine similarity, tree-top nodes, and tree depth. This method selects samples from both semantic and deep logical perspectives, resulting in a better match between the obtained samples and the original question. From the perspective of solving equations, samples are constructed by logically modifying them for different types of equations. This method is not limited to selecting samples from a dataset and has strong generalization ability. Analogical learning is performed on the two samples by calculating the cross-entropy loss function. Experimental results show that adding the MWP-AL model to the two baseline models improves the accuracy of the English dataset MathQA and the Chinese dataset Math23K by 1.8, 2.5, and 2.8, respectively, and 1.3 percentage points. At the same time, the accuracy has been improved compared to other baseline models.

Key words: analogical learning, Math Word Problems(MWP) solving, semantic similarity, sample screening, sample construction