Skip to main content
QUICK REVIEW

[论文解读] Seeking Patterns, Not just Memorizing Procedures: Contrastive Learning for Solving Math Word Problems

Zhongli Li, Wenxuan Zhang|arXiv (Cornell University)|Oct 16, 2021
Natural Language Processing TechniquesComputer Science被引用 17
一句话总结

本文提出一种对比学习方法,通过帮助模型识别潜在的数量模式而非记忆程序性线索,以提升数学应用题(MWP)求解性能。通过基于方程树结构构建对比样本,该方法使具有相似模式的问题表示更接近,而使不相似的问题表示更疏远,在单语和多语设置下均显著提升了在Math23k和MathQA上的表现。

ABSTRACT

Math Word Problem (MWP) solving needs to discover the quantitative relationships over natural language narratives. Recent work shows that existing models memorize procedures from context and rely on shallow heuristics to solve MWPs. In this paper, we look at this issue and argue that the cause is a lack of overall understanding of MWP patterns. We first investigate how a neural network understands patterns only from semantics, and observe that, if the prototype equations are the same, most problems get closer representations and those representations apart from them or close to other prototypes tend to produce wrong solutions. Inspired by it, we propose a contrastive learning approach, where the neural network perceives the divergence of patterns. We collect contrastive examples by converting the prototype equation into a tree and seeking similar tree structures. The solving model is trained with an auxiliary objective on the collected examples, resulting in the representations of problems with similar prototypes being pulled closer. We conduct experiments on the Chinese dataset Math23k and the English dataset MathQA. Our method greatly improves the performance in monolingual and multilingual settings.

研究动机与目标

  • 解决MWP模型依赖浅层启发式方法和记忆程序性步骤而非理解数量模式的问题。
  • 探究神经网络如何通过语义表示感知MWP模式,特别是BERT层中的表现。
  • 通过对比学习显式区分相似与不相似的问题模式,提升模型的泛化能力。
  • 通过利用中文和英文数据集中与语言无关的MWP模式,实现多语言迁移。
  • 证明更好的模式感知能力可带来更准确的方程生成,尤其对以往误分类的问题更为显著。

提出的方法

  • 该方法使用基于BERT的编码器提取MWP叙述的语义表示。
  • 通过将原型方程转换为树结构,并识别具有相同或相似子树结构的正样本对,构建对比样本。
  • 负样本基于操作符类型或树大小的不同进行收集,即使操作符数量相同亦如此。
  • 模型联合训练标准方程生成损失与对比学习损失,后者使相似模式表示更接近,不相似表示更疏远。
  • 对比损失在两阶段训练过程中应用,并使用可学习权重以平衡不同目标。
  • 该方法在Math23k(中文)和MathQA(英文)上进行评估,并通过多语言适配实现跨语言迁移。

实验结果

研究问题

  • RQ1当仅依赖语义表示时,神经网络如何感知MWP模式?
  • RQ2通过增强模型区分相似与不相似问题模式的能力,对比学习能否提升MWP求解性能?
  • RQ3对比学习在多语言MWP求解设置下能多大程度上提升性能?
  • RQ4应用对比学习后,模型的表示空间是否变得更加结构化且呈现聚类特征?
  • RQ5通过共享的模式理解,一种语言的数据在多大程度上能提升另一种语言的性能?

主要发现

  • 模型在Math23k和MathQA上的表现均显著提升,在单语和多语设置下均取得一致增益。
  • 对比学习后,Calinski-Harabasz指数上升,表明问题表示围绕其原型方程的聚类效果更好。
  • T-SNE可视化显示,具有相同原型方程的问题表示更加紧密聚集,而具有不同模式的问题表示则更加分散。
  • 该方法减少了对那些先前远离其原型中心表示的问题的错误预测。
  • 模型在距离区间[0.6,0.7)和[0.7,0.8)内取得了更高的准确率,表明对模糊或距离较远情况的判别能力得到改善。
  • 表7中的示例表明,对比学习纠正了关键错误,例如在速率问题中错误地应用加法而非减法操作。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。