Skip to main content
QUICK REVIEW

[论文解读] Enhancing the Transformer with Explicit Relational Encoding for Math Problem Solving

Imanol Schlag, Paul Smolensky|arXiv (Cornell University)|Oct 15, 2019
Intelligent Tutoring Systems and Adaptive Learning参考文献 26被引用 37
一句话总结

本文提出 TP-Transformer,通过 TP-Attention 将张量积表示(Tensor-Product Representations) 引入到 Transformer 中,以显式编码关系结构,在 Mathematics Dataset 的数学应用题上达到最新(state-of-the-art)的结果。

ABSTRACT

We incorporate Tensor-Product Representations within the Transformer in order to better support the explicit representation of relation structure. Our Tensor-Product Transformer (TP-Transformer) sets a new state of the art on the recently-introduced Mathematics Dataset containing 56 categories of free-form math word-problems. The essential component of the model is a novel attention mechanism, called TP-Attention, which explicitly encodes the relations between each Transformer cell and the other cells from which values have been retrieved by attention. TP-Attention goes beyond linear combination of retrieved values, strengthening representation-building and resolving ambiguities introduced by multiple layers of standard attention. The TP-Transformer's attention maps give better insights into how it is capable of solving the Mathematics Dataset's challenging problems. Pretrained models and code will be made available after publication.

研究动机与目标

  • 阐明显式关系编码如何帮助神经网络模型在数学问题中进行组合性推理。
  • 开发一种使用 Tensor-Product Representations (TPRs) 编码关系结构的 Transformer 变体。
  • 证明 TP-Attention 在一个大规模、多样化的数学应用题数据集上提升了性能。

提出的方法

  • 用 TP-Multi-Head Attention 替换标准的多头注意力,并且为每个头输出一个角色/关系向量。
  • 通过张量积绑定将注意力填充(值)与关系向量绑定,收缩为 Hadamard 形式以提高效率。
  • 聚合各头的绑定以形成用于结构化成分的张量积表示。
  • 保持类似 Transformer 的编码器-解码器架构,编码器中采用 TP-Attention,解码器为标准解码器(带 TP-Attention)。
  • 在 Mathematics Dataset 上端到端训练,使用对目标序列的交叉熵监督学习。

实验结果

研究问题

  • RQ1通过 TP-Attention 的显式关系编码是否相比标准注意力在数学问题中对结构化关系的建模有提升?
  • RQ2在无需任务特定结构偏置的前提下,TP-Transformer 是否通过学习有意义的关系角色在 Mathematics Dataset 上达到最先进的准确率?
  • RQ3学习得到的关系向量和注意力图对模型在数学问题上的推理提供了哪些见解?

主要发现

  • 在 Mathematics Dataset 的 56 个问题模块上达到新的最先进准确率。
  • TP-Attention 将填充项与角色向量绑定,提供比标准注意力更清晰且可组合的表示。
  • 对学习到的角色的分析显示可解释的按结构位置聚类(如分子/分母角色),注意力图揭示诸如 second-argument-of 等关系的关系推理。
  • TP-Transformer 的单个注意力头编码了被关注状态几乎全部的信息内容,与早前关于子空间限制的说法相反。
  • TP-Transformer 解决了堆叠注意力层中的绑定问题,降低了层级表示中的结构模糊性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。