The ability to perform arithmetic tasks is a remarkable trait of human intelligence and might form a critical component of more complex reasoning tasks. In this work, we investigate if the surface form of a number has any influence on how sequence-to-sequence language models learn simple arithmetic tasks such as addition and subtraction across a wide range of values. We find that how a number is represented in its surface form has a strong influence on the model's accuracy. In particular, the model fails to learn addition of five-digit numbers when using subwords (e.g., "32"), and it struggles to learn with character-level representations (e.g., "3 2"). By introducing position tokens (e.g., "3 10e1 2"), the model learns to accurately add and subtract numbers up to 60 digits. We conclude that modern pretrained language models can easily learn arithmetic from very few examples, as long as we use the proper surface representation. This result bolsters evidence that subword tokenizers and positional encodings are components in current transformer designs that might need improvement. Moreover, we show that regardless of the number of parameters and training examples, models cannot learn addition rules that are independent of the length of the numbers seen during training. Code to reproduce our experiments is available at https://github.com/castorini/transformers-arithmetic


翻译:执行算术任务的能力是人类智能的一个显著特征, 并可能构成更复杂的推理任务的关键组成部分。 在这项工作中, 我们调查一个数字的表面形式是否对序列到序列语言模型如何学习简单的算术任务( 例如, “ 3 10e1 2 ” ) 有任何影响。 我们发现, 一个数字以其表面形式表示的方式对模型的准确性有强烈的影响。 特别是, 该模型在使用子词( 例如, “ 32” ) 时没有学到5位数的附加数字, 而它很难用字符级表示( 例如, “ 3 2 ” ) 来学习。 通过引入位置符号( 例如, “ 3 10e1 2 ” ), 模型学会准确添加和减去数字, 最多达60位数。 我们的结论是, 只要我们使用适当的表面表示法, 现代经过预先训练的语言模型很容易从几个例子中学习算算算算算。 这有利于证明子词和位置编码是当前变换设计中可能需要改进的构成部分( ) 。 此外, 我们显示, 无论有多少参数和训练模型中有多少, 都看到, 正在学习的模型的模型是独立的复制/ 。

0
下载
关闭预览

相关内容

最新《Transformers模型》教程,64页ppt
专知会员服务
276+阅读 · 2020年11月26日
MIT-深度学习Deep Learning State of the Art in 2020,87页ppt
专知会员服务
61+阅读 · 2020年2月17日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
Arxiv
5+阅读 · 2019年8月22日
Arxiv
6+阅读 · 2019年7月11日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Arxiv
5+阅读 · 2017年9月8日
VIP会员
相关VIP内容
最新《Transformers模型》教程,64页ppt
专知会员服务
276+阅读 · 2020年11月26日
MIT-深度学习Deep Learning State of the Art in 2020,87页ppt
专知会员服务
61+阅读 · 2020年2月17日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
99+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
相关资讯
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
Top
微信扫码咨询专知VIP会员